:root {
  --night: #081c23;
  --deep: #0c2b33;
  --sea: #11434c;
  --mint: #9dbdbe;
  --paper: #f3ead9;
  --paper-deep: #e7d8bf;
  --ink: #2c2218;
  --ink-soft: #675b4c;
  --amber: #e8b06a;
  --amber-bright: #f3c987;
  --line: rgba(232, 176, 106, 0.23);
  --white: #faf5eb;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --hand: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: var(--sans);
  background:
    radial-gradient(1150px 720px at 78% 4%, rgba(232, 176, 106, 0.16), transparent 64%),
    radial-gradient(980px 700px at 8% 88%, rgba(43, 129, 136, 0.21), transparent 68%),
    radial-gradient(820px 480px at 50% 108%, rgba(232, 176, 106, 0.07), transparent 70%),
    linear-gradient(165deg, #071a21 0%, #0b252d 48%, #10353c 100%);
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.42;
  z-index: 1;
}

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

.mood-atmosphere .atmo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.8s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity;
}

.atmo-neutral {
  opacity: 1;
  background:
    radial-gradient(1150px 720px at 78% 4%, rgba(232, 176, 106, 0.16), transparent 64%),
    radial-gradient(980px 700px at 8% 88%, rgba(43, 129, 136, 0.21), transparent 68%),
    radial-gradient(820px 480px at 50% 108%, rgba(232, 176, 106, 0.07), transparent 70%),
    linear-gradient(165deg, #071a21 0%, #0b252d 48%, #10353c 100%);
}

.atmo-calm {
  background:
    radial-gradient(1050px 760px at 76% 4%, rgba(139, 193, 204, 0.22), transparent 64%),
    radial-gradient(880px 660px at 8% 88%, rgba(40, 118, 138, 0.31), transparent 68%),
    linear-gradient(158deg, #061821 0%, #0b2e3a 48%, #114652 100%);
}

.atmo-warm {
  background:
    radial-gradient(1040px 720px at 82% 2%, rgba(246, 181, 100, 0.33), transparent 62%),
    radial-gradient(820px 620px at 10% 92%, rgba(164, 85, 55, 0.22), transparent 68%),
    linear-gradient(158deg, #0c1b1e 0%, #26251f 44%, #4a3528 100%);
}

.atmo-mixed {
  background:
    radial-gradient(980px 720px at 76% 6%, rgba(118, 174, 178, 0.22), transparent 64%),
    radial-gradient(760px 620px at 12% 90%, rgba(219, 143, 88, 0.2), transparent 68%),
    linear-gradient(160deg, #091b22 0%, #192f33 46%, #3a2e25 100%);
}

body[data-atmosphere="neutral"] .atmo-neutral,
body[data-atmosphere="calm"] .atmo-calm,
body[data-atmosphere="warm"] .atmo-warm,
body[data-atmosphere="mixed"] .atmo-mixed {
  opacity: 1;
}

.page-frame {
  position: fixed;
  inset: 14px;
  z-index: 4;
  border: 1px solid rgba(248, 244, 234, 0.09);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 3px;
}

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

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

.stars i {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(248, 244, 234, 0.7);
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.sea-glow {
  position: fixed;
  left: 50%;
  bottom: -30vh;
  width: 140vw;
  height: 70vh;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 58%, rgba(67, 154, 159, 0.24), transparent 64%),
    radial-gradient(ellipse at 50% 82%, rgba(232, 176, 106, 0.09), transparent 58%);
  filter: blur(26px);
  z-index: 0;
  pointer-events: none;
  transition: opacity 2.8s ease, filter 2.8s ease;
}

.topbar {
  position: relative;
  z-index: 5;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#uiLangToggle {
  min-width: 44px;
  padding: 0 11px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.05em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--amber);
  font-family: var(--serif);
  font-size: 19px;
  background: rgba(232, 176, 106, 0.05);
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--mint);
  font-size: 8px;
  letter-spacing: 0.24em;
}

main {
  position: relative;
  z-index: 3;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 22px 22px 56px;
}

.screen { display: none; }
.screen.active { display: block; animation: fadeUp 0.55s cubic-bezier(.2,.8,.2,1); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero { padding: 42px 0 0; }

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 8.8vw, 4.15rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.hero h1 em {
  display: inline-block;
  color: var(--amber-bright);
  font-style: normal;
  text-shadow: 0 0 38px rgba(232, 176, 106, 0.18);
  transition: color 2.8s ease, text-shadow 2.8s ease;
}

body[data-atmosphere="calm"] .hero h1 em {
  color: #abd6dc;
  text-shadow: 0 0 42px rgba(133, 196, 207, 0.22);
}

body[data-atmosphere="warm"] .hero h1 em {
  color: #f3d39b;
  text-shadow: 0 0 48px rgba(240, 176, 99, 0.3);
}

body[data-atmosphere="mixed"] .hero h1 em {
  color: #e9c6a1;
  text-shadow: 0 0 42px rgba(213, 164, 119, 0.22);
}

body[data-atmosphere="calm"] .sea-glow { opacity: 0.55; }
body[data-atmosphere="warm"] .sea-glow { opacity: 0.08; }
body[data-atmosphere="mixed"] .sea-glow { opacity: 0.34; }

.lede {
  margin: 24px 0 0;
  color: rgba(248, 244, 234, 0.74);
  font-size: 15px;
  line-height: 1.9;
}

.hero-purpose {
  margin: 20px 0 0;
  padding-left: 16px;
  color: rgba(248, 244, 234, 0.62);
  border-left: 1px solid rgba(232, 176, 106, 0.35);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.bottle-stage {
  position: relative;
  height: 216px;
  margin: 12px 0 4px;
}

.moon {
  position: absolute;
  right: 8%;
  top: 18px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4d8, #e8c68c 55%, rgba(232, 176, 106, 0.05) 72%);
  box-shadow: 0 0 50px rgba(240, 201, 135, 0.28);
  opacity: 0.9;
}

.bottle {
  position: relative;
  width: 74px;
  height: 148px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.bottle-home {
  position: absolute;
  left: 46%;
  bottom: 30px;
  transform: translateX(-50%) rotate(-6deg);
  animation: float 7s ease-in-out infinite;
}

.cork {
  position: absolute;
  left: 26px;
  top: 0;
  width: 22px;
  height: 20px;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #8b5f38, #c08a58 45%, #7a4d2c);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.15);
  z-index: 3;
}

.glass {
  position: absolute;
  left: 13px;
  top: 16px;
  width: 48px;
  height: 58px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(90deg, rgba(189, 235, 231, 0.18), rgba(255,255,255,0.06) 35%, rgba(146, 215, 211, 0.2) 70%, rgba(255,255,255,0.05));
  border: 1px solid rgba(189, 235, 231, 0.4);
  z-index: 2;
}

.glass::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 58px;
  width: 30px;
  height: 74px;
  border-radius: 5px 5px 16px 16px;
  background: linear-gradient(90deg, rgba(189, 235, 231, 0.16), rgba(255,255,255,0.04) 42%, rgba(146, 215, 211, 0.17));
  border: 1px solid rgba(189, 235, 231, 0.38);
  border-top: none;
}

.note {
  position: absolute;
  left: 26px;
  top: 68px;
  width: 22px;
  height: 42px;
  border-radius: 2px;
  background: linear-gradient(135deg, #f7eedc, #d9c6a7);
  transform: rotate(8deg);
  box-shadow: inset 0 0 0 1px rgba(90, 66, 39, 0.15);
  z-index: 1;
}

.note::after {
  content: "";
  position: absolute;
  inset: 9px 4px auto;
  height: 1px;
  background: rgba(90, 66, 39, 0.3);
  box-shadow: 0 7px 0 rgba(90, 66, 39, 0.22), 0 14px 0 rgba(90, 66, 39, 0.18);
}

.shine {
  position: absolute;
  left: 21px;
  top: 28px;
  width: 6px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(1px);
  transform: rotate(8deg);
  z-index: 4;
}

.waterline {
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 66px;
  height: 14px;
  border-radius: 50%;
  border-top: 1px solid rgba(189, 235, 231, 0.4);
  background: radial-gradient(ellipse at center, rgba(41, 133, 138, 0.3), transparent 70%);
}

.wave {
  position: absolute;
  left: -20%;
  bottom: -18px;
  width: 140%;
  height: 70px;
  border-radius: 45%;
  background: rgba(22, 91, 98, 0.34);
  filter: blur(8px);
  animation: wave 9s linear infinite;
}

.wave-two {
  bottom: -30px;
  background: rgba(13, 61, 69, 0.55);
  animation-duration: 13s;
  animation-direction: reverse;
}

.mood-grid {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.mood-card {
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 20px 20px 18px;
  color: var(--white);
  text-align: left;
  border: 1px solid rgba(232, 176, 106, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    rgba(8, 33, 40, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.mood-card:hover, .mood-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 176, 106, 0.55);
  background:
    linear-gradient(135deg, rgba(232, 176, 106, 0.12), rgba(255,255,255,0.03)),
    rgba(10, 40, 48, 0.86);
}

.mood-glyph {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: var(--amber-bright);
  font-family: var(--serif);
  font-size: 22px;
  border: 1px solid rgba(232, 176, 106, 0.28);
  background: rgba(232, 176, 106, 0.06);
}

.mood-card.joy .mood-glyph {
  color: #f5d79a;
  border-color: rgba(245, 215, 154, 0.38);
}

.mood-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.mood-copy small {
  display: block;
  margin-top: 6px;
  color: rgba(248, 244, 234, 0.5);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.mood-arrow {
  color: var(--amber);
  font-family: var(--serif);
  font-size: 21px;
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.mood-card:hover .mood-arrow { transform: translateX(4px); }

.safety-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0;
  color: rgba(157, 189, 190, 0.78);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

.safety-rule {
  width: 22px;
  height: 1px;
  flex: 0 0 22px;
  background: rgba(143, 176, 178, 0.28);
}

.drift-entry { margin-top: 22px; text-align: center; }

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  color: var(--white);
  border: 1px solid rgba(232, 176, 106, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  letter-spacing: 0.03em;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.ghost:hover, .ghost:focus-visible {
  border-color: var(--amber);
  background: rgba(232, 176, 106, 0.08);
}

.ghost.small { min-height: 38px; padding: 0 14px; font-size: 12px; }

.home-foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(143, 176, 178, 0.14);
  text-align: center;
  color: rgba(157, 189, 190, 0.78);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.home-foot p { margin: 0; }

.home-foot .home-purpose {
  max-width: 560px;
  margin: 16px auto 0;
  color: rgba(157, 189, 190, 0.82);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  text-transform: none;
}

.purpose-link {
  margin-top: 10px;
  padding: 5px 0 3px;
  color: rgba(232, 176, 106, 0.85);
  border: 0;
  border-bottom: 1px solid rgba(232, 176, 106, 0.26);
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.14em;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.purpose-link:hover,
.purpose-link:focus-visible {
  color: var(--amber-bright);
  border-color: rgba(232, 176, 106, 0.7);
}

.visit-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  padding: 9px 16px;
  color: rgba(248, 244, 234, 0.72);
  border: 1px solid rgba(143, 176, 178, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.visit-bar[hidden] { display: none; }

.visit-pulse {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(232, 176, 106, 0.42);
  animation: visitPulse 2.8s ease-out infinite;
}

.visit-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.visit-stat strong {
  color: var(--amber-bright);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.visit-divider { color: rgba(143, 176, 178, 0.35); }

.milestone-note {
  position: relative;
  margin: 28px auto 0;
  padding: 28px 34px 28px 26px;
  overflow: hidden;
  border: 1px solid rgba(232, 176, 106, 0.3);
  border-radius: 10px;
  background:
    radial-gradient(120% 160% at 50% -20%, rgba(232, 176, 106, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.025);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
  animation: fadeUp 0.55s cubic-bezier(.2,.8,.2,1);
}

.milestone-note[hidden] { display: none; }

.milestone-note::before,
.milestone-note::after {
  content: "✦";
  position: absolute;
  top: 19px;
  color: rgba(232, 176, 106, 0.45);
  font-size: 11px;
}

.milestone-note::before { left: 22px; }
.milestone-note::after { right: 22px; }

.milestone-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  color: rgba(248, 244, 234, 0.38);
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.milestone-close:hover { color: var(--amber-bright); }

.milestone-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.milestone-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 142px;
  height: 156px;
  margin: 0 auto;
}

.medal-ribbon {
  position: absolute;
  top: 79px;
  z-index: 0;
  width: 32px;
  height: 66px;
  background: linear-gradient(180deg, #d9a25d 0%, #9b6036 78%, #714027 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.26));
}

.medal-ribbon-left { left: 42px; transform: rotate(9deg); }
.medal-ribbon-right { right: 42px; transform: rotate(-9deg); }

.milestone-medal {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  border: 2px solid rgba(243, 201, 135, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 243, 212, 0.3), transparent 38%),
    radial-gradient(circle at 50% 50%, #1d4b50 0%, #0c2c33 62%, #071e25 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 0 0 5px rgba(232, 176, 106, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.milestone-medal::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px dashed rgba(232, 176, 106, 0.55);
  border-radius: 50%;
  animation: medalSpin 32s linear infinite;
}

.milestone-medal::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(232, 176, 106, 0.22);
  border-radius: 50%;
}

.medal-ornament {
  position: absolute;
  top: 12px;
  color: var(--amber-bright);
  font-size: 11px;
  line-height: 1;
}

#milestoneBadgeNumber {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--amber-bright);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(232, 176, 106, 0.3);
  font-variant-numeric: tabular-nums;
}

.medal-caption {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: rgba(248, 244, 234, 0.56);
  font-size: 7px;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.milestone-copy { min-width: 0; padding-right: 10px; }

.milestone-kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-align: left;
}

.milestone-note h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4.8vw, 1.65rem);
  font-weight: 500;
  line-height: 1.45;
}

.milestone-body {
  max-width: 520px;
  margin: 12px 0 0;
  color: rgba(248, 244, 234, 0.58);
  font-size: 12px;
  line-height: 1.9;
  text-align: left;
}

.back {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 0;
  color: rgba(248, 244, 234, 0.58);
  border: 0;
  background: transparent;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.back:hover { color: var(--amber-bright); }

.paper {
  position: relative;
  color: var(--ink);
  border-radius: 6px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,0.55), transparent 55%),
    repeating-linear-gradient(0deg, rgba(94, 72, 45, 0.035) 0 1px, transparent 1px 28px),
    linear-gradient(135deg, #f7efdf, #ebdcc4);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(94, 72, 45, 0.12);
  transition: box-shadow 2.8s ease;
}

body[data-atmosphere="warm"] .paper {
  box-shadow: 0 30px 90px rgba(105, 50, 22, 0.36), inset 0 0 0 1px rgba(94, 72, 45, 0.14);
}

body[data-atmosphere="calm"] .paper {
  box-shadow: 0 30px 90px rgba(15, 65, 82, 0.38), inset 0 0 0 1px rgba(94, 72, 45, 0.12);
}

.paper::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(94, 72, 45, 0.09);
  border-radius: 4px;
  pointer-events: none;
}

.compose-paper {
  padding: 24px 22px 26px;
  transform: rotate(-0.35deg);
}

.writing-starters {
  margin: 15px 0 4px;
}

.starters-label {
  margin: 0 0 8px;
  color: rgba(103, 91, 76, 0.54);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.starter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.starter {
  min-height: 31px;
  padding: 5px 11px;
  color: rgba(70, 56, 40, 0.7);
  border: 1px solid rgba(94, 72, 45, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-family: var(--hand);
  font-size: 11px;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.starter:hover,
.starter:focus-visible {
  color: var(--ink);
  border-color: rgba(94, 72, 45, 0.42);
  background: rgba(255, 255, 255, 0.3);
}

.paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(94, 72, 45, 0.18);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
}

#message {
  display: block;
  width: 100%;
  min-height: 196px;
  margin: 10px 0 0;
  padding: 10px 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--hand);
  font-size: 19px;
  line-height: 2;
  resize: vertical;
}

#message::placeholder { color: rgba(103, 91, 76, 0.45); }

.voice-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 5px 0 13px;
  padding: 2px 0;
}

.voice-control[hidden] { display: none; }

.voice-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 4px 0;
  color: rgba(70, 56, 40, 0.78);
  border: 0;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.voice-toggle:hover { color: var(--ink); }

.voice-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(94, 72, 45, 0.34);
  border-radius: 50%;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.voice-icon::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 4px;
  height: 7px;
  border-radius: 3px;
  background: currentColor;
}

.voice-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 4px;
  width: 7px;
  height: 4px;
  border: 1px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.voice-toggle.listening { color: #8d3f2b; }

.voice-toggle.listening .voice-icon {
  border-color: rgba(169, 77, 54, 0.65);
  background: rgba(169, 77, 54, 0.08);
  animation: voicePulse 1.8s ease-out infinite;
}

.voice-status {
  flex: 1 1 180px;
  min-width: 0;
  color: rgba(103, 91, 76, 0.52);
  font-size: 9px;
  line-height: 1.55;
}

.voice-status.is-error { color: #8d3f2b; }

.paper-rule {
  height: 1px;
  margin: 2px 0 16px;
  background: rgba(94, 72, 45, 0.15);
}

.atmosphere-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 16px;
  color: rgba(103, 91, 76, 0.54);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.atmosphere-readout::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 2px;
  background: rgba(94, 72, 45, 0.12);
}

.atmosphere-swatch {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #87918b;
  box-shadow: 0 0 0 3px rgba(135, 145, 139, 0.09);
  transition: background 2.8s ease, box-shadow 2.8s ease;
}

body[data-atmosphere="calm"] .atmosphere-swatch {
  background: #72a8b4;
  box-shadow: 0 0 0 3px rgba(114, 168, 180, 0.12);
}

body[data-atmosphere="warm"] .atmosphere-swatch {
  background: #d69a56;
  box-shadow: 0 0 0 3px rgba(214, 154, 86, 0.13);
}

body[data-atmosphere="mixed"] .atmosphere-swatch {
  background: #b19477;
  box-shadow: 0 0 0 3px rgba(177, 148, 119, 0.12);
}

.atmosphere-key { flex: 0 0 auto; }

.atmosphere-value {
  flex: 0 1 auto;
  overflow: hidden;
  color: rgba(44, 34, 24, 0.6);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 2.8s ease;
}

.atmosphere-echo {
  min-height: 20px;
  margin: -4px 0 14px;
  color: rgba(57, 44, 31, 0.67);
  font-family: var(--hand);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.atmosphere-echo.visible {
  opacity: 1;
  transform: translateY(0);
}

.compose-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.reply-language-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 72, 45, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.reply-language-row label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.reply-language-row select {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  color: var(--ink);
  border: 1px solid rgba(94, 72, 45, 0.24);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.language-hint {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

#nickname {
  min-width: 0;
  width: 46%;
  padding: 8px 2px;
  color: var(--ink);
  border: 0;
  border-bottom: 1px dashed rgba(94, 72, 45, 0.3);
  outline: 0;
  background: transparent;
  font-family: var(--hand);
  font-size: 16px;
}

#nickname::placeholder { color: rgba(103, 91, 76, 0.5); }

.stamp-picker { display: flex; gap: 8px; }

.stamp {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  padding: 0;
  color: rgba(103, 91, 76, 0.7);
  border: 1px dashed rgba(94, 72, 45, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-family: var(--serif);
  font-size: 13px;
  transition: all 0.2s ease;
}

.stamp:hover { border-color: rgba(94, 72, 45, 0.7); }

.stamp.selected {
  color: #8d3f2b;
  border: 1px solid #a94d36;
  background: rgba(169, 77, 54, 0.1);
  box-shadow: 0 0 0 3px rgba(169, 77, 54, 0.09);
}

.visibility-picker {
  min-width: 0;
  margin: 22px 0 6px;
  padding: 0;
  border: 0;
}

.visibility-picker legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.visibility-options {
  display: grid;
  gap: 8px;
}

.visibility-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(94, 72, 45, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.visibility-option:hover {
  border-color: rgba(94, 72, 45, 0.3);
  background: rgba(255, 255, 255, 0.2);
}

.visibility-option:has(input:checked) {
  border-color: rgba(141, 92, 50, 0.58);
  background: rgba(232, 176, 106, 0.12);
  box-shadow: inset 0 0 0 1px rgba(141, 92, 50, 0.08);
}

.visibility-option input {
  flex: 0 0 auto;
  margin: 3px 0 0;
  accent-color: #8d5c32;
}

.visibility-option strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.visibility-option small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
}

.visibility-option .option-tag {
  margin-left: 7px;
  padding: 1px 6px;
  color: #8d5c32;
  border: 1px solid rgba(141, 92, 50, 0.28);
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.visibility-rule {
  margin: 9px 0 0;
  color: rgba(103, 91, 76, 0.82);
  font-size: 10px;
  line-height: 1.65;
}

.release-note {
  max-width: 430px;
  min-height: 18px;
  margin: 8px auto 0;
  color: rgba(143, 176, 178, 0.74);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  color: #2b1c0d;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3cf92, #dca15a);
  box-shadow: 0 12px 30px rgba(220, 161, 90, 0.2), inset 0 1px 0 rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover, .primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(220, 161, 90, 0.28), inset 0 1px 0 rgba(255,255,255,0.5);
}

.primary:active { transform: translateY(0); }

.primary.wide { width: 100%; }

.fineprint {
  margin: 14px 0 0;
  color: rgba(103, 91, 76, 0.72);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.fineprint.center { color: rgba(157, 189, 190, 0.74); margin-top: 20px; }

.loading-wrap {
  display: grid;
  place-items: center;
  min-height: 62vh;
  text-align: center;
}

.bottle-loading {
  margin-bottom: 22px;
  transform: rotate(-8deg);
  animation: float 3.4s ease-in-out infinite;
}

.loading-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.06em;
}

.loading-sub {
  margin: 12px 0 0;
  color: rgba(248, 244, 234, 0.52);
  font-size: 13px;
}

.dots { display: flex; gap: 7px; margin-top: 22px; }
.dots i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: blink 1.4s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: 0.18s; }
.dots i:nth-child(3) { animation-delay: 0.36s; }

.loading-note {
  margin: 30px 0 0;
  color: rgba(143, 176, 178, 0.62);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.reply-wrap { padding-top: 26px; }

.reply-paper {
  padding: 30px 26px 26px;
  transform: rotate(0.5deg);
}

.reply-stamp {
  position: absolute;
  right: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: #8d3f2b;
  border: 1px solid #a94d36;
  border-radius: 50%;
  background: rgba(169, 77, 54, 0.08);
  font-family: var(--serif);
  font-size: 17px;
  transform: rotate(8deg);
  opacity: 0.82;
}

.reply-text {
  min-height: 220px;
  margin: 22px 0 0;
  font-family: var(--hand);
  font-size: 19px;
  line-height: 2.05;
  white-space: pre-wrap;
}

.reply-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: rgba(44, 34, 24, 0.5);
  animation: caret 0.9s step-end infinite;
}

.reply-text.done::after { display: none; }

.signature {
  margin: 24px 0 0;
  text-align: right;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 14px;
}

.reply-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.reply-actions > * { flex: 1; }

.text-btn {
  display: block;
  margin: 18px auto 0;
  padding: 8px 0;
  color: rgba(248, 244, 234, 0.6);
  border: 0;
  border-bottom: 1px dashed rgba(248, 244, 234, 0.22);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.text-btn:hover { color: var(--amber-bright); }

.text-btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

.text-btn:disabled:hover { color: rgba(248, 244, 234, 0.6); }

.drift-head { padding: 12px 0 20px; }

.drift-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 500;
}

.drift-head p:not(.eyebrow) {
  margin: 12px 0 20px;
  color: rgba(248, 244, 234, 0.58);
  font-size: 13px;
  line-height: 1.8;
}

.bottle-grid {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.drift-card {
  display: block;
  width: 100%;
  padding: 17px 18px;
  color: var(--white);
  text-align: left;
  border: 1px solid rgba(143, 176, 178, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.drift-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 176, 106, 0.38);
  background: rgba(255, 255, 255, 0.055);
}

.drift-card .drift-meta {
  display: flex;
  justify-content: space-between;
  color: rgba(143, 176, 178, 0.66);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.drift-card .drift-excerpt {
  margin: 10px 0 0;
  color: rgba(248, 244, 234, 0.78);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: end center;
  padding: 18px;
}

.modal.open { display: grid; animation: fadeIn 0.25s ease; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 13, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 26px 22px 22px;
  border: 1px solid rgba(232, 176, 106, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(232, 176, 106, 0.1), transparent 55%),
    #0c2b33;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: sheetUp 0.35s cubic-bezier(.2,.8,.2,1);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px; height: 34px;
  color: rgba(248, 244, 234, 0.6);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 22px;
  line-height: 1;
}

.modal-card h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.modal-body {
  color: rgba(248, 244, 234, 0.78);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.modal-body .modal-note {
  margin: 16px 0 0;
  padding: 14px 15px;
  border-left: 2px solid rgba(232, 176, 106, 0.5);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(248, 244, 234, 0.65);
  font-size: 14px;
}

.withdraw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 18px;
  padding: 0 16px;
  color: rgba(248, 244, 234, 0.82);
  border: 1px solid rgba(143, 176, 178, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.withdraw-btn:hover {
  border-color: rgba(232, 176, 106, 0.5);
  color: var(--amber-bright);
}

.purpose-copy p {
  margin: 0 0 15px;
}

.purpose-copy p:last-child { margin-bottom: 0; }

.purpose-copy .promise-line {
  padding-top: 14px;
  color: rgba(232, 176, 106, 0.8);
  border-top: 1px solid rgba(143, 176, 178, 0.14);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.modal-reply {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 176, 178, 0.14);
}

.modal-reply input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  color: var(--white);
  border: 1px solid rgba(143, 176, 178, 0.2);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.modal-report-row {
  margin-top: 12px;
  text-align: right;
}

.report-btn {
  padding: 4px 0;
  color: rgba(143, 176, 178, 0.58);
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.report-btn:hover { color: var(--amber-bright); }

.report-reasons {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.report-reason-btn {
  width: 100%;
  padding: 12px 14px;
  color: rgba(248, 244, 234, 0.82);
  text-align: left;
  border: 1px solid rgba(143, 176, 178, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--sans);
  font-size: 12px;
}

.report-reason-btn:hover {
  border-color: rgba(232, 176, 106, 0.42);
  color: var(--amber-bright);
}

.modal-reply input::placeholder { color: rgba(248, 244, 234, 0.35); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 20px;
  color: #2b1c0d;
  border-radius: 999px;
  background: var(--amber-bright);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-6deg); }
  50% { transform: translateX(-50%) translateY(-12px) rotate(-3deg); }
}

.bottle-loading { animation-name: float-loading; }
@keyframes float-loading {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes wave {
  from { transform: translateX(-4%) rotate(0deg); }
  to { transform: translateX(4%) rotate(360deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.22; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.25); }
}

@keyframes blink {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@keyframes caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes visitPulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 176, 106, 0.4); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(232, 176, 106, 0); }
}

@keyframes medalSpin { to { transform: rotate(360deg); } }

@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(169, 77, 54, 0.22); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(169, 77, 54, 0); }
}

@media (max-width: 619px) {
  .page-frame { inset: 8px; border-color: rgba(248, 244, 234, 0.07); }
  .hero-purpose { margin-top: 16px; font-size: 12px; }
  .safety-note { flex-wrap: wrap; font-size: 8px; letter-spacing: 0.1em; }
  .starter { font-size: 10.5px; }
  .voice-status { flex-basis: 100%; padding-left: 25px; }
  .atmosphere-readout {
    gap: 6px;
    font-size: 7px;
    letter-spacing: 0.14em;
  }
  .milestone-note { padding: 28px 20px 25px; }
  .milestone-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    text-align: center;
  }
  .milestone-copy { padding: 0 6px; }
  .milestone-kicker, .milestone-body { text-align: center; }
  .milestone-body { margin-left: auto; margin-right: auto; }
}

@media (min-width: 620px) {
  .mood-grid { grid-template-columns: 1fr 1fr; }
  .bottle-grid { grid-template-columns: 1fr 1fr; }
  .reply-actions { max-width: 360px; }
  .reply-wrap { max-width: 620px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
