/* RiftRoster Review: the old riftroster.gg look (tokens, violet radial gradients, glass panels) made mobile-first. */
:root {
    --bg-0: #0c0a12;
    --bg-1: #14101f;
    --bg-2: #1c1629;
    --purple-1: #7c3aed;
    --purple-2: #a78bfa;
    --purple-glow: rgba(124, 58, 237, 0.45);
    --text-0: #f2f0f7;
    --text-1: #b8b2c9;
    --text-2: #7a7390;
    --border: rgba(167, 139, 250, 0.16);
    --glass: rgba(12, 10, 18, 0.62);
    --good: #4ade80;
    --bad: #f87171;
    --warn: #fbbf24;
    --info: #38bdf8;
    --radius: 1.5rem;
    --tap: 48px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior: none; }
body {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top" "banner" "main" "tabs";
    grid-template-columns: minmax(0, 1fr);
    font-family: "Segoe UI", "Inter", system-ui, -apple-system, "Roboto", sans-serif;
    font-size: 16px;
    color: var(--text-0);
    background:
        radial-gradient(60vw 60vw at 15% -10%, rgba(124, 58, 237, 0.20), transparent 60%),
        radial-gradient(70vw 70vw at 110% 10%, rgba(167, 139, 250, 0.14), transparent 55%),
        var(--bg-0);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
#matrix-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35; }
.topbar, .banner, .view, .tabbar { position: relative; z-index: 1; }
.topbar { grid-area: top; } .banner { grid-area: banner; } .view { grid-area: main; } .tabbar { grid-area: tabs; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--purple-2); }
:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
    display: flex; align-items: center; gap: 0.75rem;
    padding: calc(0.5rem + var(--safe-t)) calc(0.9rem + var(--safe-r)) 0.5rem calc(0.9rem + var(--safe-l));
    background: linear-gradient(to bottom, rgba(12, 10, 18, 0.9), rgba(12, 10, 18, 0.55));
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--text-0); text-decoration: none;
         font-weight: 700; font-size: 1.12rem; letter-spacing: 0.02em; min-height: var(--tap); }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 4px 12px var(--purple-glow)); }
.brand-sub { color: var(--purple-2); font-weight: 600; }
.status-indicator { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem;
                    font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.status-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--text-2); }
.status-indicator.live { color: var(--good); }
.status-indicator.live .status-dot { background: var(--good); box-shadow: 0 0 8px rgba(74, 222, 128, 0.7); }
.status-indicator.offline { color: var(--bad); }
.status-indicator.offline .status-dot { background: var(--bad); box-shadow: 0 0 8px rgba(248, 113, 113, 0.7); }
.icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 0.9rem;
            border: 1px solid var(--border); background: rgba(167, 139, 250, 0.06); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; stroke: var(--text-0); stroke-width: 2; stroke-linecap: round; fill: none; }

.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.6rem 1rem;
          background: var(--warn); color: #1a1200; font-weight: 600; font-size: 0.9rem; }
.banner .chip { background: #1a1200; color: var(--warn); border-color: transparent; }

/* ---------- views ---------- */
.view { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; outline: none;
        padding: 0.9rem calc(0.9rem + var(--safe-r)) 1.2rem calc(0.9rem + var(--safe-l)); }
.view.full { overflow: hidden; padding: 0; }
.panel { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius);
         -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 1.1rem; }
