/* ============================================================
   MUXU'S PIXEL BASE
   A soft pink pixel world for 木婉緒ちゃん
   ============================================================ */

@font-face {
  font-family: "ArkPixel";
  src: url("assets/ark-pixel.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffeaf4;
  --bg-deep: #ffdceb;
  --panel: #fffafd;
  --cream: #fff7e8;
  --ink: #4e2038;
  --ink-soft: #7d4d66;
  --muted: #9b6b83;
  --line: #6b3452;
  --line-soft: #b57695;
  --pink: #ff9fc8;
  --pink-bright: #f56aa8;
  --pink-deep: #d9528b;
  --pink-soft: #ffd3e6;
  --pink-pale: #ffe9f3;
  --lav: #cbb8ee;
  --lav-deep: #9a7ed1;
  --sky: #cbeaff;
  --shadow: #d998b8;
  --shadow-strong: #b7628c;
  --night: #2b1735;
  --font: "ArkPixel", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", monospace;
  --header-h: 106px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 124px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.95), transparent 30%),
    radial-gradient(circle at 92% 20%, rgba(255, 191, 219, 0.55), transparent 28%);
  background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(
    to bottom,
    rgba(94, 36, 65, 0.11) 0,
    rgba(94, 36, 65, 0.11) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: multiply;
}

::selection {
  color: var(--ink);
  background: var(--pink);
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
}

:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3000;
  padding: 10px 16px;
  border: 3px solid var(--line);
  background: var(--cream);
  box-shadow: 4px 4px 0 var(--line);
  transform: translateY(-160%);
  transition: transform 0.15s steps(2);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------------- ambient decorations ---------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-heart {
  position: absolute;
  color: rgba(238, 111, 169, 0.42);
  font-size: 22px;
  animation: ambient-float 12s steps(12) infinite;
}

.ambient-heart.h1 { left: 3%; top: 24%; animation-delay: -2s; }
.ambient-heart.h2 { right: 4%; top: 37%; font-size: 30px; animation-delay: -6s; }
.ambient-heart.h3 { left: 8%; top: 71%; font-size: 18px; color: rgba(154, 126, 209, 0.4); animation-delay: -9s; }
.ambient-heart.h4 { right: 9%; top: 82%; animation-delay: -4s; }

.ambient-star {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(238, 111, 169, 0.34);
  box-shadow: 8px 0 0 rgba(238, 111, 169, 0.2), 0 8px 0 rgba(238, 111, 169, 0.2);
  animation: blink-star 4s steps(1) infinite;
}

.ambient-star.s1 { left: 17%; top: 16%; }
.ambient-star.s2 { right: 17%; top: 62%; animation-delay: -1.3s; }
.ambient-star.s3 { left: 47%; top: 47%; animation-delay: -2.7s; }

@keyframes ambient-float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

@keyframes blink-star {
  0%, 58%, 100% { opacity: 0.8; }
  59%, 72% { opacity: 0.1; }
  73%, 86% { opacity: 0.65; }
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255, 247, 251, 0.94);
  border-bottom: 3px solid var(--line);
  box-shadow: 0 5px 0 rgba(217, 152, 184, 0.32);
  backdrop-filter: blur(8px);
}

.header-inner {
  width: min(1400px, calc(100% - 48px));
  min-height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  padding: 4px 0;
}

.brand-sprite-wrap {
  position: relative;
  width: 58px;
  height: 90px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-sprite {
  width: auto;
  height: 84px;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 rgba(163, 83, 117, 0.22));
  animation: sprite-bob 2.8s steps(2, end) infinite;
  transform-origin: center bottom;
}

.brand-sprite:hover {
  animation-play-state: paused;
}

.sprite-spark {
  position: absolute;
  top: 2px;
  right: -2px;
  color: var(--pink-bright);
  font-size: 17px;
  animation: blink-star 3.6s steps(1) infinite;
}

@keyframes sprite-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 4px;
}

.brand-logo {
  width: 198px;
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(2px 2px 0 rgba(255, 255, 255, 0.9));
}

.brand-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.brand-sub i {
  width: 4px;
  height: 4px;
  background: var(--pink-bright);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  transition: background 0.12s steps(2), transform 0.12s steps(2), box-shadow 0.12s steps(2);
}

.nav-link svg {
  width: 17px;
  height: 17px;
  color: var(--pink-deep);
}

.nav-link em {
  align-self: flex-start;
  margin-top: -5px;
  font-size: 8px;
  font-style: normal;
  color: var(--line-soft);
}

.nav-link:hover,
.nav-link.is-active {
  border-color: var(--line);
  background: var(--pink-pale);
  box-shadow: 3px 3px 0 var(--pink-soft);
  color: var(--ink);
  transform: translate(-1px, -1px);
}

.nav-link.is-active svg {
  color: var(--pink-bright);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--pink-soft);
  color: var(--ink);
  line-height: 1.2;
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2), background 0.1s steps(2);
}

.account-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--pink-soft);
  background: var(--pink-pale);
}

.account-btn.is-user {
  background: var(--pink-pale);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: var(--pink-soft);
  color: var(--pink-deep);
  overflow: hidden;
}

.account-avatar svg {
  width: 22px;
  height: 22px;
}

.account-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.account-copy small {
  max-width: 94px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  max-width: 74px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 2px solid var(--line);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--pink-soft);
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #6bc28f;
  box-shadow: 0 0 0 2px rgba(107, 194, 143, 0.25);
  animation: status-pulse 1.8s steps(2) infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.menu-toggle {
  display: none;
  width: 43px;
  height: 40px;
  padding: 8px 9px;
  border: 2px solid var(--line);
  background: var(--pink-soft);
  box-shadow: 3px 3px 0 var(--line);
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--line);
  transition: transform 0.15s steps(2), opacity 0.15s steps(2);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h));
  padding: 58px 0 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 17%, rgba(255, 252, 221, 0.9) 0 4%, transparent 4.2%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.36) 0 13%, transparent 13.2%),
    linear-gradient(180deg, #fff2f8 0%, #ffe7f2 52%, #ffdfee 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.hero-sun {
  position: absolute;
  top: 8%;
  right: 4%;
  width: 178px;
  height: 178px;
  background: #fff5c8;
  opacity: 0.66;
  clip-path: polygon(25% 0, 75% 0, 75% 6%, 88% 6%, 88% 13%, 94% 13%, 94% 25%, 100% 25%, 100% 75%, 94% 75%, 94% 88%, 88% 88%, 88% 94%, 75% 94%, 75% 100%, 25% 100%, 25% 94%, 12% 94%, 12% 88%, 6% 88%, 6% 75%, 0 75%, 0 25%, 6% 25%, 6% 13%, 12% 13%, 12% 6%, 25% 6%);
  box-shadow: 0 0 0 16px rgba(255, 245, 200, 0.2), 0 0 0 32px rgba(255, 245, 200, 0.1);
}

.hero-cloud {
  position: absolute;
  width: 92px;
  height: 26px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    14px -14px 0 rgba(255, 255, 255, 0.8),
    34px -14px 0 rgba(255, 255, 255, 0.8),
    46px 0 0 rgba(255, 255, 255, 0.8),
    -10px 9px 0 rgba(255, 255, 255, 0.5);
  opacity: 0.75;
  animation: cloud-drift 18s steps(18) infinite alternate;
}

.cloud-a { top: 18%; left: -40px; }
.cloud-b { right: 17%; bottom: 10%; transform: scale(0.7); animation-delay: -6s; opacity: 0.48; }

@keyframes cloud-drift {
  from { translate: 0 0; }
  to { translate: 38px 4px; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(400px, 0.96fr);
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 4px 4px 0 var(--pink-soft);
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.11em;
  line-height: 1.4;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--pink-bright);
  animation: blink-star 2s steps(1) infinite;
}

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 4.9vw, 70px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.9), 6px 6px 0 rgba(255, 176, 208, 0.4);
}

.hero h1 .marker {
  position: relative;
  display: inline-block;
  color: var(--pink-deep);
  z-index: 0;
}

.hero h1 .marker::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -5px;
  right: -5px;
  bottom: 4%;
  height: 33%;
  background: #ffc3dc;
  border-left: 4px solid var(--pink-bright);
  border-right: 4px solid var(--pink-bright);
}

.hero h1 .marker::after {
  content: "✦";
  position: absolute;
  top: -0.2em;
  right: -0.35em;
  color: var(--pink-bright);
  font-size: 0.3em;
  text-shadow: none;
  animation: blink-star 3s steps(1) infinite;
}

.lede {
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 2.05;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 19px;
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2), background 0.1s steps(2);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--shadow);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.btn-primary {
  background: var(--pink);
  color: #40182e;
}

.btn-primary:hover {
  background: #ffb0d2;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.76);
}

.btn-cream {
  background: var(--cream);
}

.btn-full {
  width: 100%;
}

.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  width: fit-content;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 4px 4px 0 var(--pink-soft);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 105px;
  padding: 11px 15px;
  border-right: 2px dashed #d7a3bb;
}

.hero-stats li:last-child {
  border-right: 0;
}

.hero-stats strong {
  color: var(--pink-deep);
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* hero visual */

.hero-visual {
  position: relative;
  min-height: 590px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.scene-window {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  border: 4px solid var(--line);
  background: var(--panel);
  box-shadow: 10px 10px 0 rgba(155, 68, 107, 0.18);
  transform: rotate(0.7deg);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 36px;
  padding: 0 11px;
  border-bottom: 3px solid var(--line);
  background: var(--line);
  color: #ffe8f3;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border: 1px solid #ffe8f3;
  background: var(--pink);
}

.window-dots i:nth-child(2) { background: #ffd66f; }
.window-dots i:nth-child(3) { background: #8fe3b1; }

.window-name {
  opacity: 0.78;
}

.window-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffd6e8;
  white-space: nowrap;
}

.window-live i {
  width: 5px;
  height: 5px;
  background: #8fe3b1;
  animation: status-pulse 1.6s steps(2) infinite;
}

.window-scene {
  position: relative;
  height: 540px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, #ffd8eb 0%, #ffc3df 47%, #ffacd0 100%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}

.window-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), transparent 28%);
  pointer-events: none;
}

.scene-sky-deco {
  position: absolute;
  inset: 0;
}

.pixel-moon {
  position: absolute;
  top: 38px;
  right: 34px;
  width: 74px;
  height: 74px;
  background: #fff7c9;
  border: 3px solid #c5789a;
  box-shadow: inset -10px -10px 0 #ffe79a, 6px 6px 0 rgba(183, 98, 140, 0.18);
  clip-path: polygon(25% 0, 75% 0, 75% 6%, 88% 6%, 88% 13%, 94% 13%, 94% 25%, 100% 25%, 100% 75%, 94% 75%, 94% 88%, 88% 88%, 88% 94%, 75% 94%, 75% 100%, 25% 100%, 25% 94%, 12% 94%, 12% 88%, 6% 88%, 6% 75%, 0 75%, 0 25%, 6% 25%, 6% 13%, 12% 13%, 12% 6%, 25% 6%);
}

.scene-star {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff8fc;
  box-shadow: 7px 0 0 rgba(255, 248, 252, 0.7), 0 7px 0 rgba(255, 248, 252, 0.5);
  animation: blink-star 3.4s steps(1) infinite;
}

.scene-star.st1 { top: 66px; left: 54px; }
.scene-star.st2 { top: 124px; left: 32%; animation-delay: -1.1s; transform: scale(0.7); }
.scene-star.st3 { top: 86px; right: 140px; animation-delay: -2.2s; }
.scene-star.st4 { top: 176px; right: 54px; transform: scale(0.55); animation-delay: -0.6s; }

.scene-cloud {
  position: absolute;
  width: 72px;
  height: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 11px -11px 0 rgba(255, 255, 255, 0.66), 27px -11px 0 rgba(255, 255, 255, 0.66), 38px 0 0 rgba(255, 255, 255, 0.66);
  animation: scene-cloud 14s steps(14) infinite alternate;
}

.scene-cloud.sc1 { top: 140px; left: 32px; }
.scene-cloud.sc2 { top: 220px; right: 22px; transform: scale(0.62); animation-delay: -5s; opacity: 0.55; }

@keyframes scene-cloud {
  from { translate: 0 0; }
  to { translate: 16px 3px; }
}

.speech-bubble {
  position: absolute;
  z-index: 6;
  top: 196px;
  left: 28px;
  padding: 10px 13px;
  border: 3px solid var(--line);
  background: #fffafd;
  box-shadow: 4px 4px 0 rgba(154, 77, 111, 0.28);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
  transform: rotate(-2deg);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -11px;
  width: 11px;
  height: 11px;
  border-right: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: #fffafd;
  transform: rotate(45deg);
}

.speech-bubble b {
  color: var(--pink-bright);
  font-weight: 400;
}

.scene-character {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 66px;
  display: flex;
  align-items: flex-end;
  transform: translateX(-50%);
}

.hero-sprite {
  width: 196px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(6px 6px 0 rgba(141, 65, 98, 0.14));
  animation: sprite-bob 3.2s steps(2, end) infinite;
}

.scene-cat {
  width: 58px;
  height: auto;
  margin-left: -16px;
  margin-bottom: 3px;
  image-rendering: pixelated;
  animation: cat-hop 2.4s steps(2, end) infinite;
}

@keyframes cat-hop {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-4px); }
}

