/* CHARM / ชาม — fortune ritual (Figma "v2" flow: opening → focus → revealing → shake → result).
   Mobile-first. One warm palette: cream / terracotta / olive-gold / rose / brown. */

:root {
  --ink: #1d1d1d;
  --headline: #2b2727;
  --paper: #dfd8cc; /* opening ground + header */
  --paper-2: #faf7f2; /* ritual + result ground */
  --cream: #ddd8ce; /* text on brown */
  --brown: #3c2e21; /* footer + body copy */
  --teal: #97b3b0;
  --terracotta: #d66622; /* action */
  --terracotta-ink: #201e1b; /* text on action */
  --olive: #948439; /* gold accent / hairlines */
  --rose: #d4a7a0;
  --muted: #8c7c72;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --frame: 430px;
  --btn-w: 357px;

  /* Live viewport height — fills whatever device it runs on. app.js overrides this
     with the exact pixel height (visualViewport / innerHeight) and keeps it in sync
     as mobile browser chrome shows and hides; these are the fallbacks. */
  --app-h: 100vh;
}
@supports (height: 100dvh) {
  :root {
    --app-h: 100dvh;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
}
body {
  margin: 0;
  background: var(--paper-2);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
p,
h1 {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font-family: inherit;
}
[hidden] {
  display: none !important;
}

.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;
}

/* ---------- frame ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
  min-height: var(--app-h);
  overflow: hidden;
  background: var(--paper-2);
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: var(--app-h);
  width: 100%;
}
.screen:focus {
  outline: none;
}
.screen.is-active {
  animation: screen-in 380ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- shared type ---------- */
.screen-title {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: var(--headline);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.screen-title--sm {
  font-size: 22px;
}
.screen-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--olive);
  font-size: 10px;
  line-height: 1;
}
.ornament-rule {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--olive);
  opacity: 0.55;
}

/* ---------- orbs ---------- */
.orbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.orb {
  display: block;
  border-radius: 50%;
  animation: orb-pulse 1.1s ease-in-out infinite;
}
.orbs--sm .orb {
  width: 12px;
  height: 12px;
}
.orbs--lg .orb {
  width: 18px;
  height: 18px;
}
.orb--gold {
  background: var(--olive);
  box-shadow: 0 0 10px rgba(148, 132, 57, 0.5);
}
.orb--orange {
  background: var(--terracotta);
  box-shadow: 0 0 10px rgba(214, 102, 34, 0.45);
  animation-delay: 0.18s;
}
.orb--brown {
  background: #a99e91;
  box-shadow: 0 0 10px rgba(169, 158, 145, 0.45);
  animation-delay: 0.36s;
}
@keyframes orb-pulse {
  0%,
  100% {
    transform: scale(0.68);
    opacity: 0.5;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: var(--btn-w);
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 60px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn--primary {
  background: var(--terracotta);
  color: var(--terracotta-ink);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible,
.link-btn:focus-visible,
.fortune-container:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}
.btn-icon {
  width: 20px;
  height: 20px;
}
.link-btn {
  background: none;
  border: 0;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--headline);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- footer (injected into every screen) ---------- */
.charm-footer {
  margin-top: auto;
  background: var(--brown);
  color: var(--cream);
  padding: 12px 24px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
}

/* ---------- 0 · splash (Opening 1 / Opening 2) ---------- */
.screen--splash {
  background: var(--paper); /* #dfd8cc — matches the Main opening screen */
  cursor: pointer;
}
.screen--splash:focus-visible {
  outline-offset: -4px;
}
.splash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 24px 34px;
  text-align: center;
}
.splash-wordmark {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  font-weight: 700;
  font-size: clamp(38px, 13vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #000;
}
.splash-thai {
  width: min(358px, 86%);
  height: auto;
}
.splash-bowl {
  width: min(236px, 60%);
  height: auto;
}

/* entrances — spring-in with a slight overshoot; bowl gives one wiggle (per Figma motion) */
.screen--splash1.is-active .splash-wordmark span {
  animation: splash-line 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.screen--splash1.is-active .splash-wordmark span:nth-child(1) {
  animation-delay: 120ms;
}
.screen--splash1.is-active .splash-wordmark span:nth-child(2) {
  animation-delay: 360ms;
}
.screen--splash1.is-active .splash-wordmark span:nth-child(3) {
  animation-delay: 600ms;
}
.screen--splash2.is-active .splash-thai {
  animation: splash-pop 520ms cubic-bezier(0.45, 1.45, 0.8, 1) 80ms both;
}
.screen--splash2.is-active .splash-bowl {
  animation:
    splash-pop 520ms cubic-bezier(0.45, 1.45, 0.8, 1) 320ms both,
    splash-wiggle 640ms ease-in-out 860ms 1;
}
@keyframes splash-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes splash-line {
  from {
    opacity: 0;
    transform: translateY(0.5em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes splash-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(8deg);
  }
  75% {
    transform: rotate(-8deg);
  }
}

/* ---------- 1 · opening ---------- */
.screen--opening {
  background: var(--paper);
}
.opening-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
}
.opening-logo {
  width: 185px;
  height: auto;
}
.opening-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  background: var(--paper) url('asset/app/tray.png') center / cover no-repeat;
}
.opening-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--teal);
}
.opening-collab {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--headline);
}
.opening-collab span {
  display: block;
}
.opening-desc {
  font-size: 14px;
  line-height: 1.4;
  color: var(--brown);
}