.stack { display: grid; gap: 0.9rem; max-width: 46rem; margin: 0 auto; }
h1, h2, h3 { margin: 0; }
h2.title { font-size: 1.35rem; background: linear-gradient(135deg, #fff 20%, var(--purple-2) 100%);
           -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.small { font-size: 0.85rem; }
.center-card { max-width: 26rem; margin: 12vh auto 0; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.center-card img { width: 72px; height: 72px; filter: drop-shadow(0 8px 20px var(--purple-glow)); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border);
           border-top-color: var(--purple-2); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { min-height: var(--tap); padding: 0.7rem 1.3rem; border-radius: 0.9rem; border: 1px solid var(--border);
       background: rgba(167, 139, 250, 0.08); color: var(--text-0); font-weight: 600; cursor: pointer;
       display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.btn.primary { border: none; color: #fff; background: linear-gradient(135deg, var(--purple-1), #9333ea);
               box-shadow: 0 10px 30px -8px var(--purple-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.btn.good { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.5); color: var(--good); }
.btn.bad { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.5); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.45; cursor: default; }
.chip { min-height: 40px; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--border);
        background: #2a2533; color: var(--text-0); font-size: 0.9rem; cursor: pointer; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--purple-2); background: rgba(124, 58, 237, 0.35); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- tab bar ---------- */
.tabbar { display: flex; justify-content: space-around; gap: 0.25rem;
          padding: 0.35rem calc(0.5rem + var(--safe-r)) calc(0.35rem + var(--safe-b)) calc(0.5rem + var(--safe-l));
          background: rgba(12, 10, 18, 0.92); border-top: 1px solid var(--border);
          -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tabbar a { flex: 1; min-height: 52px; max-width: 9rem; display: flex; flex-direction: column; align-items: center;
            justify-content: center; gap: 2px; border-radius: 0.8rem; color: var(--text-2); text-decoration: none;
            font-size: 0.75rem; font-weight: 600; }
.tabbar a .ti { font-size: 1.15rem; line-height: 1; }
.tabbar a[aria-current="page"] { color: var(--text-0); background: rgba(124, 58, 237, 0.22); }
.tabbar a .count { font-size: 0.68rem; color: var(--purple-2); }

/* ---------- rate (feed) and the swiper (round 26) ---------- */
.rate { position: relative; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto auto;
        grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 100vw; overflow: hidden; }
/* round 33: a long clip title (no-wrap line) made the grid column wider than the phone, so the next video and
   its sound button sat partly off-screen to the right */
.rate > * { min-width: 0; }
.stage { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.card { position: absolute; inset: 0; overflow: hidden; background: #000;
        will-change: transform; transition: transform 0.25s ease, opacity 0.25s ease; }
.card.dragging { transition: none; }
.card video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.card .slot { height: 100%; }
.tint { position: absolute; inset: 0; pointer-events: none; transition: background 0.2s ease; }
.card.dragging .tint { transition: none; }
.card .sound { position: absolute; right: 0.6rem; top: 0.6rem; width: 44px; height: 44px; padding: 0;
               border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 1.1rem;
               -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.card .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.12); }
.card .progress i { display: block; height: 100%; width: 0; background: var(--purple-2); }
.card .failed { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem;
                color: var(--text-1); background: rgba(0, 0, 0, 0.7); }
/* which side is which: small, see-through, brighter while you drag toward it */
.corner { --p: 0; position: absolute; bottom: 0.9rem; z-index: 2; pointer-events: none;
          padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
          letter-spacing: 0.02em; color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
          opacity: calc(0.55 + 0.45 * var(--p)); transform: scale(calc(1 + 0.18 * var(--p)));
          transition: opacity 0.15s ease, transform 0.15s ease; }
.corner.bad { left: 0.75rem; background: rgba(248, 113, 113, calc(0.28 + 0.5 * var(--p)));
              border: 1px solid rgba(248, 113, 113, 0.6); transform-origin: left bottom; }
.corner.good { right: 0.75rem; background: rgba(74, 222, 128, calc(0.24 + 0.5 * var(--p)));
               border: 1px solid rgba(74, 222, 128, 0.6); transform-origin: right bottom; }
.stage:not(.live) .corner { display: none; }
.swipe-hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 3;
              pointer-events: none; display: grid; gap: 0.5rem; justify-items: center; padding: 1rem 1.2rem;
              border-radius: 1.2rem; background: rgba(12, 10, 18, 0.72); border: 1px solid var(--border);
              -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: opacity 0.6s ease;
              width: max-content; max-width: calc(100% - 2rem); text-align: center; }
.swipe-hint.fade { opacity: 0; }
.swipe-hint .hint-row { display: flex; gap: 1.4rem; font-weight: 800; font-size: 1.05rem; }
.swipe-hint .hint-bad { color: var(--bad); } .swipe-hint .hint-good { color: var(--good); }
.swipe-hint .hint-line { color: var(--text-1); font-size: 0.85rem; }
/* below the video: who, which stream, the clip's title (the video keeps the rest of the screen) */
.rate > .meta { padding: 0.45rem calc(0.9rem + var(--safe-r)) 0 calc(0.9rem + var(--safe-l)); min-height: 2.9rem; }
.rate > .meta .creator { font-size: 0.85rem; color: var(--text-1); white-space: nowrap; overflow: hidden;
                         text-overflow: ellipsis; }
.rate > .meta .creator b { color: var(--text-0); font-size: 0.95rem; }
.rate > .meta .line { font-size: 0.88rem; margin-top: 0.1rem; overflow: hidden; text-overflow: ellipsis;
                      white-space: nowrap; color: var(--text-1); }
.rate > .meta .clip-title { color: var(--text-0); font-style: italic; }
.actions { display: grid; gap: 0.4rem; padding: 0.25rem calc(0.8rem + var(--safe-r)) 0.35rem calc(0.8rem + var(--safe-l)); }
.actions .pointer-btns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: center; }
.actions .btn { min-height: 52px; font-size: 1.05rem; }
.actions .skip { min-width: 56px; padding: 0 1rem; }
.actions .row2 { display: flex; gap: 0.6rem; align-items: center; font-size: 0.8rem; color: var(--text-2); min-height: 44px; }
.actions .row2 > span:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; }
.actions .row2 .info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions .row2 .counter { white-space: nowrap; }
.actions .undo { min-height: 44px; padding: 0.3rem 0.9rem; font-size: 0.9rem; flex-shrink: 0; }
.reasons { position: absolute; left: max(0.6rem, var(--safe-l)); right: max(0.6rem, var(--safe-r)); bottom: 3.4rem;
           padding: 0.8rem; z-index: 3; box-sizing: border-box;
           max-width: calc(100vw - 1.2rem - var(--safe-l) - var(--safe-r)); overflow-wrap: anywhere; }
.reasons .chips { min-width: 0; }
.reasons .chip { max-width: 100%; white-space: normal; }
.reasons-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.reasons-close { width: 40px; height: 40px; flex-shrink: 0; font-size: 1rem; }

/* ---------- edit review (Good clips, round 26) ---------- */
.good-review { display: grid; gap: 0.75rem; max-width: 46rem; margin: 0 auto; }
.good-review .head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.good-review .head .back { flex-shrink: 0; }
.good-review .head .who { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden;
                          text-overflow: ellipsis; }
.edit-stage { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
              height: min(62dvh, calc((100vw - 1.8rem) * 16 / 9)); border-radius: 1.1rem; background: #000;
              margin: 0 -0.3rem; }
.edit-stage .card { border-radius: 1.1rem; }
.edit-stage .pending { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem;
                       text-align: center; color: var(--text-1); }
.post-box { display: grid; gap: 0.55rem; }
.post-box .post-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.post-box .caption { font-size: 0.9rem; color: var(--text-1); white-space: pre-wrap; word-break: break-word;
                     display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-box .caption.open { display: block; -webkit-line-clamp: unset; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(124, 58, 237, 0.2); color: var(--purple-2);
       font-size: 0.85rem; font-weight: 600; }
.platforms { display: flex; gap: 0.35rem; }
.platforms .chip { flex: 1; min-height: 44px; padding: 0.35rem 0.5rem; }
.post-box .row .btn { min-height: 44px; }
.good-review .pointer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
dialog.sheet .sheet-title { margin: 0; font-size: 1.1rem; }
dialog.sheet .sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
dialog.sheet.tall { max-height: 92dvh; }
dialog.sheet .sheet-body { overflow-y: auto; max-height: inherit; }
/* ---------- lists ---------- */
.list { display: grid; gap: 0.7rem; }
.item { display: grid; grid-template-columns: 76px 1fr; gap: 0.8rem; align-items: center; padding: 0.7rem;
        border-radius: 1.1rem; background: var(--bg-1); border: 1px solid var(--border); color: inherit;
        text-decoration: none; min-height: 76px; }
.item .thumb { width: 76px; height: 76px; border-radius: 0.8rem; background: #000 center / cover no-repeat;
               display: grid; place-items: center; font-size: 1.6rem; color: var(--purple-2); }
.item .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 0.8rem; color: var(--text-2); margin-top: 0.2rem; }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 999px;
        font-size: 0.75rem; font-weight: 700; border: 1px solid currentColor; }
.pill.accent { color: var(--purple-2); } .pill.good { color: var(--good); } .pill.bad { color: var(--bad); }
.pill.warn { color: var(--warn); } .pill.info { color: var(--info); } .pill.muted { color: var(--text-2); }
.segmented { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; }

/* ---------- detail (good clip, post) ---------- */
.player { width: 100%; max-height: 62dvh; aspect-ratio: 9 / 16; background: #000; border-radius: 1.1rem;
          display: block; margin: 0 auto; object-fit: contain; }
.field { display: grid; gap: 0.4rem; }
.field label, .field .label { font-weight: 600; font-size: 0.9rem; color: var(--text-1); }
input[type="text"], input[type="url"], input[type="email"], textarea, select {
    width: 100%; min-height: var(--tap); padding: 0.65rem 0.8rem; border-radius: 0.8rem;
    border: 1px solid var(--border); background: var(--bg-2); font-size: 16px; /* 16px: no iOS zoom */ }
textarea { min-height: 7rem; resize: vertical; }
.radio { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0.7rem; border-radius: 0.8rem;
         border: 1px solid var(--border); background: var(--bg-1); min-height: var(--tap); cursor: pointer; }
.radio input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--purple-1); }
.words { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.word { min-height: 40px; padding: 0.35rem 0.6rem; border-radius: 0.6rem; border: 1px solid var(--border);
        background: var(--bg-2); cursor: pointer; }
.word.changed { border-color: var(--purple-2); color: var(--purple-2); }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.row .grow { flex: 1; }
.back { min-height: var(--tap); display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-1);
        text-decoration: none; font-weight: 600; }

