/* PlayheadX launch polish (2026-10-24): one layer on top of style.css. Same brand (ink, brass, Instrument Serif), tighter and calmer:
   touch targets of 44 px on touch screens, media that fades into fixed, shimmering boxes (no pop-in, no layout shift), a sticky Make bar,
   the kit gallery toolbar, optimistic states (cancelling, booked), and the screens the audit found unfinished. Loaded after style.css. */

/* ---------- media: a fixed box that shimmers until its picture has loaded, then the picture fades in (no pop-in, no shift) */
.ktile .m, .kcard .m, .sc-card .m, .cmp-cv, .scc .m, .dvt, .cmp-th, .stile .sm {
  background-color:var(--ink-3);
  background-image:linear-gradient(100deg, rgba(241,232,218,0) 30%, rgba(241,232,218,.05) 50%, rgba(241,232,218,0) 70%);
  background-size:220% 100%; animation:sh 1.8s linear infinite; }
.ktile .m > img, .kcard .m > img, .cmp-cv > img, .sc-card .m > img.cov { opacity:0; transition:opacity .35s var(--ease); }
.ktile .m > img.ld, .kcard .m > img.ld, .cmp-cv > img.ld, .sc-card .m > img.cov.ld { opacity:1; }
.ktile .m:has(> img.ld), .ktile .m:has(> video.ld), .kcard .m:has(> img.ld), .cmp-cv:has(> img.ld), .cmp-cv:has(> video.ld) { animation:none; background-image:none; }
@media (prefers-reduced-motion:reduce) { .ktile .m, .kcard .m, .sc-card .m, .cmp-cv, .scc .m, .dvt, .cmp-th, .stile .sm { animation:none; } }
.cmp-cv > video { width:100%; height:100%; object-fit:cover; display:block; }

/* the scene header before the scene has a frame: a quiet placeholder, not an empty black box */
.rel-head .src:empty { aspect-ratio:16/9; display:grid; place-items:center; cursor:default;
  background:linear-gradient(135deg, rgba(126,42,50,.28), rgba(11,9,9,0) 70%), var(--ink-3); }
.rel-head .src:empty::after { content:""; width:26px; height:26px; opacity:.5;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9B77E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M7 5v14M17 5v14M3 9h4M3 15h4M17 9h4M17 15h4'/></svg>") center/contain no-repeat; }

/* ---------- landing: the four series looks as one even row (their real 16:9 shape, nothing cropped) */
.ed-kit { grid-template-columns:repeat(4, minmax(0, 1fr)); align-items:start; }
.ed-kit .ed-kit-h { grid-column:1 / -1; margin:0 0 2px; }
.ed-kit img, .ed-kit figure:nth-child(n) img { aspect-ratio:16/9; height:auto; background:var(--ink-3); }
@media (max-width:760px) { .ed-kit { grid-template-columns:1fr 1fr; } }

/* ---------- One-off: the Make bar rides the bottom of the screen while the asset list is long */
.mkbar { position:sticky; bottom:14px; z-index:5; display:flex; align-items:center; gap:12px; margin:20px -8px -6px; padding:10px 10px 10px 16px;
  border-radius:16px; border:1px solid var(--brass-line); background:rgba(23,18,16,.94); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  box-shadow:0 18px 40px -16px rgba(0,0,0,.8); }
.mkbar .mk-sum { flex:1; min-width:0; font-size:12.5px; color:var(--cream-2); }
.mkbar #sgo { flex:none; min-width:0; max-width:70%; }
.mkbar #sgo #sgn { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:760px) {
  .mkbar { bottom:calc(84px + env(safe-area-inset-bottom)); margin:18px -6px 0; flex-wrap:wrap; }
  .mkbar .mk-sum { flex-basis:100%; }
  .mkbar #sgo { flex:1; max-width:none; }
}

/* ---------- kit gallery: toolbar (type, size, sort, download all), quick preview, filtered-out state */
.gtools { gap:10px 12px; }
.gtools [data-fmtsel] { height:32px; }
.gtools [data-zip] { white-space:nowrap; }
.gnone { padding:4px 40px 24px; }
.ktile { position:relative; }
.ktile .vexp { position:absolute; top:10px; right:10px; z-index:3; width:34px; height:34px; padding:0; border-radius:50%; background:rgba(11,9,9,.66);
  border:1px solid rgba(241,232,218,.2); color:var(--cream); opacity:0; transition:opacity var(--fast); box-shadow:none; }
