/* Студия, 2026-09-23: picture-first mobile layout from the owner-approved canvas.
   Grey ground, white cards, black primary actions, one thumb-reachable action dock.
   Colours follow Telegram's light/dark scheme; nothing here loads from another origin. */
:root{
  --bg:#f2f2f5;--surface:#fff;--surface-2:#ebebf0;--line:#e6e6eb;--ink:#121214;--muted:#5c5c66;--faint:#a1a1aa;
  --media:#1b1b1f;--scrim:rgba(18,18,20,.62);--on-media:#fff;--primary:#121214;--on-primary:#fff;
  --warn-bg:#fff1d6;--warn:#8f4a00;--blue-bg:#eaf0ff;--blue:#2b5bff;--green-bg:#e3f4ea;--green:#127a45;--red-bg:#fdecea;--red:#b3261e;
  --shadow:0 1px 2px rgba(18,18,20,.06);--focus:#2b5bff;--hover:#f6f6f9;
  --top:env(safe-area-inset-top,0px);--bottom:env(safe-area-inset-bottom,0px);--dock:0px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,"Helvetica Neue",sans-serif;
  color:var(--ink);background:var(--bg);font-synthesis:none;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;color-scheme:light
}
:root[data-theme=dark]{
  --bg:#0f0f12;--surface:#1b1b1f;--surface-2:#26262b;--line:#2a2a30;--ink:#f3f3f5;--muted:#a3a3ad;--faint:#6e6e78;
  --media:#1b1b1f;--scrim:rgba(15,15,18,.7);--primary:#fff;--on-primary:#121214;
  --warn-bg:#3a2a10;--warn:#f2b45a;--blue-bg:#1e2a4d;--blue:#7c9bff;--green-bg:#123122;--green:#5fd39c;--red-bg:#3a1715;--red:#ff8a80;
  --shadow:none;--focus:#7c9bff;--hover:#222227;color-scheme:dark
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0f0f12;--surface:#1b1b1f;--surface-2:#26262b;--line:#2a2a30;--ink:#f3f3f5;--muted:#a3a3ad;--faint:#6e6e78;
  --media:#1b1b1f;--scrim:rgba(15,15,18,.7);--primary:#fff;--on-primary:#121214;
  --warn-bg:#3a2a10;--warn:#f2b45a;--blue-bg:#1e2a4d;--blue:#7c9bff;--green-bg:#123122;--green:#5fd39c;--red-bg:#3a1715;--red:#ff8a80;
  --shadow:none;--focus:#7c9bff;--hover:#222227;color-scheme:dark
}}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink)}
button,input,textarea,select{font:inherit;color:inherit}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{border:0;background:none;cursor:pointer;padding:0;text-align:inherit}
button:disabled{cursor:default;opacity:.45}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
h1,h2,h3,p,ul,ol,figure{margin:0}
ul,ol{padding:0;list-style:none}
svg{width:18px;height:18px;flex-shrink:0}
img{display:block}
[hidden]{display:none!important}

/* Screen frame */
main{max-width:640px;margin:0 auto;min-width:0;padding:calc(12px + var(--top)) 16px calc(28px + var(--bottom) + var(--dock));outline:0}
main.has-bar{padding-top:var(--top)}
.bar{display:grid;grid-template-columns:minmax(52px,auto) minmax(0,1fr) minmax(52px,auto);align-items:center;min-height:52px;margin:0 -12px}
.bar-title{justify-self:center;font-size:15px;line-height:20px;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.round{display:grid;place-items:center;width:44px;height:44px;border-radius:999px;color:var(--ink)}
.round svg{width:22px;height:22px}
.home-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
.title-xl{font-size:30px;line-height:36px;font-weight:700;letter-spacing:-.6px;overflow-wrap:anywhere}
.lede{margin:2px 0 14px;font-size:15px;line-height:21px;color:var(--muted)}
.refresh{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 10px;margin-right:-10px;border-radius:999px;color:var(--muted);font-size:13px;font-weight:500}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 8px;font-size:13px;line-height:18px;font-weight:600;color:var(--muted)}
.section-note{margin:-4px 0 8px;font-size:13px;line-height:18px;color:var(--muted)}
.footnote{margin:20px 0 0;text-align:center;font-size:12px;line-height:16px;color:var(--muted);overflow-wrap:anywhere}
.help{font-size:13px;line-height:18px;color:var(--muted)}
.help+.help{margin-top:6px}
.error{margin:10px 0 0;font-size:14px;line-height:20px;color:var(--red)}
.error:empty{display:none}
.banner{margin:12px 0 0;padding:12px 14px;border-radius:14px;background:var(--warn-bg);color:var(--warn);font-size:14px;line-height:20px;overflow-wrap:anywhere}