.scene-ground {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  border-top: 4px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 50%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.2) 50%, transparent 50%),
    #f79cc4;
  background-size: 24px 24px, 24px 24px, auto;
}

.scene-ground::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 7px;
  background: #ffd2e5;
  border-top: 3px solid var(--line);
  border-bottom: 2px dashed #ca6d94;
}

.scene-ground::after {
  content: "";
  position: absolute;
  top: 37px;
  left: 8%;
  width: 12px;
  height: 12px;
  background: #ffe8b3;
  box-shadow: 300px 15px 0 #ffe8b3, 350px -5px 0 #ffd0e4;
}

.ground-flower {
  position: absolute;
  z-index: 2;
  color: #fff7d3;
  font-size: 13px;
  text-shadow: 1px 1px 0 #a54f75;
}

.ground-flower.f1 { left: 14%; top: 34px; }
.ground-flower.f2 { right: 15%; top: 47px; font-size: 10px; }
.ground-flower.f3 { right: 32%; top: 21px; color: #fff; font-size: 10px; }

.scene-caption {
  position: absolute;
  z-index: 6;
  bottom: 9px;
  left: 11px;
  right: 11px;
  display: flex;
  justify-content: space-between;
  color: rgba(78, 32, 56, 0.7);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.float-card {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 3px solid var(--line);
  background: #fffafd;
  box-shadow: 5px 5px 0 rgba(155, 68, 107, 0.2);
  font-size: 10px;
  line-height: 1.4;
}

.float-card small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.float-card strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.float-card strong i {
  color: var(--pink-deep);
  font-style: normal;
}

.float-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--pink-soft);
  border: 2px solid var(--line);
  color: var(--pink-deep);
}

.float-icon svg {
  width: 16px;
  height: 16px;
}

.float-message {
  top: 58px;
  left: -36px;
  transform: rotate(-3deg);
}

.float-music {
  right: -30px;
  bottom: 92px;
  transform: rotate(2deg);
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  margin-left: 4px;
}

.mini-bars i {
  width: 3px;
  background: var(--pink-bright);
  animation: mini-bar 0.8s steps(4) infinite alternate;
}

.mini-bars i:nth-child(1) { height: 8px; animation-delay: -0.2s; }
.mini-bars i:nth-child(2) { height: 19px; animation-delay: -0.6s; }
.mini-bars i:nth-child(3) { height: 13px; animation-delay: -0.4s; }
.mini-bars i:nth-child(4) { height: 23px; animation-delay: -0.8s; }

@keyframes mini-bar {
  from { height: 4px; }
  to { height: 22px; }
}

.hero-sticker {
  position: absolute;
  z-index: 7;
  color: var(--pink-bright);
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(183, 98, 140, 0.25);
  animation: ambient-float 5s steps(5) infinite;
}

.sticker-star {
  top: 12px;
  right: 20px;
  font-size: 35px;
}

.sticker-heart {
  left: 16px;
  bottom: 20px;
  font-size: 28px;
  animation-delay: -2s;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.16em;
  transform: translateX(-50%);
}

.scroll-cue i {
  width: 12px;
  height: 19px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  position: relative;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 2px;
  height: 5px;
  background: var(--pink-deep);
  animation: scroll-dot 1.6s steps(3) infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(7px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------------- marquee ---------------- */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: var(--line);
  color: #ffe8f3;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-track span {
  display: inline-block;
  padding: 10px 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.marquee-track b {
  margin: 0 23px;
  color: var(--pink);
  font-weight: 400;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- shared section ---------------- */

.section {
  position: relative;
  z-index: 1;
  padding: 108px 0 116px;
}

.section-head {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  margin-bottom: 48px;
}

.section-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 82px;
  height: 82px;
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--pink-soft);
  color: var(--ink);
}

.section-number span {
  font-size: 25px;
  line-height: 1;
}

.section-number svg {
  width: 23px;
  height: 23px;
  color: var(--pink-deep);
}

.kicker {
  margin-bottom: 8px;
  color: var(--pink-deep);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.section-heading h2 {
  margin-bottom: 11px;
  font-size: clamp(30px, 3.2vw, 45px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-desc {
  margin-bottom: 0;
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.95;
}

.section-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 13px;
  padding-top: 6px;
}

.pixel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--pink-soft);
  font-size: 9px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.pixel-badge i {
  width: 6px;
  height: 6px;
  background: #6bc28f;
}

.hand-note {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
  transform: rotate(-2deg);
}

.pixel-panel {
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 7px 7px 0 rgba(122, 63, 92, 0.15);
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 6px 13px;
  border-bottom: 2px solid var(--line);
  background: var(--pink-pale);
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.08em;
}

[data-reveal] {
  transition: opacity 0.5s steps(6), transform 0.5s steps(6);
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- message box ---------------- */

.section-messages {
  background:
    radial-gradient(circle at 96% 16%, rgba(255, 187, 216, 0.4), transparent 24%),
    radial-gradient(circle at 3% 88%, rgba(203, 184, 238, 0.24), transparent 20%),
    #fff8fc;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.45fr);
  gap: 28px;
  align-items: start;
}

.note-form {
  padding-bottom: 20px;
}

.form-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 22px 20px;
}

.form-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 2px solid var(--line);
  background: var(--pink-soft);
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--pink-deep);
  flex-shrink: 0;
}

.form-icon svg {
  width: 22px;
  height: 22px;
}

.form-heading h3 {
  margin-bottom: 2px;
  font-size: 20px;
  line-height: 1.4;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.form-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 22px 14px;
  padding: 7px 9px;
  border: 2px dashed var(--line-soft);
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.form-identity.is-logged {
  border-style: solid;
  background: var(--pink-pale);
  color: var(--ink-soft);
}

.identity-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: #c59aad;
}

.form-identity.is-logged .identity-dot {
  background: #6bc28f;
  box-shadow: 0 0 0 2px rgba(107, 194, 143, 0.18);
}

.identity-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.identity-action {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pink-deep);
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.identity-action:hover {
  color: var(--line);
}

.field-label {
  display: block;
  margin: 0 22px 7px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.pixel-input {
  display: block;
  width: calc(100% - 44px);
  margin: 0 22px 16px;
  padding: 11px 13px;
  border: 3px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 3px 3px 0 var(--pink-soft);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  transition: box-shadow 0.1s steps(2), border-color 0.1s steps(2);
}

.pixel-input::placeholder {
  color: #bd8ca4;
  opacity: 1;
}

.pixel-input:focus {
  outline: none;
  border-color: var(--pink-deep);
  box-shadow: 3px 3px 0 var(--pink);
}

.textarea-wrap {
  position: relative;
}

.textarea-wrap .pixel-input {
  min-height: 138px;
  padding-bottom: 27px;
  resize: vertical;
}

.char-count {
  position: absolute;
  right: 32px;
  bottom: 24px;
  color: var(--muted);
  font-size: 9px;
  pointer-events: none;
}

.mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 22px 18px;
}

.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 2px solid var(--line-soft);
  background: #fff;
  font-size: 10px;
  line-height: 1.4;
  transition: transform 0.1s steps(2), background 0.1s steps(2), box-shadow 0.1s steps(2);
}

.mood-chip span {
  color: var(--pink-deep);
}

.mood-chip:hover {
  transform: translateY(-2px);
  box-shadow: 2px 2px 0 var(--pink-soft);
}

.mood-chip.is-active {
  border-color: var(--line);
  background: var(--pink-soft);
  box-shadow: 2px 2px 0 var(--line-soft);
}

.note-form .btn {
  width: calc(100% - 44px);
  margin: 0 22px;
}

.field-error {
  margin: -8px 22px 13px;
  color: #c02d5b;
  font-size: 10px;
  line-height: 1.6;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 14px 22px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.privacy-note svg {
  width: 14px;
  height: 14px;
  color: var(--pink-deep);
  flex-shrink: 0;
  margin-top: 1px;
}

.board-wrap {
  border: 3px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    var(--pink-pale);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: 7px 7px 0 rgba(122, 63, 92, 0.15);
  padding: 20px;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px dashed #dda8c0;
}

.board-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-dot {
  width: 9px;
  height: 9px;
  background: var(--pink-bright);
  box-shadow: 0 0 0 3px var(--pink-soft);
}

.board-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.board-count {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.board-sort {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.message-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  min-height: 230px;
}

.message-note {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 29px 16px 12px;
  border: 2px solid var(--line);
  background: var(--note-bg, #fff);
  box-shadow: 4px 4px 0 rgba(122, 63, 92, 0.15);
  transform: rotate(var(--rot, -0.8deg));
  transition: transform 0.14s steps(3), box-shadow 0.14s steps(3);
  animation: note-drop 0.32s steps(4) both;
}

.message-note:nth-child(2n) {
  --rot: 0.7deg;
}

.message-note:nth-child(3n) {
  --rot: -1.1deg;
}

.message-note:hover {
  z-index: 2;
  transform: rotate(0) translateY(-3px);
  box-shadow: 7px 7px 0 rgba(122, 63, 92, 0.14);
}

.message-note::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 54px;
  height: 13px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(122, 63, 92, 0.2);
  transform: translateX(-50%) rotate(-1deg);
}

@keyframes note-drop {
  from { opacity: 0; transform: translateY(-10px) rotate(var(--rot)); }
  to { opacity: 1; transform: translateY(0) rotate(var(--rot)); }
}

.note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.note-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.note-avatar svg {
  width: 23px;
  height: 23px;
}

.note-author {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.note-author strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-author time {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.note-mood {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 8px;
  white-space: nowrap;
}

.note-body {
  margin: 0 0 13px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.note-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(122, 63, 92, 0.24);
}

.note-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.note-like svg {
  width: 12px;
  height: 12px;
  color: var(--pink-deep);
}

.note-like:hover svg,
.note-like.is-liked svg {
  color: var(--pink-bright);
}

.note-like.is-liked {
  color: var(--pink-deep);
}

.board-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 230px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.board-empty span {
  font-size: 30px;
  color: var(--pink);
}

.board-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 17px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.board-foot span {
  color: var(--pink-bright);
}

/* ---------------- gifts ---------------- */

.section-gifts {
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.36) 50%, transparent 50%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.36) 50%, transparent 50%),
    #ffddea;
  background-size: 28px 28px, 28px 28px, auto;
}

.section-gifts .section-number {
  background: #fff6fb;
}

.gift-counter b {
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 400;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 900px;
  margin-inline: auto;
}

.gift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px 16px;
  border: 3px solid var(--line);
  background: #fff9fd;
  box-shadow: 6px 6px 0 rgba(122, 63, 92, 0.16);
  text-align: center;
  transition: transform 0.13s steps(3), box-shadow 0.13s steps(3), background 0.13s steps(3);
}

