@font-face {
  font-family: "Exo 2";
  src: url("fonts/exo2-800-italic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

/* ============================== tokens ============================== */
:root {
  color-scheme: light dark;
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f3ece3;
  --ink: #1f1812;
  --muted: #7a6b5d;
  --line: rgba(31, 24, 18, 0.09);
  --line-strong: rgba(31, 24, 18, 0.16);
  --accent: #e8572a;
  --accent-press: #cf4a20;
  --accent-soft: rgba(232, 87, 42, 0.12);
  --accent-2: #1f9285;
  --accent-2-soft: rgba(31, 146, 133, 0.12);
  --gold: #d9a400;
  --glass: rgba(250, 246, 240, 0.72);
  --shadow-sm: 0 1px 2px rgba(31, 24, 18, 0.05), 0 2px 8px rgba(31, 24, 18, 0.04);
  --shadow-md: 0 2px 4px rgba(31, 24, 18, 0.04), 0 12px 32px -8px rgba(31, 24, 18, 0.12);
  --shadow-lg: 0 4px 8px rgba(31, 24, 18, 0.05), 0 24px 56px -12px rgba(31, 24, 18, 0.2);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  /* critically damped spring, approximated for CSS (no overshoot) */
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-base: 380ms;
  --t-slow: 520ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #1d1915;
    --surface-2: #28221c;
    --ink: #f4ece3;
    --muted: #a39587;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent-soft: rgba(232, 87, 42, 0.18);
    --accent-2: #2fb3a3;
    --accent-2-soft: rgba(47, 179, 163, 0.16);
    --gold: #f0bf2a;
    --glass: rgba(20, 17, 14, 0.7);
    --pill: #3a3229;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 24px 56px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ============================== base ============================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; margin: 6px 0; letter-spacing: 0.005em; }
.accent { color: var(--accent); }

.wrap { max-width: 680px; margin: 0 auto; padding: 28px 20px 72px; text-align: center; }
.wrap.wide { max-width: 800px; }

/* ============================== top bar ============================== */
/* full-width translucent bar; the hairline only appears once content scrolls under it */
.topbar-shell {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  transition: box-shadow var(--t-base) var(--spring);
}
.topbar-shell.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 28px -18px rgba(0, 0, 0, 0.3); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 800px; margin: 0 auto; padding: 12px 20px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; transition: transform var(--t-base) var(--spring); }
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.brand:active img { transform: scale(0.94); transition-duration: var(--t-fast); }
.wordmark { font-family: "Exo 2", system-ui, sans-serif; font-style: italic; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1; }
.wordmark .cursor { display: inline-block; width: 0.5em; height: 0.12em; margin-left: 3px; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.toplink {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 999px; transition: color var(--t-fast), background var(--t-fast);
}
.toplink:hover { color: var(--ink); background: var(--surface-2); }
.toplink:active { transform: scale(0.97); }

/* ============================== heading ============================== */
h1 {
  font-size: clamp(2.3rem, 7vw, 3.6rem); font-weight: 800; line-height: 1.04;
  letter-spacing: -0.035em; margin: 18px 0 12px; text-wrap: balance;
}
.lead { color: var(--muted); font-size: 1.06rem; line-height: 1.55; margin: 0 auto 28px; max-width: 34em; text-wrap: balance; }

/* page entrance: a short, staggered fade-up */
[data-reveal] { animation: rise var(--t-slow) var(--spring) both; }
.i1 { animation-delay: 60ms; } .i2 { animation-delay: 120ms; } .i3 { animation-delay: 180ms; } .i4 { animation-delay: 240ms; } .i5 { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================== a quiet note: help with computers ============================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.it-note { margin: 4px 0 6px; animation: rise-blur 0.9s var(--spring) both; }
@keyframes rise-blur { from { opacity: 0; transform: translateY(8px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.it-pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 12px;
  padding: 9px 18px 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.95rem;
  background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--spring), box-shadow var(--t-base) var(--spring), border-color var(--t-fast);
}
/* a slow light passes over the pill now and then */
.it-pill::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, var(--accent-soft) 50%, transparent 70%);
  transform: translateX(-110%); animation: sheen 7s var(--spring) 1.5s infinite;
}
@keyframes sheen { 0% { transform: translateX(-110%); } 25%, 100% { transform: translateX(110%); } }
.it-pill:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--shadow-md); }
.it-pill:active { transform: scale(0.98); transition-duration: 90ms; }

.live { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent-2); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }
.it-q { font-weight: 700; white-space: nowrap; }
.it-cta { color: var(--muted); font-weight: 600; white-space: nowrap; transition: color var(--t-fast); }
.it-pill:hover .it-cta { color: var(--accent); }
.arrow { display: inline-block; transition: transform var(--t-base) var(--spring); }
.it-pill:hover .arrow { transform: translateX(3px); }