/* Cards and pictures */
.card{display:flex;flex-direction:column;background:var(--surface);border-radius:20px;overflow:hidden;box-shadow:var(--shadow);width:100%;text-align:left}
.pad{padding:14px}
.frame{position:relative;display:block;aspect-ratio:16/9;background:var(--media);overflow:hidden;border-radius:10px}
.frame>img,.frame>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.frame.flat{border-radius:0}
img.is-broken,.frame img:not([src]),.avatar img:not([src]),.player img:not([src]){visibility:hidden}
.hero .frame{border-radius:0;aspect-ratio:auto;height:201px}
.hero-body{display:flex;flex-direction:column;gap:6px;padding:12px 16px 14px}
.hero-title{font-size:17px;line-height:22px;font-weight:600;letter-spacing:-.2px;overflow-wrap:anywhere}
.hero-sub{font-size:14px;line-height:20px;color:var(--muted)}
.overlay{position:absolute;display:flex;gap:6px;align-items:center}
.overlay.tl{left:12px;top:12px}.overlay.tr{right:12px;top:12px}.overlay.bl{left:12px;bottom:12px}.overlay.br{right:12px;bottom:12px}
.pill{display:inline-flex;align-items:center;gap:6px;min-height:26px;padding:0 10px;border-radius:999px;font-size:12px;line-height:16px;font-weight:600;white-space:nowrap;background:var(--surface-2);color:var(--ink)}
.pill svg{width:14px;height:14px}
.pill.light{background:rgba(255,255,255,.92);color:#121214}
.pill.scrim{background:var(--scrim);color:var(--on-media)}
.pill.warn{background:var(--warn-bg);color:var(--warn)}
.pill.blue{background:var(--blue-bg);color:var(--blue)}
.pill.green{background:var(--green-bg);color:var(--green)}
.pill.red{background:var(--red-bg);color:var(--red)}
.pill.small{min-height:22px;padding:0 8px}
.bar .next-pill{justify-self:end;margin-right:12px;min-height:32px;border:0;cursor:pointer;font:inherit;font-size:13px;font-weight:600}
.overlay.video-error{inset:0;flex-direction:column;justify-content:center;gap:12px;padding:16px;background:var(--scrim);color:var(--on-media);text-align:center}
.overlay.video-error .btn{width:auto;padding:0 20px}
.ctx{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;line-height:18px;font-weight:500;color:var(--muted)}
.ctx>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ctx-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.avatar{position:relative;flex:0 0 auto;display:grid;place-items:center;width:22px;height:22px;border-radius:999px;overflow:hidden;background:var(--media);color:var(--on-media);font-size:9px;font-weight:700;letter-spacing:.2px}
.avatar.large{width:40px;height:40px;font-size:13px}
.avatar.tiny{width:16px;height:16px;font-size:7px}
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.thumbs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.thumbs.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.thumbs .frame{border-radius:8px}
.thumb-more{display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:16/9;border-radius:8px;background:var(--primary);color:var(--on-primary)}
.thumb-more strong{font-size:15px;line-height:18px}
.thumb-more span{font-size:11px;line-height:14px;opacity:.72}
.tag{position:absolute;left:4px;bottom:4px;display:flex;align-items:center;min-height:16px;padding:0 5px;border-radius:999px;background:rgba(18,18,20,.7);color:#fff;font-size:10px;line-height:14px;font-weight:600}
.caption{display:flex;flex-direction:column;gap:4px;min-width:0}
.caption>span{font-size:12px;line-height:16px;color:var(--muted);font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wall{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:10px}
.wall .frame{border-radius:8px}
.group{display:flex;flex-direction:column;gap:12px;padding:14px;background:var(--surface);border-radius:16px;box-shadow:var(--shadow);width:100%;text-align:left}
.group+.group{margin-top:10px}
.group-head{display:flex;align-items:center;gap:12px;min-width:0}
.group-head .text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.name{font-size:15px;line-height:20px;font-weight:600;overflow-wrap:anywhere}
.sub{font-size:13px;line-height:18px;color:var(--muted);overflow-wrap:anywhere}
.body-text{font-size:14px;line-height:20px;overflow-wrap:anywhere}
.chevron{color:var(--faint)}
.stack{display:flex;flex-direction:column;gap:10px}
.spaced{margin-top:10px}
button.caption{width:100%;text-align:left}
.thumb-cell .blank.blue{background:var(--blue-bg);color:var(--blue)}

/* Lists */
.list{display:flex;flex-direction:column;background:var(--surface);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}
.list+.list{margin-top:10px}
.row{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 12px 10px 14px;color:var(--ink);text-align:left}
.row+.row{border-top:1px solid var(--line)}
.row .text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.row .title{font-size:15px;line-height:20px;font-weight:600;overflow-wrap:anywhere}
.row .title.plain{font-weight:500}
.row .one-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .time{flex:0 0 auto;align-self:flex-start;padding-top:2px;font-size:13px;line-height:18px;color:var(--muted);font-variant-numeric:tabular-nums}
.row .value{flex:0 0 auto;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.tile{flex:0 0 auto;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--surface-2);color:var(--ink)}
.tile.blue{background:var(--blue-bg);color:var(--blue)}
.tile.warn{background:var(--warn-bg);color:var(--warn)}
.tile.green{background:var(--green-bg);color:var(--green)}
.thumb-cell{position:relative;flex:0 0 auto;width:80px}
.thumb-cell.wide{width:112px}
.thumb-cell .frame{border-radius:8px}
.thumb-cell .blank{display:grid;place-items:center;aspect-ratio:16/9;border-radius:8px;background:var(--surface-2);color:var(--faint)}
.badge{position:absolute;right:-5px;bottom:-5px;display:grid;place-items:center;width:20px;height:20px;border-radius:999px;border:2px solid var(--surface);color:#fff;background:var(--muted)}
.badge svg{width:10px;height:10px}
.badge.blue{background:var(--blue)}.badge.green{background:var(--green)}.badge.red{background:var(--red)}

/* Review screens */
.player{position:relative;display:block;width:calc(100% + 32px);margin:0 -16px;aspect-ratio:16/9;max-height:360px;background:var(--media);overflow:hidden}
.player>img,.player>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.player>video{object-fit:contain;background:#000}
.player .play-big{position:absolute;inset:0;display:grid;place-items:center}
.player .play-big span{display:grid;place-items:center;width:56px;height:56px;border-radius:999px;background:rgba(255,255,255,.92);color:#121214}
.player .play-big svg{width:22px;height:22px}
.player-empty{display:grid;place-content:center;gap:10px;padding:24px;text-align:center;color:var(--muted);background:var(--surface-2)}
.player-empty svg{margin:auto;width:36px;height:36px}
.storyboard{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.storyboard-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.storyboard-head strong{font-size:15px;line-height:20px}
.storyboard-head span{font-size:13px;line-height:18px;font-weight:500;color:var(--muted);text-align:right}
.storyboard-head span.warn-text{color:var(--warn)}
.review-head{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.review-title{font-size:22px;line-height:28px;font-weight:600;letter-spacing:-.3px;overflow-wrap:anywhere}
.note-card{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.note-card .icon{flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:var(--warn-bg);color:var(--warn)}
.note-card .icon.blue{background:var(--blue-bg);color:var(--blue)}
.note-card .icon svg{width:16px;height:16px}
.note-card p{font-size:15px;line-height:21px;overflow-wrap:anywhere}
.note-card ul{display:flex;flex-direction:column;gap:4px}
.note-card li{font-size:15px;line-height:21px;overflow-wrap:anywhere}
.quote{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.quote .label{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:600;color:var(--muted)}
.quote .label svg{width:14px;height:14px}
.quote p{font-size:15px;line-height:21px;overflow-wrap:anywhere;white-space:pre-wrap}
.fix{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.fix-title{font-size:15px;line-height:20px;font-weight:600}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:15px;font-weight:500}
.chip[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.chip.ghost{border-style:dashed}
.details{padding:4px 14px 14px;display:grid;gap:6px;font-size:13px;line-height:18px;color:var(--muted);overflow-wrap:anywhere}
.details dt{font-weight:600;color:var(--ink)}
.details dd{margin:0 0 6px}
.versions{display:flex;gap:8px;overflow-x:auto;padding:4px 0}
.versions button{flex:0 0 auto;min-height:44px;padding:0 14px;border-radius:999px;background:var(--surface-2);font-size:14px}
.versions button[aria-pressed=true]{background:var(--primary);color:var(--on-primary)}
.compare{display:grid;gap:12px;margin:0 -16px}
.compare figure{position:relative}
.compare figcaption{padding:6px 16px 0;font-size:13px;color:var(--muted)}
.result{display:flex;flex-direction:column;gap:8px;margin:14px 0 0;padding:14px;border-radius:16px;background:var(--surface);box-shadow:var(--shadow);overflow-wrap:anywhere}
.result.success{background:var(--green-bg)}
.result h2{display:flex;align-items:center;gap:10px;font-size:17px;line-height:22px;font-weight:600}
.result.success h2{color:var(--green)}
.result h2 svg{width:22px;height:22px}
.result p{font-size:14px;line-height:20px}
.notes{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.notes label{font-size:15px;line-height:20px;font-weight:600}
textarea{width:100%;min-height:110px;resize:vertical;border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:var(--surface);color:var(--ink);font-size:16px;line-height:22px}
.journal{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.journal-entry{padding:12px 14px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.journal-entry h3{font-size:15px;line-height:20px;font-weight:600;margin:2px 0 4px}
.journal-note{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:20px}

/* Buttons */
.btn{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 16px;border-radius:14px;font-size:16px;line-height:20px;font-weight:600;text-align:center;width:100%}
.btn-primary{background:var(--primary);color:var(--on-primary)}
.btn-secondary{background:var(--surface-2);color:var(--ink)}
.btn-quiet{min-height:48px;background:var(--surface-2);color:var(--ink);font-size:15px;margin-top:16px}
.btn .count{display:grid;place-items:center;min-width:24px;height:24px;padding:0 8px;border-radius:999px;background:rgba(255,255,255,.18);font-size:13px}
:root[data-theme=dark] .btn .count{background:rgba(18,18,20,.12)}
.link-button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:600;box-shadow:var(--shadow)}
.link-button span+span{color:var(--muted);font-weight:500}
.text-button{display:block;min-height:44px;margin:4px auto 0;padding:0 8px;color:var(--muted);text-decoration:underline;text-underline-offset:4px;font-size:14px}

/* Dock: the one main action, under the thumb */
.dock{position:fixed;z-index:20;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:8px;padding:10px 16px calc(14px + var(--bottom));background:var(--surface);border-top:1px solid var(--line)}
.dock>*{width:100%;max-width:608px;margin:0 auto}
.dock-note{text-align:center;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);overflow-wrap:anywhere}
.dock-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:10px}
.dock-actions.wide-second{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}

/* Sheet */
dialog.sheet{position:fixed;inset:auto 0 0 0;margin:0 auto;width:100%;max-width:640px;max-height:92dvh;overflow:auto;border:0;padding:8px 20px calc(20px + var(--bottom));border-radius:24px 24px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -8px 32px rgba(10,10,12,.18)}
dialog.sheet::backdrop{background:rgba(10,10,12,.5)}
dialog.sheet form{display:flex;flex-direction:column;gap:16px}
.sheet-handle{align-self:center;width:36px;height:5px;border-radius:3px;background:var(--line)}
dialog.sheet h2{margin-top:4px;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-.3px}
.sheet-summary{display:flex;align-items:center;gap:12px;padding:10px;border-radius:14px;background:var(--bg)}
.sheet-summary .frame{flex:0 0 72px;border-radius:8px}
.sheet-summary .text{display:flex;flex-direction:column;min-width:0}
.sheet-summary .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.consequences{display:flex;flex-direction:column;gap:12px}
.consequences li{display:flex;align-items:flex-start;gap:12px;font-size:15px;line-height:21px;overflow-wrap:anywhere}
.consequences .icon{flex:0 0 auto;display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:var(--surface-2);color:var(--muted)}
.consequences .icon svg{width:14px;height:14px}
.consequences .icon.warn{background:var(--warn-bg);color:var(--warn)}
.consequences .icon.green{background:var(--green-bg);color:var(--green)}
.consequences .icon.blue{background:var(--blue-bg);color:var(--blue)}
#confirmation-copy{display:flex;flex-direction:column;gap:12px}
.sheet-copy{font-size:15px;line-height:21px;color:var(--muted);overflow-wrap:anywhere}
.sheet-actions{display:flex;flex-direction:column;gap:8px;margin-top:4px}

/* Filters */
.filters{display:flex;gap:8px;margin:14px -16px 0;padding:0 16px 2px;overflow-x:auto;scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.filter{flex:0 0 auto;min-height:44px;padding:0 16px;border-radius:999px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;box-shadow:var(--shadow)}
.filter[aria-pressed=true]{background:var(--primary);color:var(--on-primary);font-weight:600}

/* Disclosure */
details.more{background:var(--surface);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
details.more>summary{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 12px 10px 14px;cursor:pointer;list-style:none}
details.more>summary::-webkit-details-marker{display:none}
details.more[open]>summary .chevron{transform:rotate(90deg)}
details.more>summary .text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
details.more .list{border-radius:0;box-shadow:none;border-top:1px solid var(--line)}
.stacked{flex:0 0 auto;display:flex}
.stacked .frame{width:56px;border:2px solid var(--surface);border-radius:6px}
.stacked .frame+.frame{margin-left:-22px}
details.plain summary{min-height:44px;padding:10px 0;font-weight:600;cursor:pointer}

/* Empty, boot, toast, skip */
.empty{display:flex;flex-direction:column;align-items:center;gap:10px;margin:16px 0;padding:32px 20px;border-radius:20px;background:var(--surface);text-align:center;box-shadow:var(--shadow)}
.empty .tile{width:44px;height:44px;border-radius:999px}
.empty h2{font-size:20px;line-height:26px}
.empty p{font-size:15px;line-height:21px;color:var(--muted)}
.boot{min-height:60dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center}
.boot p{max-width:290px;color:var(--muted);font-size:15px;line-height:21px}
.boot h1{font-size:26px}
.mark{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:var(--primary);color:var(--on-primary);font-size:32px;font-weight:700}
.announcement{position:fixed;z-index:30;left:50%;bottom:calc(16px + var(--bottom) + var(--dock));transform:translateX(-50%);width:calc(100% - 32px);max-width:560px;padding:14px 16px;border-radius:16px;background:var(--primary);color:var(--on-primary);font-size:15px;line-height:21px;box-shadow:0 8px 24px rgba(0,0,0,.18);pointer-events:none}
.announcement:empty{display:none}
.skip{position:fixed;left:10px;top:-100px;z-index:50;padding:12px;border-radius:12px;background:var(--primary);color:var(--on-primary)}
.skip:focus{top:10px}
.eyebrow{font-size:13px;line-height:18px;font-weight:600;color:var(--muted)}
.story-title-options{display:grid;gap:8px}
.story-title-options button{min-height:54px;padding:14px 16px;border-radius:16px;background:var(--surface);box-shadow:var(--shadow);text-align:left;font-size:15px;line-height:21px;overflow-wrap:anywhere}
.story-title-options button[aria-pressed=true]{background:var(--primary);color:var(--on-primary)}
.num{flex:0 0 auto;display:grid;place-items:center;width:32px;height:32px;border-radius:999px;background:var(--surface-2);font-size:14px;font-weight:700}
.boot code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;padding:1px 6px;border-radius:6px;background:var(--surface-2);color:var(--ink);overflow-wrap:anywhere}

/* A plain browser's door (2026-10-07): the owner's PIN on a phone-style keypad, the same white keys on grey. */
.pin{min-height:calc(100dvh - 40px - var(--top) - var(--bottom));display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;max-width:340px;margin:0 auto;text-align:center}
.pin h1{font-size:26px;line-height:32px;font-weight:700}
.pin-lede{color:var(--muted);font-size:15px;line-height:21px}
.pin-input{width:100%;min-height:56px;padding:0 16px;border:0;border-radius:14px;background:var(--surface);box-shadow:var(--shadow);text-align:center;font-size:28px;letter-spacing:.35em;font-weight:600}
.pin-input:focus{outline:2px solid var(--focus);outline-offset:2px}
.pin-pad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%}
.pin-key{display:grid;place-items:center;min-height:58px;border-radius:16px;background:var(--surface);box-shadow:var(--shadow);font-size:24px;line-height:28px;font-weight:600;text-align:center}
.pin-key:active{background:var(--surface-2)}
.pin-key.quiet{background:transparent;box-shadow:none;color:var(--muted)}
.pin-key svg{width:26px;height:26px}
.pin-remember{display:flex;align-items:center;gap:10px;align-self:stretch;min-height:44px;font-size:15px;line-height:20px;text-align:left;cursor:pointer}
.pin-remember input{flex:0 0 auto;width:22px;height:22px;margin:0;accent-color:var(--primary)}
.pin .error{margin:0}
.pin .help{max-width:300px}

@media (min-width:600px){main{padding-left:24px;padding-right:24px}.player{width:calc(100% + 48px);margin:0 -24px}.compare{margin:0 -24px}.filters{margin-left:-24px;margin-right:-24px;padding-left:24px;padding-right:24px}.bar{margin:0 -16px}}
/* Home since 2026-10-07: the top decision, then one line per other thing. */
#home-decisions,#home-links{margin-top:12px}
#home-links+.text-button{margin-top:12px}
.row .text>.pill{align-self:flex-start}
.review-head>.link-button{align-self:flex-start}
details.more .help.pad{padding-top:0}

/* A mouse shows what can be pressed; a touch screen keeps its own feedback. */
@media (hover:hover){
  button.row,details.more>summary,.btn,.chip,.filter,.round,.refresh,.link-button,.versions button,.story-title-options button,.pin-key{transition:background-color .15s,border-color .15s,opacity .15s}
  button.row:hover,details.more>summary:hover,.filter[aria-pressed=false]:hover,.link-button:hover,.story-title-options button[aria-pressed=false]:hover:not(:disabled),.pin-key:not(.quiet):hover{background:var(--hover)}
  .btn-primary:hover:not(:disabled){opacity:.86}
  .btn-secondary:hover:not(:disabled),.btn-quiet:hover,.round:hover,.refresh:hover,.versions button[aria-pressed=false]:hover{background:var(--line)}
  .chip[aria-pressed=false]:hover{border-color:var(--faint)}
  .text-button:hover{color:var(--ink)}
  .card.hero:hover .hero-title{text-decoration:underline;text-underline-offset:3px}
}

/* A computer's window (owner 2026-10-07, «удобную адаптацию под десктоп»): the same screens as the phone,
   with the picture using the width and the decision buttons always in view. */
@media (min-width:1024px){
  main{max-width:880px;padding-left:32px;padding-right:32px}
  .bar{margin:0 -12px}
  .hero .frame{height:auto;aspect-ratio:16/9}
  .hero-body{padding:16px 20px 18px}
  .hero-title{font-size:20px;line-height:26px}
  .player{width:100%;max-height:none;margin:0;border-radius:16px}
  .viewer,main>.player{max-width:calc((100dvh - 330px) * 16 / 9)}
  .compare{margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
  .compare figcaption{padding:6px 0 0}
  .filters{margin-left:0;margin-right:0;padding-left:0;padding-right:0;flex-wrap:wrap}
  .note-card p,.quote p,.help,.section-note,.hero-sub,.result p{max-width:68ch}
  /* A motion loop beside its three frames: the strip is as tall as the player. */
  .viewer:has(>.storyboard){display:grid;grid-template-columns:minmax(0,3.4fr) minmax(0,1fr);gap:12px}
  .viewer>.storyboard{margin-top:0;min-height:0}
  .viewer>.storyboard .thumbs.three{flex:1 1 0;min-height:0;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
  .viewer>.storyboard .frame{aspect-ratio:auto;height:100%}
  .viewer .storyboard-head:has(.warn-text) strong{display:none}
  .viewer .storyboard-head span{text-align:left}
  .player-empty{aspect-ratio:auto;min-height:240px}
  /* An open card on the left, the other decisions beside it and in view while the card scrolls. */
  main.has-queue{max-width:1600px;padding-right:384px;position:relative}
  main.has-queue>.queue{position:absolute;top:calc(var(--top) + 52px);right:32px;bottom:calc(28px + var(--bottom) + var(--dock));width:320px}
  .queue-body{position:sticky;top:16px;max-height:calc(100dvh - 32px - var(--dock));overflow-y:auto;overscroll-behavior:contain}
  .queue .section-title{margin-top:0}
  .queue .thumb-cell.wide{width:88px}
  .queue .row .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  main.has-queue .next-pill{display:none}
  main.has-queue~.dock{padding-left:calc(max(0px,(100vw - 1600px) / 2) + 32px);padding-right:calc(max(0px,(100vw - 1600px) / 2) + 384px)}
  .dock{padding-top:12px}
  /* A confirmation is a centred dialog on a computer, not a sheet from the bottom edge. */
  dialog.sheet{inset:0;margin:auto;width:calc(100% - 64px);max-width:520px;height:fit-content;max-height:min(88dvh,760px);padding:22px 24px 24px;border-radius:20px;box-shadow:0 24px 64px rgba(10,10,12,.28)}
  .sheet-handle{display:none}
  .sheet-actions{flex-direction:row-reverse}
}
/* The PIN on a computer is typed: the phone keypad goes. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine){.pin-pad{display:none}}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
