@charset "UTF-8";

:root {
  --ink: #f8f1e8;
  --muted: rgba(248, 241, 232, 0.58);
  --faint: rgba(248, 241, 232, 0.16);
  --gold: #e8c989;
  --rose: #f4b8bb;
  --blush: #e98e9c;
  --deep: #0b0a17;
  --glass: rgba(17, 13, 29, 0.58);
  --glass-strong: rgba(19, 14, 31, 0.82);
  --serif: "STKaiti", "KaiTi", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  user-select: none;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

#game,
#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#game {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#world {
  display: block;
  touch-action: none;
}

.atmosphere,
.topbar,
.journey,
.orbit-hint,
.hero,
.action-dock,
.flight-caption,
.cut-cinematic,
.food-panel,
.eat-panel,
.finale,
.toast {
  position: fixed;
}

.atmosphere {
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ambient-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 22%, rgba(8, 7, 18, 0.08) 53%, rgba(7, 6, 16, 0.42) 100%),
    linear-gradient(180deg, transparent 64%, rgba(8, 7, 16, 0.3) 100%);
}

.film-grain {
  position: absolute;
  inset: -30%;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain 0.28s steps(2) infinite;
  mix-blend-mode: soft-light;
}

.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 17vw 4vw rgba(5, 4, 13, 0.56);
}

@keyframes grain {
  0% { transform: translate3d(2%, -1%, 0); }
  25% { transform: translate3d(-2%, 3%, 0); }
  50% { transform: translate3d(1%, 2%, 0); }
  75% { transform: translate3d(3%, -2%, 0); }
  100% { transform: translate3d(-1%, 1%, 0); }
}

.topbar {
  top: max(26px, env(safe-area-inset-top));
  left: clamp(24px, 4vw, 62px);
  right: clamp(24px, 4vw, 62px);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.monogram {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
}

.monogram-star {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(232, 201, 137, 0.43);
  border-radius: 50%;
  color: var(--gold);
  font-size: 13px;
  box-shadow: 0 0 24px rgba(232, 201, 137, 0.1) inset;
}

.monogram-number {
  font-family: Georgia, serif;
  font-size: 20px;
  letter-spacing: 0.12em;
}

.monogram-copy {
  padding-left: 11px;
  border-left: 1px solid var(--faint);
  color: var(--muted);
  font-size: 7px;
  line-height: 1.55;
  letter-spacing: 0.18em;
}

.chapter {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: rgba(248, 241, 232, 0.74);
  font-family: Georgia, var(--serif);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.chapter i {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 201, 137, 0.55), transparent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.sound-button,
.fullscreen-button,
.help-button {
  height: 34px;
  border: 1px solid var(--faint);
  background: rgba(15, 12, 25, 0.22);
  color: var(--muted);
  backdrop-filter: blur(12px);
  transition: 180ms ease;
}

.sound-button:hover,
.fullscreen-button:hover,
.help-button:hover {
  border-color: rgba(232, 201, 137, 0.45);
  color: var(--ink);
}

.sound-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.sound-waves {
  display: flex;
  height: 13px;
  align-items: center;
  gap: 2px;
}

.sound-waves i {
  width: 1px;
  height: 4px;
  background: var(--gold);
  animation: soundwave 1s ease-in-out infinite alternate;
}

.sound-waves i:nth-child(2) { height: 10px; animation-delay: -0.7s; }
.sound-waves i:nth-child(3) { height: 6px; animation-delay: -0.3s; }
.sound-button.is-muted .sound-waves i { animation: none; height: 2px; background: var(--muted); }

@keyframes soundwave {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1); }
}

.help-button {
  width: 34px;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 13px;
}

.fullscreen-button {
  position: relative;
  width: 34px;
  border-radius: 50%;
}

.fullscreen-button span,
.fullscreen-button span::before {
  position: absolute;
  inset: 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  content: "";
}

.fullscreen-button span {
  opacity: 0.72;
}

.fullscreen-button span::before {
  inset: 3px;
  border-color: var(--gold);
  opacity: 0;
  transform: scale(0.7);
  transition: 0.2s ease;
}