.gift-card::before {
  content: "GIFT " attr(data-number);
  position: absolute;
  top: 7px;
  left: 9px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.gift-card::after {
  content: "OPENED ✓";
  position: absolute;
  top: 12px;
  right: -8px;
  padding: 3px 6px;
  border: 1px solid var(--pink-deep);
  background: var(--pink-pale);
  color: var(--pink-deep);
  font-size: 7px;
  letter-spacing: 0.04em;
  transform: rotate(5deg);
  opacity: 0;
  transition: opacity 0.15s steps(2);
}

.gift-card.is-open::after {
  opacity: 1;
}

.gift-card:hover,
.gift-card:focus-visible {
  transform: translate(-3px, -4px);
  box-shadow: 10px 10px 0 rgba(122, 63, 92, 0.14);
  background: #fffdfe;
}

.gift-card:focus-visible {
  outline-offset: 4px;
}

.gift-box-art {
  position: relative;
  width: 120px;
  height: 110px;
  margin-top: 4px;
  border: 3px solid var(--line);
  background: var(--box, #ffb4d3);
  box-shadow: 5px 5px 0 rgba(122, 63, 92, 0.19);
}

.gift-box-art::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: -14px;
  left: -10px;
  width: calc(100% + 20px);
  height: 29px;
  border: 3px solid var(--line);
  background: var(--lid, #ff8cba);
}

.gift-box-art::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 15px 0 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 8px), var(--ribbon, #fff1a6) calc(50% - 8px), var(--ribbon, #fff1a6) calc(50% + 8px), transparent calc(50% + 8px)),
    linear-gradient(180deg, transparent calc(50% - 7px), var(--ribbon, #fff1a6) calc(50% - 7px), var(--ribbon, #fff1a6) calc(50% + 7px), transparent calc(50% + 7px));
  border-top: 2px solid rgba(255, 255, 255, 0.4);
}

.box-bow {
  position: absolute;
  z-index: 6;
  top: -31px;
  left: 50%;
  width: 58px;
  height: 26px;
  transform: translateX(-50%);
}

.box-bow::before,
.box-bow::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 28px;
  height: 20px;
  border: 3px solid var(--line);
  background: var(--ribbon, #fff1a6);
}

.box-bow::before {
  left: 0;
  transform: rotate(-8deg);
}

.box-bow::after {
  right: 0;
  transform: rotate(8deg);
}

.box-bow i {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  background: var(--ribbon, #fff1a6);
  transform: translateX(-50%);
}

.box-shine {
  position: absolute;
  z-index: 5;
  top: 27px;
  left: 12px;
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 10px 0 0 rgba(255, 255, 255, 0.35);
}

.gift-name {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.gift-state {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.gift-card:hover .gift-box-art {
  animation: gift-wiggle 0.35s steps(4) infinite;
}

@keyframes gift-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

.gift-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.gift-hint svg {
  width: 14px;
  height: 14px;
  color: var(--pink-deep);
}

/* ---------------- playlist ---------------- */

.section-playlist {
  background:
    radial-gradient(circle at 5% 20%, rgba(203, 184, 238, 0.4), transparent 26%),
    radial-gradient(circle at 94% 84%, rgba(255, 177, 210, 0.38), transparent 25%),
    #fdf6ff;
}

.music-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 27px;
  align-items: stretch;
}

.player {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.player-top {
  display: flex;
  gap: 22px;
  padding: 22px;
}

.album-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 216px;
  height: 216px;
  flex: 0 0 216px;
  border: 3px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 50%),
    var(--pink);
  box-shadow: 5px 5px 0 rgba(122, 63, 92, 0.18);
  transition: background 0.3s steps(3);
}

.album-art::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px dashed rgba(78, 32, 56, 0.3);
  pointer-events: none;
}

.album-sticker {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 3;
  padding: 4px 6px;
  border: 2px solid var(--line);
  background: #fff7d6;
  color: var(--ink);
  font-size: 7px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  transform: rotate(-5deg);
}

.album-note {
  position: absolute;
  right: 17px;
  bottom: 11px;
  color: rgba(78, 32, 56, 0.5);
  font-size: 24px;
}

.cassette {
  position: relative;
  z-index: 2;
  width: 150px;
  height: 102px;
  border: 3px solid var(--line);
  background: #6c3654;
  box-shadow: 5px 5px 0 rgba(78, 32, 56, 0.22);
  transform: rotate(-2deg);
}

.cassette::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  height: 31px;
  border: 2px solid #442238;
  background: #ffd9e8;
}

.cassette-label {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  right: 13px;
  color: var(--line);
  font-size: 8px;
  text-align: center;
  letter-spacing: 0.05em;
}

.cassette-label b {
  color: var(--pink-deep);
  font-weight: 400;
}

.cassette-window {
  position: absolute;
  top: 47px;
  left: 27px;
  right: 27px;
  height: 36px;
  border: 2px solid #351a2a;
  background: #f8d9e8;
}

.reel {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff6fb;
  transform: translateY(-50%);
}

.reel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.reel-l { left: 14px; }
.reel-r { right: 14px; }

.player.is-playing .reel {
  animation: reel-spin 2.2s linear infinite;
}

@keyframes reel-spin {
  to { rotate: 360deg; }
}

.cassette-teeth {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 34px;
  height: 5px;
  background: repeating-linear-gradient(90deg, #f3b8d0 0 4px, transparent 4px 7px);
  transform: translateX(-50%);
}

.now-playing {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--pink-deep);
  font-size: 9px;
  letter-spacing: 0.09em;
  line-height: 1.4;
}

.playing-dot {
  width: 7px;
  height: 7px;
  background: var(--pink-bright);
  animation: status-pulse 1.4s steps(2) infinite;
}

.play-state {
  margin-left: auto;
  color: var(--muted);
  font-size: 7px;
}

.now-playing h3 {
  margin-bottom: 5px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.track-sub {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  margin-bottom: 12px;
}

.visualizer i {
  display: block;
  flex: 1;
  height: 12%;
  min-height: 3px;
  background: var(--pink-bright);
  box-shadow: 0 -4px 0 rgba(255, 255, 255, 0.28) inset;
  transition: height 0.08s steps(2);
}

.visualizer i:nth-child(3n) { background: var(--lav); }
.visualizer i:nth-child(4n) { background: #ffc76e; }

.synth-note {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 22px;
  color: var(--muted);
  font-size: 9px;
}

.seek-range,
#volume {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  background: transparent;
  cursor: pointer;
}

.seek-range {
  flex: 1;
}

.seek-range::-webkit-slider-runnable-track {
  height: 10px;
  border: 2px solid var(--line);
  background: var(--pink-pale);
}

.seek-range::-moz-range-track {
  height: 8px;
  border: 2px solid var(--line);
  background: var(--pink-pale);
}

.seek-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 20px;
  margin-top: -7px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--pink);
}

.seek-range::-moz-range-thumb {
  width: 10px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--pink);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px 22px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-btn {
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--ink);
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2), background 0.1s steps(2);
}

.player-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow);
  background: var(--pink-pale);
}

.player-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.player-btn.small {
  width: 39px;
  height: 39px;
}

.player-btn.small svg {
  width: 16px;
  height: 16px;
}

.play-btn {
  width: 53px;
  height: 53px;
  background: var(--pink);
}

.play-btn svg {
  width: 21px;
  height: 21px;
}

.play-btn .icon-pause {
  display: none;
}

.player.is-playing .play-btn .icon-play {
  display: none;
}

.player.is-playing .play-btn .icon-pause {
  display: block;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.volume-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
}

#volume {
  width: 90px;
}

#volume::-webkit-slider-runnable-track {
  height: 7px;
  border: 2px solid var(--line);
  background: var(--pink-pale);
}

#volume::-moz-range-track {
  height: 5px;
  border: 2px solid var(--line);
  background: var(--pink-pale);
}

#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 15px;
  margin-top: -6px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--pink);
}

#volume::-moz-range-thumb {
  width: 9px;
  height: 13px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--pink);
}

.playlist-panel {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

.playlist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 2px dashed #dda8c0;
}

.playlist-label {
  color: var(--pink-deep);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.playlist-head h3 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.4;
}

.playlist-total {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: right;
  white-space: nowrap;
}

.playlist-total b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.track-list {
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  flex: 1;
}

.track-item {
  margin: 0;
}

.track-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 8px;
  border: 2px solid transparent;
  background: transparent;
  text-align: left;
  transition: background 0.1s steps(2), border-color 0.1s steps(2), transform 0.1s steps(2);
}

.track-row:hover {
  border-color: var(--line-soft);
  background: #fff;
  transform: translateX(2px);
}

.track-item.is-active .track-row {
  border-color: var(--line);
  background: var(--pink-pale);
}

.track-index {
  color: var(--muted);
  font-size: 10px;
}

.track-item.is-active .track-index {
  color: var(--pink-deep);
}

.track-title-wrap {
  min-width: 0;
}

.track-title-wrap strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-title-wrap small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-item.is-active .track-title-wrap strong {
  color: var(--ink);
}

.track-bpm {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.track-duration {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.track-duration svg {
  width: 10px;
  height: 10px;
  opacity: 0;
  color: var(--pink-deep);
}

.track-item.is-active .track-duration svg {
  opacity: 1;
}

.playlist-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 2px solid var(--line);
  background: var(--pink-pale);
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.04em;
}

/* ---------------- voyage ---------------- */

.section-voyage {
  z-index: 2;
  border-top: 4px solid #1d0e25;
  border-bottom: 4px solid #1d0e25;
  padding-bottom: 122px;
  color: #fff4fa;
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 106, 168, 0.2), transparent 24%),
    radial-gradient(circle at 88% 78%, rgba(203, 184, 238, 0.16), transparent 27%),
    linear-gradient(160deg, #2a1534 0%, #3d1f45 45%, #2a1534 100%);
  overflow: hidden;
}

.voyage-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.voyage-stars i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: rgba(255, 220, 239, 0.8);
  box-shadow: 7px 0 0 rgba(255, 220, 239, 0.25), 0 7px 0 rgba(255, 220, 239, 0.2);
  animation: blink-star 3.8s steps(1) infinite;
}

