/* keymoment.app — shell with left navigation, white panels on light grey, cream where chapters live.
   Flat: no shadows. Cobalt = selected and active. Orange = the one thing to do now (first action, a fix). Ink = everything else.
   No fonts or files from anywhere else: Inter if installed, the system face otherwise. */
:root{
  --cobalt:#0047ff; --cobalt-deep:#0036c4; --cobalt-tint:#eef2ff; --cream:#f7f2e8; --grey:#e6e6e6; --page:#f3f3f1; --line:#e2e2e0; --grey-3:#9a9a9a; --grey-4:#5f5f5f; --ink:#0b0f1a; --ink-2:#1b2130; --white:#ffffff; --orange:#ff6b00; --orange-deep:#e65f00; --orange-tint:#fff1e8; --orange-text:#c24a00;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  --r:12px; --r-sm:8px; --r-ctl:8px;
  color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
body{margin:0;background:var(--page);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.45;padding:0;letter-spacing:-.005em}
h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.02em;line-height:1.15}
h1{font-size:24px}h2{font-size:16px}h3{font-size:15px}
p{margin:0}
.micro{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--grey-4)}
.num{font-variant-numeric:tabular-nums;letter-spacing:0}
.hint{color:var(--grey-4);font-size:12.5px;margin:6px 0 0;max-width:62ch}
.lead{color:var(--grey-4);font-size:14px;max-width:70ch;margin-top:4px}
.sp{flex:1}
.row{display:flex;align-items:center;gap:10px}.row.gap{gap:10px;flex-wrap:wrap}
button,.btn{font:inherit;cursor:pointer;border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:var(--r-ctl);padding:0 14px;height:36px;font-weight:500;letter-spacing:-.01em;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;transition:background .12s,color .12s,border-color .12s,box-shadow .12s;white-space:nowrap}
button:hover:not(:disabled),.btn:hover{background:var(--page);border-color:#cfcfcd}
button.primary{background:var(--cobalt);border-color:var(--cobalt);color:var(--white);font-weight:600}
button.primary:hover:not(:disabled){background:var(--cobalt-deep);border-color:var(--cobalt-deep)}
button.primary.big{background:var(--orange);border-color:var(--orange);color:var(--ink);height:48px;padding:0 26px;font-size:15px;border-radius:999px}
button.primary.big:hover:not(:disabled){background:var(--orange-deep);border-color:var(--orange-deep);color:var(--ink)}
button.tertiary{border-color:transparent;background:transparent;color:var(--grey-4)}
button.tertiary:hover:not(:disabled){color:var(--ink);background:var(--page);border-color:transparent}
button.small,.btn.small{height:32px;padding:0 12px;font-size:13px}
button.icon{width:36px;padding:0}
button.link{background:none;border:0;height:auto;padding:0;color:var(--grey-4);text-decoration:underline;text-underline-offset:3px;font-weight:400}
button.link:hover{background:none;color:var(--ink);border:0}
button.danger{border-color:var(--orange-text);color:var(--orange-text)}
button.danger:hover:not(:disabled){background:var(--orange-text);border-color:var(--orange-text);color:var(--white)}
button:disabled{opacity:.4;cursor:default}
button.copied{background:var(--ink)!important;border-color:var(--ink)!important;color:var(--white)!important}
button.copy-failed{background:var(--orange-text)!important;border-color:var(--orange-text)!important;color:var(--white)!important;white-space:normal;height:auto;min-height:32px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
input[type=text],textarea,select{width:100%;font:inherit;color:var(--ink);background:var(--white);border:1px solid var(--line);border-radius:var(--r-ctl);padding:8px 12px;min-height:36px}
input[type=text]:hover,textarea:hover,select:hover{border-color:#cfcfcd}
textarea{resize:vertical;line-height:1.5}
input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,.tile:focus-visible,.nav:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--cobalt);outline-offset:2px}
.lbl{display:block;font-size:12.5px;font-weight:500;color:var(--ink);margin:14px 0 5px}
.lbl.fixed{color:var(--cobalt)}
.info{position:relative;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:1.5px solid currentColor;font-size:11px;font-weight:600;padding:0;background:transparent;vertical-align:middle;margin-left:6px;color:var(--grey-4)}
.info:hover,.info:focus-visible{color:var(--ink);background:transparent;border-color:currentColor}
.info::after{content:attr(data-tip);white-space:normal;position:absolute;right:-6px;bottom:calc(100% + 8px);width:240px;background:var(--ink);color:var(--white);font:13px/1.4 var(--sans);font-weight:400;letter-spacing:0;text-transform:none;padding:8px 10px;border-radius:var(--r-sm);text-align:left;opacity:0;pointer-events:none;transition:opacity .12s;z-index:8}
.info:hover::after,.info:focus-visible::after{opacity:1}

/* shell */
.shell{display:grid;grid-template-columns:232px 1fr;min-height:100%;transition:grid-template-columns .2s ease}
.shell.mini{grid-template-columns:68px 1fr}
.side{position:sticky;top:0;height:100vh;height:100dvh;padding:20px 14px calc(16px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:4px;background:var(--page);overflow:hidden}
.side-top{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-bottom:14px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.03em;color:var(--ink);text-decoration:none;padding:4px 10px;min-width:0}
.brand svg{width:30px;height:15px;color:var(--cobalt);flex:0 0 auto}
.collapse{width:32px;height:32px;border-color:transparent;background:transparent;color:var(--grey-4);flex:0 0 auto}
.collapse:hover{color:var(--ink);background:#ebebe9;border-color:transparent}
.collapse svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.only-mini{display:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
/* collapsed: icons only, labels hidden, tooltips from the title attributes */
.mini .lab{display:none}
.mini .side{padding-inline:12px}
.mini .side-top{flex-direction:column;align-items:center;gap:8px}
.mini .brand{padding:4px 0}
.mini .collapse svg{transform:scaleX(-1)}
.mini .nav{justify-content:center;padding:9px 0;border-radius:10px}
.mini .badge{position:absolute;margin:0;transform:translate(14px,-12px);min-width:16px;height:16px;font-size:10px;padding:0 4px}
.mini .nav{position:relative}
.mini .side-video{padding:8px;align-items:center}
.mini .side-video .small{width:36px;padding:0}
.mini .only-mini{display:block}
.nav{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:999px;color:var(--ink);text-decoration:none;font-weight:500;font-size:14px;transition:background .12s}
.nav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.nav:hover{background:#ebebe9}
.nav.on{background:var(--cobalt-tint);color:var(--cobalt)}
.nav.static{color:var(--grey-4);font-weight:400;font-size:12.5px;cursor:default}
.nav.kofi{color:var(--ink)}
.nav.kofi:hover{background:#ebebe9}
.nav.static:hover{background:transparent}
.badge{margin-left:auto;background:var(--cobalt);color:var(--white);font-size:11px;font-weight:600;min-width:20px;height:20px;padding:0 6px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}
.side-video{margin-top:18px;padding:12px;border:1px solid var(--line);border-radius:var(--r);background:var(--white);display:flex;flex-direction:column;gap:8px}
.side-video .fname{font-size:13px;font-weight:500;word-break:break-word;line-height:1.3}
.side-video input[type=file]{display:none}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:2px}
.main{min-width:0;padding:16px 24px calc(96px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:16px}
@media (max-width:860px){.shell,.shell.mini{grid-template-columns:1fr}.side{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;padding:12px 16px}.side-top{padding:0}.collapse{display:none}.mini .lab{display:inline}.mini .only-mini{display:none}.brand{padding:4px 8px}.side-video{margin:0;flex-basis:100%}.side-foot{margin:0;flex-direction:row}.main{padding:12px 16px calc(96px + env(safe-area-inset-bottom,0px))}}

/* top bar */
.topbar{display:flex;align-items:center;gap:12px;background:var(--white);border:1px solid var(--line);border-radius:var(--r);padding:10px 14px;min-height:56px}
.ready{display:flex;align-items:center;gap:10px;font-size:13.5px;min-width:0;flex:1}
.ready .dot{width:9px;height:9px;border-radius:50%;background:var(--grey-3);flex:0 0 auto}
.ready.ok .dot{background:var(--cobalt)}
.ready.bad .dot{background:var(--orange)}
.ready.bad .txt{color:var(--ink)}
.ready .txt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ready .fix{color:var(--orange-text);text-decoration:underline;text-underline-offset:3px;background:none;border:0;padding:0;height:auto;font-weight:600;white-space:nowrap}
.ready .fix:hover{background:none;color:var(--ink)}
.topbar-actions{display:flex;gap:8px}
@media (max-width:600px){.topbar-actions{display:none}}

/* pages */
.page{display:flex;flex-direction:column;gap:16px}
.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:8px 4px 0}
.panel{background:var(--white);border:1px solid var(--line);border-radius:var(--r);padding:14px;min-width:0}
.phead{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px;margin-bottom:12px}
.note{color:var(--grey-4);font-size:12.5px}
.ctl{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap;align-items:center}

/* empty hero */
.empty-hero{display:flex;justify-content:center;padding:40px 0 20px;border-radius:var(--r);transition:background .12s}
.empty-hero.over{background:var(--orange-tint)}
.empty-card{background:var(--white);border:1px solid var(--line);border-radius:20px;padding:44px 40px;max-width:560px;width:100%;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}
.empty-card .mark-big{width:72px;height:36px;color:var(--cobalt);margin-bottom:6px}
.empty-card h1{font-size:26px;max-width:18ch;text-wrap:balance}
.empty-card p{color:var(--grey-4);max-width:46ch}
.empty-card .sub{font-size:12.5px;color:var(--grey-4)}

/* workspace */
.work{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:16px}
.work .chapters-panel{grid-column:1/-1;background:var(--cream);border-color:#ece4d2}
@media (max-width:1100px){.work{grid-template-columns:minmax(0,1fr)}}
.player{display:flex;flex-direction:column;gap:12px}
video,.sample-art{width:100%;max-width:100%;background:#000;display:block;aspect-ratio:16/9;border-radius:var(--r-sm)}
.sample-art{background:var(--cream);position:relative;overflow:hidden;border:1px solid var(--line)}
.sample-art canvas{width:100%;height:100%;display:block}
.sample-art span{position:absolute;left:10px;bottom:10px;font-size:12px;background:rgba(11,15,26,.75);color:var(--white);padding:3px 8px;border-radius:4px}
.transport{display:flex;align-items:center;gap:10px;font-size:13px;flex-wrap:wrap}
.transport .time{min-width:96px}
.tl-wrap{padding-bottom:30px}
.timeline{position:relative;height:52px;background:var(--ink-2);border-radius:var(--r-sm);user-select:none;touch-action:none}
.timeline .strip{position:absolute;inset:0;display:flex;overflow:hidden;border-radius:var(--r-sm)}
.timeline .strip canvas,.timeline .strip i{flex:1 1 0;min-width:0;height:100%;display:block;background:var(--ink-2);border-right:1px solid var(--ink)}
.timeline .head{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--cobalt);transform:translateX(-1px);pointer-events:none}
.timeline .head::before{content:"";position:absolute;top:-4px;left:-5px;width:12px;height:8px;background:var(--cobalt);clip-path:polygon(0 0,100% 0,50% 100%)}
.timeline .mk{position:absolute;top:-6px;bottom:-6px;width:14px;transform:translateX(-7px);cursor:ew-resize;display:flex;flex-direction:column;align-items:center}
.timeline .mk::before{content:"";flex:1;width:2px;background:var(--white)}
.timeline .mk b{position:absolute;bottom:-18px;font-size:10px;font-weight:600;color:var(--ink);background:var(--white);border:1px solid var(--line);min-width:16px;height:16px;line-height:14px;text-align:center;border-radius:4px;padding:0 3px}
.timeline .mk.sel::before{background:var(--cobalt)}
.timeline .mk.sel b,.timeline .mk.drag b{background:var(--cobalt);border-color:var(--cobalt);color:var(--white)}
.timeline .mk.bad b{background:var(--orange-text);border-color:var(--orange-text);color:var(--white)}
.timeline .scale{position:absolute;left:0;right:0;bottom:-30px;display:flex;justify-content:space-between;font-size:11px;color:var(--grey-4)}
.keys{font-size:11.5px;color:var(--grey-4);display:flex;gap:12px;flex-wrap:wrap}
.keys kbd{font:inherit;font-weight:600;color:var(--ink);background:var(--page);border:1px solid var(--line);padding:0 5px;border-radius:4px;margin-right:3px}
.drop-again{border:1px dashed var(--line);border-radius:var(--r-sm);padding:9px;text-align:center;color:var(--grey-4);font-size:12.5px;cursor:pointer}
.drop-again:hover,.drop-again.over{border-color:var(--cobalt);color:var(--cobalt);background:var(--cobalt-tint)}
.drop-again u{text-decoration-color:var(--cobalt);text-underline-offset:3px}

/* sheet */
.sheet{display:grid;grid-template-columns:repeat(auto-fill,minmax(136px,1fr));gap:4px}
@media (max-width:560px){.sheet{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}}
.tile{position:relative;aspect-ratio:16/9;background:var(--grey);border:0;border-radius:6px;overflow:hidden;cursor:pointer;padding:0;height:auto}
.tile:hover:not(:disabled){background:var(--grey);border:0}
.tile canvas{width:100%;height:100%;object-fit:cover;display:block;transition:filter .15s,opacity .15s}
.sheet.has-ch .tile:not(.ch):not(.sel) canvas{filter:saturate(.25) brightness(.92);opacity:.6}
.sheet.has-ch .tile:not(.ch):not(.sel):hover canvas,.sheet.has-ch .tile:not(.ch):not(.sel):focus-visible canvas{filter:none;opacity:1}
.tile.sel::before{content:"";position:absolute;inset:0;border:3px solid var(--cobalt);border-radius:6px;pointer-events:none}
.tile .t{position:absolute;left:5px;top:5px;font-size:10px;font-weight:500;background:rgba(11,15,26,.8);color:var(--white);padding:2px 6px;border-radius:4px}
.tile .n{position:absolute;right:5px;top:5px;font-size:11px;font-weight:600;background:var(--cobalt);color:var(--white);min-width:20px;text-align:center;padding:2px 6px;border-radius:4px}
.tile .add{position:absolute;right:5px;bottom:5px;font-size:11px;height:24px;padding:0 8px;background:var(--white);color:var(--ink);border:0;border-radius:6px;opacity:0;transition:opacity .15s;display:inline-flex;align-items:center}
.tile:hover .add,.tile.sel .add,.tile:focus-within .add{opacity:1}

/* chapters */
.rail{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 10px;scroll-snap-type:x proximity}
.card.ch{flex:0 0 236px;scroll-snap-align:start;background:var(--white);border:1px solid var(--line);border-radius:var(--r);padding:10px;display:flex;flex-direction:column;gap:8px;position:relative}
.card.ch.sel{border-color:var(--cobalt);outline:2px solid var(--cobalt-tint)}
.card.ch.bad{border-color:var(--orange)}
.card.ch .thumb{aspect-ratio:16/9;background:var(--grey);overflow:hidden;cursor:pointer;border-radius:var(--r-sm)}
.card.ch .thumb canvas{width:100%;height:100%;object-fit:cover;display:block}
.card.ch .row{display:flex;align-items:baseline;gap:8px}
.card.ch .n{font-size:22px;font-weight:700;letter-spacing:-.04em;line-height:1;color:var(--cobalt)}
.card.ch input.time{width:auto;flex:0 0 auto;min-height:0;background:transparent;border:0;border-bottom:1px solid transparent;border-radius:0;padding:2px 0;font-size:12.5px;color:var(--grey-4);margin-left:auto;text-align:right;max-width:84px}
.card.ch input.time:hover,.card.ch input.time:focus{border-bottom-color:var(--ink);color:var(--ink)}
.card.ch .x{position:absolute;top:6px;right:6px;width:26px;height:26px;padding:0;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--grey-4);font-size:15px;line-height:1;opacity:0}
.card.ch:hover .x,.card.ch:focus-within .x{opacity:1}
.card.ch .x:hover{background:var(--orange);color:var(--white)}
.card.ch .body{display:grid;gap:6px}
.card.ch .body input{min-height:34px;padding:6px 10px;font-size:13px}
.card.ch .bad-note{font-size:11.5px;color:var(--orange-text);font-weight:500}
.card.ch.empty{align-items:center;justify-content:center;color:var(--grey-4);text-align:center;padding:16px;background:var(--page);border-style:dashed;min-height:150px;flex-basis:100%}

/* cards for description and templates pages */
.desc-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:16px;align-items:start}
@media (max-width:1000px){.desc-grid{grid-template-columns:minmax(0,1fr)}}
.desc-form{display:flex;flex-direction:column;gap:16px;min-width:0}
.card{background:var(--white);border:1px solid var(--line);border-radius:var(--r)}
.card.sticky{position:sticky;top:16px}
.card-head{padding:16px 20px 12px;border-bottom:1px solid var(--line)}
.card-head.row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.card-head p{color:var(--grey-4);font-size:12.5px;margin-top:3px}
.card-body{padding:6px 20px 18px}
.card-body > .lbl:first-child,.card-body > div:first-child > .lbl{margin-top:10px}
.card-foot{padding:12px 20px;border-top:1px solid var(--line);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.two{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
@media (max-width:520px){.two{grid-template-columns:1fr}}
.switch{position:relative;width:42px;height:24px;flex:0 0 auto;cursor:pointer}
.switch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.switch i{position:absolute;inset:0;background:var(--grey);border-radius:999px;transition:background .15s}
.switch i::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--white);transition:transform .15s}
.switch input:checked + i{background:var(--cobalt)}
.switch input:checked + i::after{transform:translateX(18px)}
.switch input:focus-visible + i{outline:2px solid var(--cobalt);outline-offset:2px}
.status{font-size:12.5px;color:var(--grey-4)}
.status.bad{color:var(--orange-text)}
.count{font-size:12.5px;color:var(--grey-4);white-space:nowrap}
.count.bad{color:var(--orange-text);font-weight:600}
.meter{height:3px;background:var(--grey);margin:0 20px}
.meter i{display:block;height:100%;background:var(--cobalt);width:0}
.meter i.bad{background:var(--orange)}
.preview{display:block;width:calc(100% - 40px);margin:14px 20px;min-height:420px;font-size:13px;line-height:1.55;background:var(--page);border:1px solid var(--line);border-radius:var(--r-sm);padding:12px;white-space:pre-wrap}
.preview.edited{border-color:var(--cobalt)}
.list{display:flex;flex-direction:column}
.style{display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center;text-align:left;padding:14px 20px;border:0;border-top:1px solid var(--line);border-radius:0;background:var(--white);height:auto;white-space:normal;color:var(--ink)}
.list .style:first-child{border-top:0}
.list .style:last-child{border-radius:0 0 var(--r) var(--r)}
.style:hover:not(:disabled){background:var(--page);border-color:var(--line)}
.style.on{background:var(--cobalt-tint)}
.style b{font-size:14px;font-weight:600}
.style span{font-size:12.5px;color:var(--grey-4);grid-column:1}
.style .blocks{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--grey-4);grid-column:1;margin-top:2px}
.style .pick{grid-column:2;grid-row:1/4;font-size:12.5px;font-weight:500;color:var(--cobalt)}
.style .del{grid-column:3;grid-row:1/4;width:28px;height:28px;padding:0;border-radius:50%;border:0;background:transparent;color:var(--grey-4)}
.style .del:hover{color:var(--orange);background:var(--orange-tint)}
.savebox input{flex:1;min-width:160px}
.help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.help-grid .card-body{padding:18px 20px;display:flex;flex-direction:column;gap:8px}
.help-grid p{color:var(--grey-4)}

/* updates page */
.legend{display:flex;gap:14px;font-size:12.5px;color:var(--grey-4);align-items:center;padding-top:6px}
.legend span{display:inline-flex;align-items:center;gap:6px}
.ty{display:inline-flex;width:22px;height:22px;border-radius:6px;align-items:center;justify-content:center;flex:0 0 auto;background:var(--grey)}
.ty::before{content:"";width:10px;height:10px;display:block}
.ty.new{background:var(--grey)}.ty.new::before{background:var(--ink);clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%)}
.ty.improved{background:var(--cobalt-tint)}.ty.improved::before{background:var(--cobalt);clip-path:polygon(50% 0,100% 55%,70% 55%,70% 100%,30% 100%,30% 55%,0 55%)}
.ty.fixed{background:var(--orange-tint)}.ty.fixed::before{background:var(--orange-text);clip-path:polygon(0 70%,70% 0,100% 30%,30% 100%);width:11px;height:11px}
.changelog{display:flex;flex-direction:column}
.rel{padding:16px 20px;border-top:1px solid var(--line)}
.rel:first-child{border-top:0}
.rel-head{display:flex;align-items:baseline;gap:12px;margin-bottom:10px}
.rel-head b{font-size:14px}
.rel-head span{font-size:12.5px;color:var(--grey-4)}
.rel ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.rel li{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;line-height:1.45}
.rel li .ty{margin-top:1px}

/* suggest page */
.seg{display:inline-flex;background:var(--page);border:1px solid var(--line);border-radius:var(--r-ctl);padding:3px;gap:2px}
.seg-btn{border:0;background:transparent;height:30px;padding:0 12px;font-size:13px;border-radius:6px;color:var(--grey-4)}
.seg-btn:hover{background:var(--white);color:var(--ink);border:0}
.seg-btn.on{background:var(--white);color:var(--ink);outline:1px solid var(--line)}
.addr{font-size:15px;font-weight:600;user-select:all;word-break:break-all}

/* floating bar and toast */
.toast.show{opacity:1}

/* timeline: numbers only on the selected, hovered or broken marker, so early chapters do not pile up */
.timeline .mk b{opacity:0;transition:opacity .12s}
.timeline .mk:hover b,.timeline .mk.sel b,.timeline .mk.bad b,.timeline .mk.drag b{opacity:1}
/* the light of the walk: one stripe per filmstrip frame, its mean colour */
.band{display:block;width:100%;height:14px;border-radius:4px 4px 0 0;image-rendering:pixelated;cursor:pointer;background:var(--grey);margin-bottom:2px}
.zoomrange{position:absolute;top:0;bottom:0;background:rgba(0,71,255,.18);border-left:2px solid var(--cobalt);border-right:2px solid var(--cobalt);pointer-events:none}
.clock{color:var(--grey-4);font-size:12px}
/* chapters: gaps grow with the time between them, so the row reads like the walk */
.rail .gap{flex:0 0 auto;align-self:center;height:2px;background:repeating-linear-gradient(90deg,#d9cfb9 0 4px,transparent 4px 8px);position:relative}
.rail .gap span{position:absolute;top:-20px;left:50%;transform:translateX(-50%);font-size:11px;color:var(--grey-4);white-space:nowrap}
.card.ch .row .clock{font-size:11.5px}
.card.ch .save{justify-self:start;height:26px;font-size:12px;padding:0 6px}
/* description page */
.fold{margin:12px 20px 0;padding:10px 12px;background:var(--cream);border-radius:var(--r-sm)}
.fold p{font-size:13px;line-height:1.45;margin-top:4px;color:var(--ink)}
.pageview{margin:14px 20px;max-height:520px;overflow:auto;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--white);padding:12px 12px 12px 0}
.pl{display:grid;grid-template-columns:110px 1fr;gap:10px;align-items:start}
.pl-side{display:flex;justify-content:flex-end}
.pl-side canvas{width:96px;height:54px;border-radius:4px;display:block;margin:2px 0}
.pl-text{font-size:13px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.pl-text.blank{height:10px}
.hint.bad{color:var(--orange-text)}
/* readiness and the one copy action */
.topbar{gap:12px}
.ready.note .dot{background:var(--cobalt)}
.ready.note .fix{color:var(--cobalt)}
#readyCopy{flex:0 0 auto}
/* signature */
.sig{font-size:11.5px;line-height:1.4;color:var(--grey-4);padding:10px 12px 0;margin:0}
.credit{font-size:12.5px;color:var(--grey-4);max-width:46ch;margin-top:10px;padding-top:14px;border-top:1px solid var(--line)}
.credit a,.lead a{color:var(--ink);text-underline-offset:3px}
.nav.minor{font-weight:400;font-size:13.5px;color:var(--grey-4)}
.nav.minor.on{color:var(--cobalt)}
#reopen{justify-content:flex-start;white-space:normal;text-align:left;height:auto;min-height:28px;padding:4px 6px;font-size:12px;line-height:1.3}
/* about page */
.jump{display:flex;gap:14px;font-size:13px;align-items:center;flex-wrap:wrap}
.jump a{color:var(--grey-4);text-underline-offset:3px}
.jump a:hover{color:var(--ink)}
h2.sec{font-size:18px;margin-top:8px}
#sec-help{margin:8px 4px 0}
/* toast, with an optional action */
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--white);padding:10px 16px;font-size:13.5px;font-weight:500;border-radius:var(--r-sm);opacity:0;transition:opacity .2s;pointer-events:none;z-index:9;display:flex;align-items:center;gap:12px;max-width:calc(100% - 32px)}
.toast.show{opacity:1}
.toast.show.actionable{pointer-events:auto}
.toast-act{height:28px;padding:0 10px;font-size:13px;background:transparent;color:var(--white);border:1px solid rgba(255,255,255,.4)}
.toast-act:hover:not(:disabled){background:var(--white);color:var(--ink);border-color:var(--white)}
.mini .sig{display:none}

/* v1.2: the chapters page fits the window. Frames scroll inside their panel; the chapter strip stays visible. */
.keys-tip{width:auto;height:26px;border:0;border-radius:var(--r-sm);padding:0 4px;margin-left:auto;font-size:12.5px;font-weight:500;text-decoration:underline dotted;text-underline-offset:3px}
.keys-tip:hover,.keys-tip:focus-visible{border:0}
.keys-tip::after{white-space:pre-line;width:260px;line-height:1.7}
.card.ch{flex:0 0 352px;display:grid;grid-template-columns:116px minmax(0,1fr);gap:8px 10px;padding:8px;align-items:start}
.card.ch .thumb{position:relative}
.card.ch .x{top:12px;left:12px;right:auto;width:22px;height:22px;font-size:13px}
.card.ch .save{position:absolute;left:4px;bottom:4px;height:22px;font-size:11px;padding:0 7px;background:rgba(255,255,255,.94);color:var(--ink);border:0;opacity:0;transition:opacity .12s}
.card.ch:hover .save,.card.ch:focus-within .save,.card.ch.sel .save{opacity:1}
.card.ch .save:hover:not(:disabled){background:var(--white);color:var(--cobalt)}
.card.ch .body{gap:4px;min-width:0}
.card.ch .row{min-height:22px}
.card.ch .n{font-size:18px}
.card.ch .body input{min-height:30px;padding:4px 8px}
.card.ch .bad-note{font-size:11px;line-height:1.3}
.card.ch.empty{display:flex;min-height:84px}
.chapters-panel .phead{margin-bottom:8px}
.chapters-panel .rail{padding-top:4px}
@media (min-width:1101px) and (min-height:560px){
  .main:has(#page-chapters:not([hidden]) #work:not([hidden])){height:100vh;height:100dvh;padding-bottom:16px;overflow:hidden}
  #page-chapters:has(#work:not([hidden])){flex:1 1 auto;min-height:0}
  .work{height:100%;min-height:0;grid-template-rows:minmax(0,1fr) auto}
  .work .player{min-height:0;overflow-y:auto;overflow-x:hidden}
  .work .frames{min-height:0;display:flex;flex-direction:column;overflow:hidden}
  .work .frames .sheet{flex:1 1 auto;min-height:0;overflow-y:auto;align-content:start;padding-right:2px}
  .work .chapters-panel{padding:10px 14px 4px}
}
.work .player > video,.work .player > .sample-art{flex:0 1 auto;min-height:120px}
.sample-art canvas{object-fit:contain}
@media (max-width:1100px) and (min-height:560px){
  .work .chapters-panel{position:sticky;bottom:0;z-index:4;padding:10px 14px 4px}
  html:has(#page-chapters:not([hidden]) #work:not([hidden])){scroll-padding-bottom:200px}
}
/* the logo row shares one line with the top bar: both 56px tall, both starting 16px from the top */
.side{padding-top:16px}
.side-top{min-height:56px;padding-bottom:0;margin-bottom:14px}
.mini .side-top{gap:6px}
.mini .brand{min-height:56px;padding:0}
@media (max-width:860px){.side-top{min-height:0;margin-bottom:0}.mini .brand{min-height:0}}

/* imprint and privacy */
.help-grid.legal{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.help-grid.legal p{font-size:13px}
#sec-imprint{margin-top:8px}