.fullscreen-button.is-on span {
  opacity: 0.45;
  transform: scale(1.16);
}

.fullscreen-button.is-on span::before {
  opacity: 1;
  transform: scale(0.65);
}

.fullscreen-button[hidden] {
  display: none;
}

.journey {
  top: 50%;
  left: clamp(24px, 4vw, 62px);
  z-index: 7;
  transform: translateY(-50%);
  pointer-events: none;
}

.journey ol {
  position: relative;
  display: grid;
  gap: 27px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.journey-line {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 6px;
  width: 1px;
  overflow: hidden;
  background: rgba(248, 241, 232, 0.1);
}

.journey-line span {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(var(--gold), rgba(244, 184, 187, 0.65));
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.journey li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.3;
  transition: 0.5s ease;
}

.journey li::before {
  position: relative;
  z-index: 1;
  width: 5px;
  height: 5px;
  margin-left: 4px;
  border: 1px solid rgba(248, 241, 232, 0.4);
  border-radius: 50%;
  background: var(--deep);
  content: "";
  transition: 0.5s ease;
}

.journey li span {
  width: 16px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.journey li b {
  white-space: nowrap;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.journey li.is-done {
  opacity: 0.52;
}

.journey li.is-done::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(232, 201, 137, 0.4);
}

.journey li.is-active {
  opacity: 1;
}

.journey li.is-active::before {
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 201, 137, 0.12), 0 0 15px rgba(232, 201, 137, 0.55);
}

.hero {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(540px, calc(100vw - 48px));
  text-align: center;
  transform: translate(-50%, -47%);
  transition: opacity 0.9s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.9s;
}

.hero::before {
  position: absolute;
  inset: -38px -74px;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(9, 7, 17, 0.74) 0, rgba(12, 9, 23, 0.46) 42%, rgba(13, 10, 24, 0.12) 63%, transparent 75%);
  filter: blur(8px);
  content: "";
}

.hero.is-leaving {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -54%);
  pointer-events: none;
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0 0 21px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.4em;
}

.hero-kicker span {
  width: 35px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 201, 137, 0.6));
}

.hero-kicker span:last-child {
  transform: scaleX(-1);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.78;
  text-shadow: 0 5px 16px rgba(9, 7, 17, 0.56), 0 14px 48px rgba(9, 7, 17, 0.72);
}

.hero h1 span {
  display: block;
  font-size: clamp(53px, 6.4vw, 94px);
  letter-spacing: 0.13em;
}

.hero h1 small {
  display: block;
  margin-top: 27px;
  color: rgba(248, 241, 232, 0.75);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.55em;
}

.hero-copy {
  margin: 33px 0 27px;
  color: rgba(248, 241, 232, 0.63);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 9px rgba(9, 7, 17, 0.92), 0 0 28px rgba(9, 7, 17, 0.72);
}

.primary-button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 27px;
  overflow: hidden;
  padding: 0 26px;
  border: 1px solid rgba(232, 201, 137, 0.55);
  border-radius: 2px;
  background: linear-gradient(120deg, rgba(43, 31, 52, 0.88), rgba(20, 15, 29, 0.72));
  color: #fffaf0;
  box-shadow: 0 12px 38px rgba(5, 4, 12, 0.35), inset 0 0 24px rgba(232, 201, 137, 0.04);
  font-size: 10px;
  letter-spacing: 0.2em;
  backdrop-filter: blur(14px);
  transition: 220ms ease;
}

.primary-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 42%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  content: "";
  transition: left 0.6s ease;
}

.primary-button:hover {
  border-color: rgba(255, 234, 186, 0.9);
  background-color: rgba(232, 201, 137, 0.13);
  box-shadow: 0 16px 48px rgba(5, 4, 12, 0.32), 0 0 24px rgba(232, 201, 137, 0.1);
  transform: translateY(-2px);
}

.primary-button:hover::before {
  left: 120%;
}