.voyage-stars i:nth-child(1) { top: 7%; left: 4%; }
.voyage-stars i:nth-child(2) { top: 22%; left: 17%; animation-delay: -0.7s; transform: scale(0.7); }
.voyage-stars i:nth-child(3) { top: 9%; left: 41%; animation-delay: -1.5s; }
.voyage-stars i:nth-child(4) { top: 27%; left: 69%; animation-delay: -2.1s; transform: scale(0.6); }
.voyage-stars i:nth-child(5) { top: 11%; left: 88%; animation-delay: -1.1s; }
.voyage-stars i:nth-child(6) { top: 46%; left: 91%; animation-delay: -2.6s; transform: scale(0.7); }
.voyage-stars i:nth-child(7) { top: 68%; left: 7%; animation-delay: -1.8s; }
.voyage-stars i:nth-child(8) { top: 83%; left: 32%; animation-delay: -0.3s; transform: scale(0.5); }
.voyage-stars i:nth-child(9) { top: 73%; left: 52%; animation-delay: -2.3s; }
.voyage-stars i:nth-child(10) { top: 59%; left: 77%; animation-delay: -1.3s; transform: scale(0.7); }
.voyage-stars i:nth-child(11) { top: 89%; left: 85%; animation-delay: -0.9s; }
.voyage-stars i:nth-child(12) { top: 37%; left: 47%; animation-delay: -3.1s; transform: scale(0.5); }

.section-head-light .section-number {
  border-color: #ffd5e7;
  background: #43234d;
  box-shadow: 5px 5px 0 #1a0d21;
  color: #fff4fa;
}

.section-head-light .section-number svg {
  color: var(--pink);
}

.section-head-light .kicker {
  color: var(--pink);
}

.section-head-light .section-desc {
  color: rgba(255, 233, 244, 0.7);
}

.section-head-light .hand-note {
  color: rgba(255, 221, 237, 0.58);
}

.pixel-badge-light {
  border-color: #ffd5e7;
  background: #43234d;
  box-shadow: 3px 3px 0 #1a0d21;
  color: #ffe5f1;
}

.voyage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.78fr);
  gap: 26px;
  align-items: stretch;
}

.map-panel {
  border: 3px solid #140a19;
  background: #46274f;
  box-shadow: 8px 8px 0 #160b1c;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 13px;
  border-bottom: 2px solid #140a19;
  background: #24132c;
  color: rgba(255, 231, 243, 0.8);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.map-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-name svg {
  width: 15px;
  height: 15px;
  color: var(--pink);
}

.map-weather {
  color: rgba(255, 215, 235, 0.62);
  white-space: nowrap;
}

.sea-map {
  position: relative;
  height: clamp(380px, 34vw, 470px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 216, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 216, 235, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #5d3267 0%, #4b2857 43%, #351b44 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

.sea-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(255, 206, 230, 0.06) 17px 19px, transparent 19px 31px);
  pointer-events: none;
}

.map-horizon {
  position: absolute;
  top: 36%;
  left: 0;
  right: 0;
  border-top: 2px dashed rgba(255, 205, 231, 0.25);
}

.map-moon {
  position: absolute;
  top: 28px;
  right: 76px;
  width: 58px;
  height: 58px;
  background: #ffeab5;
  border: 2px solid #a65f84;
  box-shadow: 0 0 35px rgba(255, 234, 181, 0.24), inset -8px -8px 0 #ffd98e;
  clip-path: polygon(25% 0, 75% 0, 75% 6%, 88% 6%, 88% 13%, 94% 13%, 94% 25%, 100% 25%, 100% 75%, 94% 75%, 94% 88%, 88% 88%, 88% 94%, 75% 94%, 75% 100%, 25% 100%, 25% 94%, 12% 94%, 12% 88%, 6% 88%, 6% 75%, 0 75%, 0 25%, 6% 25%, 6% 13%, 12% 13%, 12% 6%, 25% 6%);
}

.map-star {
  position: absolute;
  z-index: 1;
  width: 4px;
  height: 4px;
  background: #ffe7f3;
  box-shadow: 0 0 0 3px rgba(255, 231, 243, 0.08);
  animation: blink-star 3.1s steps(1) infinite;
}

.map-star.ms1 { top: 15%; left: 9%; }
.map-star.ms2 { top: 21%; left: 54%; animation-delay: -0.8s; }
.map-star.ms3 { top: 10%; left: 72%; animation-delay: -1.4s; }
.map-star.ms4 { top: 51%; left: 26%; animation-delay: -2.2s; }
.map-star.ms5 { top: 39%; left: 89%; animation-delay: -0.4s; }

.sea-route {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.island {
  position: absolute;
  z-index: 4;
  left: var(--x);
  top: var(--y);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffeaf4;
  transform: translate(-50%, -50%);
  transition: filter 0.15s steps(2);
}

.island:hover {
  filter: brightness(1.16);
}

.island-art {
  width: 74px;
  height: 47px;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 0 rgba(16, 7, 21, 0.26));
  transition: transform 0.15s steps(3);
}

.island:hover .island-art {
  transform: translateY(-4px);
}

.island-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 222, 238, 0.48);
  background: rgba(35, 16, 44, 0.72);
  color: rgba(255, 234, 245, 0.8);
  font-size: 8px;
  line-height: 1.5;
  white-space: nowrap;
  transition: background 0.15s steps(2), color 0.15s steps(2);
}

.island-label b {
  color: var(--pink);
  font-size: 7px;
  font-weight: 400;
}

.island.is-active .island-art {
  animation: island-float 2.8s steps(3) infinite;
  filter: drop-shadow(0 0 13px rgba(255, 182, 213, 0.42)) drop-shadow(0 5px 0 rgba(16, 7, 21, 0.26));
}

.island.is-active .island-label {
  border-color: #ffd6e8;
  background: #ffdcec;
  color: var(--line);
}

.island.is-active .island-label b {
  color: var(--pink-deep);
}

@keyframes island-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.island-pin {
  position: absolute;
  top: -17px;
  right: 7px;
  color: #ffe38f;
  font-size: 14px;
  text-shadow: 0 0 8px rgba(255, 227, 143, 0.75);
  animation: blink-star 2.4s steps(1) infinite;
}

.ship-wrap {
  position: absolute;
  z-index: 5;
  left: var(--x);
  top: var(--y);
  width: 88px;
  transform: translate(-50%, -50%);
  transition: left 1.25s cubic-bezier(0.45, 0.05, 0.55, 0.95), top 1.25s cubic-bezier(0.45, 0.05, 0.55, 0.95);
  filter: drop-shadow(0 7px 0 rgba(15, 6, 19, 0.25));
}

.ship-wrap img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  animation: ship-bob 2.3s steps(2) infinite;
}

@keyframes ship-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

.ship-trail {
  position: absolute;
  left: -20px;
  bottom: 2px;
  display: flex;
  gap: 5px;
}

.ship-trail i {
  width: 5px;
  height: 5px;
  background: rgba(255, 218, 238, 0.55);
  animation: wake 1.8s steps(3) infinite;
}

.ship-trail i:nth-child(2) { animation-delay: -0.5s; opacity: 0.7; }
.ship-trail i:nth-child(3) { animation-delay: -1s; opacity: 0.45; }

@keyframes wake {
  0% { transform: translateX(0) scale(1); opacity: 0.7; }
  100% { transform: translateX(-16px) scale(0.3); opacity: 0; }
}

.map-compass {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 21px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 218, 238, 0.35);
  background: rgba(35, 16, 44, 0.36);
}

.compass-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 218, 238, 0.3);
  border-radius: 50%;
}

.compass-pointer {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 2px;
  height: 23px;
  background: var(--pink);
  transform: translateX(-50%) rotate(26deg);
  transform-origin: center bottom;
}

.compass-pointer::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -4px;
  width: 10px;
  height: 10px;
  background: var(--pink);
  clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%);
}

.compass-n {
  position: absolute;
  top: 1px;
  left: 50%;
  color: rgba(255, 231, 243, 0.8);
  font-size: 6px;
  transform: translateX(-50%);
}

.map-coord {
  position: absolute;
  z-index: 3;
  left: 15px;
  bottom: 14px;
  color: rgba(255, 220, 237, 0.44);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.sea-waves {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  overflow: hidden;
  background: linear-gradient(to top, rgba(33, 15, 42, 0.52), transparent);
  pointer-events: none;
}

.sea-waves i {
  position: absolute;
  height: 2px;
  background: rgba(255, 198, 228, 0.28);
  animation: wave-slide 9s linear infinite;
}

.sea-waves i:nth-child(1) { left: -5%; bottom: 12px; width: 34%; }
.sea-waves i:nth-child(2) { left: 40%; bottom: 22px; width: 18%; animation-delay: -2.5s; }
.sea-waves i:nth-child(3) { left: 68%; bottom: 9px; width: 24%; animation-delay: -5s; }
.sea-waves i:nth-child(4) { left: 18%; bottom: 37px; width: 24%; animation-delay: -3.8s; opacity: 0.55; }
.sea-waves i:nth-child(5) { left: 55%; bottom: 42px; width: 30%; animation-delay: -7.2s; opacity: 0.42; }

@keyframes wave-slide {
  from { transform: translateX(-20px); }
  50% { transform: translateX(20px); }
  to { transform: translateX(-20px); }
}

.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border-top: 2px solid #140a19;
  background: #24132c;
  color: rgba(255, 226, 241, 0.56);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.map-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 5px;
  height: 5px;
  background: var(--pink);
}

.map-hint {
  color: rgba(255, 226, 241, 0.33);
}

.log-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 3px solid var(--line);
  background: #fff6fb;
  box-shadow: 8px 8px 0 #160b1c;
  color: var(--ink);
}

.log-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.log-stamp {
  display: inline-block;
  padding: 5px 7px;
  border: 2px solid var(--pink-deep);
  color: var(--pink-deep);
  font-size: 8px;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.log-no {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.log-date {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.log-panel h3 {
  margin-bottom: 11px;
  font-size: 27px;
  line-height: 1.4;
}

.log-text {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.95;
}

.log-rule {
  margin-bottom: 15px;
  border-top: 2px dashed #dda8c0;
}

.perks-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.crew-perks ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.crew-perks li {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.crew-perks li span {
  color: var(--pink-deep);
  font-size: 7px;
}

.log-panel .btn {
  margin-top: auto;
  font-size: 13px;
}

.log-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.6;
  text-align: center;
}

.log-panel.is-travelling .log-text,
.log-panel.is-travelling h3,
.log-panel.is-travelling .log-date {
  animation: log-in 0.35s steps(4) both;
}

@keyframes log-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- footer ---------------- */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 4px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    #ffe1ee;
  background-size: 24px 24px, 24px 24px, auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) auto;
  gap: 46px;
  padding-top: 54px;
  padding-bottom: 42px;
}

.footer-brand img {
  width: 210px;
  height: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.footer-links span {
  margin-bottom: 5px;
  color: var(--pink-deep);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.footer-links a {
  position: relative;
  padding: 2px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 0;
  height: 2px;
  background: var(--pink-bright);
  transition: width 0.12s steps(3);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 17px;
  min-width: 185px;
}

.footer-heart {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  background: var(--pink-soft);
  color: var(--pink-deep);
  font-size: 20px;
  box-shadow: 3px 3px 0 var(--shadow);
  animation: heart-beat 2s steps(2) infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.07); }
}

.footer-end p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.9;
  text-align: right;
}

.back-top {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  background: #fff8fc;
  box-shadow: 3px 3px 0 var(--shadow);
  font-size: 16px;
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2);
}

.back-top:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 var(--shadow);
}

.footer-ticker {
  overflow: hidden;
  border-top: 2px solid var(--line);
  background: var(--line);
  color: #ffe8f3;
}

.footer-ticker span {
  display: block;
  width: max-content;
  padding: 9px 0 9px 100%;
  font-size: 8px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
}

