:root {
  color-scheme: light;
  --ink: #392f3b;
  --ink-soft: #6f5e6d;
  --plum: #74576f;
  --plum-dark: #5d435a;
  --paper: #fff9f4;
  --cream: #f7eadf;
  --rose: #e8b7c4;
  --rose-soft: #f7e0e5;
  --lavender: #cbbbd7;
  --lavender-soft: #eee7f2;
  --sage: #b7c8b0;
  --sage-soft: #e5eddf;
  --peach: #edc4aa;
  --peach-soft: #fae8dc;
  --gold: #b88754;
  --line: #e6c7cf;
  --shadow: rgba(79, 52, 68, 0.16);
  --stream-bg: #211827;
  --stream-bg-raised: #352640;
  --stream-grid: rgba(241, 232, 246, 0.055);
  --stream-grid-strong: rgba(241, 232, 246, 0.105);
  --stream-line: rgba(224, 205, 234, 0.22);
  --font-rounded: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--stream-bg);
  font-family: var(--font-body);
  line-height: 1.5;
}

body.dialog-open {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  padding: 10px 16px;
  color: var(--paper);
  background: var(--plum-dark);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  display: block;
  border: 1px solid rgba(117, 87, 111, 0.08);
}

.shape--rose {
  top: -130px;
  left: -110px;
  width: 410px;
  height: 360px;
  background: #9e7eae;
  border-radius: 43% 57% 62% 38% / 56% 34% 66% 44%;
  transform: rotate(12deg);
}

.shape--lavender {
  right: -150px;
  bottom: -130px;
  width: 470px;
  height: 410px;
  background: #d7c8e2;
  border-radius: 58% 42% 34% 66% / 41% 57% 43% 59%;
  transform: rotate(-18deg);
}

.shape--cream {
  top: 38%;
  right: -80px;
  width: 210px;
  height: 150px;
  background: rgba(238, 229, 244, 0.62);
  border-radius: 65% 35% 51% 49% / 50% 53% 47% 50%;
  transform: rotate(26deg);
}

.decor-paw {
  position: absolute;
  width: 76px;
  height: 76px;
  color: var(--plum);
  fill: currentColor;
  opacity: 0.1;
}

.decor-paw--one {
  top: 15%;
  right: 8%;
  transform: rotate(19deg);
}

.decor-paw--two {
  bottom: 14%;
  left: 7%;
  width: 94px;
  height: 94px;
  transform: rotate(-23deg);
}

.decor-paw--three {
  top: 57%;
  left: 15%;
  width: 52px;
  height: 52px;
  transform: rotate(36deg);
}

.stitch {
  position: absolute;
  display: block;
  width: 190px;
  height: 86px;
  border: 2px dashed rgba(116, 87, 111, 0.17);
  border-right: 0;
  border-bottom: 0;
  border-radius: 60% 0 0;
}

.stitch--one {
  top: 8%;
  left: 7%;
  transform: rotate(-15deg);
}

.stitch--two {
  right: 4%;
  bottom: 9%;
  transform: rotate(168deg);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
  place-items: center;
}

.profile-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 650px);
  padding: 20px 28px 25px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: 0 26px 70px var(--shadow), 0 5px 14px rgba(79, 52, 68, 0.08);
  animation: card-arrival 620ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.profile-card::before {
  position: absolute;
  inset: 9px;
  z-index: -1;
  content: "";
  pointer-events: none;
  border: 1px dashed rgba(167, 116, 132, 0.25);
  border-radius: 26px;
}

.profile-card::after {
  position: absolute;
  top: -45px;
  right: -55px;
  z-index: -2;
  width: 175px;
  height: 130px;
  content: "";
  background: var(--rose-soft);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 4px;
}

.mood-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 11px;
  color: var(--plum-dark);
  background: var(--cream);
  border: 1px solid #ead5c6;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mood-pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--plum);
  stroke-width: 1.4;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  background: #f8e9eb;
  border: 1px solid #e4c3cc;
  border-radius: 50%;
  place-items: center;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--plum-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button:hover {
  background: #f2dce1;
  box-shadow: 0 5px 10px rgba(85, 58, 75, 0.11);
  transform: rotate(-6deg) translateY(-1px);
}

.icon-button:active {
  box-shadow: none;
  transform: rotate(0) translateY(1px);
}

.profile-header {
  text-align: center;
}

.avatar-stage {
  position: relative;
  width: 156px;
  margin: 0 auto 15px;
}

