/* VoteIt - one stylesheet for every page.
   Look: a late-night picture house. Warm projection-booth black, tungsten marquee bulbs,
   red velvet, cream ticket paper. Everything is CSS + hand-drawn SVG, no images or web fonts. */

:root {
  --ink: #110e0c;      /* page */
  --ink-2: #1a1613;    /* tickets */
  --ink-3: #241e1a;    /* raised */
  --ink-4: #2f2722;
  --line: #3a302a;
  --line-2: #4d4038;
  --cream: #f6ecdc;    /* main text */
  --paper: #f1e4cc;    /* ticket paper */
  --paper-2: #e4d3b4;
  --paper-ink: #24190f;
  --dust: #b8aa98;     /* quiet text (7:1 on --ink) */
  --dust-2: #968878;   /* quieter text (5:1 on --ink) */
  --bulb: #ffb633;     /* tungsten */
  --bulb-hi: #ffd27a;
  --bulb-glow: rgba(255, 182, 51, .38);
  --velvet: #e04a3f;
  --velvet-2: #a32a24;
  --velvet-deep: #5a1410;
  --r: 14px;
  --r-lg: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Avenir Next Condensed", "Bahnschrift", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", "DejaVu Sans Condensed", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--ink); color: var(--cream);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background-image:
    radial-gradient(120% 60% at 50% -12%, rgba(255, 182, 51, .09), transparent 60%);
  background-repeat: no-repeat;
}
/* Film grain - very faint, fixed, never blocks taps. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--bulb-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--bulb-hi); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 90; background: var(--bulb); color: var(--paper-ink);
        padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- page frame ---------- */

.page { max-width: 600px; margin: 0 auto; padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 28px);
        animation: page-in .28s var(--ease) both; }
.page:focus { outline: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { max-width: 600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
          gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; }
.topbar-home { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: inherit; border-radius: 10px; }

.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 34px; height: 34px; }
.logo-sm .logo-mark { width: 30px; height: 30px; }
.logo-tk { fill: var(--bulb); }
.logo-perf { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.logo-tick { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-word { font-family: var(--display); font-weight: 800; font-stretch: condensed; font-size: 23px;
             letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.logo-sm .logo-word { font-size: 20px; }

.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 62%;
        padding: 0 14px 0 12px; border-radius: 999px; background: var(--ink-3); border: 1px solid var(--line);
        color: var(--cream); text-decoration: none; font-weight: 600; font-size: 14px; }
.chip .ic { width: 18px; height: 18px; color: var(--bulb); }
.chip-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-star .ic { width: 15px; height: 15px; fill: var(--bulb); stroke: var(--bulb); }
.chip:active { background: var(--ink-4); }

/* ---------- type ---------- */

.eyebrow { font: 600 11px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dust); margin: 0 0 6px; }
.display { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase;
           letter-spacing: .01em; line-height: .96; margin: 0; }
h1.display { font-size: clamp(30px, 8.6vw, 42px); }
h2.display { font-size: 24px; }
.lede { color: var(--dust); margin: 10px 0 0; max-width: 34em; }
.muted { color: var(--dust); font-size: 14px; }
.small { font-size: 13px; color: var(--dust-2); }
.mono { font-family: var(--mono); }
.hl { color: var(--bulb); }

.page-head { padding: 12px 0 4px; }
.page-head .lede { margin-top: 8px; }

.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.sec h2 { font-family: var(--display); font-weight: 800; font-stretch: condensed; font-size: 21px; letter-spacing: .03em;
          text-transform: uppercase; margin: 0; }
.sec .count { font: 600 12px var(--mono); letter-spacing: .1em; color: var(--dust); }

/* ---------- buttons & fields ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
       padding: 0 20px; border-radius: 13px; border: 1px solid transparent; font-weight: 700; font-size: 16px;
       text-decoration: none; line-height: 1.1; text-align: center; touch-action: manipulation;
       transition: transform .12s var(--ease), background-color .15s, border-color .15s, color .15s; }
.btn:active { transform: scale(.975); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--bulb); color: var(--paper-ink); box-shadow: 0 6px 22px -8px var(--bulb-glow); }
.btn-primary:hover { background: var(--bulb-hi); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--dust-2); }
.btn-soft { background: var(--ink-3); color: var(--cream); border-color: var(--line); }
.btn-paper { background: var(--paper-ink); color: var(--paper); }
.btn-danger { background: transparent; color: #ff8a80; border-color: rgba(224, 74, 63, .55); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row > * { flex: 1; }
.btn-row .btn { white-space: nowrap; padding: 0 12px; }
.btn[disabled], .btn.is-busy { opacity: .7; pointer-events: none; }
.btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
                      border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* tap-twice "Are you sure?" */
.armed, .btn.armed { background: var(--velvet) !important; border-color: var(--velvet) !important; color: #fff !important; }

.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--dust); text-decoration: underline;
           text-underline-offset: 3px; font-size: 14px; }