@keyframes ticker {
  to { transform: translateX(-100%); }
}

/* ---------------- dialogs ---------------- */

.pixel-dialog {
  width: min(530px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 4px solid var(--line);
  border-radius: 0;
  background: #fff8fc;
  box-shadow: 12px 12px 0 rgba(25, 9, 20, 0.35);
  color: var(--ink);
  overflow: auto;
}

.pixel-dialog::backdrop {
  background: rgba(44, 17, 35, 0.68);
  backdrop-filter: blur(3px);
}

.pixel-dialog[open] {
  animation: dialog-pop 0.2s steps(3) both;
}

@keyframes dialog-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-inner {
  position: relative;
  padding: 29px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  background: var(--pink-soft);
  box-shadow: 2px 2px 0 var(--shadow);
}

.dialog-close:hover {
  background: var(--pink);
}

.dialog-close svg {
  width: 15px;
  height: 15px;
}

.dialog-kicker {
  margin-bottom: 5px;
  color: var(--pink-deep);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.gift-dialog {
  width: min(500px, calc(100% - 28px));
}

.gift-dialog h3 {
  margin-bottom: 11px;
  font-size: 27px;
  line-height: 1.4;
  text-align: center;
}

.gift-art {
  width: 190px;
  height: 170px;
  margin: 12px auto 20px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.4) 75%),
    var(--pink-pale);
  background-size: 20px 20px;
  box-shadow: 5px 5px 0 var(--pink-soft);
}

.gift-art svg {
  width: 150px;
  height: 150px;
  image-rendering: pixelated;
}

.gift-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gift-placeholder b {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 3px solid var(--line);
  background: #fff7fb;
  box-shadow: 4px 4px 0 var(--pink-soft);
  color: var(--pink-deep);
  font-family: var(--font);
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
}

.gift-placeholder small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.playlist-dev {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 36px;
  text-align: center;
}

.playlist-dev .gift-art {
  margin: 0 auto 18px;
}

.playlist-dev h3 {
  margin: 4px 0 10px;
  font-size: 30px;
  line-height: 1.4;
}

.playlist-dev-copy {
  margin: 0 auto 8px;
  max-width: 420px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 2;
}

.gift-message {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 2;
  text-align: center;
  white-space: pre-line;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.dialog-actions .btn {
  font-size: 12px;
}

.crew-dialog h3 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.4;
}

.crew-intro {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}

.crew-account {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 15px;
  padding: 6px 8px;
  border: 2px dashed var(--line-soft);
  background: var(--pink-pale);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.crew-account svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--pink-deep);
}

.crew-dialog .pixel-input {
  width: 100%;
  margin: 0 0 14px;
}

.crew-dialog .field-error {
  margin: -5px 0 12px;
}

.crew-small {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}

.crew-small b {
  color: var(--pink-deep);
  font-weight: 400;
}

.crew-preview-wrap {
  margin: 15px 0 4px;
  padding: 8px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 var(--pink-soft);
}

.crew-preview-wrap img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ---------------- account / login ---------------- */

.account-dialog {
  width: min(540px, calc(100% - 28px));
}

.account-dialog h3 {
  margin-bottom: 7px;
  font-size: 26px;
  line-height: 1.4;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
  padding-right: 34px;
}

.login-tv {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 3px solid var(--line);
  background: var(--pink-soft);
  box-shadow: 4px 4px 0 var(--shadow);
  color: var(--pink-deep);
}

.login-tv svg {
  width: 40px;
  height: 40px;
}

.login-head .dialog-kicker {
  margin-bottom: 2px;
  font-size: 8px;
}

.login-intro {
  margin-bottom: 19px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.95;
}

.account-dialog .field-label {
  margin: 0 0 7px;
}

.field-label small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}

.uid-input {
  display: flex;
  align-items: stretch;
  margin: 0 0 8px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 3px 3px 0 var(--pink-soft);
}

.uid-input span {
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-right: 2px solid var(--line);
  background: var(--pink-pale);
  color: var(--pink-deep);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.uid-input input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
}

.uid-input input::placeholder {
  color: #bd8ca4;
  opacity: 1;
}

.uid-input:focus-within {
  border-color: var(--pink-deep);
  box-shadow: 3px 3px 0 var(--pink);
}

.uid-input input:focus {
  outline: none;
}

.account-dialog .pixel-input {
  width: 100%;
  margin: 0 0 14px;
}

.account-dialog .field-error {
  margin: -3px 0 11px;
}

.account-dialog .btn-full {
  width: 100%;
  margin-top: 2px;
}

.login-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.75;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 18px;
  padding-bottom: 16px;
  border-bottom: 2px dashed #dda8c0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 3px solid var(--line);
  background: var(--pink-pale);
  box-shadow: 4px 4px 0 var(--pink-soft);
  overflow: hidden;
}

.profile-avatar svg {
  width: 60px;
  height: 60px;
}

.profile-head h3 {
  margin-bottom: 3px;
  font-size: 28px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-uid {
  margin: 0;
  color: var(--pink-deep);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 3px 3px 0 var(--pink-soft);
}

.profile-stats > div {
  padding: 10px 5px;
  border-right: 2px dashed #dda8c0;
  text-align: center;
}

.profile-stats > div:last-child {
  border-right: 0;
}

.profile-stats strong {
  display: block;
  color: var(--pink-deep);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
}

.profile-stats span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.profile-since {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.account-dialog .dialog-actions {
  margin-top: 19px;
}

/* ---------------- toast & sparkles ---------------- */

.toast {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 11px 17px;
  border: 2px solid #ffe4f0;
  background: var(--line);
  box-shadow: 4px 4px 0 rgba(255, 159, 200, 0.5);
  color: #fff1f7;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  transform: translate(-50%, 150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s steps(4), opacity 0.22s steps(4);
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.click-sparkles {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  overflow: hidden;
}

.click-sparkles span {
  position: absolute;
  color: var(--pink-bright);
  font-size: 12px;
  line-height: 1;
  animation: sparkle-up 0.7s steps(7) forwards;
}

@keyframes sparkle-up {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); }
}

/* ============================================================
   HUB / ROOM VIEWS
   ============================================================ */

.home-view {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 54px);
  min-height: calc(100svh - var(--header-h) - 54px);
  padding: 34px 0 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 12%, rgba(255, 255, 255, 0.92), transparent 24%),
    radial-gradient(circle at 88% 76%, rgba(203, 184, 238, 0.26), transparent 26%),
    linear-gradient(180deg, #fff3f9 0%, #ffe6f2 100%);
}

.home-view::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.home-view::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 2%;
  width: 210px;
  height: 210px;
  pointer-events: none;
  background: #fff4c8;
  opacity: 0.5;
  clip-path: polygon(25% 0, 75% 0, 75% 6%, 88% 6%, 88% 13%, 94% 13%, 94% 25%, 100% 25%, 100% 75%, 94% 75%, 94% 88%, 88% 88%, 88% 94%, 75% 94%, 75% 100%, 25% 100%, 25% 94%, 12% 94%, 12% 88%, 6% 88%, 6% 75%, 0 75%, 0 25%, 6% 25%, 6% 13%, 12% 13%, 12% 6%, 25% 6%);
}

.hub-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}

.hub-character {
  width: min(100%, 390px);
  justify-self: center;
}

.hub-frame {
  position: relative;
  width: 100%;
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 9px 9px 0 rgba(122, 63, 92, 0.17);
  transform: rotate(-1deg);
  overflow: hidden;
}

.hub-frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 29px;
  padding: 0 9px;
  border-bottom: 2px solid var(--line);
  background: var(--line);
  color: #ffe8f3;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.hub-dots {
  display: flex;
  gap: 4px;
}

.hub-dots i {
  width: 7px;
  height: 7px;
  background: var(--pink);
}

.hub-dots i:nth-child(2) { background: #ffd66f; }
.hub-dots i:nth-child(3) { background: #8fe3b1; }

.hub-frame-bar b {
  font-weight: 400;
  opacity: 0.8;
}

.hub-frame-bar em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-style: normal;
  color: #ffd6e8;
}

.hub-frame-bar em i {
  width: 5px;
  height: 5px;
  background: #8fe3b1;
  animation: status-pulse 1.6s steps(2) infinite;
}

.hub-stage {
  position: relative;
  height: 452px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(180deg, #ffd9eb 0%, #ffc2df 55%, #ffacd1 100%);
  background-size: 22px 22px, 22px 22px, 100% 100%;
}

.hub-stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  border-top: 3px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 50%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.28) 50%, transparent 50%),
    #f59dc4;
  background-size: 20px 20px, 20px 20px, auto;
}

.hub-stage::after {
  content: "✿";
  position: absolute;
  left: 26px;
  bottom: 25px;
  z-index: 2;
  color: #fff6c8;
  font-size: 14px;
  text-shadow: 1px 1px 0 #a54f75;
}

.hub-sprite {
  position: relative;
  z-index: 3;
  width: 245px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(5px 5px 0 rgba(141, 65, 98, 0.16));
  animation: sprite-bob 3.2s steps(2, end) infinite;
}

.hub-cat {
  position: absolute;
  z-index: 4;
  right: 19px;
  bottom: 17px;
  width: 54px;
  image-rendering: pixelated;
  animation: cat-hop 2.4s steps(2, end) infinite;
}

.hub-star {
  position: absolute;
  z-index: 2;
  color: #fff7d3;
  text-shadow: 2px 2px 0 rgba(139, 73, 102, 0.32);
  animation: blink-star 3.5s steps(1) infinite;
}

.hub-star.hs1 { top: 25px; left: 24px; font-size: 20px; }
.hub-star.hs2 { top: 95px; right: 26px; font-size: 15px; animation-delay: -1.2s; }
.hub-star.hs3 { top: 180px; left: 38px; font-size: 11px; animation-delay: -2.1s; color: #fff; }

.hub-cloud {
  position: absolute;
  z-index: 1;
  top: 80px;
  right: 18px;
  width: 48px;
  height: 13px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 9px -9px 0 rgba(255, 255, 255, 0.62), 20px 0 0 rgba(255, 255, 255, 0.62);
}

.hub-frame-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border-top: 2px solid var(--line);
  background: var(--pink-pale);
  color: var(--ink-soft);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.hub-character-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-align: center;
}

.hub-character-note b {
  color: var(--pink-deep);
  font-weight: 400;
}

.hub-panel {
  width: 100%;
  max-width: 640px;
}

.hub-panel .eyebrow {
  margin-bottom: 17px;
}

.hub-panel h1 {
  margin-bottom: 14px;
  font-size: clamp(44px, 4.9vw, 66px);
  line-height: 1.22;
  letter-spacing: -0.03em;
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(255, 176, 208, 0.34);
}

.hub-panel h1 span {
  color: var(--pink-deep);
  position: relative;
  z-index: 0;
}

.hub-panel h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4px;
  right: -4px;
  bottom: 5%;
  height: 26%;
  background: #ffc3dc;
  border-left: 3px solid var(--pink-bright);
  border-right: 3px solid var(--pink-bright);
}

.hub-lede {
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.9;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 154px;
  padding: 12px 13px 10px;
  border: 3px solid var(--line);
  background: var(--portal-bg, var(--pink-pale));
  box-shadow: 5px 5px 0 rgba(122, 63, 92, 0.16);
  color: var(--portal-text, var(--ink));
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2);
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translate(-2px, -3px);
  box-shadow: 8px 8px 0 rgba(122, 63, 92, 0.14);
}

.portal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.portal-no {
  color: var(--portal-muted, var(--muted));
  font-size: 8px;
  letter-spacing: 0.04em;
}

