:root {
  --bg: #2b1a12;
  --bg2: #4a2d1d;
  --ink: #fbf3e6;
  --muted: #d9bfa3;
  --accent: #f2b45a;
  --accent-ink: #2b1405;
  --line: rgba(251, 243, 230, 0.16);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 50% 30%, var(--bg2), var(--bg) 70%) fixed;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* no "copy/save image" menu on long press */
}
button { touch-action: manipulation; }

#app { max-width: 480px; margin: 0 auto; min-height: 100%; padding: 16px; }
.screen { display: flex; flex-direction: column; align-items: center; gap: 16px; min-height: calc(100vh - 32px); }
.hidden { display: none !important; }

.logo { font-family: Fraunces, serif; font-weight: 800; font-size: 76px; margin: 14vh 0 0; letter-spacing: -0.02em; }
.tag { margin: 0; color: var(--muted); font-size: 18px; }
.menu { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; margin-top: 24px; }
.how { color: var(--muted); line-height: 1.5; max-width: 340px; font-size: 15px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.how b { color: var(--ink); }

.steps { display: flex; gap: 6px; }
.steps span { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); color: var(--muted); border: 1px solid var(--line); }
.steps span.now { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.steps span.done { color: var(--ink); }
.steps span.done::before { content: '✓ '; }
.tip { margin: 4px 0 0; color: #7a5a44; text-align: center; font-size: 15px; }
.best { color: var(--accent); font-weight: 700; margin: 0; }

button {
  font: inherit; font-weight: 700; font-size: 18px;
  border: 0; border-radius: 999px; padding: 14px 22px; cursor: pointer;
  transition: transform 0.08s ease, opacity 0.2s;
}
button:active { transform: scale(0.96); }
button:disabled { opacity: 0.35; cursor: default; }
.primary { background: var(--accent); color: var(--accent-ink); }
.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.icon { background: rgba(0, 0, 0, 0.25); color: var(--ink); width: 44px; height: 44px; padding: 0; font-size: 20px; }
.icon.on { background: var(--accent); color: var(--accent-ink); }

.bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order { font-family: Fraunces, serif; font-weight: 600; font-size: 20px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; }

.stage { width: 100%; display: flex; justify-content: center; touch-action: none; }
#cup { display: block; touch-action: none; }

.status { margin: 0; min-height: 48px; color: var(--ink); font-weight: 700; font-size: 17px; text-align: center; max-width: 360px; line-height: 1.35; }
.status.warn { color: #ff8a80; }
.actions { display: flex; gap: 12px; width: 100%; max-width: 360px; }
.actions button { flex: 1; }

.result {
  width: 100%; max-width: 448px;
  background: #fbf3e6; color: #2b1405; border-radius: 24px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: rise 0.35s ease both;
}
.result .primary { margin-top: 10px; width: 100%; }
.stars { font-size: 36px; letter-spacing: 4px; color: #e09a2d; }
.verdict { margin: 0; font-family: Fraunces, serif; font-weight: 800; font-size: 26px; }
.score { margin: 0; color: #7a5a44; font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