.field { display: block; margin: 14px 0 0; }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--dust); margin: 0 0 6px; }
.input, .field input, .field select, select.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--ink); color: var(--cream); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .field input::placeholder { color: var(--dust-2); }
.input:focus, .field input:focus, .field select:focus, select.input:focus { border-color: var(--bulb); box-shadow: 0 0 0 3px rgba(255, 182, 51, .22); }
select.input, .field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8aa98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field-row { display: flex; gap: 8px; }
.field-row > .input, .field-row > input { flex: 1; min-width: 0; }
.code-input { font-family: var(--mono); letter-spacing: .3em; text-transform: uppercase; font-size: 20px !important; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick button, .quick a { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--line-2);
  background: none; color: var(--dust); font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.quick button:active, .quick a:active { border-style: solid; color: var(--cream); }

/* Segmented control (All / Films / TV) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px;
       background: var(--ink-2); border: 1px solid var(--line); }
.seg a, .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border-radius: 10px; border: 0; background: none; color: var(--dust); font-weight: 600; font-size: 14px; text-decoration: none;
  touch-action: manipulation; }
.seg .ic { width: 18px; height: 18px; }
.seg .on { background: var(--cream); color: var(--paper-ink); }

/* ---------- cards ---------- */

.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 0 0 12px; }
.card h2, .card h3 { margin: 0; }
.card > p:first-of-type { margin-top: 6px; }
.card-title { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase;
              font-size: 22px; letter-spacing: .02em; line-height: 1; margin: 0; }

/* Cream "ticket paper" card */
.paper { position: relative; background: var(--paper); color: var(--paper-ink); border: 0; border-radius: var(--r-lg);
         padding: 20px; margin: 0 0 12px;
         background-image: repeating-linear-gradient(0deg, rgba(36, 25, 15, .025) 0 1px, transparent 1px 4px); }
.paper .eyebrow { color: #6c5a45; }
.paper .muted, .paper .small { color: #5f4f3d; }
.paper a { color: var(--velvet-2); }
.paper .input, .paper input { background: #fffaf0; color: var(--paper-ink); border-color: #cdb894; }
.paper .input::placeholder, .paper input::placeholder { color: #8a775f; }
.paper .btn-ghost { color: var(--paper-ink); border-color: #b9a27c; }
.paper .field > span { color: #5f4f3d; }
/* perforated edge with punched notches */
.paper.perf { margin-bottom: 18px; }
.perf-line { position: relative; height: 0; border-top: 2px dashed rgba(36, 25, 15, .25); margin: 18px -20px; }
.perf-line::before, .perf-line::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.perf-line::before { left: -11px; } .perf-line::after { right: -11px; }

/* Marquee bulbs frame */
.marquee { position: relative; padding: 12px; border-radius: 22px; background: var(--velvet-deep);
  background-image: radial-gradient(circle, var(--bulb-hi) 0 2.2px, rgba(255, 182, 51, .35) 3px, transparent 4.5px);
  background-size: 16px 16px; background-position: 2px 2px; }
.marquee-in { position: relative; border-radius: 14px; background: var(--ink-2); padding: 22px 18px; text-align: center; }
.marquee.chase { animation: chase 1.6s steps(2) infinite; }
@keyframes chase { 50% { background-position: 10px 2px; } }

/* ---------- toast & loading bar ---------- */

.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 80; transform: translateX(-50%);
         width: min(560px, calc(100% - 24px)); background: var(--cream); color: var(--paper-ink);
         padding: 14px 16px 14px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
         box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .8); animation: toast-in .35s var(--ease) both; }
.toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bulb); }
.toast.out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -16px); } }

.loadbar { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 95; background: var(--bulb);
           box-shadow: 0 0 12px var(--bulb-glow); opacity: 0; pointer-events: none; }
body.is-leaving .loadbar { opacity: 1; animation: load 2.4s var(--ease) forwards; }
@keyframes load { 0% { width: 0; } 30% { width: 45%; } 100% { width: 88%; } }

/* ---------- bottom tabs ---------- */

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(17, 14, 12, .94);
        border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tabs-in { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
       min-height: var(--nav-h); padding: 8px 0 6px; color: var(--dust-2); text-decoration: none;
       font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
       touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: color .15s; }