.ktile:hover .vexp, .ktile:focus-within .vexp, .ktile.playing .vexp { opacity:1; }
.ktile.playing .m::after { content:""; position:absolute; left:0; bottom:0; height:2px; width:calc(var(--p, 0) * 100%); background:var(--brass); z-index:2; }
@media (hover:none) { .ktile .vexp { opacity:1; width:44px; height:44px; } }
@media (max-width:760px) { .gtools { padding:12px 16px; } .gtools .seg { max-width:100%; } .gnone { padding:4px 16px 20px; } }

/* ---------- optimistic states: a cancel greys the kit out at once; a confirmed plan says it is booked before the server answers */
.kit.cancelling .stagetl, .kit.cancelling .kwait, .kit.cancelling .kgrid { opacity:.4; filter:grayscale(.7); transition:opacity .2s, filter .2s; pointer-events:none; }
.dx-optk { display:flex; align-items:center; gap:10px; margin-top:12px; padding:10px 12px; border-radius:12px; border:1px solid var(--brass-line); background:var(--brass-wash); color:var(--cream-2); font-size:12.5px; }
.dx-optk .dot { width:7px; height:7px; border-radius:50%; background:var(--brass); flex:none; }

/* ---------- Series Studio header: the lock state reads as words, not "NOT LOCKED YETKits read..." */
.ser-head .ver { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px 10px; max-width:440px; }
.ser-head .ver .lab { white-space:nowrap; }
@media (max-width:760px) { .ser-head .ver { justify-content:flex-start; max-width:none; } }

/* ---------- series wizard: the side panel shows the road ahead before a type is picked; on a phone the footer never covers the cards */
.wz-road { list-style:none; margin:18px 0 0; padding:0; display:flex; flex-direction:column; gap:14px; counter-reset:none; }
.wz-road li { display:flex; gap:12px; align-items:flex-start; color:var(--cream-2); }
.wz-road .n { flex:none; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:650; border:1px solid var(--line-2); color:var(--cream-3); }
.wz-road li.on .n { border-color:var(--brass); color:var(--brass); background:var(--brass-wash); }
.wz-road b { display:block; color:var(--cream); font-weight:600; font-size:13.5px; } .wz-road small { display:block; font-size:12px; color:var(--cream-3); margin-top:2px; }
@media (max-width:760px) {
  .wz-main { padding-bottom:calc(150px + env(safe-area-inset-bottom)); }
  .wz-foot { background:rgba(11,9,9,.97); border-top:1px solid var(--line); padding-bottom:calc(14px + env(safe-area-inset-bottom)); flex-wrap:nowrap; }
  .wz-foot .lnk { font-size:12px; line-height:1.3; white-space:normal; margin-left:0 !important; }
}

/* ---------- account: one month of usage is a slim bar, not a wall */
.uchart { max-width:820px; max-height:280px; }