.primary-button i {
  color: var(--gold);
  font-size: 16px;
  font-style: normal;
}

.hero-button {
  min-width: 188px;
}

.hero-tip {
  margin: 18px 0 0;
  color: rgba(248, 241, 232, 0.32);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.toast {
  top: 17%;
  left: 50%;
  z-index: 20;
  padding: 10px 18px;
  border: 1px solid rgba(232, 201, 137, 0.2);
  border-radius: 999px;
  background: rgba(14, 11, 24, 0.7);
  color: rgba(255, 248, 236, 0.8);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.13em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: 0.35s ease;
  backdrop-filter: blur(18px);
}

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

.action-dock {
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 25px));
  left: 50%;
  z-index: 10;
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 241, 232, 0.13);
  border-radius: 6px;
  background: rgba(13, 10, 23, 0.66);
  box-shadow: 0 24px 80px rgba(5, 4, 11, 0.44), inset 0 1px rgba(255, 255, 255, 0.04);
  transform: translateX(-50%);
  backdrop-filter: blur(22px) saturate(1.2);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
}

.action-dock.is-hidden,
.flight-caption.is-hidden,
.cut-dock.is-hidden,
.cut-cinematic.is-hidden,
.food-panel.is-hidden,
.eat-panel.is-hidden,
.finale.is-hidden,
.help-sheet.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.action-dock.is-hidden {
  transform: translate(-50%, 12px);
}

.wish-counter {
  width: 98px;
  padding-left: 6px;
}

.wish-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.wish-counter strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.wish-counter strong small {
  color: rgba(248, 241, 232, 0.28);
  font-size: 11px;
}

.wish-dots {
  display: flex;
  width: 70px;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.wish-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 5px rgba(232, 201, 137, 0.65);
  transition: 0.3s ease;
}

.wish-dots i.is-out {
  background: rgba(248, 241, 232, 0.15);
  box-shadow: none;
}

.dock-divider {
  width: 1px;
  height: 45px;
  background: linear-gradient(transparent, rgba(248, 241, 232, 0.12), transparent);
}

.blow-button {
  position: relative;
  display: flex;
  min-width: 190px;
  height: 54px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 0 16px;
  border: 1px solid rgba(232, 201, 137, 0.34);
  border-radius: 3px;
  background: linear-gradient(100deg, rgba(232, 201, 137, 0.12), rgba(244, 184, 187, 0.07));
  touch-action: none;
  transition: 0.2s ease;
}

.blow-button:hover,
.blow-button.is-blowing {
  border-color: rgba(244, 214, 158, 0.72);
  background: linear-gradient(100deg, rgba(232, 201, 137, 0.2), rgba(244, 184, 187, 0.1));
}

.blow-button.is-blowing {
  transform: scale(0.985);
}

.blow-icon {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(232, 201, 137, 0.3);
  border-radius: 50%;
}

.blow-icon i {
  position: absolute;
  top: 50%;
  left: 7px;
  width: 14px;
  height: 1px;
  border-radius: 99px;
  background: var(--gold);
  opacity: 0.7;
}

.blow-icon i:first-child { transform: translateY(-5px); }
.blow-icon i:nth-child(2) { width: 10px; transform: translateY(0); }
.blow-icon i:last-child { width: 6px; transform: translateY(5px); }

.blow-button.is-blowing .blow-icon i {
  animation: breath-lines 0.55s ease-in-out infinite alternate;
}

@keyframes breath-lines {
  to { width: 19px; opacity: 1; }
}

.blow-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.blow-copy b {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.blow-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.blow-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.blow-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  box-shadow: 0 0 9px var(--gold);
  transition: width 0.18s linear;
}

.mic-button {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.mic-button:hover,
.mic-button.is-on {
  color: var(--ink);
}

.mic-button.is-on .mic-icon {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 184, 187, 0.08), 0 0 12px rgba(244, 184, 187, 0.25);
}

.mic-button.is-on .mic-icon::before {
  background: var(--rose);
}