.tab .ic { width: 25px; height: 25px; transition: transform .2s var(--ease), color .15s; }
.tab:active .ic { transform: scale(.88); }
.tab-bulb { position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: transparent; transition: background .2s, box-shadow .2s; }
.tab.on { color: var(--cream); }
.tab.on .ic { color: var(--bulb); }
.tab.on .tab-bulb { background: var(--bulb-hi); box-shadow: 0 0 10px 2px var(--bulb-glow); }
.tab.on .tab-lbl { color: var(--cream); }
.tab:focus-visible { outline-offset: -4px; }

/* ---------- list tickets (Vote / Ideas) ---------- */

.tickets { display: grid; gap: 12px; }
.ticket { position: relative; display: grid; grid-template-columns: 1fr 78px; background: var(--ink-2);
          border: 1px solid var(--line); border-radius: 16px; min-height: 118px; transition: opacity .2s; }
.ticket.is-busy { opacity: .6; }
.t-main { display: flex; gap: 12px; padding: 12px; min-width: 0; }
.poster { position: relative; flex: none; width: 64px; height: 96px; border-radius: 9px; overflow: hidden; background: var(--ink-4); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-none { display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--ink-4) 0 8px, var(--ink-3) 8px 16px); }
.poster-none span { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--dust-2); }
.t-body { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-right: 30px; }
.t-no { font: 700 11px var(--mono); letter-spacing: .14em; color: var(--dust-2); }
.t-title { font-size: 17px; font-weight: 700; line-height: 1.2; margin: 3px 0 4px; overflow-wrap: anywhere; }
.t-meta { font-size: 13px; color: var(--dust); }
.t-likes { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--dust); margin-top: 5px; }
.t-likes .ic { width: 15px; height: 15px; color: var(--bulb); }
.t-note { font-size: 14px; font-style: italic; color: var(--cream); margin-top: 6px; opacity: .9; }
.t-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font: 700 10.5px var(--mono);
         letter-spacing: .14em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; margin-bottom: 4px;
         background: var(--bulb); color: var(--paper-ink); }
.t-tag .ic { width: 13px; height: 13px; }
.t-tag.match { background: var(--velvet); color: #fff; }

/* the stub: dashed tear line with punched notches */
.t-stub { position: relative; display: flex; flex-direction: column; border-left: 2px dashed var(--line-2); }
.t-stub::before, .t-stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--line); }
.t-stub::before { top: -11px; clip-path: inset(50% 0 0 0); }
.t-stub::after { bottom: -11px; clip-path: inset(0 0 50% 0); }
.t-stub form { flex: 1; display: flex; margin: 0; }
.vbtn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        min-height: 52px; border: 0; background: none; color: var(--dust); touch-action: manipulation;
        font: 700 13px var(--mono); transition: background-color .15s, color .15s; }
.vbtn .ic { width: 23px; height: 23px; }
.t-stub form + form .vbtn { border-top: 1px solid var(--line); }
.t-stub form:first-child .vbtn { border-top-right-radius: 15px; }
.t-stub form:last-child .vbtn { border-bottom-right-radius: 15px; }
.vbtn:active { background: var(--ink-3); }
.vbtn.on-up { background: var(--bulb); color: var(--paper-ink); }
.vbtn.on-down { background: var(--velvet); color: #fff; }
.vbtn.solo { gap: 4px; font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bulb); }
.vbtn.solo.love { color: var(--velvet); cursor: default; }
.vbtn.solo.love .ic { fill: var(--velvet); }

/* the winner gets printed on cream ticket paper */
.ticket.is-winner { background: var(--paper); color: var(--paper-ink); border-color: var(--paper);
  box-shadow: 0 0 0 1px rgba(255, 182, 51, .5), 0 16px 40px -18px var(--bulb-glow); }