/* ---------- pipeline ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.tile { padding: 0.8rem; border-radius: 1rem; background: var(--bg-1); border: 1px solid var(--border); }
.tile.hot { border-color: var(--purple-2); background: linear-gradient(rgba(124, 58, 237, 0.16), rgba(124, 58, 237, 0.16)), var(--bg-1); }
.tile .v { font-size: 1.5rem; font-weight: 750; }
.bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; margin-top: 0.4rem; }
.bar i { display: block; height: 100%; background: var(--purple-2); }
.bar i.full { background: var(--warn); }
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem; }
.stagec { padding: 0.85rem; border-radius: 1.1rem; background: var(--bg-1); border: 1px solid var(--border);
          display: grid; gap: 0.45rem; text-align: left; cursor: pointer; }
.stagec.waiting { border-color: var(--purple-2); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25); }
.stagec.failed { border-color: var(--bad); background: linear-gradient(rgba(248, 113, 113, 0.08), rgba(248, 113, 113, 0.08)), var(--bg-1); }
.stagec .h { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.stagec .err { color: var(--bad); font-size: 0.8rem; word-break: break-word; }
.spark { display: flex; align-items: flex-end; gap: 1px; height: 22px; }
.spark i { flex: 1; background: var(--purple-2); opacity: 0.8; min-height: 1px; border-radius: 1px; }
.events { display: grid; gap: 0.35rem; }
.event { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: 0.6rem; align-items: center;
         padding: 0.5rem 0.7rem; border-radius: 0.7rem; background: var(--bg-1); font-size: 0.85rem; }
.event.error { color: var(--bad); background: linear-gradient(rgba(248, 113, 113, 0.08), rgba(248, 113, 113, 0.08)), var(--bg-1); }

/* ---------- sheets, toast ---------- */
dialog.sheet { margin: auto auto 0; width: min(32rem, 100%); max-height: 85dvh; border: 1px solid var(--border);
               border-radius: var(--radius) var(--radius) 0 0; padding: 0; color: var(--text-0);
               background: var(--bg-1); }