/* ---------- 1.5 · intention ---------- */
.screen--intention {
  background: var(--paper-2);
}
.intention-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vh, 34px);
  padding: 28px 24px 34px;
}
.intention-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.intention-choices {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 14px);
  width: 100%;
  max-width: var(--btn-w);
}
.intention-choice {
  --accent: var(--olive);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: clamp(52px, 7.5vh, 60px);
  padding: 0 44px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--olive));
  border-radius: 60px;
  background: color-mix(in srgb, var(--accent) 7%, var(--paper-2));
  color: var(--headline);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}
/* left accent dot — turns five identical pills into five characters */
.intention-choice::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.intention-choice[data-intent='love'] {
  --accent: var(--rose);
}
.intention-choice[data-intent='money'] {
  --accent: var(--olive);
}
.intention-choice[data-intent='luck'] {
  --accent: var(--terracotta);
}
.intention-choice[data-intent='work'] {
  --accent: #a99e91;
}
.intention-choice[data-intent='food'] {
  --accent: var(--teal);
}
.intention-choice:hover {
  background: color-mix(in srgb, var(--accent) 16%, var(--paper-2));
  border-color: var(--accent);
}
.intention-choice:active {
  transform: translateY(1px);
  background: color-mix(in srgb, var(--accent) 24%, var(--paper-2));
}
.intention-choice:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}
.screen--intention.is-active .intention-choice {
  animation: screen-in 380ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.screen--intention.is-active .intention-choice:nth-child(2) {
  animation-delay: 60ms;
}
.screen--intention.is-active .intention-choice:nth-child(3) {
  animation-delay: 120ms;
}
.screen--intention.is-active .intention-choice:nth-child(4) {
  animation-delay: 180ms;
}
.screen--intention.is-active .intention-choice:nth-child(5) {
  animation-delay: 240ms;
}

/* ---------- 2 · focus ---------- */
.screen--focus {
  background: var(--paper-2);
}
.focus-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 24px 34px;
}
.focus-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
}
.focus-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bowl-line {
  width: 236px;
  max-width: 64vw;
  height: auto;
}
.screen--focus .bowl-line {
  animation: bowl-float 5s ease-in-out infinite;
}
@keyframes bowl-float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.6deg);
  }
  50% {
    transform: translateY(-6px) rotate(0.6deg);
  }
}
.focus-copy {
  max-width: 340px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brown);
  text-align: center;
}

/* ---------- 3 · revealing ---------- */
.screen--revealing {
  background: var(--paper-2);
}
.revealing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 28px 20px 42px;
}
.revealing-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ---------- 4 · shake ---------- */
.screen--shake {
  background: var(--paper-2);
}
.shake-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vh, 36px);
  padding: 28px 20px 42px;
  overflow: hidden;
}
.shake-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.screen--shake .ornament {
  animation: twinkle 2.6s ease-in-out infinite;
}

/* ambient glow that breathes behind the bowl */
.shake-aura {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 132%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(214, 102, 34, 0.16) 0%,
    rgba(148, 132, 57, 0.1) 38%,
    rgba(148, 132, 57, 0) 68%
  );
  pointer-events: none;
  z-index: 0;
  animation: aura-pulse 5s ease-in-out infinite;
}
@keyframes aura-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
}