.ticket.is-winner .t-no, .ticket.is-winner .t-meta, .ticket.is-winner .t-likes { color: #5f4f3d; }
.ticket.is-winner .t-likes .ic { color: var(--velvet-2); }
.ticket.is-winner .t-stub { border-left-color: rgba(36, 25, 15, .3); }
.ticket.is-winner .vbtn { color: #5f4f3d; }
.ticket.is-winner .vbtn.on-up { background: var(--paper-ink); color: var(--bulb); }
.ticket.is-winner .vbtn.on-down { background: var(--velvet); color: #fff; }
.ticket.is-winner .t-stub form + form .vbtn { border-top-color: rgba(36, 25, 15, .18); }
.ticket.is-winner .more > summary { color: #5f4f3d; }
.ticket.is-winner .t-tag { background: var(--paper-ink); color: var(--bulb); }
.ticket.is-match { border-color: rgba(224, 74, 63, .45); }

/* the "..." menu on each ticket */
.more { position: absolute; top: 4px; right: 82px; z-index: 3; }
.more > summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
                  color: var(--dust); cursor: pointer; touch-action: manipulation; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { background: var(--ink-4); color: var(--cream); }
.more-menu { position: absolute; right: 0; top: 46px; min-width: 228px; padding: 6px; border-radius: 14px;
             background: var(--ink-3); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .8);
             color: var(--cream); animation: pop .16s var(--ease) both; }
.more-menu form { margin: 0; }
.more-menu .mi { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0;
                 border-radius: 10px; background: none; color: var(--cream); font-size: 15px; font-weight: 600; text-align: left; }
.more-menu .mi:hover, .more-menu .mi:active { background: var(--ink-4); }
.more-menu .mi .ic { width: 19px; height: 19px; color: var(--dust); }
.more-menu .mi.danger { color: #ff8a80; }
.more-menu .mi.danger .ic { color: #ff8a80; }
.more-menu .mi.armed .ic { color: #fff; }
.more-menu .note-form { padding: 6px; display: grid; gap: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- search ---------- */

.searchbar { position: relative; margin: 14px 0 10px; }
.searchbar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dust); pointer-events: none; }
.searchbar input { width: 100%; min-height: 54px; padding: 0 50px 0 46px; border-radius: 16px; border: 1px solid var(--line-2);
                   background: var(--ink-2); color: var(--cream); font-size: 16px; }
.searchbar input:focus { border-color: var(--bulb); box-shadow: 0 0 0 3px rgba(255, 182, 51, .2); }
.searchbar input::placeholder { color: var(--dust-2); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar .clear { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 12px;
                    background: none; color: var(--dust); display: grid; place-items: center; }
.searchbar .clear .ic { position: static; transform: none; }
.searchbar.is-loading::after { content: ""; position: absolute; right: 18px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; border: 2px solid var(--bulb); border-right-color: transparent; animation: spin .7s linear infinite; }
.searchbar.is-loading .clear { visibility: hidden; }

.results { margin-top: 8px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.results-head h2 { font-size: 14px; font-weight: 700; color: var(--dust); margin: 0; }
.result { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--ink-2);
          border: 1px solid var(--line); margin-bottom: 8px; }
.result .poster { width: 46px; height: 69px; border-radius: 7px; }
.result .poster-none span { font-size: 20px; }
.result-info { flex: 1; min-width: 0; }
.result-title { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.result form { margin: 0; flex: none; }
.addbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 12px;
          border: 0; background: var(--bulb); color: var(--paper-ink); font-weight: 700; font-size: 15px; touch-action: manipulation; }
.addbtn .ic { width: 18px; height: 18px; }
.onlist { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--dust); font-size: 13px; font-weight: 600; padding: 0 8px; }
.onlist .ic { width: 16px; height: 16px; color: var(--bulb); }

.skel { border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); height: 91px; margin-bottom: 8px; position: relative; overflow: hidden; }
.skel::after, .shimmer::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(246, 236, 220, .05), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- empty states ---------- */

.empty { text-align: center; padding: 26px 18px 22px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); }
.empty h3 { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase;
            font-size: 22px; letter-spacing: .02em; margin: 6px 0 4px; }
.empty p { color: var(--dust); margin: 0 auto 14px; max-width: 28em; font-size: 15px; }
.empty .quick { justify-content: center; }
.illo { width: 140px; height: 105px; margin: 0 auto; display: block; }
.il-line { stroke: var(--cream); }
.il-gold { stroke: var(--bulb); }
.il-red { stroke: var(--velvet); }
.il-dim { stroke: var(--dust-2); }

/* ---------- drawers (folded sections) ---------- */

.drawer { border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); margin: 0 0 10px; }
.drawer > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px;
                    cursor: pointer; font-weight: 700; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary .ic:first-child { color: var(--bulb); }
.drawer .chev { margin-left: auto; }
.drawer > summary .chev { margin-left: auto; color: var(--dust-2); transition: transform .2s var(--ease); }
.drawer[open] > summary .chev { transform: rotate(90deg); }
.drawer-body { padding: 0 16px 18px; }
.drawer-body > p:first-child { margin-top: 0; }
.drawer .sub { font-weight: 500; font-size: 13px; color: var(--dust); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; min-height: 54px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li .grow { flex: 1; min-width: 0; }
.rows form { margin: 0; }

/* ---------- menu ---------- */

.menu-sec { margin: 28px 0 10px; font: 600 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dust); }
.invite-code { font: 800 34px/1 var(--mono); letter-spacing: .22em; margin: 6px 0 2px; color: var(--paper-ink); }
.paper .eyebrow + .invite-name { margin-top: 10px; }
.invite-name { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase; font-size: 30px; line-height: .95; margin: 2px 0 4px; }
.admit { position: absolute; right: 14px; top: 12px; font: 700 10px var(--mono); letter-spacing: .18em; text-transform: uppercase;
         color: var(--velvet-2); border: 1.5px solid var(--velvet-2); padding: 4px 7px; border-radius: 5px; transform: rotate(4deg); }
.qrbox { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; width: 220px; height: 220px; }
.qr svg { width: 100%; height: 100%; display: block; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px !important; }
.copyrow .btn { flex: none; }
.premium-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
                background: rgba(255, 182, 51, .14); color: var(--bulb-hi); font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.premium-pill .ic { width: 14px; height: 14px; fill: currentColor; }
.teaser { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--ink); border: 1px dashed var(--line-2); margin-top: 6px; }
.teaser .ic { color: var(--bulb); margin-top: 2px; }
.teaser p { margin: 0 0 10px; color: var(--dust); font-size: 14px; }
.teaser strong { color: var(--cream); }
.footer { text-align: center; color: var(--dust-2); font-size: 13px; margin: 34px 0 0; line-height: 1.6; }
.footer a { color: var(--dust); }
.danger-zone { border-color: rgba(224, 74, 63, .3); }

/* ---------- first run ---------- */

.hero { margin: 8px 0 18px; }
.hero .marquee-in { padding: 26px 18px 24px; }
.hero h1 { font-size: clamp(34px, 10vw, 48px); }
.hero .lede { margin: 12px auto 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 4px; }
.steps div { text-align: center; font-size: 12.5px; color: var(--dust); line-height: 1.3; }
.steps b { display: block; font: 800 20px var(--mono); color: var(--bulb); margin-bottom: 2px; }
.groups-list form { margin: 0 0 8px; }
.grp { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 14px; border-radius: 14px;
       background: var(--ink); border: 1px solid var(--line); color: var(--cream); font-weight: 700; text-align: left; }
.grp .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp .mono { color: var(--dust); font-size: 13px; letter-spacing: .12em; }
.grp .ic { color: var(--bulb); }
.grp:active { background: var(--ink-3); }

/* ---------- match ---------- */

body.match-page { overscroll-behavior: none; }
.match-main { display: flex; flex-direction: column; height: calc(100vh - 62px); height: calc(100dvh - 62px - env(safe-area-inset-top, 0px));
              min-height: 520px; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 10px); }
