/* unreel: the Reel Grid design (design/project/brand-screens.dc.html).
   Flat surfaces, no shadows, corners 8–12px: never sharp, never pill-round. */
:root {
  color-scheme: dark;
  --ground: #111214;
  --raised: #1f2024;
  --line: #26272b;
  --line-raised: #2a2b30;
  --dash: #3a3b40;
  --ink: #f4f4f5;
  --soft: #c9c9cf;
  --mut: #a1a1aa;
  --estimate: #ff9b70;
  --failed: #2a1616;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
/* Category: the dot colour and the block a thumbnail sits on. */
.c-recipe { --accent: #ff7a45; --block: #6b3a22; }
.c-movie { --accent: #4da3ff; --block: #1e3a5f; }
.c-tech { --accent: #b57bff; --block: #3b2a5c; }
.c-music, .c-product, .c-place, .c-other { --accent: var(--mut); --block: var(--raised); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
/* Pages that fit the screen don't drag: no rubber-band or pull-to-refresh on Android. */
html, body { overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.screen { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.padded { padding: 28px 16px calc(24px + env(safe-area-inset-bottom)); gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.mut { color: var(--mut); }
.lbl { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.lead { margin: 0; font-size: 16px; line-height: 1.55; color: var(--soft); }
.err { margin: 0; color: var(--estimate); font-size: 14px; }
.t { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.wordmark { width: 116px; height: 38px; display: block; }

/* Controls */
.ib { width: 44px; height: 44px; border-radius: var(--r); border: 0; background: var(--raised); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.ib.ground { background: var(--ground); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r); border: 0; background: var(--raised); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--ground); }
.cta, .ghost { min-height: 52px; border-radius: var(--r); border: 0; width: 100%; display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; font-size: 16px; cursor: pointer; }
.cta { background: var(--ink); color: var(--ground); }
.ghost { background: var(--raised); color: var(--ink); }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-sm); background: var(--ground); font-weight: 600; font-size: 11px; }
.pill.raised { background: var(--raised); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.dur, .tag { font-family: var(--mono); font-size: 11px; background: var(--ground); border-radius: 6px; padding: 2px 6px; }
.tag { padding: 4px 8px; }
input[type="url"], input[type="search"], input[type="password"] { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); font-size: 16px; }

/* Grid */
.top { display: flex; justify-content: space-between; align-items: center; padding: calc(24px + env(safe-area-inset-top)) 16px 14px; }
.search { margin: 0 16px 14px; width: auto !important; }
.chips { display: flex; gap: 8px; padding: 0 16px 14px; overflow-x: auto; scrollbar-width: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; padding: 0 16px 16px; align-content: start; flex: 1; }
.empty { grid-column: 1 / -1; margin: 40px 0; text-align: center; line-height: 1.5; }
.tile { display: flex; flex-direction: column; gap: 8px; text-decoration: none; min-width: 0; }
.th { position: relative; aspect-ratio: 4 / 5; width: 100%; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; background: var(--block) center / cover no-repeat; }
.th .dur { align-self: flex-end; }
.th.waiting { background: var(--raised); border: 1.5px dashed var(--dash); justify-content: center; align-items: center; gap: 10px; }
.ring { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--dash); border-top-color: var(--ink); }
.ring.on { border-right-color: var(--ink); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring.on { animation: none; } }
.dock { position: sticky; bottom: 0; background: var(--ground); padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.failed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-lg); background: var(--failed); font-size: 14px; }
.failed .chip { min-height: 44px; }
dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ground); color: var(--ink); padding: 20px 16px; }
dialog::backdrop { background: rgb(0 0 0 / .6); }
dialog form { display: flex; flex-direction: column; gap: 12px; }

/* Received */
.recv-head { display: flex; gap: 14px; align-items: center; }
.recv-thumb { width: 92px; height: 150px; border-radius: var(--r-lg); flex-shrink: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px; background: var(--block) center / cover no-repeat; }
.recv-head h2 { font-size: 30px; }
.steps { display: flex; flex-direction: column; padding: 4px 16px; border-radius: var(--r-lg); background: var(--raised); }
.steps .li { border-bottom-color: var(--line-raised); }
.steps .li:last-child { border-bottom: 0; }
.b { font-weight: 600; }
.track { height: 4px; border-radius: 2px; background: var(--line); }
.bar { height: 4px; border-radius: 2px; background: var(--ink); transition: width .4s; }
.actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* Rows: ingredients, steps, mentions */
.li, .md ul > li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--raised); font-size: 15px; }

/* One reel */
.hero { height: 250px; display: flex; flex-direction: column; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 16px 16px; background: var(--block) center / cover no-repeat; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.watch { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); background: var(--ground); text-decoration: none; font-weight: 600; font-size: 14px; }
.body { padding: 18px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.head { display: flex; flex-direction: column; gap: 10px; }
.head .lead { font-size: 15px; line-height: 1.5; }
.est { color: var(--estimate); }
p.est { margin: 0; }

/* Recipes are read at arm's length while cooking: body text runs larger. */
.md { font-size: 17px; line-height: 1.55; }
.md h2, .md h3, .md h4 { margin: 18px 0 2px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); line-height: 1.4; }
.md ul { list-style: none; margin: 0; padding: 0; }
.md ul > li { font-size: 17px; display: block; }
.md ol { margin: 0; padding-left: 1.4em; }
.md ol > li { padding: 8px 0; }
.md p { margin: 10px 0; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--raised); border-radius: 6px; padding: 1px 5px; }
.md pre { background: var(--raised); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md strong { font-weight: 600; }

/* Movie picks */
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.pick { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.pick .t { font-size: 14px; }
.poster { height: 160px; width: 100%; border-radius: var(--r-lg); padding: 8px; border: 2px solid transparent; }
.poster.s0 { background: #1e3a5f; }
.poster.s1 { background: #2b4f7a; }
.poster.s2 { background: #17304f; }
.pick[aria-pressed="true"] .poster { border-color: var(--ink); }
.n { font-size: 28px; font-weight: 700; }
.card { padding: 14px; border-radius: var(--r-lg); background: var(--raised); display: flex; flex-direction: column; gap: 4px; }

/* Sign in */
.login { justify-content: center; gap: 28px; }
.login .wordmark { width: 180px; height: 58px; }
.login form { gap: 12px; }