.mic-icon {
  position: relative;
  width: 10px;
  height: 15px;
  border: 1px solid rgba(248, 241, 232, 0.45);
  border-radius: 8px;
}

.mic-icon::before {
  position: absolute;
  top: 5px;
  left: 3px;
  width: 2px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.flight-caption {
  top: 21%;
  left: 50%;
  z-index: 7;
  text-align: center;
  transform: translateX(-50%);
  transition: 0.8s ease;
}

.flight-caption p {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.36em;
}

.flight-caption strong {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-shadow: 0 4px 25px rgba(5, 4, 11, 0.7);
}

.flight-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}

.flight-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  animation: flight-dot 1.2s ease-in-out infinite;
}

.flight-dots i:nth-child(2) { animation-delay: 0.2s; }
.flight-dots i:nth-child(3) { animation-delay: 0.4s; }

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

.cut-dock {
  min-width: min(580px, calc(100vw - 48px));
  justify-content: space-between;
  padding: 13px 14px 13px 24px;
}

.cut-copy {
  display: flex;
  flex-direction: column;
}

.cut-copy span {
  margin-bottom: 5px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.3em;
}

.cut-copy strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.cut-button {
  min-width: 164px;
  min-height: 50px;
}

.knife-mark {
  position: relative;
  width: 22px;
  height: 1px;
  transform: rotate(-24deg);
  background: var(--gold);
}

.knife-mark::before {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 8px;
  height: 5px;
  border: 1px solid var(--gold);
  content: "";
}

.cut-cinematic {
  top: 23%;
  left: 50%;
  z-index: 9;
  width: 260px;
  text-align: center;
  transform: translateX(-50%);
}

.cut-cinematic p {
  margin: 0 0 12px;
  color: rgba(248, 241, 232, 0.72);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.slim-progress {
  height: 1px;
  overflow: hidden;
  background: rgba(248, 241, 232, 0.14);
}

.slim-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  animation: cut-progress 2.7s cubic-bezier(0.3, 0.2, 0.2, 1) forwards;
}

@keyframes cut-progress {
  to { width: 100%; }
}

.food-panel {
  bottom: max(27px, calc(env(safe-area-inset-bottom) + 20px));
  left: 50%;
  z-index: 15;
  width: min(900px, calc(100vw - 40px));
  padding: 23px;
  border: 1px solid rgba(248, 241, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 45%),
    rgba(12, 9, 22, 0.8);
  box-shadow: 0 30px 100px rgba(4, 3, 10, 0.68), inset 0 1px rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
  backdrop-filter: blur(28px) saturate(1.2);
  animation: panel-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: 0.55s ease;
}

@keyframes panel-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.panel-heading {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin-bottom: 16px;
}