/* drifting sparks */
.shake-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.shake-sparks i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--olive);
  opacity: 0;
  animation: spark 6s ease-in-out infinite;
}
.shake-sparks i:nth-child(1) {
  left: 14%;
  top: 26%;
  animation-delay: 0s;
}
.shake-sparks i:nth-child(2) {
  left: 82%;
  top: 20%;
  background: var(--terracotta);
  animation-delay: 0.8s;
}
.shake-sparks i:nth-child(3) {
  left: 24%;
  top: 68%;
  animation-delay: 1.6s;
}
.shake-sparks i:nth-child(4) {
  left: 74%;
  top: 74%;
  animation-delay: 2.4s;
}
.shake-sparks i:nth-child(5) {
  left: 9%;
  top: 48%;
  background: var(--terracotta);
  animation-delay: 3.1s;
}
.shake-sparks i:nth-child(6) {
  left: 90%;
  top: 52%;
  animation-delay: 3.8s;
}
.shake-sparks i:nth-child(7) {
  left: 44%;
  top: 14%;
  animation-delay: 4.6s;
}
.shake-sparks i:nth-child(8) {
  left: 58%;
  top: 86%;
  background: var(--terracotta);
  animation-delay: 5.3s;
}
@keyframes spark {
  0%,
  100% {
    opacity: 0;
    transform: translateY(6px) scale(0.6);
  }
  20% {
    opacity: 0.9;
    transform: translateY(0) scale(1);
  }
  55% {
    opacity: 0.25;
    transform: translateY(-10px) scale(0.85);
  }
  75% {
    opacity: 0;
    transform: translateY(-16px) scale(0.6);
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
.shake-enable {
  margin-top: 4px;
  padding: 7px 16px;
  border: 1px solid var(--olive);
  border-radius: 60px;
  background: transparent;
  color: var(--olive);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.fortune-container {
  position: relative;
  z-index: 2;
  /* playing-card proportion — height : width = 7 : 5. Height is capped so the
     card always fits between the header and the footer on any device. */
  flex: 0 1 auto;
  align-self: center;
  aspect-ratio: 5 / 7;
  height: min(504px, calc(var(--app-h) - 290px));
  width: auto;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(20px, 6vh, 72px);
  padding: 24px 20px clamp(28px, 7vh, 56px);
  border: 8px solid var(--olive);
  border-radius: 16px;
  background: var(--rose);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  cursor: pointer;
  animation: card-breathe 4.5s ease-in-out infinite;
}
@keyframes card-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.08);
  }
  50% {
    transform: scale(1.012);
    box-shadow: 0 16px 34px -10px rgba(148, 132, 57, 0.28);
  }
}
/* halo inside the bowl — invisible at rest, blooms as shake energy builds */
.fortune-aura {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(0.55 + var(--charge, 0) * 0.8));
  background: radial-gradient(circle at center, rgba(250, 247, 242, 0.75) 0%, rgba(148, 132, 57, 0) 70%);
  opacity: calc(0.12 + var(--charge, 0) * 0.88);
  pointer-events: none;
  transition:
    transform 0.2s ease-out,
    opacity 0.2s ease-out;
}
.screen--shake .fortune-slip-preview {
  animation: preview-glow 4s ease-in-out infinite;
}
@keyframes preview-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(148, 132, 57, 0));
  }
  50% {
    filter: drop-shadow(0 4px 14px rgba(148, 132, 57, 0.45));
  }
}
.screen--shake .charm-wordmark {
  animation: fade-pulse 3.4s ease-in-out infinite;
}
@keyframes fade-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
/* energy fills the bowl from the bottom as you shake (--charge: 0 → 1) */
.shake-charge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--charge, 0) * 100%);
  background: linear-gradient(to top, rgba(148, 132, 57, 0.5), rgba(148, 132, 57, 0.04));
  pointer-events: none;
  transition: height 0.16s ease-out;
}
.fortune-slip-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen--shake .bowl-line {
  width: min(236px, 74%);
  animation: bowl-float 5s ease-in-out infinite;
}
.charm-wordmark {
  width: 227px;
  max-width: 62%;
  height: auto;
}
.screen--shake .charm-wordmark {
  width: min(227px, 72%);
}
.fortune-container.is-charging {
  animation: card-charge 0.3s ease-in-out infinite alternate;
}
@keyframes card-charge {
  from {
    transform: translateX(-2px) rotate(-0.6deg);
  }
  to {
    transform: translateX(2px) rotate(0.6deg);
    box-shadow: 0 12px 30px -6px rgba(148, 132, 57, 0.4);
  }
}
.fortune-container.is-shaking {
  animation: card-shake 0.5s ease-in-out 2;
}
@keyframes card-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  20% {
    transform: translateX(-6px) rotate(-2deg);
  }
  40% {
    transform: translateX(6px) rotate(2deg);
  }
  60% {
    transform: translateX(-4px) rotate(-1deg);
  }
  80% {
    transform: translateX(4px) rotate(1deg);
  }
}
.fortune-container.is-opening {
  animation: card-open 0.5s ease forwards;
}
@keyframes card-open {
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}
/* light burst when the bowl cracks — the visual payoff on devices with no haptic */
.shake-body.is-cracking::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 46%,
    rgba(255, 247, 236, 0.96),
    rgba(255, 243, 228, 0) 62%
  );
  animation: crack-flash 0.62s ease-out forwards;
}
@keyframes crack-flash {
  0% {
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- 4.5 · fortune number ---------- */
.screen--number {
  background: var(--paper-2);
}
.number-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vh, 48px);
  padding: 28px 24px 44px;
}
.number-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.number-kicker {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.number-value {
  font-weight: 300;
  font-size: clamp(96px, 34vw, 152px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--headline);
}
.screen--number.is-active .number-value {
  animation: number-in 640ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes number-in {
  from {
    opacity: 0;
    transform: scale(0.72);
    filter: blur(7px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
/* held hidden until the suspense beat is over (JS toggles .is-ready after ~1.2s) */
.number-reveal {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 480ms ease,
    transform 480ms ease;
}
.screen--number.is-ready .number-reveal {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------- 5 · result ---------- */
.screen--result {
  background: var(--paper-2);
}
.result-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 42px 20px 20px;
}
.result-eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.slip {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 18px 18px;
  background: var(--paper-2);
  border: 1.5px solid var(--olive);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.13);
}
.screen--result.is-active .slip {
  animation: slip-rise 0.5s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes slip-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.slip-head {
  display: flex;
  align-items: center;
  width: 100%;
}
.slip-number {
  flex-shrink: 0;
  padding: 0 14px;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--headline);
  /* fixed box so the digits sit identically on screen and in the exported PNG */
}
.slip-vrule {
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  height: 34px;
  background: var(--olive);
  opacity: 0.5;
}
.slip-title-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 8px 6px;
  text-align: center;
}
.slip-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  color: var(--headline);
  text-transform: uppercase;
}
.slip-title-th {
  font-size: 12px;
  color: var(--muted);
}

.slip-div {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
}
.slip-div i {
  flex: 1;
  height: 1px;
  background: var(--olive);
  opacity: 0.35;
}
.slip-div img {
  width: 10px;
  height: 10px;
}

.slip-kicker {
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--olive);
}
.slip-kicker--center {
  width: 100%;
  text-align: center;
}

.slip-overall {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
  text-align: center;
}
.slip-overall p:last-child {
  font-size: 12px;
  line-height: 1.6;
  color: var(--brown);
}

.slip-areas {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
}
.area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
}
.area-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 11px;
}
.area-icon img {
  width: 12px;
  height: 12px;
}
.area--love .area-icon {
  background: var(--rose);
}
.area--wealth .area-icon {
  background: var(--olive);
}
.area--work .area-icon {
  background: var(--teal);
}
.area--health .area-icon {
  background: var(--terracotta);
}
.area-label {
  flex-shrink: 0;
  width: 60px;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--headline);
}
.area-vrule {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: var(--olive);
  opacity: 0.4;
}
.area-text {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--brown);
}

.slip-dish {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 4px 0 10px;
}
.dish-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 4px;
}
.dish-thumb {
  flex-shrink: 0;
  width: 82px;
  height: 60px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dish-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.dish-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dish-name {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--headline);
}
.dish-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.slip-dish.is-sign .dish-row {
  justify-content: center;
}
.slip-dish.is-sign .dish-thumb {
  display: none;
}
.slip-dish.is-sign .dish-meta {
  flex: 0 1 auto;
  text-align: center;
}

.slip-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding-top: 4px;
}
.slip-wordmark {
  width: 158px;
  height: auto;
  margin-bottom: 12px;
}
.slip-venue {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2b2626;
}
.slip-address {
  font-size: 8px;
  color: #8c7d73;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.result-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.result-links-sep {
  color: var(--muted);
  font-size: 12px;
}
.btn.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- error ---------- */
.screen--error {
  background: var(--paper-2);
}
.error-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 24px;
  text-align: center;
}
.error-copy {
  font-size: 15px;
  color: var(--brown);
}

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