/* the problem changes: letters flip in from below and leave upwards, the box glides to the new width */
.rot-line { white-space: nowrap; }
.rot { position: relative; display: inline-block; height: 1.2em; vertical-align: bottom; perspective: 500px; transition: width 0.55s var(--spring); }
.rot-w { position: absolute; left: 0; bottom: 0; white-space: nowrap; }
.ch { display: inline-block; color: color-mix(in oklab, var(--accent-2) var(--mix, 0%), var(--accent)); transform-origin: 50% 100%;
  animation: ch-in 0.65s var(--spring) both; animation-delay: calc(var(--i) * 24ms + 80ms); }
.rot-w.out .ch { animation: ch-out 0.36s cubic-bezier(0.55, 0, 0.8, 0.25) both; animation-delay: calc(var(--i) * 14ms); }
@keyframes ch-in { from { opacity: 0; transform: translateY(0.5em) rotateX(-80deg); filter: blur(5px); } }
@keyframes ch-out { to { opacity: 0; transform: translateY(-0.4em) rotateX(70deg); filter: blur(5px); } }

.it-or { color: var(--muted); font-size: 0.92rem; margin: 12px 0 0; animation: rise-blur 0.9s var(--spring) 0.25s both; }
.it-or .accent { font-weight: 700; }
/* a small die that tumbles every few seconds */
.die {
  position: relative; display: inline-block; vertical-align: -0.15em; margin-left: 0.45em; width: 1.05em; height: 1.05em; border-radius: 0.24em;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 3px 8px -4px rgba(31, 24, 18, 0.35);
  animation: tumble 5s var(--spring) 2s infinite;
}
.die i { position: absolute; width: 18%; height: 18%; border-radius: 50%; background: var(--accent); }
.die i:nth-child(1) { left: 18%; top: 18%; } .die i:nth-child(2) { right: 18%; top: 18%; } .die i:nth-child(3) { left: 41%; top: 41%; }
.die i:nth-child(4) { left: 18%; bottom: 18%; } .die i:nth-child(5) { right: 18%; bottom: 18%; }
@keyframes tumble { 0% { transform: none; } 9% { transform: translateY(-0.35em) rotate(200deg); } 16%, 100% { transform: rotate(360deg); } }

.it-note + h1 { margin-top: 22px; }

