/* Try-it night pages (clip-maker, takes, master) — mcbopus. Same frame as join3: the work ≈70% on the left and as tall as the
   window allows, ONE strip under it, every control in a narrow right panel numbered in the order of use. Tokens from theme.css only. */
html, body { width: 100%; height: 100%; overflow: hidden; }
[hidden] { display: none !important; }
.nt { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: var(--sf-top-h, 52px) minmax(0, 1fr); height: 100vh; }
/* the panel head (as on the kit's pages): the page's name + Basic | Hands-on */
.phead { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px 8px; border-bottom: 1px solid var(--line-soft); }
.phead h1 { font-size: 15px; font-weight: 600; margin: 0; white-space: nowrap; }
.phead .seg a { padding: 5px 10px; font-size: 13px; }
.btn { cursor: pointer; user-select: none; }
.btn[aria-disabled="true"], .seg a[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
body.basic .hands, body.hands .bas { display: none !important; }
.grow { flex: 1; }

/* top bar: Home · door · stage bar · Basic | Hands-on · Dark | Light */
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); min-width: 0; }
.top .home { font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-btn); white-space: nowrap; }
.top .home:hover { color: var(--text); border-color: var(--accent-line); }
.top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stages { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.stages::-webkit-scrollbar { display: none; }
.stages .door { font-size: 12px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.stages a { font-size: 13px; color: var(--text-2); text-decoration: none; padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
.stages a:hover { background: var(--hover); color: var(--text); }
.stages a.here { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.stages a.coming { color: var(--faint); }
.stages a.coming::after { content: " · coming"; font-size: 11px; }
.stages .sep { color: var(--faint); font-size: 11px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-btn); overflow: hidden; flex: none; }
.seg a { padding: 6px 11px; font-size: 13px; cursor: pointer; color: var(--text-2); user-select: none; white-space: nowrap; }
.seg a.on { background: var(--raised); color: var(--text); font-weight: 600; }
.seg a + a { border-left: 1px solid var(--line); }
.seg.fill { display: flex; } .seg.fill a { flex: 1; text-align: center; }

/* LEFT: the work */
.stage { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px 12px 10px 16px; min-width: 0; min-height: 0; }
.pic { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100% - 96px); margin: 0 auto; border-radius: 6px; overflow: hidden; background: var(--well); }
.pic video, .pic img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--well); display: block; }
.pic .tag { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 3; pointer-events: none; flex-wrap: wrap; max-width: calc(100% - 20px); }
[data-theme="dark"] .pic { --on-pic: var(--text); } [data-theme="light"] .pic { --on-pic: var(--panel); }
.pchip { height: 28px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
        background: color-mix(in srgb, var(--well) 62%, transparent); color: var(--on-pic); backdrop-filter: blur(6px); white-space: nowrap; }
.pchip.ill { font-weight: 600; font-size: 12px; border: 1px dashed color-mix(in srgb, var(--on-pic) 55%, transparent); }
.pchip.hot { background: var(--accent); color: var(--on-accent); }
.pic .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.pic .making { position: absolute; inset: 0; display: none; place-items: center; z-index: 4; background: color-mix(in srgb, var(--well) 70%, transparent); color: var(--on-pic); font-size: 16px; font-weight: 600; }
.pic .making.on { display: grid; }
.pic .cap { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); max-width: 80%; text-align: center; z-index: 3; font: 500 clamp(14px, 1.6vw, 22px)/1.35 var(--read);
            color: var(--on-pic); background: color-mix(in srgb, var(--well) 66%, transparent); padding: 4px 12px; border-radius: 6px; pointer-events: none; }
.pic .cap:empty { display: none; }
.pic.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: transparent; aspect-ratio: 32 / 9.1; }
.pic.duo .side2 { position: relative; background: var(--well); border-radius: 6px; overflow: hidden; }
.pic.duo .side2 video { position: absolute; inset: 0; }