.match-bar { display: flex; gap: 8px; align-items: center; }
.match-bar .seg { flex: 1; }
.match-bar select.input { width: auto; flex: 0 0 auto; max-width: 40%; min-height: 50px; border-radius: 14px; background-color: var(--ink-2); font-size: 14px; }
.match-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; min-height: 44px; }
.match-info .muted { font-size: 13px; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
           background: var(--ink-2); color: var(--dust); touch-action: manipulation; flex: none; }
.iconbtn:active { background: var(--ink-3); }
.pass { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase;
        color: var(--bulb-hi); background: rgba(255, 182, 51, .1); padding: 6px 9px; border-radius: 8px; }

.stage { position: relative; flex: 1; min-height: 260px; margin: 6px 0 12px; }
.mcard { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
         background: var(--ink-3); box-shadow: 0 22px 50px -20px rgba(0, 0, 0, .9);
         touch-action: none; -webkit-user-select: none; user-select: none; will-change: transform;
         transition: transform .32s var(--ease), opacity .32s ease; }
.mcard.dragging { transition: none; cursor: grabbing; }
.mcard.under { transform: scale(.94) translateY(14px); opacity: .55; pointer-events: none; }
.mcard.under2 { transform: scale(.88) translateY(28px); opacity: .25; pointer-events: none; }
.m-poster { position: relative; flex: 1; min-height: 0; background: var(--ink-4); }
.m-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.m-poster .poster-none { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.m-poster .poster-none span { font-size: 90px; }
.m-stub { position: relative; flex: none; background: var(--paper); color: var(--paper-ink); padding: 14px 18px 16px;
          border-top: 2px dashed rgba(36, 25, 15, .3);
          background-image: repeating-linear-gradient(0deg, rgba(36, 25, 15, .025) 0 1px, transparent 1px 4px); }
.m-stub::before, .m-stub::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.m-stub::before { left: -11px; } .m-stub::after { right: -11px; }
.m-title { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase;
           font-size: 25px; line-height: .98; letter-spacing: .01em; overflow-wrap: anywhere;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-meta { font: 600 12px var(--mono); letter-spacing: .06em; color: #5f4f3d; margin-top: 5px; }
.m-blurb { font-size: 13.5px; line-height: 1.35; color: #4a3d2f; margin-top: 6px;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-idea { position: absolute; left: 14px; top: 14px; }
.stamp { position: absolute; top: 26px; padding: 6px 14px; border: 4px solid; border-radius: 10px; opacity: 0;
         font-family: var(--display); font-weight: 900; font-stretch: condensed; font-size: 40px; letter-spacing: .06em; line-height: 1;
         background: rgba(17, 14, 12, .35); box-shadow: inset 0 0 0 2px rgba(17, 14, 12, .45); pointer-events: none; }
.stamp.yes { left: 18px; color: var(--bulb); border-color: var(--bulb); transform: rotate(-14deg); }
.stamp.no { right: 18px; color: #ff6b5f; border-color: #ff6b5f; transform: rotate(14deg); }

.mcard.skeleton .m-poster { background: var(--ink-4); }
.mcard.skeleton .m-poster, .mcard.skeleton .m-stub { overflow: hidden; }
.sk-line { height: 14px; border-radius: 6px; background: rgba(36, 25, 15, .14); margin-top: 8px; }
.sk-line.w1 { width: 70%; height: 22px; margin-top: 0; } .sk-line.w2 { width: 45%; } .sk-line.w3 { width: 85%; }
.shimmer { position: relative; overflow: hidden; }

.m-controls { display: grid; grid-template-columns: 52px 1fr 1fr 52px; align-items: center; gap: 14px; justify-items: center; }
.round { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; touch-action: manipulation;
         transition: transform .12s var(--ease), background-color .15s; }
.round .ic { width: 32px; height: 32px; stroke-width: 2.2; }
.round:active { transform: scale(.92); }
.round.no { background: var(--ink-2); border: 2px solid var(--line-2); color: var(--cream); justify-self: end; }
.round.yes { background: var(--bulb); border: 2px solid var(--bulb); color: var(--paper-ink); box-shadow: 0 10px 30px -10px var(--bulb-glow); justify-self: start; }
.round.yes .ic { fill: var(--paper-ink); }
.round.small { width: 48px; height: 48px; background: none; border: 1px solid var(--line); color: var(--dust); }
.round.small .ic { width: 21px; height: 21px; stroke-width: 1.9; }
.round[disabled] { opacity: .35; pointer-events: none; }
.left-count { font: 700 12px var(--mono); color: var(--dust-2); text-align: center; line-height: 1.1; }

.m-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
           text-align: center; gap: 6px; padding: 24px; border-radius: 22px; border: 1.5px dashed var(--line-2); }
.m-empty h3 { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase; font-size: 26px; margin: 4px 0 0; }
.m-empty p { color: var(--dust); margin: 0 0 10px; }
.m-empty .btn-row { width: 100%; max-width: 320px; }

/* The "It's a match" curtain */
.curtain { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(8, 6, 5, .9); }
.curtain::before, .curtain::after { content: ""; position: absolute; top: 0; bottom: 0; width: 51%; z-index: 0;
  background: repeating-linear-gradient(90deg, #6e1712 0 14px, #9c2720 14px 24px, #7d1b15 24px 34px);
  box-shadow: inset 0 -80px 80px -40px rgba(0, 0, 0, .7); animation: open-l .9s var(--ease) .1s forwards; }
.curtain::before { left: 0; }
.curtain::after { right: 0; animation-name: open-r; }
@keyframes open-l { to { transform: translateX(-88%); } }
@keyframes open-r { to { transform: translateX(88%); } }
.matchbox { position: relative; z-index: 1; width: min(360px, 100%); text-align: center; animation: rise .5s var(--ease) .35s both; }
.matchbox .marquee-in { padding: 20px 18px 18px; }
.matchbox h2 { font-size: 36px; color: var(--bulb); text-shadow: 0 0 22px var(--bulb-glow); }
.matchbox .mp { width: 120px; aspect-ratio: 2 / 3; margin: 14px auto 10px; border-radius: 12px; overflow: hidden; background: var(--ink-4);
                box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .9); }
.matchbox .mp img { width: 100%; height: 100%; object-fit: cover; }
.matchbox .mt { font-weight: 800; font-size: 20px; line-height: 1.2; }
.matchbox .btn-row { flex-direction: column; }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.96); } }

dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 600px; max-height: 88vh; color: var(--cream);
               background: var(--ink-2); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2);
               padding-bottom: var(--safe-b); }