@media (max-width: 480px) {
  .it-pill { border-radius: var(--r-lg); padding: 10px 16px; font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .it-pill::after, .live, .die { animation: none !important; }
  .it-note, .it-or, .ch { animation: fade 200ms ease both !important; }
  .rot-w.out { opacity: 0; }
}

/* ============================== segmented tabs ============================== */
.tabs-scroll {
  position: relative; margin: 0 -20px 16px; padding: 0 20px;
  overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs {
  position: relative; display: inline-flex; gap: 2px; padding: 4px; margin: 0 auto;
  background: var(--surface-2); border-radius: 999px; white-space: nowrap;
}
.tabs-center { display: flex; justify-content: center; min-width: max-content; }
.tab-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--pill, var(--surface)); box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--spring), width var(--t-base) var(--spring);
}
.tab {
  position: relative; z-index: 1; border: 0; background: none; color: var(--muted);
  padding: 9px 15px; border-radius: 999px; cursor: pointer; font-size: 0.95rem; font-weight: 600;
  transition: color var(--t-fast);
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab:active { transform: scale(0.96); }

/* ============================== panels & controls ============================== */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; margin-bottom: 12px; text-align: left; box-shadow: var(--shadow-sm);
}
.panel-enter { animation: panel-in var(--t-base) var(--spring) both; }
.panel-enter.from-left { --dx: -14px; }
@keyframes panel-in { from { opacity: 0; transform: translateX(var(--dx, 14px)); } to { opacity: 1; transform: none; } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.row.filters { justify-content: flex-start; margin: 10px 0; }
.locbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.locbar input { flex: 1 1 220px; }
input[type=text], select, textarea {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 13px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea { width: 100%; resize: vertical; line-height: 1.5; }
input[type=text]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select { cursor: pointer; }
.check { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); cursor: pointer; font-size: 0.95rem; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; }
.notice { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; margin: 0; color: var(--muted); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips:empty { display: none; }
.chip {
  font-size: 0.92rem; cursor: pointer; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--spring);
}
.chip:hover { border-color: var(--muted); }
.chip:active { transform: scale(0.95); }
.chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on small { color: inherit; opacity: 0.65; }
.chip img { width: 20px; height: 20px; border-radius: 5px; }

/* ============================== buttons ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; cursor: pointer;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: 999px;
  padding: 10px 18px; text-decoration: none; font-size: 0.95rem;
  transition: transform var(--t-fast) var(--spring), background var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
}
.btn:hover { opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { opacity: 1; background: var(--surface-2); }
.btn:active, .big:active, .round:active, .mode:active { transform: scale(0.96); transition-duration: 90ms; }
.big {
  position: relative; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.005em; padding: 16px 44px; min-width: 200px; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(232, 87, 42, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform var(--t-fast) var(--spring), background var(--t-fast), box-shadow var(--t-base) var(--spring);
}
.big:hover { background: var(--accent-press); box-shadow: 0 14px 30px -10px rgba(232, 87, 42, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.big:disabled { cursor: progress; }
.big.loading::after {
  content: ""; position: absolute; left: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hint { color: var(--muted); min-height: 1.5em; font-size: 0.95rem; transition: opacity var(--t-fast); }

/* ============================== stage & result ============================== */
.stage { margin: 20px 0; transition: height var(--t-base) var(--spring); }
.result {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 40px 18px; font-size: clamp(1.6rem, 6vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
  min-height: 150px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.28em;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.result .q { color: var(--muted); font-weight: 500; }
.pick { color: var(--accent); display: inline-block; }
.pick.roll { animation: roll 110ms ease-out; }
@keyframes roll { from { opacity: 0.35; transform: translateY(35%); } to { opacity: 1; transform: none; } }
.materialize { animation: materialize var(--t-slow) var(--spring) both; }
@keyframes materialize {
  from { opacity: 0; transform: translateY(10px) scale(0.975); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.dots { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.35; } }

.pick-card {
  position: relative; overflow: hidden; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl); display: grid; box-shadow: var(--shadow-md);
}
.pick-card h2 { font-size: clamp(1.55rem, 5vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 6px; line-height: 1.1; text-wrap: balance; }
.pick-card h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 8px; }
.pc-body { padding: 22px; position: relative; }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.88rem; }
.badge { background: var(--accent-2-soft); color: var(--accent-2); border-radius: 999px; padding: 4px 11px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.rating { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.tags { color: var(--muted); margin: 0 0 12px; }
.facts { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; font-size: 0.95rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pick-card a:not(.btn), .tags a { color: var(--accent); text-underline-offset: 3px; }
.overview { margin: 0 0 12px; line-height: 1.6; }
.where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.where img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }

/* images fade in once loaded instead of popping */
.pick-card img { transition: opacity var(--t-slow) var(--spring); }
.pick-card img.pending { opacity: 0; }

.place { grid-template-columns: 1.1fr 1fr; }
.minimap { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; background: var(--surface-2); }
.screen { grid-template-columns: 210px 1fr; }
.screen::before {
  content: ""; position: absolute; inset: 0; background: var(--backdrop, none) center / cover;
  opacity: 0.12; filter: blur(4px); transform: scale(1.05); pointer-events: none;
}
.poster { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; background: var(--surface-2); }
.poster.empty { display: flex; align-items: center; justify-content: center; font-size: 4rem; min-height: 260px; }

.cook .ing { columns: 2 220px; column-gap: 28px; padding-left: 18px; margin: 0; }
.cook .ing li { margin: 3px 0; break-inside: avoid; }
.cook .ing li::marker { color: var(--accent); }
.cook .steps { padding-left: 22px; margin: 0; display: grid; gap: 8px; line-height: 1.6; }
.cook .steps li::marker { color: var(--accent); font-weight: 700; }
.cook-img { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--r-lg); margin: 12px 0 4px; background: var(--surface-2); }
.cook-ph { height: 150px; display: grid; place-items: center; font-size: 3.4rem;
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%), radial-gradient(circle at 80% 90%, var(--accent-2-soft), transparent 55%), var(--surface-2); }
.cook .license { margin-top: 16px; }

.food { text-align: center; }
.food .facts, .food .tags { text-align: left; }
.food .links { justify-content: center; }
.food-emoji { font-size: 4.5rem; line-height: 1; margin: 6px 0 4px; }

@media (max-width: 640px) {
  .place, .screen { grid-template-columns: 1fr; }
  .minimap { min-height: 210px; }
  .screen .poster:not(.empty) { max-height: 340px; object-position: top; }
  .pc-body { padding: 18px; }
}

/* ============================== history & footer ============================== */
.history { margin-top: 36px; text-align: left; }
.history h3 { margin: 0; font-size: 1rem; }
.history ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.history li {
  display: flex; align-items: baseline; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 14px;
}
.history a { color: var(--ink); text-decoration: none; font-weight: 600; }
.history a:hover { color: var(--accent); }
.history small { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.credits { margin-top: 48px; color: var(--muted); font-size: 0.78rem; line-height: 1.6; letter-spacing: 0.005em; }
.credits a { color: inherit; text-underline-offset: 2px; }
footer { color: var(--muted); }

/* ============================== swipe game ============================== */
.modes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 8px 0 20px; }
.mode {
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 30px 20px; cursor: pointer; display: grid; gap: 6px; justify-items: center; box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--spring), box-shadow var(--t-base) var(--spring), border-color var(--t-fast);
}
.mode:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.mode .emoji { font-size: 2.6rem; line-height: 1; margin-bottom: 4px; }
.mode b { font-size: 1.2rem; letter-spacing: -0.02em; }
.mode small { color: var(--muted); }
.deck { position: relative; height: 380px; max-width: 340px; margin: 12px auto 20px; }
.deck-enter { animation: rise var(--t-base) var(--spring) both; }
.swipe-card {
  position: absolute; inset: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 26px; touch-action: pan-y; user-select: none; cursor: grab; will-change: transform;
}
.swipe-card.dragging { cursor: grabbing; }
.swipe-card.under { box-shadow: var(--shadow-sm); transform: translateY(14px) scale(0.94); opacity: 0.7; pointer-events: none; }
.swipe-card .emoji { font-size: 4.8rem; line-height: 1; }
.swipe-card h2 { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.swipe-card .labels { position: absolute; bottom: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; font-size: 1rem; font-weight: 700; }
.l-no { color: var(--accent); }
.l-yes { color: var(--accent-2); }
.stamp {
  position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-weight: 800;
  font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; pointer-events: none;
}
.stamp.yes { left: 20px; color: var(--accent-2); transform: rotate(-12deg); }
.stamp.no { right: 20px; color: var(--accent); transform: rotate(12deg); }
.swipe-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.swipe-actions #progress { min-width: 92px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.round {
  min-width: 124px; height: 52px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface);
  font-size: 1rem; font-weight: 700; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--spring), background var(--t-fast), border-color var(--t-fast);
}
.round.no { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.round.yes { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.round.no:hover { background: var(--accent-soft); }
.round.yes:hover { background: var(--accent-2-soft); }

/* ============================== accessibility ============================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .wordmark .cursor { animation: none; }
  .materialize, .panel-enter, [data-reveal] { animation: fade 200ms ease both !important; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar-shell { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(0, 0, 0, 0.35); --line-strong: rgba(0, 0, 0, 0.6); --muted: #4d4136; }
}
.history li:first-child { animation: rise var(--t-base) var(--spring) both; }

/* ---------- small screens ---------- */
.toplink { white-space: nowrap; }
.tl-short { display: none; }
@media (max-width: 480px) {
  .tl-long { display: none; }
  .tl-short { display: inline; }
  .swipe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 340px; margin: 0 auto 10px; }
  .swipe-actions .round { min-width: 0; padding: 0 12px; }
  .swipe-actions #progress { grid-column: 1 / -1; order: 3; text-align: center; }
}

/* ---------- książki ---------- */
.book .poster { aspect-ratio: 2 / 3; }
.overview.quote { font-style: italic; border-left: 3px solid var(--accent); padding-left: 14px; color: var(--muted); }

/* ---------- co robić ---------- */
.idea { text-align: center; }
.idea .overview { max-width: 34em; margin: 0 auto 10px; }
.idea-tags { justify-content: center; margin-top: 12px; }
.idea-tags .chip { cursor: default; font-size: 0.82rem; padding: 4px 10px; }
.idea-tags .chip:active { transform: none; }

/* ---------- phones: the main button lives in a bar pinned to the bottom ---------- */
@media (max-width: 640px) {
  .wrap > .actions {
    position: sticky; bottom: 0; z-index: 15;
    margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    box-shadow: 0 -1px 0 var(--line);
    flex-wrap: nowrap;
  }
  .wrap > .actions .big { flex: 1; min-width: 0; padding: 15px 20px; }
  .wrap > .actions .btn { flex: 0 0 auto; }
  .credits { padding-bottom: 8px; }
}
@media (max-width: 640px) and (prefers-reduced-transparency: reduce) {
  .wrap > .actions { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.ing-chips .chip { cursor: default; }
.ing-chips .chip:active { transform: none; }