/* ---------- admin and other wide tables on a phone: each row a small card instead of a squeezed grid */
@media (max-width:760px) {
  table.stack thead { display:none; }
  table.stack, table.stack tbody { display:block; width:100%; }
  table.stack tr { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:4px 12px; padding:12px 0; border-bottom:1px solid var(--line); }
  table.stack td { display:block; padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
  table.stack td.msg { grid-column:1 / -1; color:var(--cream-2); }
  table.stack td.acts { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; }
}

/* ---------- tabs that scroll sideways on a phone fade at the edge, so the cut-off tab reads as "more" */
@media (max-width:760px) {
  .stabs { -webkit-mask-image:linear-gradient(90deg, #000 85%, transparent); mask-image:linear-gradient(90deg, #000 85%, transparent); }
  .acct-hero .exp > div { flex-wrap:wrap; gap:0 8px; }
}

/* ---------- touch screens: every control is at least 44 px to tap (style.css sizes them for a mouse) */
@media (pointer:coarse) {
  button, .btn, select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=search] { min-height:44px; }
  button.xs, .btn.xs, button.sm, .btn.sm, select.pill-sel, .seg button, .seg a, .dx-chip, .dx-opt, button.chip, label.chip, .tsc { min-height:44px; }
  .seg { padding:2px; }
  button.lnk { min-height:44px; display:inline-flex; align-items:center; }
  .icon-btn, button.icon-btn, .btn.icon-btn, [data-nedit], .wz-bar .btn, .wz-bar button { min-width:44px; }
  .dx-det, .dx-crow .dx-det { min-height:44px; }
  .wf-watch, button.wf-watch { min-height:44px; }
  input[type=checkbox], input[type=radio] { width:20px; height:20px; }
  label.check { min-height:44px; align-items:center; }
  /* text links keep their look; an invisible pad makes them 44 px to tap */
  .crumb a, a.crumb, .sc-card h3 a, .brand, .nav-r a, .kitsum a, .cmp-shelf .meta a, a.lnk, .lnk[href], .auth-card a, .sec-head a { position:relative; }
  .crumb a::after, a.crumb::after, .sc-card h3 a::after, .brand::after, .nav-r a::after, .kitsum a::after, .cmp-shelf .meta a::after, a.lnk::after, .auth-card a::after, .sec-head a::after {
    content:""; position:absolute; left:-6px; right:-6px; top:50%; height:44px; transform:translateY(-50%); }
}

/* ---------- no jump on first paint: the page stays blank until the first view has its layout (the boot "Loading" line used to jump) */
body:not([class]) #view { visibility:hidden; }
/* the kit gallery keeps its room while it loads, so the sections under it do not jump down when it lands */
.kits-sec:has(> .wrap > .skel-wrap) { min-height:70vh; }
/* a kit card in production: the global ".live" badge rule (inline-flex) collapsed its picture box to nothing on the Kits page */
.kcard .m.live, .ktile .m.live { display:block; font-size:inherit; font-weight:inherit; color:inherit; }
/* sticky bars need the page itself to scroll: "overflow-x:hidden" on body made the body its own (never scrolling) scroll container, so a
   bottom-sticky bar never stuck. clip cuts the sideways overflow the same way without making a scroll container (older browsers keep hidden). */
html, body { overflow-x:clip; }
/* Admin: invite link box, invite actions, the demo account (badge in the header, the demo sheet) */
.demo-badge { color:var(--amber); border-color:rgba(231,166,90,.5); background:rgba(34,20,8,.6); text-transform:uppercase; letter-spacing:.06em; font-size:10.5px; }
.top .demo-badge { margin-left:8px; flex:none; }
.inv-link { margin-top:12px; padding:12px; border:1px solid rgba(217,183,126,.35); border-radius:12px; background:rgba(30,22,12,.45); }
.inv-link p { margin:0 0 8px; } .inv-link input { min-width:0; font-family:ui-monospace, Menlo, Consolas, monospace; font-size:12.5px; }
.inv-acts { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.demo-snap { display:grid; gap:6px; font-size:13px; margin:6px 0 10px; } .demo-snap b { margin-right:6px; }
.demo-rm { list-style:none; padding:0; margin:6px 0 10px; display:grid; gap:6px; } .demo-rm li { display:flex; flex-direction:column; gap:2px; font-size:13px; }
@media (max-width:640px) { .inv-link .row { flex-wrap:wrap; } .inv-link .row button { width:100%; } }
/* an API restart: one calm line while a request waits (web/app.js netBar) */
.netbar { position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:95; max-width:calc(100vw - 32px); background:rgba(30,24,23,.97); border:1px solid var(--line-2); border-radius:12px; padding:10px 16px; font-size:13px; box-shadow:var(--shadow); text-align:center; }
@media (max-width:767px) { .netbar { bottom:84px; } }
/* live delivery: what a running kit has made so far (web/app.js liveBlock) */
.klive { padding:6px 40px 24px; }
.klive-t .m { cursor:zoom-in; }
.klive .kgrid { padding-left:0; padding-right:0; }
.klive ~ .stagetl .devgrid { display:none; }
.klive-p { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:16px; }
.klive-m { max-width:min(960px, calc(100vw - 32px)); }
.klive-v { margin:12px 0; background:var(--ink-3); border-radius:var(--r-m); overflow:hidden; }
.klive-v video, .klive-v img { display:block; width:100%; max-height:70vh; object-fit:contain; }
@media (max-width:767px) { .klive { padding:6px 16px 20px; } }