dialog.sheet::backdrop { background: rgba(5, 3, 10, 0.6); }
.sheet-body { display: grid; gap: 0.6rem; padding: 1.1rem 1.1rem calc(1.1rem + var(--safe-b)); }
.who { margin: 0; font-weight: 700; }
.switch { display: flex; gap: 0.7rem; align-items: center; min-height: var(--tap); }
.switch input { width: 22px; height: 22px; accent-color: var(--purple-1); }
.switch small { display: block; color: var(--text-2); }
.menu-item { min-height: var(--tap); display: flex; align-items: center; padding: 0 0.9rem; border-radius: 0.8rem;
             border: 1px solid var(--border); background: transparent; color: var(--text-0); text-decoration: none;
             text-align: left; cursor: pointer; }
.menu-item.danger { color: var(--bad); }
.hint { margin: 0; font-size: 0.85rem; color: var(--text-1); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
         top: calc(64px + var(--safe-t)); max-width: min(30rem, calc(100% - 2rem)); padding: 0.75rem 1rem;
         border-radius: 1rem; background: rgba(28, 22, 41, 0.97); border: 1px solid var(--border);
         box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); display: flex; gap: 0.8rem; align-items: center; }
.toast.error { border-color: var(--bad); }
.toast .btn { min-height: 40px; padding: 0.3rem 0.8rem; }