.avatar-frame {
  padding: 7px;
  background: #f7eadf;
  border: 1px solid #ddbac2;
  border-radius: 46px;
  box-shadow: 0 10px 22px rgba(86, 58, 75, 0.14);
  transform: rotate(-1.5deg);
  animation: avatar-breathe 5s ease-in-out 1s infinite;
}

.avatar-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 39px;
}

.paper-tape {
  position: absolute;
  top: -8px;
  left: 40px;
  z-index: 2;
  width: 78px;
  height: 23px;
  background: rgba(255, 243, 220, 0.82);
  border: 1px solid rgba(189, 158, 121, 0.22);
  transform: rotate(-4deg);
  clip-path: polygon(3% 8%, 97% 0, 94% 92%, 0 100%);
}

.avatar-charm {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  width: 41px;
  height: 41px;
  color: var(--cream);
  background: var(--plum);
  border: 4px solid var(--paper);
  border-radius: 50%;
  place-items: center;
  transform: rotate(8deg);
}

.avatar-charm svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: center;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: clamp(2rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.profile-badge {
  padding: 5px 10px;
  color: var(--plum-dark);
  background: var(--lavender-soft);
  border: 1px solid #d8c8e0;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.handle {
  margin: 6px 0 0;
  color: var(--plum);
  font-size: 0.92rem;
  font-weight: 700;
}

.bio {
  max-width: 470px;
  margin: 13px auto 14px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}

.tags li {
  padding: 5px 10px;
  color: var(--plum-dark);
  background: #f3e8ea;
  border: 1px solid #e7ccd3;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tags li:nth-child(2) {
  background: var(--lavender-soft);
  border-color: #d9cae1;
}

.tags li:nth-child(3) {
  background: var(--sage-soft);
  border-color: #cddac6;
}

.link-hub {
  scroll-margin-top: 16px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 13px;
  background: #f5e9e8;
  border: 1px solid #e7ccd2;
  border-radius: 21px;
}

.tab-button {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tab-button svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.tab-button:nth-child(2) svg {
  fill: none;
}

.tab-button:nth-child(3) svg {
  fill: none;
}

.tab-button:hover {
  color: var(--plum-dark);
  background: rgba(255, 249, 244, 0.65);
}

.tab-button.is-active {
  color: var(--plum-dark);
  background: var(--paper);
  border-color: #dfbdc6;
  box-shadow: 0 4px 10px rgba(79, 52, 68, 0.09);
}

.tab-button:active {
  transform: translateY(1px);
}

.link-panel {
  display: grid;
  gap: 11px;
  animation: panel-arrival 280ms ease both;
}

.link-card {
  --link-bg: var(--rose-soft);
  --link-border: #e6bcc7;
  --icon-bg: var(--rose);
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 11px 14px 11px 12px;
  overflow: hidden;
  color: var(--ink);
  background: var(--link-bg);
  border: 1px solid var(--link-border);
  border-radius: 21px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

button.link-card:not(:disabled) {
  cursor: pointer;
}

.link-card::before {
  position: absolute;
  top: -25px;
  right: -30px;
  width: 75px;
  height: 60px;
  content: "";
  background: rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.link-card--lavender {
  --link-bg: var(--lavender-soft);
  --link-border: #d8c8e0;
  --icon-bg: var(--lavender);
}

.link-card--sage {
  --link-bg: var(--sage-soft);
  --link-border: #ccd9c7;
  --icon-bg: var(--sage);
}

.link-card--peach {
  --link-bg: var(--peach-soft);
  --link-border: #edcfbd;
  --icon-bg: var(--peach);
}

.link-card:not(.is-unavailable):hover {
  z-index: 1;
  border-color: rgba(116, 87, 111, 0.4);
  box-shadow: 0 10px 20px rgba(79, 52, 68, 0.12);
  transform: translateY(-3px) rotate(-0.15deg);
}

.link-card:not(.is-unavailable):active {
  box-shadow: 0 3px 7px rgba(79, 52, 68, 0.09);
  transform: translateY(0) scale(0.992);
}

.link-card.is-unavailable {
  cursor: not-allowed;
  opacity: 0.72;
}

.link-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  color: var(--plum-dark);
  background: var(--icon-bg);
  border: 1px solid rgba(93, 67, 90, 0.13);
  border-radius: 16px;
  place-items: center;
}

.link-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.recommendation-cover {
  overflow: hidden;
}

.recommendation-cover__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

.recommendation-cover.is-loaded .recommendation-cover__fallback {
  display: none;
}

.recommendation-cover.is-loaded .recommendation-cover__image {
  opacity: 1;
}

.recommendation-cover__fallback {
  position: relative;
  z-index: 1;
}

.link-card [href="#icon-paw"],
.link-card [href="#icon-spark"] {
  fill: rgba(93, 67, 90, 0.12);
}

.link-copy {
  min-width: 0;
}

.link-copy strong,
.link-copy small {
  display: block;
}

.link-copy strong {
  overflow: hidden;
  font-family: var(--font-rounded);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-side {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
  align-items: center;
}

.link-badge,
.availability-pill {
  padding: 4px 8px;
  color: var(--plum-dark);
  background: rgba(255, 250, 246, 0.68);
  border: 1px solid rgba(116, 87, 111, 0.17);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.availability-pill {
  position: relative;
  z-index: 1;
}

.link-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--plum-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.link-card:not(.is-unavailable):hover .link-arrow {
  transform: translateX(3px);
}

.community-stamp {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 20px;
  gap: 13px;
  align-items: center;
  min-height: 88px;
  padding: 8px 14px 8px 10px;
  margin-top: 17px;
  color: var(--ink);
  background: #f8eee6;
  border: 1px dashed #d8b9bf;
  border-radius: 22px;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.community-stamp:hover {
  background: #f4e5de;
  transform: translateY(-2px);
}

.community-stamp img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: 0.72;
}

.community-stamp strong,
.community-stamp small {
  display: block;
}

.community-stamp strong {
  font-family: var(--font-rounded);
  font-size: 0.92rem;
}

.community-stamp small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.community-stamp > svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--plum-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-footer {
  margin-top: 18px;
  color: var(--ink-soft);
  text-align: center;
}

.legal-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
}

.legal-actions button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 34px;
  padding: 5px 8px;
  color: var(--plum-dark);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-actions button:hover {
  background: var(--rose-soft);
}

.legal-actions svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-footer p {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-footer p::before,
.profile-footer p::after {
  width: 32px;
  height: 1px;
  content: "";
  background: #dfc7cd;
}

.profile-footer p svg {
  width: 18px;
  height: 18px;
  fill: var(--rose);
}

.modal {
  width: min(calc(100% - 24px), 650px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.modal--wide {
  width: min(calc(100% - 24px), 1060px);
}

.modal::backdrop {
  background: rgba(49, 39, 49, 0.64);
}

.modal[open] {
  animation: modal-arrival 220ms ease both;
}

.modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 850px);
  max-height: min(88dvh, 850px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #d8b8c1;
  border-radius: 28px;
  box-shadow: 0 24px 65px rgba(44, 33, 43, 0.28);
}

.modal-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  background: #f7e8e8;
  border-bottom: 1px solid #e4c8cf;
}

.modal-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--plum);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  line-height: 1.15;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--plum-dark);
  cursor: pointer;
  background: var(--paper);
  border: 1px solid #dcbfc7;
  border-radius: 50%;
  place-items: center;
  transition: transform 180ms ease, background-color 180ms ease;
}

.modal-close:hover {
  background: var(--rose-soft);
  transform: rotate(7deg);
}

.modal-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.modal-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-intro,
.planning-note {
  margin: 0 0 16px;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid #ead2c1;
  border-radius: 15px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.music-list {
  display: grid;
  gap: 12px;
}

.track-card {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--lavender-soft);
  border: 1px solid #d8c9df;
  border-radius: 19px;
}

.track-card:nth-child(2) {
  background: var(--rose-soft);
  border-color: #e4c0c9;
}

.track-card:nth-child(3) {
  background: var(--sage-soft);
  border-color: #cbd8c6;
}

.track-icon {
  display: grid;
  width: 45px;
  height: 45px;
  color: var(--plum-dark);
  background: rgba(255, 249, 244, 0.66);
  border-radius: 14px;
  place-items: center;
}

.track-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.track-copy {
  min-width: 0;
}

.track-copy strong,
.track-copy small {
  display: block;
}

.track-copy strong {
  font-family: var(--font-rounded);
  font-size: 0.9rem;
}

.track-copy small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.listen-button {
  min-height: 40px;
  padding: 7px 12px;
  color: var(--paper);
  cursor: pointer;
  background: var(--plum-dark);
  border: 1px solid var(--plum-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.listen-button:hover {
  background: #4d374a;
}

.spotify-slot {
  grid-column: 1 / -1;
}

.spotify-slot:empty {
  display: none;
}

.spotify-slot iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 14px;
}

.legal-content {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.legal-content h3 {
  margin: 22px 0 6px;
  color: var(--plum-dark);
  font-family: var(--font-rounded);
  font-size: 1rem;
}

.legal-content p {
  margin: 0 0 10px;
}

.legal-content a {
  color: var(--plum-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

.loading-state,
.planning-source-note {
  padding: 18px;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px dashed #d9bcae;
  border-radius: 18px;
  font-size: 0.86rem;
  text-align: center;
}

.planning-source-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  text-align: left;
}

.planning-week-header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.planning-week-header strong {
  font-family: var(--font-rounded);
  font-size: 1rem;
}

.planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  background: var(--rose);
  border-radius: 50%;
}

.legend-dot.event {
  background: var(--sage);
}

.planning-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--rose) var(--cream);
  scrollbar-width: thin;
}

.planning-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(146px, 1fr));
  gap: 9px;
  min-width: 1060px;
  padding-bottom: 8px;
}