/* the ONE strip under the picture: time ruler / film strip / wave, with marks */
.tl { position: relative; flex: none; height: 64px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line-soft); overflow: hidden; cursor: pointer; touch-action: none; user-select: none; }
.tl .reel { position: absolute; inset: 0 0 18px 0; background-repeat: no-repeat; background-size: 100% 100%; opacity: .9; }
.tl canvas { position: absolute; inset: 0 0 18px 0; width: 100%; height: calc(100% - 18px); }
.tl .ruler { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl .ruler span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.tl .ruler span:first-child { transform: none; padding-left: 4px; } .tl .ruler span.end { transform: translateX(-100%); padding-right: 4px; }
.tl .head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); z-index: 3; pointer-events: none; }
.tl .mark { position: absolute; top: 0; bottom: 18px; width: 14px; margin-left: -7px; z-index: 2; display: grid; justify-items: center; }
.tl .mark::before { content: ""; width: 2px; height: 100%; background: var(--need); }
.tl .mark i { position: absolute; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--need); border: 2px solid var(--panel); }
.tl .mark.check::before, .tl .mark.check i { background: var(--accent); } .tl .mark.info::before, .tl .mark.info i { background: var(--run); }
.tl .mark.on i { box-shadow: 0 0 0 3px var(--accent-line); }
.tl .shotb { position: absolute; top: 0; bottom: 18px; width: 1px; background: color-mix(in srgb, var(--text) 30%, transparent); z-index: 1; }
.under { flex: none; display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 22px; white-space: nowrap; overflow: hidden; }
.under b { color: var(--text); font-weight: 600; }