@media (min-width: 900px) {
    .stage > .card { inset: 1rem calc(50% - min(28rem, 45vh * 0.5625 + 8rem)) 0.4rem; border-radius: var(--radius);
                     border: 1px solid var(--border); box-shadow: 0 20px 50px -20px var(--purple-glow); }
    .stage > .corner.bad { left: calc(50% - min(28rem, 45vh * 0.5625 + 8rem) + 0.75rem); }
    .stage > .corner.good { right: calc(50% - min(28rem, 45vh * 0.5625 + 8rem) + 0.75rem); }
    .actions, .rate > .meta { max-width: 36rem; margin: 0 auto; width: 100%; }
    .tabbar { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    #matrix-bg { display: none; }
}

.view pre { white-space: pre-wrap; word-break: break-word; background: var(--bg-0); border: 1px solid var(--border);
            border-radius: 0.7rem; padding: 0.6rem; max-height: 14rem; overflow: auto; font-size: 0.75rem; }
details summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; }

.layout-pick { width: 100%; }
.flush { margin: 0; }
.offscreen { position: fixed; top: 0; left: -200vw; opacity: 0; }
.edit-info { margin: -0.4rem 0 0; }
.understood { margin: 0; padding: 0.55rem 0.8rem; border-radius: 0.8rem; color: var(--text-1);
              background: rgba(124, 58, 237, 0.14); border: 1px solid var(--border); }

/* touch screens: swipes only, the video gets the space of the buttons (last, so it wins over the rules above) */
@media (hover: none) and (pointer: coarse) {
    .actions .pointer-btns, .good-review > .pointer-btns { display: none; }
}

/* round 28: sign-in */
.signin { max-width: 24rem; }
.signin form { width: 100%; }
.signin .or { margin: 0.2rem 0; }
.device-code { font: 700 2.2rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.3em;
               padding: 0.6rem 0.9rem 0.6rem 1.2rem; border-radius: 1rem; background: var(--bg-2);
               border: 1px solid var(--purple-2); }
.center-card img.qr { width: 200px; height: 200px; border-radius: 0.8rem; background: #fff; filter: none; }

/* ---------- edit-review feed (round 31) ---------- */
.edit-feed .understood-line { color: var(--purple-2); font-style: normal; }
.center-row { justify-content: center; }
.post-sheet .post-box { padding: 0; }
.transcript-box { font-size: 16px; line-height: 1.45; min-height: 6.5rem; resize: none; overflow: hidden; }
dialog.sheet .sticky-actions { position: sticky; bottom: calc(-1.1rem - var(--safe-b)); z-index: 1;
    padding: 0.6rem 0 calc(0.6rem + var(--safe-b)); margin-bottom: calc(-1.1rem - var(--safe-b));
    background: linear-gradient(to bottom, rgba(20, 16, 31, 0.85), var(--bg-1) 35%); }
.btn.good.solid { background: var(--good); color: #06240f; border-color: transparent; }

/* round 36: drawing the facecam box on a still of the 16:9 source */
.facebox .fb-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0.6rem;
                     overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.facebox .fb-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.facebox .fb-box { position: absolute; border: 2px solid #4ade80; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
                   cursor: move; touch-action: none; box-sizing: border-box; }
.facebox .fb-handle { position: absolute; width: 28px; height: 28px; margin: -14px; border-radius: 50%;
                      background: #4ade80; border: 3px solid #0c0a12; touch-action: none; }
.facebox .fb-handle.nw { left: 0; top: 0; } .facebox .fb-handle.ne { right: 0; top: 0; margin-right: -14px; }
.facebox .fb-handle.sw { left: 0; bottom: 0; margin-bottom: -14px; }
.facebox .fb-handle.se { right: 0; bottom: 0; margin-right: -14px; margin-bottom: -14px; }
/* round 37: the clip itself is bad (not the edit) */
.clip-bad-toggle { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; margin: 0.4rem 0 0.6rem;
                   border-color: rgba(248, 113, 113, 0.5); color: var(--bad); }
.clip-bad-toggle[aria-pressed="true"] { background: rgba(248, 113, 113, 0.18); border-color: var(--bad); }
.edit-issue-part[hidden], .clip-bad-field[hidden] { display: none; }
.ask-clip-bad { color: var(--bad); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.ask-clip-bad .btn { min-height: 44px; padding: 0.3rem 0.8rem; }
.facebox .fb-handle::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; } /* 44 px to touch */
.facebox .fb-spots { margin-top: 0.5rem; }