.planning-day {
  min-height: 210px;
  padding: 11px;
  background: #f8eeec;
  border: 1px solid #e5cbd0;
  border-radius: 17px;
}

.planning-day.is-today {
  background: var(--lavender-soft);
  border-color: #cdb9d8;
}

.planning-day.has-events {
  background: var(--sage-soft);
  border-color: #c3d2bd;
}

.planning-day-head {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(116, 87, 111, 0.16);
}

.planning-day-name {
  font-family: var(--font-rounded);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.planning-day-date {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.today-pill {
  display: block;
  width: fit-content;
  padding: 3px 7px;
  margin: -3px 0 8px;
  color: var(--plum-dark);
  background: rgba(255, 249, 244, 0.72);
  border: 1px solid rgba(116, 87, 111, 0.18);
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
}

.planning-event {
  display: block;
  width: 100%;
  padding: 9px;
  margin-top: 8px;
  color: var(--ink);
  cursor: pointer;
  background: var(--paper);
  border: 1px solid #cfbcc2;
  border-radius: 13px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.planning-event:hover {
  border-color: var(--plum);
  transform: translateY(-2px);
}

.planning-event-time {
  color: var(--plum);
  font-size: 0.67rem;
  font-weight: 800;
}

.planning-event-title {
  display: block;
  margin-top: 4px;
  font-family: var(--font-rounded);
  font-size: 0.78rem;
}

.planning-event-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 7px;
  object-fit: cover;
  border-radius: 9px;
}

.no-day-event {
  display: grid;
  min-height: 126px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  place-items: center;
}

.planning-detail-panel {
  margin-bottom: 15px;
}

.planning-detail-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: var(--peach-soft);
  border: 1px solid #e5c3af;
  border-radius: 19px;
}

.planning-detail-visual {
  display: grid;
  min-height: 92px;
  overflow: hidden;
  background: rgba(255, 249, 244, 0.68);
  border-radius: 14px;
  place-items: center;
}

.planning-detail-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.planning-detail-placeholder {
  font-size: 2rem;
}

.planning-detail-info {
  padding-right: 34px;
}

.planning-detail-info h3 {
  margin: 2px 0 5px;
  font-family: var(--font-rounded);
  font-size: 1.05rem;
}

.planning-detail-kicker,
.planning-detail-date {
  color: var(--plum);
  font-size: 0.7rem;
  font-weight: 800;
}

.planning-detail-desc {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.planning-detail-actions {
  margin-top: 10px;
}

.planning-link {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 11px;
  color: var(--paper);
  background: var(--plum-dark);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.planning-detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid #d9b9ae;
  border-radius: 50%;
  place-items: center;
}

.toast {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 110;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  color: var(--paper);
  background: var(--plum-dark);
  border: 1px solid rgba(255, 249, 244, 0.22);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(57, 47, 59, 0.2);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

:focus-visible {
  outline: 3px solid var(--plum-dark);
  outline-offset: 3px;
}

@keyframes card-arrival {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-arrival {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-arrival {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes avatar-breathe {
  0%,
  100% {
    transform: rotate(-1.5deg) scale(1);
  }
  50% {
    transform: rotate(-0.5deg) scale(1.012);
  }
}

/* Couche d'interface stream gaming mate */
.paper-tape {
  display: none;
}

body {
  background-color: var(--stream-bg);
  background-image:
    linear-gradient(
      118deg,
      rgba(119, 87, 137, 0.3) 0 13%,
      transparent 13% 72%,
      rgba(82, 61, 101, 0.28) 72% 100%
    ),
    linear-gradient(var(--stream-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--stream-grid-strong) 1px, transparent 1px),
    linear-gradient(var(--stream-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--stream-grid) 1px, transparent 1px),
    linear-gradient(145deg, var(--stream-bg), var(--stream-bg-raised));
  background-size:
    100% 100%,
    144px 144px,
    144px 144px,
    36px 36px,
    36px 36px,
    100% 100%;
}

body::before {
  display: none;
}

.shape {
  border-color: rgba(224, 205, 234, 0.12);
  border-radius: 0;
}

.shape--rose {
  top: -80px;
  left: -140px;
  width: 520px;
  height: 250px;
  background: rgba(114, 83, 132, 0.32);
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
  transform: rotate(-3deg);
}

.shape--lavender {
  right: -150px;
  bottom: -100px;
  width: 540px;
  height: 280px;
  background: rgba(83, 62, 101, 0.48);
  border-radius: 0;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  transform: rotate(-4deg);
}

.shape--cream {
  top: 45%;
  right: -45px;
  width: 260px;
  height: 10px;
  background: rgba(218, 198, 229, 0.2);
  border: 0;
  border-radius: 0;
  clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
  transform: rotate(-36deg);
}

.decor-paw {
  color: #d6c2e0;
  opacity: 0.07;
}

.stitch {
  display: block;
  width: 180px;
  height: 72px;
  border: 1px solid var(--stream-line);
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.stitch--one {
  top: 30px;
  left: 30px;
  transform: none;
}

.stitch--one::after {
  position: absolute;
  top: 9px;
  left: 12px;
  color: rgba(241, 232, 246, 0.42);
  content: "WOLFY LÉGION";
  font-family: var(--font-rounded);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.stitch--two {
  right: 30px;
  bottom: 30px;
  transform: rotate(180deg);
}

.profile-card {
  border-width: 2px;
  border-radius: 26px 7px 26px 7px;
  box-shadow: 12px 12px 0 rgba(12, 8, 18, 0.22), 0 30px 74px rgba(12, 8, 18, 0.36);
}

.profile-card::before {
  inset: 10px;
  border-style: solid;
  border-color: rgba(116, 87, 111, 0.16);
  border-radius: 18px 4px 18px 4px;
}

.profile-card::after {
  top: 0;
  right: 0;
  width: 180px;
  height: 7px;
  background: linear-gradient(90deg, var(--rose), var(--lavender), var(--sage));
  border-radius: 0;
  transform: none;
}

.card-topline {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(116, 87, 111, 0.14);
}

.mood-pill {
  border-radius: 8px 2px 8px 2px;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.icon-button {
  border-radius: 11px 3px 11px 3px;
}

.icon-button:hover {
  transform: translateY(-2px);
}

.avatar-frame {
  padding: 6px;
  border-width: 2px;
  border-radius: 30px 8px 30px 8px;
  box-shadow: 7px 7px 0 rgba(116, 87, 111, 0.11);
}

.avatar-frame img {
  border-radius: 23px 4px 23px 4px;
}

.avatar-charm {
  border-radius: 11px 3px 11px 3px;
}

.name-row::before {
  flex-basis: 100%;
  width: 100%;
  color: var(--plum);
  content: "// PROFIL JOUEUR";
  font-family: var(--font-rounded);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
}

.profile-badge,
.tags li {
  border-radius: 7px 2px 7px 2px;
}

.category-tabs {
  background-color: #443849;
  background-image:
    linear-gradient(rgba(255, 249, 244, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 249, 244, 0.035) 1px, transparent 1px);
  background-size: 12px 12px;
  border-width: 2px;
  border-color: #5d435a;
  border-radius: 15px 4px 15px 4px;
}

.tab-button {
  color: #efe4ea;
  border-radius: 10px 3px 10px 3px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tab-button:hover {
  color: var(--paper);
  background: rgba(255, 249, 244, 0.08);
}

.tab-button.is-active {
  color: var(--ink);
  background: var(--paper);
  border-color: rgba(116, 87, 111, 0.38);
  box-shadow: inset 0 -3px 0 var(--plum);
}

.link-panel::before {
  grid-column: 1 / -1;
  color: var(--plum);
  content: "CHOISIR UNE DESTINATION //";
  font-family: var(--font-rounded);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.link-card {
  border-left: 4px solid var(--icon-bg);
  border-radius: 14px 4px 14px 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 44%),
    var(--link-bg);
}

.link-card::before {
  top: 0;
  right: 0;
  width: 31px;
  height: 31px;
  background: rgba(116, 87, 111, 0.12);
  border-radius: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.link-card:not(.is-unavailable):hover {
  box-shadow: 6px 6px 0 rgba(79, 52, 68, 0.1);
  transform: translateX(4px) translateY(-1px);
}

.link-icon {
  border-radius: 10px 3px 10px 3px;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.link-copy strong {
  letter-spacing: 0.012em;
}

.link-badge,
.availability-pill {
  border-radius: 6px 2px 6px 2px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.community-stamp {
  border-style: solid;
  border-width: 2px;
  border-radius: 16px 4px 16px 4px;
  background:
    linear-gradient(90deg, rgba(116, 87, 111, 0.035) 1px, transparent 1px),
    #f8eee6;
  background-size: 18px 18px;
}

.modal-card {
  border-width: 2px;
  border-radius: 22px 6px 22px 6px;
}

.modal-header {
  background-color: #f7e8e8;
  background-image: linear-gradient(90deg, rgba(116, 87, 111, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
}

.modal-close {
  border-radius: 10px 3px 10px 3px;
}

.track-card,
.planning-day,
.planning-detail-card {
  border-radius: 14px 4px 14px 4px;
}

.listen-button,
.planning-link {
  border-radius: 8px 2px 8px 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.planning-day-date,
.planning-event-time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 650px) {
  body {
    background-size:
      100% 100%,
      112px 112px,
      112px 112px,
      28px 28px,
      28px 28px,
      100% 100%;
  }

  .stitch {
    display: none;
  }

  .shape--rose {
    top: -60px;
    left: -150px;
    width: 320px;
    height: 170px;
  }

  .shape--lavender {
    right: -170px;
    width: 360px;
    height: 210px;
  }

  .shape--cream {
    display: none;
  }

  .page-shell {
    padding: 18px 13px max(22px, env(safe-area-inset-bottom));
  }

  .profile-card {
    padding: 16px 16px 20px;
    border-radius: 22px 7px 22px 7px;
  }

  .profile-card::before {
    inset: 7px;
    border-radius: 15px 3px 15px 3px;
  }

  .avatar-stage {
    width: 144px;
  }

  .paper-tape {
    left: 35px;
    width: 74px;
  }

  .avatar-frame {
    border-radius: 28px 7px 28px 7px;
  }

  .avatar-frame img {
    border-radius: 21px 3px 21px 3px;
  }

  .bio {
    margin-top: 11px;
    font-size: 0.91rem;
  }

  .tags {
    margin-bottom: 18px;
  }

  .tab-button {
    flex-direction: column;
    gap: 4px;
    min-height: 59px;
    padding: 7px 4px;
    font-size: 0.67rem;
  }

  .link-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 68px;
    padding: 10px 12px 10px 10px;
    border-radius: 13px 4px 13px 4px;
  }

  .link-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .link-badge {
    display: none;
  }

  .community-stamp {
    grid-template-columns: 62px minmax(0, 1fr) 18px;
  }

  .community-stamp img {
    width: 62px;
    height: 62px;
  }

  .modal-header {
    padding: 17px 16px 13px;
  }

  .modal-body {
    padding: 16px;
  }

  .planning-week-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .track-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .listen-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .planning-detail-card {
    grid-template-columns: 1fr;
  }

  .planning-detail-visual {
    min-height: 120px;
  }

  .profile-footer p::before,
  .profile-footer p::after {
    width: 18px;
  }

  .decor-paw--three,
  .stitch--one {
    display: none;
  }
}

@media (max-width: 360px) {
  .profile-card {
    padding-inline: 13px;
  }

  .mood-pill {
    font-size: 0.7rem;
  }

  .tab-button {
    font-size: 0.58rem;
    letter-spacing: 0;
    text-transform: none;
  }

  .link-copy small {
    font-size: 0.7rem;
  }

  .availability-pill {
    display: none;
  }

  .community-stamp {
    grid-template-columns: 52px minmax(0, 1fr) 18px;
  }

  .community-stamp img {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .profile-card,
  .link-card,
  .category-tabs,
  .tab-button,
  .icon-button,
  .modal-card,
  .community-stamp {
    border: 1px solid CanvasText;
  }
}
