/* Nx iD Game Studio — dark production-tool theme. One accent (cyan) for activity; green/amber/red only carry status. */
:root {
  color-scheme: dark;
  --bg: #0c0e12; --side: #090b0e; --panel: #13161c; --panel-2: #181c23; --panel-3: #1e232b;
  --line: #222730; --line-2: #2f3541;
  --text: #e8eaee; --text-2: #b4bbc7; --muted: #7d8695;
  --accent: #52c7d9; --ok: #46c37b; --warn: #e0a93b; --bad: #ef6a5f;
  --sans: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(82, 199, 217, .3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--line); padding: 20px 12px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 2px 10px 22px; color: var(--text); } .brand:hover { text-decoration: none; }
.brand-mark { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { display: block; font-size: 10.5px; letter-spacing: .22em; color: var(--muted); font-weight: 600; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--panel-3); color: var(--text); }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--bg); background: var(--accent); border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sys { font: 11px/1.4 var(--mono); color: var(--muted); padding: 8px 10px 0; border-top: 1px solid var(--line); }
.content { min-width: 0; }
.page { max-width: 1040px; margin: 0 auto; padding: 36px 36px 80px; animation: fade .18s ease-out; }
@keyframes fade { from { transform: translateY(4px); } to { transform: none; } }

/* ---- type ---- */
.h1 { font-size: 26px; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; }
.h2 { font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .sub { color: var(--text-2); } .small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--text-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 12px; }
.section-head .h2 { display: flex; align-items: center; gap: 8px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; } .crumb:hover { color: var(--text); text-decoration: none; } .crumb svg { width: 14px; height: 14px; flex: none; }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 560; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--panel-3); border-color: #3b4250; text-decoration: none; }
.btn.primary { background: var(--text); color: #0c0e12; border-color: transparent; font-weight: 650; } .btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--panel-2); }
.btn.lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 7px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: default; pointer-events: none; }
.btn svg { width: 15px; height: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--side); border: 1px solid var(--line); border-radius: 8px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 6px; color: var(--text-2); font-weight: 560; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--panel-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
textarea { width: 100%; resize: vertical; font: inherit; color: var(--text); background: transparent; border: 0; outline: 0; padding: 0; }
textarea::placeholder { color: #566070; }
.field { background: var(--side); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; } .field:focus-within { border-color: #3b4250; }
.field textarea { min-height: 64px; }
.dlg-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 12, .62); backdrop-filter: blur(2px); animation: dlg-fade .12s ease-out; }
.dlg { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 20px 22px 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: dlg-pop .14s ease-out; }
.dlg-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 8px; }
.dlg-body { color: var(--text-2); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #1a0d0c; } .btn.danger:hover { filter: brightness(1.08); }
@keyframes dlg-fade { from { opacity: 0; } } @keyframes dlg-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .dlg, .dlg-back { animation: none; } }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; } .title-row .h1 { margin: 0; }
.title-input { font: inherit; font-size: 20px; font-weight: 650; color: var(--text); background: var(--side); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; min-width: 0; width: min(420px, 100%); outline: 0; } .title-input:focus { border-color: var(--accent); }
.field input[type=text], .field select { width: 100%; font: inherit; color: var(--text); background: transparent; border: 0; outline: 0; padding: 0; }
.field select option { background: var(--panel); }
label.small { display: block; color: var(--text-2); } label.small .field { margin-top: 4px; }