dialog.sheet::backdrop { background: rgba(8, 6, 5, .7); }
dialog.sheet[open] { animation: sheet-up .28s var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-in { padding: 10px 18px 22px; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }

/* ---------- stats ---------- */

.board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 12px; right: 12px; top: 7px; height: 4px;
  background: radial-gradient(circle, var(--bulb) 0 1.6px, transparent 2.2px) 0 0 / 10px 4px repeat-x; opacity: .7; }
.tile .num { font-family: var(--display); font-weight: 800; font-stretch: condensed; font-size: 44px; line-height: 1; margin-top: 8px; }
.tile .lbl { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dust); margin-top: 4px; }
.tile.big { grid-column: 1 / -1; background: var(--paper); color: var(--paper-ink); border: 0; }
.tile.big .lbl { color: #5f4f3d; }
.tile.big::before { background: radial-gradient(circle, var(--velvet-2) 0 1.6px, transparent 2.2px) 0 0 / 10px 4px repeat-x; }
.tile.big .num { font-size: 60px; }
.meter { height: 12px; border-radius: 3px; margin-top: 6px; background: var(--ink-4); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--bulb);
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, rgba(17, 14, 12, .45) 8px 10px); }
.statrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.statrow:first-child { border-top: 0; padding-top: 2px; }
.statrow .grow { flex: 1; min-width: 0; }
.statrow .poster { width: 38px; height: 57px; border-radius: 6px; }
.statrow .poster-none span { font-size: 16px; }
.statrow .rk { font: 800 18px var(--mono); color: var(--bulb); width: 26px; }
.statrow .val { font: 700 14px var(--mono); color: var(--dust); white-space: nowrap; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.award { padding: 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.award .who { font-family: var(--display); font-weight: 800; font-stretch: condensed; font-size: 24px; text-transform: uppercase; line-height: 1; margin: 6px 0 2px; overflow-wrap: anywhere; }
.locked-preview { position: relative; margin-top: 16px; }
.locked-preview .board { filter: blur(5px) saturate(.6); opacity: .55; pointer-events: none; }
.locked-preview .lock { position: absolute; inset: 0; display: grid; place-items: center; }

/* ---------- premium ---------- */

.perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks .ic { color: var(--bulb); width: 20px; height: 20px; margin-top: 1px; }
.price-card { position: relative; }
.price { font-family: var(--display); font-weight: 800; font-stretch: condensed; font-size: 46px; line-height: 1; margin: 4px 0 2px; }
.price small { font-family: var(--font); font-size: 15px; font-weight: 600; color: inherit; opacity: .7; letter-spacing: 0; }
.best { position: absolute; top: 16px; right: 16px; font: 700 10px var(--mono); letter-spacing: .16em; text-transform: uppercase;
        background: var(--velvet); color: #fff; padding: 5px 8px; border-radius: 6px; }
.note-ok { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; margin: 12px 0;
           background: rgba(255, 182, 51, .1); border: 1px solid rgba(255, 182, 51, .35); color: var(--cream); }
.note-ok .ic { color: var(--bulb); }
.note-bad { padding: 14px; border-radius: 14px; margin: 12px 0; background: rgba(224, 74, 63, .12); border: 1px solid rgba(224, 74, 63, .45); color: #ffd0cb; }

.pay-sheet .sheet-in { padding-bottom: 28px; }
.pay-mount { min-height: 380px; border-radius: 14px; background: #fff; overflow: hidden; position: relative; }
.pay-loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: #5f4f3d; font-weight: 600; background: var(--paper); }
.pay-loading .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--velvet-2); border-right-color: transparent; animation: spin .8s linear infinite; }
.pay-safe { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--dust); margin-top: 10px; }
.pay-safe .ic { width: 16px; height: 16px; color: var(--bulb); }

/* ---------- privacy / long text ---------- */

.prose h2 { font-family: var(--display); font-weight: 800; font-stretch: condensed; text-transform: uppercase; font-size: 21px; letter-spacing: .03em; color: var(--bulb); margin: 30px 0 6px; }
.prose p, .prose li { color: var(--dust); line-height: 1.6; }
.prose strong { color: var(--cream); }
.prose ul { padding-left: 20px; }

/* ---------- bigger screens ---------- */

@media (min-width: 900px) {
  .tabs { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 560px; border: 1px solid var(--line);
          border-radius: 20px; padding-bottom: 0; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); }
  .tab { min-height: 62px; }
  .page { padding-bottom: 120px; }
  .match-main { height: min(860px, calc(100dvh - 62px)); padding-bottom: 104px; }
  .stage { max-width: 420px; width: 100%; margin-left: auto; margin-right: auto; }
  dialog.sheet { margin: auto; border-radius: 22px; border: 1px solid var(--line-2); max-width: 520px; }
  .ticket:hover { border-color: var(--line-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
  .curtain::before, .curtain::after { display: none; }
  .marquee.chase { animation: none; }
}
@media (forced-colors: active) {
  .tab.on { outline: 2px solid CanvasText; }
  .btn { border: 1px solid ButtonText; }
}
html:has(body.match-page), body.match-page { overflow-x: hidden; }
.paper .btn-paper { color: var(--paper); }
.paper .perks .ic { color: var(--velvet-2); }
.field > .copyrow { display: flex; margin: 0; font-size: inherit; }
.copyrow input { width: auto; }

/* ---------- Premium pill in the top bar (free groups only) ---------- */
.topbar-r { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 72%; }
.topbar-r .chip { max-width: 100%; min-width: 0; }
.chip-premium { flex: none; background: var(--bulb); border-color: var(--bulb); color: var(--paper-ink); padding: 0 12px 0 10px;
                box-shadow: 0 4px 16px -6px var(--bulb-glow); }
.chip-premium .ic { color: var(--paper-ink); fill: var(--paper-ink); stroke: var(--paper-ink); width: 16px; height: 16px; }
.chip-premium:active { background: var(--bulb-hi); }
@media (max-width: 400px) { .topbar .logo-word { display: none; } .topbar-r { max-width: 82%; } }
@media (max-width: 420px) { .topbar-r .chip:not(.chip-premium) > .ic { display: none; } .topbar-r .chip:not(.chip-premium) { padding-left: 14px; } }

/* ---------- Setup guide (wizard) ---------- */
.wiz-page .page { padding-bottom: 120px; }
.wiz { max-width: 520px; margin: 0 auto; }
.wiz-top { display: flex; align-items: center; gap: 14px; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 6px; }
.wiz-bar { display: flex; gap: 6px; flex: 1; }
.wiz-bar i { flex: 1; height: 5px; border-radius: 3px; background: var(--ink-4); }
.wiz-bar i.done { background: var(--bulb); opacity: .55; }
.wiz-bar i.on { background: var(--bulb); box-shadow: 0 0 10px var(--bulb-glow); }
.wiz-skip { color: var(--dust); font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px 2px; white-space: nowrap; }
.wiz-count { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dust-2); margin: 4px 0 18px; }
.wiz-step { margin-bottom: 20px; }
html.js .wiz-step { display: none; }
html.js .wiz-step.on { display: block; animation: page-in .28s var(--ease); }
.wiz-step h1.display { font-size: clamp(30px, 9vw, 44px); outline: none; }
.wiz-step .illo { display: block; width: 150px; margin: 6px 0 14px; }
.wiz-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; justify-content: center;
            padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--ink) 70%, transparent); }