.panel-heading p {
  margin: 0;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.3em;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.panel-heading span {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.food-card {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  min-height: 84px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(248, 241, 232, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  transition: 0.25s ease;
}

.food-card:hover {
  border-color: rgba(232, 201, 137, 0.42);
  background: rgba(232, 201, 137, 0.075);
  transform: translateY(-3px);
}

.food-card.is-selected {
  border-color: var(--gold);
  background: rgba(232, 201, 137, 0.1);
}

.food-visual {
  position: relative;
  display: block;
  width: 62px;
  height: 60px;
  filter: drop-shadow(0 9px 10px rgba(0, 0, 0, 0.28));
}

.cake-slice .cake-top {
  position: absolute;
  top: 13px;
  left: 9px;
  width: 44px;
  height: 19px;
  transform: skewX(-25deg);
  border-radius: 50% 50% 6px 6px;
  background: linear-gradient(180deg, #fff9ed, #edd5c8);
}

.cake-layer {
  position: absolute;
  left: 10px;
  width: 42px;
  height: 12px;
  transform: skewX(-25deg);
  border-radius: 2px;
}

.cake-layer-a { top: 31px; background: linear-gradient(90deg, #f1cba7, #f7dec3); }
.cake-layer-b { top: 43px; background: linear-gradient(90deg, #e9b5b0, #f6d5cf); }

.cake-berry {
  position: absolute;
  top: 7px;
  left: 27px;
  width: 12px;
  height: 15px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(135deg, #ff8e94, #c93e5a);
  transform: rotate(12deg);
}

.cake-berry::before {
  position: absolute;
  top: -3px;
  left: 3px;
  width: 8px;
  height: 5px;
  transform: rotate(-18deg);
  background: #95b67b;
  clip-path: polygon(50% 0, 62% 55%, 100% 50%, 70% 76%, 84% 100%, 50% 83%, 13% 100%, 29% 72%, 0 54%, 39% 55%);
  content: "";
}

.macaron .macaron-top,
.macaron .macaron-base {
  position: absolute;
  left: 11px;
  width: 42px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 38% 24%, #ffd8dc, #de8c9c 54%, #b36278);
}

.macaron .macaron-top { top: 11px; }
.macaron .macaron-base { top: 33px; box-shadow: inset 0 -5px rgba(129, 60, 83, 0.18); }

.macaron .macaron-cream {
  position: absolute;
  top: 28px;
  left: 15px;
  z-index: 2;
  width: 34px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(#fff7e4, #efd2bc);
}

.macaron em {
  position: absolute;
  top: 3px;
  left: 47px;
  color: var(--gold);
  font-size: 8px;
  font-style: normal;
}

.cup-glass {
  position: absolute;
  top: 18px;
  left: 14px;
  width: 36px;
  height: 38px;
  clip-path: polygon(0 0, 100% 0, 83% 100%, 17% 100%);
  background: linear-gradient(135deg, rgba(220, 251, 255, 0.12), rgba(255, 255, 255, 0.35), rgba(185, 232, 241, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cup-cream {
  position: absolute;
  top: 25px;
  left: 17px;
  width: 30px;
  height: 12px;
  border-radius: 50%;
  background: #f5e6d2;
  box-shadow: 0 8px 0 #ead4b8;
}

.cup-berry {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffc1c5, #bd425c 72%);
}

.berry-a { top: 15px; left: 19px; }
.berry-b { top: 12px; left: 30px; background: radial-gradient(circle at 35% 30%, #a7b9ff, #5760ac 72%); }
.berry-c { top: 18px; left: 39px; }

.cup-leaf {
  position: absolute;
  top: 10px;
  left: 27px;
  width: 10px;
  height: 6px;
  border-radius: 100% 0;
  background: #93b37f;
  transform: rotate(-30deg);
}

.food-name {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.food-name b {
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.food-name small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-pick {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(232, 201, 137, 0.2);
  border-radius: 50%;
  color: var(--gold);
  font-size: 7px;
  opacity: 0;
  transform: translateX(-4px);
  transition: 0.25s ease;
}

.food-card:hover .food-pick {
  opacity: 1;
  transform: translateX(0);
}

.food-note {
  margin: 12px 0 0;
  color: rgba(248, 241, 232, 0.3);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-align: center;
}

.food-panel.is-selecting .food-card:not(.is-selected) {
  opacity: 0.35;
  transform: scale(0.98);
}

.food-panel.is-leaving {
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
}

.eat-panel {
  bottom: max(36px, calc(env(safe-area-inset-bottom) + 26px));
  left: 50%;
  z-index: 12;
  display: flex;
  min-width: 420px;
  align-items: center;
  gap: 20px;
  padding: 14px 14px 14px 20px;
  border: 1px solid rgba(248, 241, 232, 0.12);
  border-radius: 5px;
  background: rgba(12, 9, 22, 0.7);
  transform: translateX(-50%);
  backdrop-filter: blur(24px);
  transition: 0.45s ease;
}

.eat-progress {
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.eat-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  transition: width 0.45s ease;
}

.eat-panel p {
  display: flex;
  min-width: 150px;
  flex-direction: column;
  margin: 0;
}

.eat-panel p span {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.eat-panel p small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.bite-button {
  min-width: 150px;
  min-height: 44px;
  margin-left: auto;
}

.bite-button.is-biting {
  animation: bite-bounce 0.32s ease;
}

.bite-button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

@keyframes bite-bounce {
  50% { transform: scale(0.96); }
}

.finale {
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px));
  left: 50%;
  z-index: 14;
  width: min(700px, calc(100vw - 40px));
  padding: 20px 28px 23px;
  border-top: 1px solid rgba(232, 201, 137, 0.32);
  background: linear-gradient(180deg, transparent, rgba(8, 6, 17, 0.72));
  text-align: center;
  transform: translateX(-50%);
  transition: 1s ease;
}

.finale::before,
.finale::after {
  position: absolute;
  top: -3px;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold);
  content: "";
  box-shadow: 0 0 12px rgba(232, 201, 137, 0.6);
}

.finale::before { left: 0; }
.finale::after { right: 0; }

.finale p {
  margin: 0 0 8px;
  color: rgba(232, 201, 137, 0.7);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.4em;
}

.finale h2 {
  margin: 0 0 17px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16em;
}

.finale h2 span {
  color: #fff1cf;
  text-shadow: 0 0 24px rgba(232, 201, 137, 0.3);
}

.finale-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.finale-actions .primary-button {
  min-height: 39px;
  padding: 0 21px;
  font-size: 8px;
}

.text-button {
  padding: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--ink);
}

.orbit-hint {
  right: clamp(24px, 4vw, 62px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(248, 241, 232, 0.28);
  font-size: 7px;
  letter-spacing: 0.12em;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.drag-ring {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(248, 241, 232, 0.16);
  border-radius: 50%;
}

.drag-ring::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
  animation: drag-dot 3s ease-in-out infinite;
}

@keyframes drag-dot {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  35% { transform: translate(4px, 0); opacity: 0.9; }
  70% { transform: translate(0, 4px); opacity: 0.7; }
}

.help-sheet {
  top: 50%;
  left: 50%;
  z-index: 40;
  width: min(470px, calc(100vw - 36px));
  padding: 34px;
  border: 1px solid rgba(248, 241, 232, 0.15);
  border-radius: 8px;
  background:
    radial-gradient(circle at 90% 0, rgba(232, 201, 137, 0.12), transparent 35%),
    rgba(13, 10, 23, 0.94);
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(30px);
  transition: 0.35s ease;
}

.help-sheet .help-eyebrow {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.35em;
}

.help-sheet h2 {
  margin: 10px 0 25px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.help-sheet ol {
  display: grid;
  gap: 15px;
  padding: 0;
  margin: 0 0 25px;
  list-style: none;
}

.help-sheet li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(248, 241, 232, 0.08);
}

.help-sheet li b {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 400;
}

.help-sheet li span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.help-close {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  font-weight: 200;
}

.help-sheet .primary-button {
  width: 100%;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(82, 55, 101, 0.35), transparent 32%),
    #0b0a17;
  transition: opacity 1s ease, visibility 1s;
}

.loading-screen.is-gone {
  visibility: hidden;
  opacity: 0;
}

.loading-star {
  color: var(--gold);
  font-size: 17px;
  animation: loading-spin 3s linear infinite;
}

.loading-screen p {
  margin: 19px 0 14px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.loading-line {
  width: 120px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.loading-line i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: loading-line 1.3s ease-in-out infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-line {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.webgl-fallback {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  background: #0b0a17;
  text-align: center;
}

.webgl-fallback.is-hidden {
  display: none;
}

.webgl-fallback strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.webgl-fallback span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 960px) {
  .journey {
    display: none;
  }

  .orbit-hint {
    display: none;
  }

  .hero {
    transform: translate(-50%, -43%);
  }

  .hero h1 span {
    font-size: clamp(50px, 9vw, 74px);
  }

  .food-panel {
    padding: 18px;
  }

  .panel-heading {
    flex-wrap: wrap;
  }

  .panel-heading span {
    width: 100%;
    margin-left: 0;
  }

  .food-card {
    grid-template-columns: 50px 1fr;
  }

  .food-visual {
    transform: scale(0.84);
    transform-origin: center;
  }

  .food-pick {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar {
    top: max(16px, env(safe-area-inset-top));
    left: 17px;
    right: 17px;
  }

  .monogram-copy,
  .chapter {
    display: none;
  }

  .sound-button {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .fullscreen-button {
    width: 34px;
  }

  #soundLabel {
    display: none;
  }

  .hero {
    top: 45%;
    width: calc(100vw - 34px);
  }

  .hero-kicker {
    margin-bottom: 15px;
    font-size: 7px;
    letter-spacing: 0.25em;
  }

  .hero h1 span {
    font-size: clamp(43px, 14vw, 66px);
    letter-spacing: 0.07em;
  }

  .hero h1 small {
    margin-top: 22px;
    font-size: 9px;
  }

  .hero-copy {
    margin: 25px 0 21px;
    font-size: 12px;
  }

  .hero-tip {
    font-size: 7px;
  }

  .action-dock {
    right: 13px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 13px;
    width: auto;
    min-height: 72px;
    gap: 9px;
    padding: 9px;
    transform: none;
  }

  .action-dock.is-hidden {
    transform: translateY(12px);
  }

  .wish-counter {
    width: 60px;
    padding-left: 3px;
  }

  .wish-label {
    font-size: 7px;
  }

  .wish-counter strong {
    font-size: 23px;
  }

  .wish-dots {
    width: 48px;
    gap: 3px;
  }

  .dock-divider {
    display: none;
  }

  .blow-button {
    min-width: 0;
    flex: 1;
    height: 52px;
    gap: 9px;
    padding: 0 10px;
  }

  .blow-icon {
    width: 25px;
    height: 25px;
  }

  .blow-copy b {
    font-size: 10px;
  }

  .blow-copy small {
    display: none;
  }

  .mic-button {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  #micLabel {
    display: none;
  }

  .flight-caption {
    top: 16%;
  }

  .cut-dock {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding: 13px;
  }

  .cut-copy {
    align-items: center;
    text-align: center;
  }

  .cut-button {
    width: 100%;
  }

  .cut-cinematic {
    top: 17%;
  }

  .food-panel {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 15px 12px 12px;
    transform: none;
    animation-name: panel-up-mobile;
  }

  .food-panel.is-leaving {
    transform: translateY(15px);
  }

  @keyframes panel-up-mobile {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .panel-heading {
    display: block;
    margin-bottom: 12px;
    text-align: center;
  }

  .panel-heading h2 {
    margin: 4px 0 5px;
    font-size: 18px;
  }

  .panel-heading span {
    display: block;
    font-size: 7px;
  }

  .food-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .food-card {
    grid-template-columns: 48px 1fr auto;
    min-height: 58px;
    padding: 5px 11px 5px 5px;
  }

  .food-visual {
    width: 48px;
    height: 50px;
    transform: scale(0.74);
  }

  .food-name b {
    margin-bottom: 3px;
    font-size: 12px;
  }

  .food-name small {
    font-size: 7px;
  }

  .food-card::after {
    padding: 0 4px;
    color: var(--gold);
    font-size: 13px;
    content: "›";
  }

  .food-note {
    display: none;
  }

  .eat-panel {
    right: 13px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 13px;
    width: auto;
    min-width: 0;
    transform: none;
  }

  .eat-panel p {
    min-width: 0;
  }

  .bite-button {
    min-width: 138px;
  }

  .finale {
    right: 13px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 13px;
    width: auto;
    padding: 16px 17px 18px;
    transform: none;
  }

  .finale-actions {
    gap: 7px;
  }

  .toast {
    top: 11%;
    max-width: calc(100vw - 34px);
    white-space: nowrap;
  }

  .help-sheet {
    padding: 27px 22px;
  }
}

@media (max-height: 690px) {
  .hero {
    transform: translate(-50%, -44%) scale(0.9);
  }

  .hero-copy {
    margin: 20px 0 18px;
  }

  .journey ol {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-grain,
  .sound-waves i,
  .drag-ring::after,
  .loading-star,
  .flight-dots i {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
  }
}