.portal-top svg {
  width: 25px;
  height: 25px;
  color: var(--portal-ink, var(--pink-deep));
}

.portal-card strong {
  margin-bottom: 3px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
}

.portal-desc {
  flex: 1;
  color: var(--portal-muted, var(--ink-soft));
  font-size: 9px;
  line-height: 1.7;
}

.portal-enter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--portal-line, #dda8c0);
  color: var(--portal-muted, var(--muted));
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.portal-enter b {
  color: var(--portal-ink, var(--pink-deep));
  font-size: 14px;
  font-weight: 400;
}

.portal-messages {
  --portal-bg: #ffe0ed;
  --portal-ink: #d9528b;
  --portal-muted: #7d4d66;
}

.portal-gifts {
  --portal-bg: #ffe9d1;
  --portal-ink: #c47a34;
  --portal-muted: #805a3e;
}

.portal-playlist {
  --portal-bg: #e9e1ff;
  --portal-ink: #7d62c9;
  --portal-muted: #5f4c85;
}

.portal-voyage {
  --portal-bg: #3d2147;
  --portal-ink: #ffb3d3;
  --portal-muted: rgba(255, 235, 246, 0.73);
  --portal-line: rgba(255, 214, 234, 0.3);
  border-color: #1d0e25;
  box-shadow: 5px 5px 0 #1d0e25;
  color: #fff4fa;
}

.portal-voyage .portal-no {
  color: rgba(255, 226, 241, 0.55);
}

.portal-voyage:hover {
  box-shadow: 8px 8px 0 #1d0e25;
}

.hub-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.hub-note span {
  color: var(--pink-bright);
}

/* ---------------- room pages ---------------- */

.page-view {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h) - 45px);
  min-height: calc(100svh - var(--header-h) - 45px);
  padding: 18px 0 70px;
}

.page-view.is-active,
.home-view.is-active {
  animation: view-in 0.24s steps(4) both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding: 10px 0 11px;
  border-bottom: 2px dashed #dda8c0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: color 0.1s steps(2), transform 0.1s steps(2);
}

.back-link:hover {
  color: var(--pink-deep);
  transform: translateX(-2px);
}

.view-topline-light {
  border-color: rgba(255, 218, 238, 0.24);
  color: rgba(255, 226, 241, 0.52);
}

.view-topline-light .back-link {
  color: #ffd9e9;
}

.view-topline-light .back-link:hover {
  color: #fff;
}

.page-view .section-head {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 27px;
}

.page-view .section-side {
  display: none;
}

.page-view .section-number {
  width: 68px;
  height: 68px;
  box-shadow: 4px 4px 0 var(--pink-soft);
}

.page-view .section-number span {
  font-size: 21px;
}

.page-view .section-number svg {
  width: 20px;
  height: 20px;
}

.page-view.section-voyage .section-number {
  box-shadow: 4px 4px 0 #1a0d21;
}

.page-view .section-heading h2 {
  margin-bottom: 7px;
  font-size: clamp(28px, 3vw, 39px);
}

.page-view .section-desc {
  font-size: 12px;
  line-height: 1.8;
}

.page-view.section-voyage {
  padding-bottom: 72px;
}

.message-layout,
.music-layout,
.voyage-layout {
  margin-top: 34px;
}

[data-zone] {
  position: relative;
}

[data-zone]::before {
  content: attr(data-zone);
  position: absolute;
  top: -24px;
  left: 0;
  color: var(--muted);
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.058em;
  white-space: nowrap;
}

.section-voyage [data-zone]::before {
  color: rgba(255, 226, 241, 0.55);
}

.zone-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.zone-label span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 2px 2px 0 var(--pink-soft);
  color: var(--pink-deep);
  font-size: 8px;
}

.zone-label strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 400;
}

.zone-label em {
  margin-left: auto;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.07em;
}

.zone-label-gifts {
  margin: 2px 0 15px;
}

.gift-hint {
  margin-top: 21px;
}

/* ---------------- opened gift log ---------------- */

.opened-panel {
  margin-top: 25px;
  padding-bottom: 14px;
}

.opened-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px 9px;
  border-bottom: 2px dashed #dda8c0;
}

.opened-head .zone-label {
  margin: 0;
}

.opened-count {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.opened-count b {
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 400;
}

.opened-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 13px 15px 0;
}

.opened-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 2px dashed #dfaec4;
  background: #fff;
}

.opened-item.is-open {
  border-style: solid;
  border-color: var(--line-soft);
  background: var(--pink-pale);
}

.opened-mini {
  position: relative;
  width: 26px;
  height: 23px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: var(--box, #ffb6d3);
}

.opened-mini::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 5px;
  background: var(--ribbon, #ffe58a);
  transform: translateX(-50%);
}

.opened-mini::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 12px;
  height: 6px;
  border: 1px solid var(--line);
  background: var(--ribbon, #ffe58a);
  transform: translateX(-50%);
}

.opened-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opened-status {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.opened-item.is-open .opened-status {
  color: var(--pink-deep);
}

/* ---------------- slim footer ---------------- */

.mini-footer {
  position: relative;
  z-index: 2;
  border-top: 3px solid var(--line);
  background: #ffe1ee;
}

.mini-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.035em;
}

.mini-footer a {
  color: var(--pink-deep);
  white-space: nowrap;
}

.mini-footer a:hover {
  color: var(--line);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1180px) {
  .header-inner {
    width: calc(100% - 32px);
    gap: 14px;
  }

  .brand-logo { width: 174px; }
  .brand-sprite-wrap { width: 52px; height: 80px; }
  .brand-sprite { width: auto; height: 74px; }

  .nav-link { padding: 10px 9px; font-size: 13px; }
  .nav-link em { display: none; }
  .status-chip { display: none; }

  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr); gap: 26px; }
  .hero h1 { font-size: clamp(40px, 4.8vw, 62px); }
  .hero-visual { min-height: 540px; }
  .window-scene { height: 490px; }
  .hero-sprite { width: 175px; }
  .float-message { left: -18px; }
  .float-music { right: -16px; }

  .message-layout { grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.4fr); }
  .player-top { gap: 16px; }
  .album-art { width: 180px; height: 180px; flex-basis: 180px; }
  .cassette { width: 126px; height: 88px; }
  .cassette-window { top: 42px; left: 20px; right: 20px; height: 30px; }
  .reel { width: 18px; height: 18px; }
  .reel-l { left: 11px; }
  .reel-r { right: 11px; }
  .voyage-layout { grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.8fr); }
  .sea-map { height: 430px; }
  .island-art { width: 65px; }
}