.wiz-foot .btn { flex: 1; max-width: 300px; }
.wiz-foot #wizBack { flex: 0 0 96px; }
.wz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.wz-tile { position: relative; padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--ink-3); color: var(--cream);
           overflow: hidden; aspect-ratio: 2 / 3; transition: transform .12s var(--ease), border-color .12s; }
.wz-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wz-tile:active { transform: scale(.96); }
.wz-tile.busy { opacity: .55; }
.wz-tile.on { border-color: var(--bulb); box-shadow: 0 0 0 3px rgba(255, 182, 51, .22); }
.wz-tick { position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center;
           background: var(--bulb); color: var(--paper-ink); }
.wz-tick .ic { width: 16px; height: 16px; stroke-width: 3; }
.wz-tile.on .wz-tick { display: grid; }
.wz-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 5px 5px; font-size: 10.5px; font-weight: 700; line-height: 1.15; text-align: left;
           background: linear-gradient(to top, rgba(0, 0, 0, .86), transparent); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wz-search { margin-top: 10px; }
.wz-list { list-style: none; margin: 18px 0 20px; padding: 0; display: grid; gap: 12px; }
.wz-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line); }
.wz-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bulb); color: var(--paper-ink); font: 800 17px var(--mono); }
.wz-cards { display: grid; gap: 10px; margin-top: 18px; }
.wz-cards .card { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.wz-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ink-4); color: var(--bulb); }
.wz-ic .ic { width: 22px; height: 22px; }
@media (min-width: 560px) { .wz-grid { grid-template-columns: repeat(4, 1fr); } }