/* ---- surfaces ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.panel.flush { padding: 0; }
.panel + .panel { margin-top: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--line-2); background: var(--panel); border-radius: 6px; padding: 12px 14px; }
.callout.bad { border-left-color: var(--bad); } .callout.warn { border-left-color: var(--warn); } .callout.ok { border-left-color: var(--ok); }
.banner.dismissible { position: relative; padding-right: 48px; }
.banner .x { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; } .banner .x:hover { background: var(--panel-3); color: var(--text); } .banner .x svg { width: 14px; height: 14px; }
.callout.dismissible { position: relative; padding-right: 40px; }
.callout .x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; } .callout .x:hover { background: var(--panel-3); color: var(--text); } .callout .x svg { width: 14px; height: 14px; }
.callout .t { font-weight: 650; margin-bottom: 2px; }
details > summary { cursor: pointer; color: var(--text-2); font-weight: 560; list-style: none; display: flex; align-items: center; gap: 8px; padding: 2px 0; user-select: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .12s; margin: 0 2px 0 3px; }
details[open] > summary::before { transform: rotate(45deg); }
details > summary:hover { color: var(--text); }
details[open] > summary { margin-bottom: 8px; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; color: var(--text-2); background: rgba(125, 134, 149, .12); border: 1px solid rgba(125, 134, 149, .25); }
.badge.ok { color: var(--ok); background: rgba(70, 195, 123, .1); border-color: rgba(70, 195, 123, .3); }
.badge.warn { color: var(--warn); background: rgba(224, 169, 59, .1); border-color: rgba(224, 169, 59, .3); }
.badge.bad { color: var(--bad); background: rgba(239, 106, 95, .1); border-color: rgba(239, 106, 95, .3); }
.badge.run { color: var(--accent); background: rgba(82, 199, 217, .1); border-color: rgba(82, 199, 217, .3); }
/* A game made from a concept approved in Obsidian: Obsidian's purple, the colour of its concepts letter. */
.from-obsidian { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; vertical-align: 2px; color: #c4a6ff; background: rgba(150, 104, 255, .13); border: 1px solid rgba(150, 104, 255, .38); }
.obsidian-concept { border-left: 3px solid rgba(150, 104, 255, .55); }
.obsidian-concept .h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.run .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line-2); }
.chip.primary { color: var(--text); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(82, 199, 217, .25); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- create ---- */
.hero { padding-top: 26px; max-width: 820px; margin: 0 auto; }
.hero .h1 { font-size: 32px; letter-spacing: -.025em; }
.hero > .sub { margin: 6px 0 20px; }
.prompt { padding: 14px 16px 12px; }
.prompt .field { border: 0; background: transparent; padding: 0; }
.prompt textarea { font-size: 17px; line-height: 1.5; min-height: 84px; max-height: 55vh; resize: none; overflow-y: auto; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.prompt-foot .hint { font-size: 12.5px; color: var(--muted); max-width: 46ch; }
.pa { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pa[hidden], .pa-prompt[hidden] { display: none; }
.pa-thread { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.pa-thread:empty { display: none; }
.pa-msg { font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.pa-msg.me { color: var(--text); align-self: flex-end; background: var(--panel-3); border-radius: 8px; padding: 5px 10px; max-width: 85%; }
.pa-prompt { background: var(--side); border: 1px solid var(--line-2); border-left: 2px solid var(--accent); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.pa-text { white-space: pre-wrap; font-size: 14px; line-height: 1.5; max-height: 220px; overflow-y: auto; }
.pa-prompt .actions { justify-content: flex-end; }
.pa-in { display: flex; gap: 8px; align-items: flex-end; }
.pa-in textarea { flex: 1; background: var(--side); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-height: 30px; max-height: 120px; resize: none; line-height: 1.4; }
.pa-in textarea:focus { border-color: #3b4250; }
.try { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.try button { cursor: pointer; } .try button:hover { color: var(--text); border-color: #3b4250; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---- stage track ---- */
.track { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.stage { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-right: 8px; }
.stage::before { content: ""; position: absolute; left: 26px; right: 4px; top: 10px; height: 2px; background: var(--line-2); border-radius: 1px; }
.stage:last-child::before { display: none; }
.stage.done::before { background: var(--ok); opacity: .55; }
.mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--line-2); position: relative; z-index: 1; transition: background .2s, border-color .2s; }
.mark svg { width: 12px; height: 12px; }
.stage .lbl { font-size: 12.5px; font-weight: 560; color: var(--muted); line-height: 1.2; }
.stage.done .mark { background: var(--ok); border-color: var(--ok); color: #07120b; } .stage.done .lbl { color: var(--text-2); }
.stage.running .mark { border-color: var(--accent); } .stage.running .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.stage.running .lbl { color: var(--text); font-weight: 650; }
.stage.failed .mark { background: var(--bad); border-color: var(--bad); color: #1a0705; } .stage.failed .lbl { color: var(--bad); font-weight: 650; }
.track.compact .mark { width: 16px; height: 16px; border-width: 2px; } .track.compact .mark svg { width: 9px; height: 9px; }
.track.compact .stage { gap: 6px; } .track.compact .stage::before { left: 20px; top: 7px; }
.track.compact .lbl { font-size: 11.5px; } .track.compact .stage.running .mark::after { width: 6px; height: 6px; }

/* ---- job cards ---- */
.job-card { display: block; color: inherit; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transition: border-color .12s; }
.job-card:hover { border-color: #3b4250; text-decoration: none; }
.job-card.live { border-color: rgba(82, 199, 217, .35); }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.job-title { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.job-prompt { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch; }
.job-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.job-foot .step { color: var(--text-2); display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elapsed { font-family: var(--mono); font-size: 12px; }
.job-hero { padding: 22px 24px; }
.job-hero .track { margin: 26px 0 6px; }
.job-hero .track .mark { width: 26px; height: 26px; } .job-hero .track .stage::before { left: 32px; top: 12px; } .job-hero .track .lbl { font-size: 13px; }

/* ---- lists ---- */
.rows { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rows-head, .row-item { display: grid; grid-template-columns: minmax(0, 2.6fr) 120px minmax(0, 1.2fr) 100px 92px; gap: 16px; align-items: center; padding: 12px 18px; }
.rows-head { font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 9px; padding-bottom: 9px; background: var(--side); }
.row-item { border-bottom: 1px solid var(--line); color: inherit; } .row-item:last-child { border-bottom: 0; }
.row-item.click { cursor: pointer; } .row-item.click:hover { background: var(--panel-2); }
.row-name a { color: var(--text); }
.row-name { min-width: 0; }
.row-name .t { font-weight: 620; display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-name .t a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-name .p { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows.act .rows-head, .rows.act .row-item { grid-template-columns: 110px minmax(0, 2.4fr) 130px 90px 140px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text-2); margin-bottom: 4px; font-weight: 600; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- project / result ---- */
.result-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.result-head .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.quote { color: var(--text-2); margin-top: 6px; max-width: 70ch; } .quote q { quotes: "“" "”"; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 22px; }
.stat { background: var(--panel); padding: 14px 16px; min-width: 0; }
.stat .k { font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat .v { font-size: 17px; font-weight: 680; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; min-width: 0; }
.stat .v > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .v.ok { color: var(--ok); } .stat .v.bad { color: var(--bad); } .stat .v.warn { color: var(--warn); }
.stat .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 30px 0 18px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; margin-bottom: -1px; color: var(--muted); font-weight: 580; cursor: pointer; }
.tabs button:hover { color: var(--text); } .tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }

/* ---- plan ---- */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; min-width: 0; }
.plan-sec.wide { grid-column: 1 / -1; }
.plan-sec .eyebrow { margin-bottom: 8px; }
.plan-sec p { color: var(--text); line-height: 1.6; } .plan-sec p + p { margin-top: 8px; }
.plan-sec .lead { font-size: 16px; line-height: 1.55; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; margin-top: 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--text-2); }
.mech { display: flex; flex-direction: column; gap: 10px; }
.mech .m { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.mech .m .why { color: var(--text-2); font-size: 13.5px; }
.bullets li { position: relative; padding-left: 16px; color: var(--text-2); line-height: 1.55; } .bullets li + li { margin-top: 5px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.bullets.ok li::before { background: var(--ok); } .bullets.chg li::before { background: var(--accent); }
.pre { background: var(--side); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; font: 12px/1.55 var(--mono); color: var(--text-2); overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-word; }
.pre .log-error { color: var(--bad); } .pre .log-warn { color: var(--warn); } .pre .t { color: #566070; }

/* ---- originality ---- */
.banner { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 8px; padding: 16px 20px; }
.banner.ok { border-left-color: var(--ok); } .banner.warn { border-left-color: var(--warn); } .banner.bad { border-left-color: var(--bad); }
.banner .t { font-size: 16px; font-weight: 680; letter-spacing: -.01em; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner p { color: var(--text-2); margin-top: 6px; max-width: 68ch; }
.banner .st { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; } .banner .st.open { display: block; }
.score { font: 700 12px var(--mono); }
.sim { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.sim-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sim-head .n { font-weight: 650; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols .eyebrow { margin-bottom: 8px; }
.variation { border-color: rgba(82, 199, 217, .4); }
.score-shift { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.score-shift .arrow { color: var(--muted); }

/* ---- tables ---- */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 9px 14px; background: var(--side); border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; color: var(--text-2); }
table.t tr:last-child td { border-bottom: 0; }
.tbl-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }

/* ---- play ---- */
.play-frame { width: 100%; height: calc(100vh - 170px); min-height: 480px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; display: block; }
/* A published game fills the window: it is played the way it is played on Pips, and wears its own bar (the way out, the sound). */
#app[data-route="game"] { animation: none; }
.game-stage { position: fixed; inset: 0; z-index: 60; background: #000; }
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.game-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--bg); }
.game-wait[hidden] { display: none; }
.listing[hidden] { display: none; }
.game-wait .t { font-size: 18px; font-weight: 650; }
body:has(.game-stage) .toast { z-index: 70; }

/* ---- toast ---- */
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--bad); border-radius: 6px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 10; }
.toast.on { opacity: 1; transform: none; }
.toast[data-kind="info"] { border-left-color: var(--accent); }
.toast[data-kind="warn"] { border-left-color: var(--warn); }

/* ---- narrow widths ---- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 6px 0 0; } .brand-sub { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav a { padding: 6px 9px; }
  .sidebar-foot { margin-top: 0; margin-left: auto; flex-direction: row; align-items: center; } .sys { display: none; }
  .page { padding: 22px 16px 60px; }
  .rows-head { display: none; }
  .row-item, .rows.act .row-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .plan-grid, .cols { grid-template-columns: 1fr; }
  .track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .hero .h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* activity trace and telemetry */
.job-link { display: block; color: inherit; } .job-link:hover { text-decoration: none; }
.job-trace { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; } .job-trace > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.job-trace[open] > summary { margin-bottom: 8px; }
.tier-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tier-select { font: inherit; color: var(--text); background: var(--side); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.trace-panel { margin-top: 12px; } .trace-panel > summary { cursor: pointer; margin-bottom: 10px; }
.trace-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; } .trace-filters button { cursor: pointer; } .trace-filters button[aria-pressed=true] { border-color: var(--accent); color: var(--text); }
.trace { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.trace-group > summary { cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text); padding: 4px 0; }
.trace-row { display: grid; grid-template-columns: 62px 104px minmax(0, 1fr) 56px; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 12.5px; align-items: baseline; }
.trace-row .tm { font: 11px var(--mono); color: #566070; } .trace-row .who { color: var(--muted); font-size: 11.5px; } .trace-row .dur { font: 11px var(--mono); color: var(--muted); text-align: right; }
.trace-row .what { min-width: 0; overflow-wrap: anywhere; } .trace-row .tgt { margin-left: 6px; color: var(--accent); font-family: var(--mono); font-size: 11.5px; } .trace-row .res { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.trace-row.failed .what > span:first-child { color: var(--warn); }
.telemetry { margin-top: 12px; } .tm-rows { display: flex; flex-direction: column; gap: 5px; }
.tm-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 72px; gap: 10px; align-items: center; font-size: 12.5px; } .tm-row .mono { text-align: right; font-size: 12px; }
.tm-bar { height: 6px; background: var(--side); border-radius: 3px; overflow: hidden; } .tm-bar i { display: block; height: 100%; background: var(--accent); opacity: .7; }
.cmp { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.4fr) minmax(0, 1.4fr) 62px; gap: 6px 12px; font-size: 12.5px; }
@media (max-width: 620px) { .trace-row { grid-template-columns: 56px minmax(0, 1fr) 48px; } .trace-row .who { display: none; } .tm-row { grid-template-columns: 110px minmax(0, 1fr) 60px; } .cmp { grid-template-columns: 1fr 1fr; } }

.now { display: flex; flex-direction: column; }
.now-row { display: flex; align-items: baseline; gap: 0; margin: 0 -10px; padding: 9px 10px; border-top: 1px solid var(--line); border-radius: 6px; color: var(--text-2); font-size: 13px; cursor: pointer; transition: background .12s; }
.now-row:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }
.now-row .t { font-weight: 650; color: var(--text); }
.now-row .go { margin-left: auto; padding-left: 12px; color: var(--accent); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.now-row .go span { display: inline-block; transition: transform .12s; } .now-row:hover .go span { transform: translateX(3px); }

/* ---- calmer defaults ---- */
.fold { margin-top: 14px; } .fold > summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 6px 0; } .fold[open] > summary { margin-bottom: 10px; }
.plan-sec .lead { max-width: 72ch; } .plan-sec .lead + .lead { margin-top: 10px; }
.row-item.ver { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) 90px auto; }
.row-item .actions { justify-content: flex-end; }
.play-frame { height: calc(100vh - 150px); }
@media (max-width: 920px) { .row-item.ver { grid-template-columns: minmax(0, 1fr) auto; } }
textarea:focus, textarea:focus-visible, .field :focus-visible { outline: none; box-shadow: none; }

.act-group { margin-top: 18px; } .act-group > summary { cursor: pointer; font-weight: 650; padding: 4px 0 10px; }
.rows.act .rows-head { display: none; }

/* ---- project gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .12s, transform .12s; }
.gcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.cover { height: 96px; position: relative; display: flex; align-items: center; justify-content: center; }
.cover .initial { font-size: 44px; font-weight: 700; color: rgba(255,255,255,.22); letter-spacing: -.03em; }
.cover .tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.gbody { padding: 12px 14px 4px; flex: 1; } .gtitle { font-weight: 660; font-size: 15px; letter-spacing: -.01em; margin-bottom: 2px; }
.gblurb { color: var(--text-2); font-size: 13px; line-height: 1.5; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px 12px; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search { font: inherit; color: var(--text); background: var(--side); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-width: 200px; outline: none; }
.cover { height: auto; aspect-ratio: 16 / 10; background: var(--side); } .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gtags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; } .gtags:empty { display: none; }
.gcard:not(:has(.cover)) .gbody { padding-top: 14px; }
.gallery { align-items: start; } .gsection + .gsection { margin-top: 26px; } .gsection > .eyebrow { margin-bottom: 10px; }
.gallery.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gallery.compact .gcard { border-radius: 8px; } .gallery.compact .gbody { padding: 10px 12px 2px; } .gallery.compact .gtitle { font-size: 14px; }
.gallery.compact .gblurb { -webkit-line-clamp: 2; font-size: 12.5px; margin-top: 4px; } .gallery.compact .gfoot { padding: 8px 12px 10px; }

/* ---- Pips shelf: one row per game, in the order Pips shows them; a row opens into its editor ---- */
.shelf { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.shelf-item { border-bottom: 1px solid var(--line); } .shelf-item:last-child { border-bottom: 0; }
.shelf-item.open { background: var(--panel-2); }
.shelf-row { display: grid; grid-template-columns: 28px 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px; }
.shelf-place { color: var(--muted); text-align: right; }
.shelf-thumb { border-radius: 6px; overflow: hidden; } .shelf-thumb .initial { font-size: 26px; }
.shelf-item.is-hidden .shelf-thumb, .shelf-item.is-hidden .shelf-title > span:first-child { opacity: .5; }
.shelf-main { min-width: 0; }
.shelf-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; } .shelf-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.shelf-tags { margin: 6px 0 0; }
.shelf-actions { flex-wrap: nowrap; justify-content: flex-end; } .shelf-actions .btn svg { width: 14px; height: 14px; }
.shelf-edit { padding: 4px 16px 16px 58px; }
.shelf-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.shelf-cover-edit { display: flex; flex-direction: column; gap: 8px; } .shelf-cover-edit .cover { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.shelf-theirs { display: block; margin-top: 4px; }
.shelf-log { display: flex; flex-direction: column; gap: 10px; } .shelf-log li { border-left: 2px solid var(--line-2); padding-left: 10px; }

/* stat strip: cells share one row evenly and wrap without leaving an empty block */
.stats { display: flex; flex-wrap: wrap; gap: 0; background: transparent; }
.stat { flex: 1 1 96px; border-right: 1px solid var(--line); padding: 12px 16px; } .stat:last-child { border-right: 0; }
.stat .k { margin-bottom: 4px; } .stat .v { font-size: 16px; } .stat .d:empty, .stat .d { min-height: 0; }

/* ---- accounts: sign-in, first password, people ---- */
body.signed-out .shell { display: none; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate[hidden] { display: none; }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.auth-brand { margin-bottom: 8px; } .auth-brand .brand-mark { display: block; font-size: 28px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; } .auth-brand .brand-sub { display: block; font-size: 10.5px; letter-spacing: .22em; color: var(--muted); font-weight: 600; margin-top: 3px; }
.auth-title { font-size: 22px; } .auth-sub { margin-top: -8px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-msg { min-height: 18px; margin: 0; font-size: 12.5px; color: var(--bad); } .auth-msg:empty { min-height: 0; }
.auth-note { margin: 0; align-self: flex-start; }
.inp { font: inherit; color: var(--text); background: var(--side); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; width: 100%; outline: none; }
.inp:focus { border-color: #3b4250; } .inp::placeholder { color: #566070; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .inline-form .inp { width: auto; flex: 1 1 200px; max-width: 280px; padding: 6px 10px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 12.5px; } .linkbtn:hover { color: var(--text); text-decoration: underline; }
.me { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 0; margin-top: 4px; border-top: 1px solid var(--line); }
.me-name { font-weight: 600; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys[hidden] { display: none; }
.row-item.person { grid-template-columns: minmax(0, 1fr) auto; text-decoration: none; }
.row-item.acct { grid-template-columns: minmax(0, 1.6fr) 130px auto; }
.owner-line { color: var(--text-2); margin: 1px 0 2px; } .owner-line a { color: inherit; font-weight: 560; } .owner-line a:hover { color: var(--accent); }
.st-ok { color: var(--ok); } .st-bad { color: var(--bad); } .st-warn { color: var(--warn); } .st-run { color: var(--accent); }
.seg.visibility { align-self: center; }
.cred { display: flex; align-items: center; gap: 12px; margin: 6px 0; } .cred code { font: 600 15px var(--mono); letter-spacing: .04em; user-select: all; }

/* =====================================================================================================================
   Phones and tablets (<= 920px): bottom tab bar + "More" sheet, edge-to-edge pages, touch-sized controls.
   Desktop (> 920px) is untouched: every rule below is inside a width query, or hidden until one applies.
   ===================================================================================================================== */
:root { --tab-h: 58px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
html { -webkit-text-size-adjust: 100%; }
a, button, summary, select, .btn, .gcard, .row-item { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.topbar, .tabbar, .sheet { display: none; }

@media (max-width: 920px) {
  .shell { display: block; min-height: 100dvh; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; padding: calc(10px + var(--safe-t)) max(16px, var(--safe-r)) 2px max(16px, var(--safe-l)); }
  .topbar .brand { display: flex; align-items: baseline; gap: 8px; padding: 0; }
  .topbar .brand-mark { font-size: 19px; display: inline; }
  .topbar .brand-sub { display: inline; font-size: 9.5px; margin: 0; }
  .page { padding: 12px max(16px, var(--safe-r)) calc(var(--tab-h) + var(--safe-b) + 28px) max(16px, var(--safe-l)); max-width: none; }
  .hero { padding-top: 4px; max-width: none; }
  .h1 { font-size: 24px; } .hero .h1 { font-size: 26px; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  .section-head { margin: 26px 0 10px; }

  /* bottom navigation */
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: rgba(9, 11, 14, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; }
  .tab:hover { text-decoration: none; color: var(--text-2); }
  .tab:active { background: var(--panel); }
  .tab svg { width: 22px; height: 22px; }
  .tab.active { color: var(--text); }
  .tab.active::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  .tab-create .pill { display: grid; place-items: center; width: 52px; height: 32px; border-radius: 16px; background: var(--text); color: #0c0e12; }
  .tab-create svg { width: 20px; height: 20px; stroke-width: 2; }
  .tab-create.active .pill { background: var(--accent); }
  .tab-create.active::before { display: none; }
  .tab .count { position: absolute; top: 7px; left: calc(50% + 6px); font-size: 10.5px; font-weight: 700; color: var(--bg); background: var(--accent); border-radius: 9px; padding: 1px 5px; min-width: 17px; text-align: center; }
  .tab .count[hidden] { display: none; }
  body.kb-open .tabbar { display: none; }
  body.kb-open .page { padding-bottom: 24px; }

  /* More sheet */
  .sheet { position: fixed; inset: 0; z-index: 30; }
  .sheet.open { display: block; }
  .sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
  .sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--panel); border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; padding: 8px max(10px, var(--safe-r)) calc(12px + var(--safe-b)) max(10px, var(--safe-l)); }
  .sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 10px; }
  .sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--text); font-size: 16px; font-weight: 560; text-align: left; text-decoration: none; cursor: pointer; }
  .sheet-item:hover { text-decoration: none; }
  .sheet-item:active, .sheet-item.active { background: var(--panel-3); }
  .sheet-item svg { width: 20px; height: 20px; color: var(--text-2); flex: none; }
  .sheet-item.danger { color: var(--bad); } .sheet-item.danger svg { color: var(--bad); }
  .sheet-acct { padding: 8px 14px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .sheet-acct b { display: block; font-size: 15px; } .sheet-acct span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
  body.sheet-open { overflow: hidden; }

  /* touch targets */
  .btn { height: 44px; padding: 0 16px; }
  .btn.sm { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .btn.lg { height: 48px; }
  .seg button { min-height: 38px; padding: 0 16px; }
  .chip { height: 34px; padding: 0 12px; }
  .crumb { min-height: 36px; margin-bottom: 4px; }
  summary { min-height: 40px; }
  .inp, .search, .tier-select, .pa-in textarea, .pa-in select, textarea { font-size: 16px; }
  .inp, .search, .tier-select { height: 44px; padding-top: 0; padding-bottom: 0; }
  .banner .x, .callout .x { width: 40px; height: 40px; top: 2px; right: 2px; } .banner .x svg, .callout .x svg { width: 16px; height: 16px; }
  .banner.dismissible { padding-right: 48px; }
  .toast { left: max(12px, var(--safe-l)); right: max(12px, var(--safe-r)); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); max-width: none; }

  /* sign-in */
  .gate { min-height: 100dvh; place-items: start center; padding: max(14dvh, calc(var(--safe-t) + 32px)) max(24px, var(--safe-r)) 24px max(24px, var(--safe-l)); }

  /* create */
  .prompt { padding: 12px 14px; }
  .prompt textarea { min-height: 128px; max-height: 45dvh; }
  .prompt-foot { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .prompt-foot .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .prompt-foot .actions .btn { width: 100%; padding: 0 8px; }
  .prompt-foot > .btn { align-self: flex-start; }
  .tier-row { margin-top: 10px; padding-top: 10px; gap: 4px 12px; flex-wrap: nowrap; align-items: center; }
  .tier-row .seg { flex: none; }
  .tier-row .hint { font-size: 12.5px; color: var(--muted); min-width: 0; }
  .tier-row .hint .blurb { display: none; }
  .try { flex-wrap: nowrap; overflow-x: auto; margin: 12px calc(-1 * max(16px, var(--safe-r))) 0 calc(-1 * max(16px, var(--safe-l))); padding: 0 max(16px, var(--safe-r)) 4px max(16px, var(--safe-l)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .try::-webkit-scrollbar { display: none; } .try > * { flex: none; }
  .try .chip { max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 32px; }
  .pa-thread { max-height: 28dvh; }
  .pa-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .pa-in textarea { grid-column: 1 / -1; min-height: 44px; padding: 10px 12px; }
  .pa-in .tier-select { min-width: 0; }
  .pa-text { max-height: 32dvh; }
  .pa-prompt .actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .pa-prompt .actions .btn { width: 100%; padding: 0 8px; }
  .pa-prompt .actions > :first-child { grid-column: 1 / -1; order: 3; }
  .pa-msg.me { max-width: 92%; }

  /* library */
  .page-head > .btn.primary[href="#/"] { display: none; }
  .filter-bar { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .filters { gap: 6px; }
  .search { width: 100%; min-width: 0; }
  .gallery, .gallery.compact { grid-template-columns: 1fr; gap: 10px; }
  .gcard { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "body body" "foot foot"; border-radius: 10px; }
  .gcard:has(.cover) { grid-template-areas: "cover body" "cover foot"; }
  .gcard .cover { grid-area: cover; aspect-ratio: auto; height: 100%; min-height: 96px; }
  .gcard .cover .tags { top: 6px; left: 6px; }
  .gcard .gbody { grid-area: body; padding: 12px 12px 2px; min-width: 0; }
  .gcard .gfoot { grid-area: foot; padding: 6px 12px 12px; align-self: end; }
  .gcard .gblurb { display: none; }
  .gallery.compact .gcard .gblurb { display: -webkit-box; -webkit-line-clamp: 2; }
  .gtitle { font-size: 15.5px; overflow-wrap: anywhere; }
  .gcard .gfoot .btn { flex: none; }

  /* Pips shelf */
  .shelf-row { grid-template-columns: 22px 72px minmax(0, 1fr); grid-template-areas: "place thumb main" "acts acts acts"; gap: 8px 12px; padding: 12px 14px; }
  .shelf-place { grid-area: place; } .shelf-thumb { grid-area: thumb; } .shelf-main { grid-area: main; }
  .shelf-actions { grid-area: acts; justify-content: flex-end; }
  .shelf-actions .btn.sm { height: 36px; min-width: 44px; }
  .shelf-edit { padding: 4px 14px 16px; }
  .shelf-edit-grid { grid-template-columns: 1fr; }
  .shelf-cover-edit { order: -1; } .shelf-cover-edit .cover { max-width: 280px; }

  /* rows, activity, people */
  .row-item { padding: 12px 14px; }
  .rows.act .row-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "name name badge" "kind time when"; gap: 6px 12px; align-items: center; }
  .rows.act .row-item > :nth-child(1) { grid-area: kind; } .rows.act .row-item > :nth-child(2) { grid-area: name; } .rows.act .row-item > :nth-child(3) { grid-area: badge; justify-self: end; }
  .rows.act .row-item > :nth-child(4) { grid-area: time; } .rows.act .row-item > :nth-child(5) { grid-area: when; justify-self: end; }
  .row-item.acct { grid-template-columns: minmax(0, 1fr) auto; } .row-item.acct > :first-child { grid-column: 1 / -1; }
  .row-item.acct .actions { justify-content: flex-start; }
  .row-name .p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
  .now-row { min-height: 48px; flex-wrap: wrap; align-items: center; row-gap: 2px; padding: 10px; }
  .now-row .go { margin-left: auto; }
  .panel { padding: 16px; }
  .panel-head { flex-wrap: wrap; }
  .job-card { padding: 14px; } .job-top { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .job-prompt { max-width: none; }
  .job-hero { padding: 16px; }
  .job-foot { flex-wrap: wrap; gap: 4px 12px; } .job-foot .step { white-space: normal; }
  .stat { flex-basis: 104px; }

  /* project page */
  .result-head { gap: 14px; }
  .result-head > div:first-child { flex-basis: 100% !important; }
  .result-head .actions { padding-top: 0 !important; width: 100%; }
  .result-head .actions > .btn.lg { flex: 1 1 100%; }
  .result-head .seg.visibility { width: 100%; } .result-head .seg.visibility button { flex: 1; }
  .quote { overflow-wrap: anywhere; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; margin: 20px calc(-1 * max(16px, var(--safe-r))) 14px calc(-1 * max(16px, var(--safe-l))); padding: 0 max(16px, var(--safe-r)) 0 max(16px, var(--safe-l)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; } .tabs button { flex: none; padding: 12px 14px; white-space: nowrap; }
  .plan-sec { padding: 14px; } .plan-sec .lead { font-size: 15.5px; }
  .kv, .kv[style] { grid-template-columns: minmax(0, 1fr) !important; gap: 0; } .kv dd { margin-bottom: 10px; overflow-wrap: anywhere; } .kv dt { font-size: 12px; }
  .inline-form .inp { flex: 1 1 100%; max-width: none; width: 100%; }
  .inline-form .btn { flex: 1 1 auto; }
  .banner { padding: 14px; }
  .cmp { grid-template-columns: 1fr 1fr; }

  /* tables become stacked records */
  table.t thead { display: none; }
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t tr { padding: 10px 14px; border-bottom: 1px solid var(--line); } table.t tr:last-child { border-bottom: 0; }
  table.t td { padding: 2px 0; border: 0; overflow-wrap: anywhere; }
  table.t td[data-label]:not(:first-child)::before { content: attr(data-label) " \00b7  "; color: var(--muted); font-size: 11.5px; }

  /* play */
  #app[data-route="play"] { padding-left: 0; padding-right: 0; padding-top: 4px; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px); }
  #app[data-route="play"] > :not(.play-frame) { margin-left: max(16px, var(--safe-l)); margin-right: max(16px, var(--safe-r)); }
  .play-frame { height: calc(100dvh - var(--tab-h) - var(--safe-b) - var(--safe-t) - 150px); min-height: 360px; border-radius: 0; border-left: 0; border-right: 0; }
  #app[data-route="play"] .page-head .actions { width: 100%; } #app[data-route="play"] .page-head .actions > * { flex: 1 1 auto; min-width: 0; }
}
/* narrow phones */
@media (max-width: 400px) {
  .gcard { grid-template-columns: 96px minmax(0, 1fr); }
  .hero .h1 { font-size: 24px; }
}
/* tablets: two-column cards, roomier gutters */
@media (min-width: 600px) and (max-width: 920px) {
  .page { padding-left: max(24px, var(--safe-l)); padding-right: max(24px, var(--safe-r)); }
  .gallery, .gallery.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gcard, .gcard:has(.cover) { display: flex; flex-direction: column; } .gcard .cover { aspect-ratio: 16 / 10; height: auto; } .gcard .gblurb { display: -webkit-box; }
  .hero { max-width: 680px; margin: 0 auto; }
  .page-head > .btn.primary[href="#/"] { display: inline-flex; }
  .tabs { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}
/* landscape phones: slimmer bar, no labels */
@media (max-width: 920px) and (max-height: 480px) and (orientation: landscape) {
  :root { --tab-h: 46px; }
  .tab { flex-direction: row; gap: 0; } .tab span:not(.pill):not(.count) { display: none; } .tab svg { width: 22px; height: 22px; }
  .topbar { display: none; }
  .play-frame { height: calc(100dvh - var(--tab-h) - var(--safe-b) - 90px); min-height: 220px; }
}

body.signed-out .topbar, body.signed-out .tabbar, body.signed-out .sheet { display: none !important; }

.only-m { display: none; }
@media (max-width: 920px) {
  .topbar .brand { min-height: 40px; }
  .chip { height: 36px; line-height: 34px; }
  .try .chip { line-height: 34px; }
  .section-head a, .crumb, .small > a.go { display: inline-flex; align-items: center; min-height: 40px; }
  .trace-filters button, .filters .btn { min-height: 38px; }
  .tab-create .pill { height: 30px; margin: -4px 0 -4px; }
  .only-m { display: flex; }
  .gcard .cover .tags { display: none; }
  .gcard .cover img { object-position: center top; }
  .job-title a, .row-name .t a { display: inline-block; padding: 2px 0; }
}
@media (max-width: 920px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * max(16px, var(--safe-r))) 0 calc(-1 * max(16px, var(--safe-l))); padding: 0 max(16px, var(--safe-r)) 2px max(16px, var(--safe-l)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; } .filters > * { flex: none; }
  .gcard .gfoot .small { min-width: 0; line-height: 1.35; }
}
@media (max-width: 920px) {
  .rows.act .row-item { grid-template-columns: auto auto auto minmax(0, 1fr); grid-template-areas: "name name name name" "badge kind time when"; gap: 8px 12px; }
  .rows.act .row-item > :nth-child(3) { justify-self: start; }
  .rows.act .row-item > :nth-child(2) .p { -webkit-line-clamp: 2; }
  .rows.act .row-item > :nth-child(5) { white-space: nowrap; }
}
@media (max-width: 920px) { table.t td a { display: inline-flex; align-items: center; min-height: 36px; } }

/* ---- Device Testing (public/devices.js) ---- */
.ev { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.ev.sim { color: #c5b3ff; background: rgba(155, 128, 255, .08); border: 1px dashed rgba(155, 128, 255, .5); }
.ev.auto { color: var(--text-2); background: rgba(125, 134, 149, .1); border: 1px solid rgba(125, 134, 149, .35); }
.ev.real { color: var(--muted); background: transparent; border: 1px dotted var(--line-2); }
.dt-key { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dt-setup { display: flex; flex-direction: column; gap: 22px; }
.dt-step { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dt-step > * { max-width: 100%; }
.dt-step > .dt-target-row, .dt-step > .dt-devices, .dt-step > .dt-engines, .dt-step > .dt-sub, .dt-step > .dt-adv { align-self: stretch; }
.dt-step + .dt-step { border-top: 1px solid var(--line); padding-top: 18px; }
.dt-sub { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.dt-target-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.dt-target-row > label { flex: 1 1 240px; min-width: 0; }
.dt-ident { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 6px; background: var(--side); border: 1px solid var(--line); flex-basis: 100%; }
.dt-presets { flex-wrap: wrap; }
.dt-presets button .muted { font-size: 11.5px; }
.dt-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px 20px; }
.dt-fam { min-width: 0; }
.dt-fam .eyebrow { margin-bottom: 6px; }
.dt-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dt-chip { display: inline-flex; align-items: center; flex-wrap: wrap; min-height: 28px; max-width: 100%; padding: 3px 10px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; line-height: 1.3; cursor: pointer; text-align: left; }
.dt-chip .dim { color: var(--muted); font-size: 11.5px; font-family: var(--mono); margin-left: 4px; }
.dt-chip:hover { border-color: #3b4250; color: var(--text); }
.dt-chip[aria-pressed=true] { background: rgba(82, 199, 217, .12); border-color: rgba(82, 199, 217, .55); color: var(--text); }
.dt-engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.dt-engine { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--side); cursor: pointer; }
.dt-engine .t { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.dt-engine .n { font-size: 12px; color: var(--muted); line-height: 1.4; }
.dt-engine .box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: var(--bg); }
.dt-engine .box svg { width: 12px; height: 12px; }
.dt-engine[aria-pressed=true] { border-color: rgba(82, 199, 217, .55); }
.dt-engine[aria-pressed=true] .box { background: var(--accent); border-color: var(--accent); }
.dt-inline { padding: 5px 10px; } .dt-inline input { width: 170px; font: 12px var(--mono); color: var(--text); background: transparent; border: 0; outline: 0; }
.dt-adv { margin-top: 4px; } .dt-check { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.dt-check select { font: inherit; color: var(--text); background: var(--side); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 6px; }
.dt-go { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; flex-wrap: wrap; }
.dt-runs .row-item { grid-template-columns: minmax(0, 2.6fr) 150px minmax(0, 1.2fr) 110px; }
.dt-identity { margin-top: 16px; } .dt-identity summary { margin-bottom: 4px; }
.dt-progress { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.dt-bar { height: 6px; border-radius: 3px; background: var(--side); overflow: hidden; } .dt-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }
.dt-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dt-gaps summary, .dt-compare summary { color: var(--text); }
.dt-compare { margin-top: 12px; }
.dt-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dt-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line-2); border-radius: 8px; overflow: hidden; color: inherit; transition: border-color .12s; }
.dt-card:hover { border-color: #3b4250; text-decoration: none; }
.dt-card.st-pass { border-top-color: var(--ok); } .dt-card.st-fail { border-top-color: var(--bad); } .dt-card.st-not_run { border-top-color: var(--warn); }
.dt-shot { height: 150px; display: grid; place-items: center; background: #07090c; padding: 8px; }
.dt-shot img { max-width: 100%; max-height: 134px; width: auto; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); }
.dt-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dt-card-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.dt-card-title { font-weight: 650; }
.dt-card-issue { color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dt-card-issue b { font-family: var(--mono); font-size: 11px; color: var(--text); }
.dt-manage { margin-top: 24px; }
.dt-label { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dt-label-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.dt-shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dt-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dt-fig-img { height: 190px; width: 100%; display: grid; place-items: center; background: #07090c; border: 1px solid var(--line); border-radius: 6px; padding: 6px; overflow: hidden; cursor: zoom-in; }
.dt-fig.missing .dt-fig-img { cursor: default; border-style: dashed; text-align: center; padding: 10px; }
.dt-fig-img img { max-width: 100%; max-height: 176px; border-radius: 3px; }
.dt-fig figcaption { font-size: 12px; line-height: 1.35; }
.dt-checks td:first-child { width: 90px; } .dt-checks td:nth-child(3) { width: 90px; } .dt-checks td:last-child { width: 130px; text-align: right; }
.dt-findings { margin-top: 6px; } .dt-findings li { font-size: 12px; }
tr.st-row-fail td:first-child { box-shadow: inset 3px 0 0 var(--bad); } tr.st-row-not_run td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.dt-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .dt-evidence .panel + .panel { margin-top: 0; }
.dt-lightbox { cursor: zoom-out; } .dt-lightbox figure { margin: 0; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.dt-lightbox img { max-width: 96vw; max-height: 84vh; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-2), 0 20px 50px rgba(0, 0, 0, .6); }
.dt-lightbox figcaption { color: var(--text-2); font-size: 13px; }
@media (max-width: 920px) {
  .dt-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dt-evidence { grid-template-columns: 1fr; }
  .dt-runs .row-item { grid-template-columns: minmax(0, 1fr) auto; }
  .dt-runs .row-item > :nth-child(3), .dt-runs .row-item > :nth-child(4) { display: none; }
  .dt-label-row { grid-template-columns: 1fr; gap: 2px; }
  .dt-chip { min-height: 36px; }
  .dt-checks td:last-child { text-align: left; }
}
@media (max-width: 400px) { .dt-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .dt-shot { height: 110px; } .dt-shot img { max-height: 96px; } }

/* ---------------------------------------------------------------- Device Testing: live preview (play it yourself in a device frame) */
.dt-head { flex-wrap: wrap; gap: 12px; align-items: center; }
.dt-modes { margin-left: auto; }
.dt-livebar { display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 14px; }
.dt-barrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dt-barrow .field.dt-inline select, .dt-barrow .field.dt-inline input { min-height: 24px; font-size: 13px; }
.dt-barrow .btn.sm svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; }
.dt-grow { flex: 1 1 320px; min-width: 0; }
.dt-grow select, .dt-grow input { width: 100%; }
.dt-spacer { flex: 1 1 auto; }
.dt-livewrap { display: grid; gap: 10px; }
.dt-stage { display: flex; justify-content: center; align-items: flex-start; min-height: 340px; padding: 6px 0 4px; overflow: auto; }
.dt-scaler { position: relative; flex: none; }
.dt-inner { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.dt-device { position: relative; background: #050608; box-shadow: 0 0 0 1px #2c313b, 0 0 0 3px #0b0d10, 0 18px 50px rgba(0,0,0,.55); }
.dt-device.desk { background: #1b1f26; box-shadow: 0 0 0 1px #2c313b, 0 18px 50px rgba(0,0,0,.5); overflow: hidden; }
.dt-winbar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #20252d; border-bottom: 1px solid #2c313b; }
.dt-winbar i { width: 11px; height: 11px; border-radius: 50%; background: #3a404b; }
.dt-winbar .url { margin-left: 12px; flex: 1; min-width: 0; padding: 4px 10px; border-radius: 6px; background: #14181e; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-screen { position: absolute; overflow: hidden; background: #000; }
.dt-iframe { position: absolute; left: 0; border: 0; display: block; background: #000; }
.dt-sbar { position: absolute; left: 0; right: 0; background: #e9e9ec; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.dt-sbar.top { top: 0; } .dt-sbar.bottom { bottom: 0; }
.dt-sbar .pill { background: #d3d4d9; color: #555a63; border-radius: 10px; padding: 5px 14px; font-size: 12px; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-island { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; background: #000; border-radius: 20px; pointer-events: none; }
.dt-island.land { top: 50%; left: 11px; width: 36px; height: 124px; margin: -62px 0 0; }
.dt-notch { position: absolute; top: 0; left: 50%; width: 162px; height: 32px; margin-left: -81px; background: #000; border-radius: 0 0 20px 20px; pointer-events: none; }
.dt-notch.land { top: 50%; left: 0; width: 32px; height: 162px; margin: -81px 0 0; border-radius: 0 20px 20px 0; }
.dt-punch { position: absolute; top: 10px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; background: #000; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.35); pointer-events: none; }
.dt-punch.land { top: 50%; left: 10px; margin: -6.5px 0 0; }
.dt-home { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(255,255,255,.75); mix-blend-mode: difference; pointer-events: none; }
.dt-home.android { width: 108px; margin-left: -54px; height: 4px; bottom: 9px; }
.dt-livestatus { display: grid; gap: 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dt-statusrow { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; }
.dt-phase { margin-left: auto; font-size: 12px; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 999px; }
.dt-phase b { color: var(--text); font-weight: 600; }
.dt-errlist { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dt-errlist ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 920px) {
  .dt-modes { margin-left: 0; }
  .dt-spacer { display: none; }
  .dt-phase { margin-left: 0; }
}

.dt-loaded { display: grid; gap: 4px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel); }
.dt-loaded:empty { display: none; }
.dt-loaded .t { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dt-loaded .kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }

/* Live preview: Start test, full screen, bigger device */
.dt-start svg, .dt-fsbtn svg { width: 15px; height: 15px; margin-right: 7px; vertical-align: -3px; }
.dt-live { display: grid; gap: 10px; }
.dt-live .dt-stage { min-height: 60vh; }
.dt-hint { font-size: 13px; color: var(--text); }
.dt-live.dt-focus { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; background: var(--bg); overflow: hidden; }
.dt-live.dt-focus .dt-livebar { margin: 0; padding: 8px 10px; gap: 6px; }
.dt-live.dt-focus .dt-stage { flex: 1 1 auto; min-height: 0; padding: 0; align-items: center; overflow: hidden; }
.dt-live.dt-focus .dt-livestatus { padding: 6px 12px; }
.dt-live.dt-focus .dt-livestatus .small.muted, .dt-live.dt-focus .dt-loaded > .small, .dt-live.dt-focus .dt-errors { display: none; }
.dt-live.dt-focus .dt-loaded { padding: 6px 12px; }

body.dt-noscroll { overflow: hidden; }
.dt-live.dt-focus .dt-row-target > .seg { display: none; }
.dt-live.dt-focus .dt-nofocus { display: none; }
.dt-live.dt-focus .dt-livebar .dt-barrow { gap: 6px; }
.dt-live.dt-focus .dt-hint { font-size: 12px; }
.dt-live.dt-focus .dt-loaded .kv > span:nth-child(n+3) { display: none; }
.dt-live.dt-focus .dt-loaded .kv { display: inline-flex; }
.dt-live.dt-focus .dt-loaded { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

/* Device picker */
.dt-devbtn { max-width: 100%; }
.dt-devbtn .t { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.dt-devbtn svg { width: 15px; height: 15px; margin-right: 7px; vertical-align: -3px; }
.dt-states button { padding: 5px 11px; }
.dt-pick-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; }
.dt-pick { width: min(820px, 100%); max-height: 86vh; display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.dt-pick-head { display: flex; gap: 8px; align-items: center; }
.dt-pick-search { flex: 1; } .dt-pick-search input { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: transparent; border: 0; outline: 0; }
.dt-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-pick-count { line-height: 1.4; }
.dt-pick-list { overflow: auto; display: grid; gap: 14px; padding-right: 4px; }
.dt-pick-sec { display: grid; gap: 2px; }
.dt-pick-sec .eyebrow { margin: 0 0 4px; }
.dt-pick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.dt-pick-row:hover, .dt-pick-row:focus-visible { background: var(--panel-3); border-color: var(--line-2); outline: 0; }
.dt-pick-row[aria-selected="true"] { border-color: var(--accent); }
.dt-pick-row .m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-pick-row .sz { font-size: 12.5px; color: var(--text-2); }
.dt-pick-row .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); min-width: 92px; justify-content: flex-end; }
.dt-pick .tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); margin-left: 8px; }
.dt-pick .tag.est { color: var(--warn); border-color: rgba(224,169,59,.45); }
.dt-pick .tag.ok { color: var(--ok); border-color: rgba(70,195,123,.4); }
.dt-pick .tag.stress { color: var(--accent); border-color: rgba(82,199,217,.45); }
@media (max-width: 600px) { .dt-pick-row { grid-template-columns: minmax(0, 1fr) auto; } .dt-pick-row .meta { display: none; } .dt-pick-overlay { padding-top: 12px; } }
/* Hinge and crease */
.dt-hinge { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #08090b, #23262c 45%, #23262c 55%, #08090b); box-shadow: inset 0 0 0 1px #000; z-index: 3; cursor: not-allowed; }
.dt-hinge.h { left: 0; right: 0; top: auto; bottom: auto; background: linear-gradient(180deg, #08090b, #23262c 45%, #23262c 55%, #08090b); }
.dt-crease { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.18), rgba(0,0,0,.25)); pointer-events: none; z-index: 2; }
.dt-crease.h { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 2px; margin: -1px 0 0; background: linear-gradient(180deg, rgba(255,255,255,.0), rgba(255,255,255,.18), rgba(0,0,0,.25)); }
.dt-device.duo { background: #1d2026; }
/* Runs page: device sections */
.dt-devsections .dt-fam { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dt-devsections .dt-fam > summary { cursor: pointer; list-style: revert; }
.dt-devsections .dt-fam[open] > summary { margin-bottom: 8px; }
.dt-pick-row .also { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-foldbtn svg { width: 15px; height: 15px; margin-right: 7px; vertical-align: -3px; }
.dt-foldbtn { border-color: var(--accent); }