@media (max-width: 980px) {
  :root { --header-h: 94px; }

  html { scroll-padding-top: 106px; }

  .site-header { position: sticky; }
  .header-inner { min-height: var(--header-h); }

  .main-nav {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 9px 16px 14px;
    border-bottom: 3px solid var(--line);
    background: #fff7fb;
    box-shadow: 0 8px 0 rgba(217, 152, 184, 0.24);
  }

  .main-nav.is-open { display: flex; }

  .nav-link {
    justify-content: flex-start;
    padding: 12px 10px;
    border-bottom: 1px dashed #dda8c0;
    font-size: 14px;
  }

  .nav-link:last-child { border-bottom: 0; }

  .nav-link em { display: inline; margin-left: auto; }

  .menu-toggle { display: flex; }

  .header-tools { margin-left: auto; }

  .brand-logo { width: 170px; }
  .brand-sprite-wrap { height: 76px; }

  .hero {
    min-height: 0;
    padding: 54px 0 76px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero h1 { font-size: clamp(42px, 7vw, 62px); }

  .hero-visual {
    min-height: 560px;
    justify-content: center;
    width: min(100%, 540px);
    margin-inline: auto;
  }

  .scene-window { width: 100%; }
  .window-scene { height: 520px; }
  .scroll-cue { display: none; }

  .section { padding: 86px 0 94px; }
  .section-head { grid-template-columns: 74px minmax(0, 1fr); gap: 20px; margin-bottom: 38px; }
  .section-number { width: 70px; height: 70px; }
  .section-number span { font-size: 22px; }
  .section-number svg { width: 20px; height: 20px; }
  .section-side { display: none; }

  .message-layout { grid-template-columns: 1fr; }
  .note-form { max-width: 640px; }
  .board-wrap { margin-top: 2px; }

  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .gift-card { padding: 22px 10px 14px; }
  .gift-box-art { width: 104px; height: 96px; }
  .gift-name { font-size: 13px; }

  .music-layout { grid-template-columns: 1fr; }
  .playlist-panel { min-height: 0; }
  .album-art { width: 216px; height: 216px; flex-basis: 216px; }
  .cassette { width: 150px; height: 102px; }
  .cassette-window { top: 47px; left: 27px; right: 27px; height: 36px; }
  .reel { width: 22px; height: 22px; }
  .reel-l { left: 14px; }
  .reel-r { right: 14px; }

  .voyage-layout { grid-template-columns: 1fr; }
  .sea-map { height: 390px; }
  .log-panel { min-height: 0; }
  .crew-perks ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-end { grid-column: 1 / -1; flex-direction: row; align-items: center; min-width: 0; }
  .footer-end p { text-align: left; }
}

@media (max-width: 720px) {
  :root { --header-h: 82px; }

  html { scroll-padding-top: 92px; }

  .container { width: calc(100% - 36px); }
  .header-inner { width: calc(100% - 28px); gap: 10px; }

  .brand { gap: 6px; }
  .brand-sprite-wrap { width: 42px; height: 68px; }
  .brand-sprite { width: auto; height: 62px; }
  .sprite-spark { font-size: 12px; right: -3px; }
  .brand-logo { width: 128px; }
  .brand-sub { display: none; }

  .menu-toggle { width: 39px; height: 36px; }

  .account-btn {
    width: auto;
    min-width: 39px;
    height: 36px;
    min-height: 0;
    padding: 5px 7px;
    gap: 4px;
    justify-content: center;
  }

  .account-btn.is-user {
    width: 39px;
    padding: 5px;
  }

  .account-avatar {
    width: 24px;
    height: 24px;
  }

  .account-avatar svg {
    width: 20px;
    height: 20px;
  }

  .account-copy {
    display: flex;
  }

  .account-copy small {
    display: none;
  }

  .account-copy strong {
    max-width: 38px;
    font-size: 9px;
  }

  .account-btn.is-user .account-copy {
    display: none;
  }

  .hero { padding: 42px 0 66px; }
  .hero-cloud, .hero-sun { opacity: 0.45; }
  .hero h1 { font-size: clamp(34px, 9.2vw, 48px); text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(255, 176, 208, 0.4); }
  .eyebrow { margin-bottom: 19px; padding: 7px 9px; font-size: 8px; letter-spacing: 0.06em; }
  .lede { font-size: 14px; line-height: 2; }
  .lede br { display: none; }
  .hero-actions { gap: 11px; margin-bottom: 27px; }
  .btn { padding: 11px 15px; font-size: 12px; }
  .hero-stats { width: 100%; }
  .hero-stats li { flex: 1; min-width: 0; padding: 9px 10px; }
  .hero-stats strong { font-size: 21px; }
  .hero-stats span { font-size: 8px; }

  .hero-visual { min-height: 460px; margin-top: 4px; }
  .window-scene { height: 420px; }
  .pixel-moon { width: 56px; height: 56px; top: 25px; right: 24px; }
  .speech-bubble { top: 154px; left: 18px; font-size: 10px; padding: 8px 10px; }
  .hero-sprite { width: 155px; }
  .scene-cat { width: 47px; margin-left: -14px; }
  .scene-ground { height: 77px; }
  .scene-character { bottom: 54px; }
  .scene-caption { font-size: 7px; }
  .float-card { display: none; }
  .sticker-star { right: 7px; top: 6px; font-size: 25px; }
  .sticker-heart { left: 8px; bottom: 11px; font-size: 20px; }

  .section { padding: 72px 0 80px; }
  .section-head { grid-template-columns: 58px minmax(0, 1fr); gap: 15px; margin-bottom: 30px; }
  .section-number { width: 56px; height: 56px; }
  .section-number span { font-size: 19px; }
  .section-number svg { width: 17px; height: 17px; }
  .kicker { font-size: 9px; letter-spacing: 0.08em; }
  .section-heading h2 { font-size: clamp(24px, 6.6vw, 32px); line-height: 1.48; margin-bottom: 8px; }
  .section-desc { font-size: 12px; line-height: 1.9; }

  .note-form { padding-bottom: 16px; }
  .form-heading { margin: 18px 15px 17px; }
  .form-identity { margin-inline: 15px; margin-bottom: 13px; }
  .field-label { margin-inline: 15px; }
  .pixel-input { width: calc(100% - 30px); margin-inline: 15px; font-size: 12px; }
  .mood-row { margin-inline: 15px; gap: 6px; margin-bottom: 15px; }
  .mood-chip { font-size: 9px; }
  .note-form .btn { width: calc(100% - 30px); margin-inline: 15px; }
  .privacy-note { margin-inline: 15px; }
  .field-error { margin-inline: 15px; }
  .char-count { right: 24px; bottom: 22px; }

  .board-wrap { padding: 13px; }
  .board-head { align-items: flex-end; padding-bottom: 11px; margin-bottom: 12px; }
  .board-sort { display: none; }
  .message-board { grid-template-columns: 1fr; gap: 12px; }
  .message-note { min-height: 0; }
  .board-foot { font-size: 8px; }

  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .gift-card { padding: 20px 8px 13px; }
  .gift-box-art { width: 91px; height: 85px; }
  .gift-box-art::before { height: 26px; }
  .box-bow { width: 48px; height: 22px; top: -28px; }
  .box-bow::before, .box-bow::after { width: 23px; height: 17px; }
  .gift-name { font-size: 12px; }
  .gift-state { font-size: 7px; }
  .gift-card::after { font-size: 6px; right: -5px; }
  .gift-hint { font-size: 9px; }

  .player-top { flex-direction: column; align-items: center; padding: 17px; }
  .album-art { width: 190px; height: 190px; flex-basis: 190px; }
  .now-playing { width: 100%; text-align: center; }
  .player-kicker { justify-content: center; }
  .play-state { margin-left: 0; }
  .now-playing h3 { font-size: 27px; }
  .visualizer { justify-content: center; height: 38px; margin-bottom: 9px; }
  .synth-note { font-size: 7px; }
  .progress-row { padding-inline: 15px; }
  .player-controls { flex-direction: column; gap: 15px; padding: 17px 15px 19px; }
  .volume-wrap { width: 100%; justify-content: center; }

  .playlist-head { padding: 16px 14px 12px; }
  .playlist-head h3 { font-size: 17px; }
  .track-row { grid-template-columns: 21px minmax(0, 1fr) auto 29px; gap: 5px; padding: 8px 5px; }
  .track-title-wrap strong { font-size: 11px; }
  .track-bpm { display: none; }
  .track-duration { font-size: 7px; }
  .playlist-foot { padding: 10px 14px; font-size: 6px; }

  .section-voyage { padding-bottom: 83px; }
  .map-toolbar { font-size: 7px; }
  .map-weather { font-size: 6px; }
  .sea-map { height: 330px; }
  .map-moon { top: 21px; right: 25px; width: 45px; height: 45px; }
  .island-art { width: 53px; }
  .island-label { padding: 3px 5px; font-size: 8px; }
  .island-label b { font-size: 7px; }
  .ship-wrap { width: 65px; }
  .map-compass { width: 41px; height: 41px; right: 11px; bottom: 14px; }
  .compass-pointer { top: 11px; height: 19px; }
  .map-coord { font-size: 6px; left: 10px; }
  .map-footer { font-size: 6px; padding: 7px 10px; }
  .map-hint { display: none; }
  .log-panel { padding: 19px; }
  .log-panel h3 { font-size: 23px; }
  .crew-perks ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-text { font-size: 11px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 39px; padding-bottom: 30px; }
  .footer-brand img { width: 190px; }
  .footer-links { gap: 30px; }
  .footer-end { flex-wrap: wrap; gap: 13px; }
  .footer-end .footer-heart { order: 2; }
  .footer-end p { order: 3; width: 100%; font-size: 7px; }
  .back-top { order: 1; margin-left: auto; }

  .pixel-dialog { width: calc(100% - 22px); }
  .dialog-inner { padding: 23px 18px; }
  .gift-dialog h3 { font-size: 23px; }
  .gift-art { width: 165px; height: 150px; }
  .gift-art svg { width: 132px; height: 132px; }
  .gift-message { font-size: 12px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .btn { width: 100%; }
  .crew-dialog h3 { font-size: 22px; }

  .login-head { gap: 10px; padding-right: 28px; }
  .login-tv { width: 54px; height: 54px; }
  .login-tv svg { width: 34px; height: 34px; }
  .account-dialog h3 { font-size: 22px; }
  .login-intro { font-size: 10px; }
  .profile-avatar { width: 60px; height: 60px; }
  .profile-avatar svg { width: 50px; height: 50px; }
  .profile-head h3 { font-size: 23px; }
  .profile-stats strong { font-size: 16px; }
}

@media (max-width: 390px) {
  .brand-logo { width: 112px; }
  .brand-sprite-wrap { width: 38px; height: 60px; }
  .brand-sprite { width: auto; height: 54px; }
  .hero h1 { font-size: 32px; }
  .hero-stats li { padding-inline: 7px; }
  .hero-stats strong { font-size: 18px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gift-box-art { width: 86px; height: 80px; }
  .gift-card { padding: 22px 7px 13px; }
  .gift-card::before { font-size: 6px; }
  .gift-card::after { right: -4px; font-size: 6px; }
  .gift-name { font-size: 11px; }
}

@media (max-width: 1180px) {
  .hub-inner {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: 34px;
  }

  .hub-stage { height: 410px; }
  .hub-sprite { width: 220px; }
  .hub-panel h1 { font-size: clamp(42px, 5vw, 56px); }
  .portal-card { min-height: 148px; }
}

@media (max-width: 980px) {
  .home-view {
    min-height: 0;
    padding: 30px 0 44px;
  }

  .hub-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hub-character {
    width: min(100%, 330px);
  }

  .hub-stage { height: 400px; }
  .hub-panel {
    max-width: none;
  }

  .hub-panel h1 {
    font-size: clamp(40px, 7vw, 52px);
  }

  .page-view {
    padding: 14px 0 62px;
  }

  .view-topline {
    margin-bottom: 24px;
  }
}

@media (max-width: 720px) {
  .home-view {
    padding: 22px 0 38px;
  }

  .home-view::after {
    width: 130px;
    height: 130px;
    opacity: 0.42;
  }

  .hub-inner { gap: 25px; }
  .hub-character { width: min(100%, 285px); }
  .hub-frame { transform: rotate(0); }
  .hub-stage { height: 350px; }
  .hub-sprite { width: 188px; }
  .hub-cat { width: 45px; right: 14px; bottom: 13px; }
  .hub-frame-bar { height: 26px; font-size: 6px; }
  .hub-frame-foot { font-size: 6px; }
  .hub-character-note { margin-top: 10px; font-size: 9px; }

  .hub-panel .eyebrow {
    margin-bottom: 13px;
    font-size: 8px;
  }

  .hub-panel h1 {
    margin-bottom: 10px;
    font-size: clamp(34px, 9.4vw, 44px);
  }

  .hub-lede {
    margin-bottom: 17px;
    font-size: 12px;
    line-height: 1.85;
  }

  .hub-lede br { display: none; }

  .portal-grid {
    gap: 10px;
  }

  .portal-card {
    min-height: 144px;
    padding: 10px;
    box-shadow: 4px 4px 0 rgba(122, 63, 92, 0.15);
  }

  .portal-voyage { box-shadow: 4px 4px 0 #1d0e25; }
  .portal-top { margin-bottom: 6px; }
  .portal-top svg { width: 21px; height: 21px; }
  .portal-card strong { font-size: 18px; }
  .portal-desc { font-size: 8px; line-height: 1.65; }
  .portal-enter { font-size: 7px; }
  .hub-note { margin-top: 14px; font-size: 7px; }

  .page-view {
    padding: 9px 0 52px;
  }

  .page-view.section-voyage {
    padding-bottom: 58px;
  }

  .view-topline {
    margin-bottom: 20px;
    padding: 8px 0 9px;
    font-size: 7px;
  }

  .back-link { font-size: 9px; }

  .page-view .section-head {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 22px;
  }

  .page-view .section-number {
    width: 54px;
    height: 54px;
    box-shadow: 3px 3px 0 var(--pink-soft);
  }

  .page-view .section-number span { font-size: 18px; }
  .page-view .section-number svg { width: 17px; height: 17px; }
  .page-view .section-heading h2 { font-size: clamp(23px, 6.3vw, 30px); }
  .page-view .section-desc { font-size: 11px; line-height: 1.8; }

  .message-layout,
  .music-layout,
  .voyage-layout {
    margin-top: 31px;
  }

  [data-zone]::before {
    top: -22px;
    font-size: 7px;
  }

  .zone-label {
    margin-bottom: 9px;
    font-size: 7px;
  }

  .zone-label span {
    width: 21px;
    height: 21px;
    font-size: 7px;
  }

  .zone-label strong { font-size: 9px; }
  .zone-label em { font-size: 6px; }

  .opened-panel { margin-top: 20px; }
  .opened-head { padding: 10px 12px 8px; }
  .opened-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 11px 12px 0;
  }

  .opened-item { padding: 6px; gap: 6px; }
  .opened-name { font-size: 8px; }
  .opened-status { font-size: 6px; }

  .mini-footer-inner {
    flex-wrap: wrap;
    gap: 5px 14px;
    padding: 11px 0;
    font-size: 7px;
  }

  .mini-footer-inner span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 420px) {
  .hub-character { width: min(100%, 260px); }
  .hub-stage { height: 315px; }
  .hub-sprite { width: 168px; }
  .hub-panel h1 { font-size: 34px; }
  .portal-card { min-height: 139px; }
  .portal-desc { font-size: 7.5px; }
  .portal-enter { padding-top: 5px; margin-top: 5px; }
  .hub-note { font-size: 6.5px; }

  .view-topline { letter-spacing: 0.02em; }
  .view-topline > span { font-size: 6px; }
  .page-view .section-heading h2 { font-size: 23px; }
  .page-view .section-desc { font-size: 10px; }
}

/* ============================================================
   MESSAGE BOARD
   ============================================================ */

.board-shell {
  overflow: hidden;
  background: var(--panel);
}

.board-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 14px;
  padding: 12px 15px;
  border-bottom: 2px solid var(--line);
  background: var(--pink-pale);
}

.board-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-title h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
}

.board-count {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.board-title .sync-status {
  margin-left: 2px;
}

.board-modes {
  display: flex;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: #fff;
}

.board-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 0;
  border-right: 2px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
}

.board-mode:last-child {
  border-right: 0;
}

.board-mode svg {
  width: 13px;
  height: 13px;
  color: var(--pink-deep);
}

.board-mode.is-active {
  background: var(--pink);
  color: #40182e;
}

.board-mode.is-active[data-board-mode="private"] {
  background: #e7dbff;
}

.topic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-bottom: 2px dashed #dda8c0;
  background: rgba(255, 255, 255, 0.58);
}