/* RIGHT: the panel */
.side { border-left: 1px solid var(--line-soft); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.groups { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.g { display: grid; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.g:last-child { border-bottom: 0; }
.g h2 { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.g h2 .n { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.g h2 .ct { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; min-width: 0; }
.row .k { color: var(--text-2); }
.row input[type=range] { flex: 1; min-width: 80px; accent-color: var(--accent); }
.val { font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; min-width: 40px; }
.btn.wide { flex: 1; } .btn.big { height: 42px; font-size: 15px; }
textarea.box, input.box { width: 100%; resize: none; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 400 14px var(--ui); padding: 9px 10px; }
textarea.box { min-height: 60px; }
textarea.box:focus, input.box:focus { outline: 2px solid var(--accent-line); outline-offset: 0; }
.lbl { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lbl em { font-style: normal; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.reply { font-size: 13.5px; color: var(--text-2); min-height: 20px; line-height: 1.4; } .reply b { color: var(--text); font-weight: 600; }
.why { position: fixed; z-index: 60; max-width: 260px; font-size: 12.5px; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; box-shadow: var(--shadow-pop); pointer-events: none; display: none; }
.why.on { display: block; }
.foot { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.foot .note { font-size: 12px; color: var(--muted); }
.price { font-variant-numeric: tabular-nums; }
.verbs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.prop { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-soft); }
.prop .who2 { font-size: 12.5px; color: var(--muted); } .prop .who2 b { color: var(--text); font-size: 14px; }
.prop .rsn { font-size: 15.5px; line-height: 1.45; color: var(--text); }
.spoken { font-family: var(--read); font-size: 15px; line-height: 1.45; color: var(--text); }

/* list rows (takes, flags) */
.ls { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.lr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px 6px 6px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); cursor: pointer; min-width: 0; }
.lr:hover { border-color: var(--line); }
.lr.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.lr.now { box-shadow: inset 3px 0 0 var(--accent); }
.lr img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; display: block; background: var(--well); }
.lr .t1 { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr .t2 { font-size: 12.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.35; }
.lr .tc { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); min-width: 40px; }
.vd { font-size: 12px; white-space: nowrap; font-weight: 600; }
.vd.good { color: var(--done); } .vd.bad { color: var(--need); } .vd.mid { color: var(--accent-ink); } .vd.info { color: var(--run); } .vd.kept { color: var(--done); font-weight: 800; }

/* shelves (principle 10): title + count, small thumbs, hover enlarges in place, click pins */
.shelf { display: grid; gap: 6px; }
.shelf .sh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.shelf .sh .ct { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 700; }
.shelf .sh::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.shelf.shut .sh::after { transform: rotate(-45deg); }
.shelf.shut .thumbs { display: none; }
.shelf .thumbs { display: flex; gap: 6px; flex-wrap: wrap; position: relative; }
.shelf .thumbs .it { position: relative; width: 56px; height: 32px; border-radius: 4px; overflow: hidden; outline: 1px solid var(--line-soft); cursor: pointer; background: var(--well); flex: none; }
.shelf .thumbs .it img, .shelf .thumbs .it video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.shelf .thumbs .it .no { position: absolute; left: 2px; top: 1px; font-size: 10px; font-weight: 800; color: var(--on-accent); background: var(--accent); border-radius: 3px; padding: 0 3px; line-height: 13px; }
.shelf .thumbs .it.pin { outline: 2px solid var(--accent); }
.shelf .thumbs .add { min-width: 56px; height: 32px; padding: 0 8px; border-radius: 4px; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--text-2); font-size: 12.5px; cursor: pointer; flex: none; white-space: nowrap; }
.shelf .thumbs .add:hover { border-color: var(--accent-line); color: var(--text); }
.shelf .empty { font-size: 12.5px; color: var(--faint); }
.peek { position: absolute; z-index: 30; width: 240px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); pointer-events: none; display: none; }
.peek.on { display: block; }
.peek img, .peek video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; background: var(--well); }
.peek .pl { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.drop.over { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 6px; }

/* popover lists (engine, library) */
.popl { position: absolute; left: 10px; right: 10px; z-index: 40; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 10px; display: none; gap: 6px; max-height: 70%; overflow-y: auto; }
.popl.open { display: grid; }
.eng { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; cursor: pointer; background: var(--bg-2); }
.eng.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.eng .en { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 700; } .eng .en .price { margin-left: auto; font-size: 13px; color: var(--accent-ink); }
.eng .ec { display: flex; gap: 4px; flex-wrap: wrap; }
.eng .ec span { font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 18px; }
.engchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--accent-line); color: var(--accent-ink); font-size: 13px; cursor: pointer; white-space: nowrap; }
.engchip u { color: var(--text-2); }
details.more { border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
details.more summary { font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; padding: 2px 0; }
details.more summary::before { content: "▸ "; } details.more[open] summary::before { content: "▾ "; }
details.more > div { margin-top: 8px; display: grid; gap: 7px; }
.receipt { font-size: 12.5px; line-height: 1.5; color: var(--text-2); background: var(--raised); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; }
.receipt b { color: var(--text); }
.receipt .pr { max-height: 120px; overflow: auto; font-family: var(--read); }
select.box2 { height: 30px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 500 13px var(--ui); padding: 0 8px; }
.pickrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.pickrow img { width: 48px; height: 27px; object-fit: cover; border-radius: 3px; display: block; background: var(--well); }
.pickrow .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickrow .x { color: var(--muted); cursor: pointer; padding: 0 4px; }
.sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; color: var(--text-2); } .sw input { accent-color: var(--accent); }
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }

/* PHONE: the work on top, the panel as a bottom sheet */
@media (max-width: 820px) {
  .nt { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .top { flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; }
  .top h1 { display: none; }
  .top .grow { display: none; }
  .stages { order: 9; flex: 1 1 100%; }
  .stages .door { display: none; }
  .top .seg a { padding: 5px 7px; font-size: 12px; }
  .top .home { padding: 5px 8px; font-size: 12px; }
  .stage { padding: 8px 10px 6px; gap: 6px; }
  .pic { max-height: none; }
  .tl { height: 52px; }
  .side { border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: var(--shadow-pop); }
  .side::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
  .groups { padding: 6px 12px; }
  .peek { display: none !important; }
  .pic.duo { grid-template-columns: 1fr; aspect-ratio: 16 / 18.2; }
  .popl { max-height: 85%; }
}

.rng { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn.nudge { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent-line); }
.ask { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--panel); font-size: 13.5px; color: var(--text-2); } .ask b { color: var(--text); }
.fnote { font-size: 12px; color: var(--muted); } .shelf .it .no.badge { left: auto; right: 2px; }
body.basic.showexp #expg.hands { display: grid !important; }