.topic-bar-label,
.compose-label {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.topic-filters,
.compose-topics {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.topic-filters::-webkit-scrollbar,
.compose-topics::-webkit-scrollbar {
  display: none;
}

.topic-chip {
  flex-shrink: 0;
  padding: 4px 8px;
  border: 1px solid #d9a9c0;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.1s steps(2), border-color 0.1s steps(2), box-shadow 0.1s steps(2);
}

.topic-chip:hover {
  border-color: var(--line-soft);
  background: var(--pink-pale);
}

.topic-chip.is-active {
  border-color: var(--line);
  background: var(--pink-soft);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--shadow);
}

.topic-add,
.compose-topic-add {
  flex-shrink: 0;
  padding: 4px 7px;
  border: 1px dashed var(--line-soft);
  background: var(--pink-pale);
  color: var(--pink-deep);
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.4;
  white-space: nowrap;
}

.topic-add span,
.compose-topic-add span {
  font-size: 11px;
}

.board-compose {
  padding: 14px 15px 12px;
  border-bottom: 3px solid var(--line);
  background: linear-gradient(180deg, #fffdfd, #fff6fb);
}

.board-compose.is-private {
  background: linear-gradient(180deg, #faf7ff, #f3eaff);
}

.compose-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.compose-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--pink-soft);
}

.compose-avatar svg {
  width: 27px;
  height: 27px;
}

.compose-who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.compose-who strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-who span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.compose-login {
  flex-shrink: 0;
  padding: 4px 7px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 2px 2px 0 var(--pink-soft);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.4;
  white-space: nowrap;
}

.compose-body {
  position: relative;
}

.compose-text {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 9px 11px 23px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 2px 2px 0 var(--pink-soft);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.8;
  resize: vertical;
}

.compose-text::placeholder {
  color: #bd8ca4;
  opacity: 1;
}

.compose-text:focus {
  outline: none;
  border-color: var(--pink-deep);
  box-shadow: 2px 2px 0 var(--pink);
}

.board-compose.is-private .compose-text {
  border-color: #9f84cf;
  box-shadow: 2px 2px 0 #e2d7f6;
}

.compose-count {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  pointer-events: none;
}

.compose-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.compose-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.visibility-switch {
  display: flex;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: #fff;
}

.visibility-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 0;
  border-right: 2px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.4;
}

.visibility-btn:last-child {
  border-right: 0;
}

.visibility-btn svg {
  width: 12px;
  height: 12px;
  color: var(--pink-deep);
}

.visibility-btn.is-active {
  background: var(--pink);
  color: #40182e;
}

.visibility-btn.is-active[data-visibility="private"] {
  background: #e7dbff;
}

.private-hint {
  flex: 1;
  min-width: 110px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.compose-submit {
  margin-left: auto;
  min-height: 36px;
  padding: 7px 13px;
  font-size: 11px;
}

.board-compose .privacy-note {
  margin: 9px 0 0;
  font-size: 8px;
}

.board-compose .field-error {
  margin: 5px 0 0;
}

.board-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px 0;
  color: var(--muted);
  font-size: 8px;
}

.board-feed-title {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.board-feed-label {
  font-size: 7px;
  letter-spacing: 0.03em;
  text-align: right;
}

.board-feed .message-board {
  min-height: 260px;
  padding: 11px 15px 17px;
}

.board-shell .board-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 0;
  padding: 10px 15px;
  border-top: 2px solid var(--line);
  background: var(--pink-pale);
}

.board-foot-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.board-foot-copy > span {
  color: var(--pink-bright);
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.sync-status i {
  width: 5px;
  height: 5px;
  background: #c69aad;
}

.sync-status.is-online {
  color: #3f8a64;
}

.sync-status.is-online i {
  background: #6bc28f;
}

.board-empty-icon svg {
  width: 28px;
  height: 28px;
  color: var(--pink);
}

.board-empty-action {
  margin-top: 7px;
  padding: 5px 9px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 2px 2px 0 var(--pink-soft);
  color: var(--pink-deep);
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.4;
}

.note-tags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
}

.note-topic {
  padding: 1px 5px;
  border: 1px solid #d9a9c0;
  background: rgba(255, 255, 255, 0.55);
  color: var(--pink-deep);
  font-size: 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.note-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px;
  border: 1px solid #a68bd4;
  background: #efe7ff;
  color: #6d55a5;
  font-size: 7px;
  line-height: 1.5;
  white-space: nowrap;
}

.note-private-badge svg {
  width: 9px;
  height: 9px;
}

.message-note.is-private {
  border-color: #b99cdf;
}

.message-note.is-private .note-avatar {
  border-color: #8e72bd;
}

.note-private-foot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6d55a5;
  font-size: 8px;
  line-height: 1.5;
}

.note-private-foot svg {
  width: 11px;
  height: 11px;
}

.message-board.is-private-view {
  background: linear-gradient(180deg, rgba(238, 229, 255, 0.46), transparent 52%);
}

.topic-dialog {
  width: min(470px, calc(100% - 28px));
}

.topic-dialog h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.4;
}

.topic-intro {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}

.topic-dialog .field-label {
  margin: 0 0 7px;
}

.topic-dialog .pixel-input {
  width: 100%;
  margin: 0 0 10px;
}

.topic-dialog .field-error {
  margin: -3px 0 10px;
}

.topic-dialog .dialog-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .board-topbar { padding: 10px 12px; gap: 7px; }
  .board-title h3 { font-size: 17px; }
  .board-count { font-size: 7px; }
  .board-mode { padding: 5px 7px; font-size: 8px; }
  .board-mode svg { width: 12px; height: 12px; }
  .topic-bar { padding: 7px 12px; gap: 6px; }
  .topic-chip { padding: 4px 7px; font-size: 8px; }
  .topic-add, .compose-topic-add { padding: 4px 6px; font-size: 7px; }
  .board-compose { padding: 12px; }
  .compose-text { min-height: 84px; font-size: 11px; }
  .compose-head { margin-bottom: 8px; }
  .compose-bottom { gap: 7px; }
  .private-hint { order: 3; flex-basis: 100%; min-width: 0; }
  .compose-submit { order: 4; width: 100%; margin-left: 0; }
  .board-feed-head { padding: 10px 12px 0; }
  .board-feed .message-board { padding: 10px 12px 14px; }
  .board-shell .board-foot { padding: 9px 12px; font-size: 8px; }
  .note-tags { gap: 3px; }
  .note-topic { font-size: 7px; }
  .note-private-badge { font-size: 6px; }
  .topic-dialog h3 { font-size: 21px; }
  .topic-intro { font-size: 10px; }
}

@media (max-width: 420px) {
  .board-topbar { align-items: flex-start; }
  .board-modes { width: 100%; }
  .board-mode { flex: 1; justify-content: center; }
  .board-title { width: 100%; justify-content: flex-start; }
  .topic-bar-label { display: none; }
  .compose-who strong { font-size: 10px; }
  .compose-avatar { width: 30px; height: 30px; }
  .compose-avatar svg { width: 24px; height: 24px; }
  .note-head { gap: 6px; }
  .note-tags { max-width: 120px; }
}

/* ---------------- motion preferences ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------- voyage rewards & shipping ---------------- */

.shipping-poster {
  padding: 22px;
  margin-bottom: 18px;
  background: #fffafd;
  color: var(--ink);
}

.shipping-poster-head {
  max-width: 760px;
  margin: 0 auto 16px;
  text-align: center;
}

.shipping-zone {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--pink-deep);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.shipping-poster-head h3,
.shipping-card-head h3 {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.45;
}

.shipping-poster-head p,
.shipping-card-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}

.reward-poster-scroll {
  width: min(647px, 100%);
  max-height: 640px;
  margin: 0 auto;
  overflow: auto;
  border: 3px solid var(--line);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.65) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.65) 75%),
    var(--pink-pale);
  background-size: 24px 24px;
  box-shadow: 5px 5px 0 var(--pink-soft);
  scrollbar-color: var(--pink) var(--pink-pale);
}

.reward-poster-scroll a {
  display: block;
}

.reward-poster-scroll img {
  display: block;
  width: 100%;
  height: auto;
}

.reward-poster-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.shipping-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}

.shipping-card {
  padding: 22px;
  background: #fffafd;
  color: var(--ink);
}

.shipping-card-head {
  margin-bottom: 16px;
}

.shipping-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ship-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9px;
}

.ship-field-wide {
  grid-column: 1 / -1;
}

.ship-field > span,
.ship-label {
  color: var(--ink-soft);
  font-size: 9px;
}

.ship-label em {
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

.ship-field input,
.ship-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.ship-field input:focus,
.ship-field textarea:focus {
  outline: none;
  border-color: var(--pink-deep);
  box-shadow: 3px 3px 0 var(--pink-soft);
}

.ship-field input[readonly] {
  background: #fff4f9;
  color: var(--ink-soft);
}

.crew-upload-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 2px dashed #d79ab4;
  background: #fff5fa;
  cursor: pointer;
  overflow: hidden;
}

.crew-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.crew-upload-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  pointer-events: none;
}

.crew-upload-empty svg {
  width: 16px;
  height: 16px;
  color: var(--pink-deep);
}

.crew-upload-box img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  pointer-events: none;
}

.ship-hint {
  margin: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.6;
}

.ship-login-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.shipping-submit-status {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid #a9d9bc;
  background: #effaf2;
  color: #397453;
  font-size: 9px;
  line-height: 1.7;
}

.shipping-card .btn-full {
  margin-top: 12px;
}

.tracking-form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-top: 6px;
}

.tracking-form .ship-field {
  flex: 1;
}

.tracking-submit {
  flex-shrink: 0;
  min-height: 36px;
  padding-inline: 12px;
  white-space: nowrap;
}

.tracking-result {
  min-height: 110px;
  margin-top: 14px;
  padding: 12px;
  border: 2px dashed #d9a9bf;
  background: #fff6fb;
}

.tracking-empty {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.9;
}

.tracking-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tracking-badge {
  display: inline-flex;
  padding: 2px 7px;
  border: 1px solid #b89adc;
  background: #f1e9ff;
  color: #6d55a5;
  font-size: 8px;
}

.tracking-time {
  color: var(--muted);
  font-size: 7px;
}

.tracking-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed #f0cfdd;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.tracking-line:last-of-type {
  border-bottom: 0;
}

.tracking-line b {
  color: var(--ink);
  font-weight: 400;
  text-align: right;
  overflow-wrap: anywhere;
}

.tracking-note {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #f0cfdd;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.tracking-waiting {
  margin: 0;
  color: var(--pink-deep);
  font-size: 10px;
  line-height: 1.9;
}

.tracking-waiting small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

@media (max-width: 980px) {
  .shipping-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shipping-poster { padding: 14px; }
  .shipping-poster-head h3,
  .shipping-card-head h3 { font-size: 21px; }
  .shipping-card { padding: 15px; }
  .shipping-fields { grid-template-columns: 1fr; }
  .ship-field-wide { grid-column: auto; }
  .reward-poster-scroll { max-height: 520px; }
  .tracking-form { flex-direction: column; align-items: stretch; }
  .tracking-submit { width: 100%; }
}
