/* Black Empire Linkup (was DJ Gemini Batch). One stylesheet for the app and the sign-in pages.
   Look: the Black Empire "Sterling Case" — black leather panels in a polished sterling frame, blackletter titles,
   our own faceted cross. Chrome is kept to frames, titles, the active step and primary or active controls. */
@font-face { font-family: 'Grenze Gotisch'; src: url('/linkup/fonts/GrenzeGotisch-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/linkup/fonts/Montserrat-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/linkup/fonts/Montserrat-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #070708; --deep: #0b0b0d; --panel: #111114; --panel-hi: #18181c; --raised: #1f1f24; --track: #2a2a30;
  --line: #24242a; --line-hi: #3a3a43;
  --cream: #f6f6fa; --text: #dcdce3; --muted: #b4b4bd; --silver: #e6e6ec; --ink: #0a0a0c;
  --mint: #8fe0b8; --amber: #f0c76a; --red: #ff787c; --house-red: #b5121b;
  /* polished sterling: hard bright bands between dark ones, like light on a chrome cross */
  --chrome: linear-gradient(115deg, #3a3a40 0%, #ececf2 16%, #76767e 32%, #fcfcff 50%, #68686f 66%, #e2e2e8 84%, #424248 100%);
  /* the same metal, softened for fills that carry dark text */
  --chrome-fill: linear-gradient(180deg, #fbfbfe 0%, #d9d9e1 46%, #aeaeb8 54%, #e7e7ee 100%);
  --chrome-fill-hi: linear-gradient(180deg, #ffffff 0%, #e8e8ef 46%, #c2c2cb 54%, #f3f3f8 100%);
  --chrome-text: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #b9b9c3 52%, #f0f0f5 78%, #d4d4dc 100%);
  --stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0l3 3.4h-1.8v5.4h5.4V7l3.4 3-3.4 3v-1.8h-5.4v5.4H13L10 20l-3-3.4h1.8v-5.4H3.4V13L0 10l3.4-3v1.8h5.4V3.4H7z'/%3E%3C/svg%3E");
  --gothic: 'Grenze Gotisch', 'Old English Text MT', serif; --sans: 'Montserrat', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --radius: 6px; --case: 12px; --ease: cubic-bezier(.16, 1, .3, 1);
  --lift: 0 1px 0 #ffffff59 inset, 0 -1px 0 #00000040 inset, 0 3px 10px #00000080;
}
* { box-sizing: border-box; }
html { background: var(--night); scrollbar-color: #3e3e47 var(--night); caret-color: var(--silver); text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--night); color: var(--cream); font: 500 14px/1.5 var(--sans); font-feature-settings: 'tnum' 1, 'lnum' 1; -webkit-font-smoothing: antialiased; }
::selection { background: var(--silver); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: #3e3e47; border: 2px solid var(--night); border-radius: 10px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { text-underline-offset: 3px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, audio:focus-visible, summary:focus-visible { outline: 2px solid var(--silver); outline-offset: 2px; }
h1, h2 { margin: 0; font-family: var(--gothic); font-weight: 700; letter-spacing: .005em; text-wrap: balance; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body[data-mode=hosted] .local-only, body:not([data-mode=hosted]) .hosted-only { display: none !important; }

/* a sterling hairline under bars and over footers */
.topbar, .page-foot { position: relative; }
.topbar::after, .page-foot::before { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: var(--chrome); opacity: .55; }
.topbar::after { bottom: 0; }
.page-foot::before { top: 0; }

/* ---------- top bar ---------- */
.topbar { height: 60px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 3vw, 40px); background: var(--night); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--cream); text-decoration: none; white-space: nowrap; }
.brand-cross { width: 23px; height: 32px; flex: 0 0 auto; filter: drop-shadow(0 2px 3px #000000b3); }
.brand-word { font: 700 24px/1 var(--gothic); letter-spacing: .01em; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.brand-word b { font: 700 10px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; margin-left: 6px; vertical-align: 4px; -webkit-text-fill-color: var(--muted); color: var(--muted); }
.top-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--text); white-space: nowrap; }
.local-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px #8fe0b81f; }
.local-dot.off { background: var(--red); box-shadow: 0 0 0 3px #ff787c1f; }
.divider { height: 20px; border-left: 1px solid var(--line-hi); margin: 0 4px; }
.account-menu { position: relative; letter-spacing: 0; }
.account-menu summary { min-height: 40px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: var(--radius); color: var(--cream); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; transition: border-color .16s var(--ease), background .16s var(--ease); }
.account-menu summary:hover { background: var(--panel-hi); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ''; width: 7px; height: 7px; margin: -3px 0 0 10px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.account-menu[open] summary { border-color: var(--silver); }
.account-menu-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; min-width: 210px; display: grid; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--chrome) border-box; box-shadow: 0 18px 40px #000000d9; }
.account-menu-popover .text-button { min-height: 44px; padding: 8px 12px; text-align: left; color: var(--text); font-weight: 600; }
.account-menu-popover .text-button:hover { color: var(--cream); background: var(--raised); }
.icon-button { border: 0; background: transparent; color: var(--text); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; transition: background .16s var(--ease), color .16s var(--ease); }
.icon-button:hover { background: var(--raised); color: var(--cream); }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.brand-cross, .card-cross, .record-cross { stroke: none; }
.icon-button svg { width: 18px; height: 18px; }
/* the close button is our cross turned 45 degrees */
.close-button { font-size: 0; }
.close-button::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; transform: rotate(45deg); }

/* ---------- buttons ---------- */
.primary, .process-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; background: var(--chrome-fill); border: 1px solid #f4f4f8; color: var(--ink); border-radius: var(--radius); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-decoration: none; white-space: nowrap; box-shadow: var(--lift); transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease); }
.primary:hover, .process-button:not(:disabled):hover { background: var(--chrome-fill-hi); transform: translateY(-1px); box-shadow: 0 1px 0 #ffffff80 inset, 0 -1px 0 #00000040 inset, 0 6px 16px #000000a6; }
.primary:active, .process-button:not(:disabled):active { transform: translateY(0); filter: brightness(.94); }
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-hi); background: var(--panel-hi); color: var(--cream); border-radius: var(--radius); font-size: 13px; font-weight: 600; white-space: nowrap; transition: border-color .16s var(--ease), background .16s var(--ease); }
.secondary:not(:disabled):hover { border-color: #8d8d97; background: var(--raised); }
.secondary[aria-pressed=true] { border: 1px solid transparent; background: linear-gradient(var(--raised), var(--raised)) padding-box, var(--chrome) border-box; color: #fff; }
.primary:disabled, .process-button:disabled { background: var(--raised); border-color: var(--line-hi); color: #8a8a94; box-shadow: none; cursor: not-allowed; }
.secondary:disabled { opacity: .45; cursor: not-allowed; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; background: none; border: 0; border-radius: var(--radius); color: var(--silver); font-size: 13px; font-weight: 700; white-space: nowrap; }
.text-button:not(:disabled):hover { background: var(--raised); color: #fff; }
.text-button:disabled { color: #6f6f79; cursor: not-allowed; }
.remove-button, .remove-button:not(:disabled):hover { color: var(--red); }

/* ---------- inputs ---------- */
.url-form { display: grid; gap: var(--s2); }
.url-form textarea, .folder-row input, dialog input, dialog select, .login-card input { width: 100%; min-width: 0; background: var(--deep); color: var(--cream); border: 1px solid var(--line-hi); border-radius: var(--radius); font-size: 13px; transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.url-form textarea { min-height: 88px; padding: 11px 12px; line-height: 1.5; resize: vertical; }
.url-form textarea::placeholder, .login-card input::placeholder { color: #8f8f99; }
.url-form textarea:focus, .folder-row input:focus, dialog input:focus, dialog select:focus, .login-card input:focus { border-color: var(--silver); outline: none; box-shadow: 0 0 0 3px #e6e6ec1a; }
.or-line { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 12px; margin-top: var(--s2); }
.or-line:before, .or-line:after { content: ''; height: 1px; background: var(--line-hi); flex: 1; }
.dropzone { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border: 1px dashed var(--line-hi); border-radius: var(--radius); cursor: pointer; transition: border-color .16s var(--ease), background .16s var(--ease); }
.dropzone:hover, .dropzone.dragover { border-color: var(--silver); background: var(--panel-hi); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-mark { width: 34px; height: 34px; border: 1px solid var(--line-hi); border-radius: 50%; display: grid; place-items: center; color: var(--silver); flex: 0 0 auto; }
.dropzone strong, .dropzone small { display: block; }
.dropzone strong { font-size: 13px; font-weight: 700; }
.dropzone small { font-size: 12px; color: var(--muted); }
.drop-hint { display: none; }
.privacy-note { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 12px; margin: 0; }
.privacy-note svg { width: 14px; height: 14px; color: var(--silver); margin-top: 1px; }
.import-status, .runner-banner { border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--panel-hi); padding: 10px 12px; font-size: 12px; color: var(--text); }
.import-status p { margin: 0 0 6px; overflow-wrap: anywhere; }
.import-status p:last-child { margin: 0; }
.import-error { color: var(--red); }
.runner-banner { margin: -14px 0 28px; border-color: #f0c76a66; background: #f0c76a0d; color: #f4e3b8; font-size: 13px; }
.runner-banner em { font-style: normal; font-family: var(--mono); font-size: 12px; }

/* ---------- the case: Source -> Sound -> Output in one sterling frame ---------- */
.app { flex: 1 0 auto; width: 100%; max-width: 1480px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 40px) 40px; display: block; }
.workspace-head { margin: 0 0 24px; }
.workspace-head h1 { font-size: clamp(38px, 4.4vw, 56px); line-height: .95; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 4px; }
.workspace-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.workflow { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .9fr) minmax(220px, .78fr); gap: 1px; padding: 2px; margin-bottom: 40px; border-radius: var(--case); background: var(--chrome); background-size: 100% 100%; box-shadow: 0 1px 0 #ffffff14, 0 18px 50px #000000cc; }
/* signature: while jobs run, light travels round the frame */
body:has(#stopAll:not([hidden])) .workflow { background: linear-gradient(100deg, #3a3a40 0%, #ececf2 8%, #76767e 16%, #fcfcff 25%, #68686f 33%, #e2e2e8 42%, #424248 50%, #ececf2 58%, #76767e 66%, #fcfcff 75%, #68686f 83%, #e2e2e8 92%, #3a3a40 100%); background-size: 200% 100%; animation: sheen 3.2s linear infinite; }
@keyframes sheen { from { background-position: 0% 0; } to { background-position: -200% 0; } }
.workflow-step { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 22px; background: linear-gradient(180deg, #121215 0%, #0c0c0e 100%); }
.workflow-step:first-child { border-radius: calc(var(--case) - 2px) 0 0 calc(var(--case) - 2px); }
.workflow-step:last-child { border-radius: 0 calc(var(--case) - 2px) calc(var(--case) - 2px) 0; }
.workflow-step[data-state=current] { background: linear-gradient(180deg, #1d1d22 0%, #111114 100%); }
.workflow-step[data-state=current]::before { content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 2px; border-radius: 0 0 2px 2px; background: var(--chrome); }
.step-heading { display: flex; align-items: flex-start; gap: 12px; min-height: 46px; }
.step-node { width: 19px; height: 19px; margin-top: 4px; flex: 0 0 auto; background: var(--line-hi); -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; }
.workflow-step[data-state=current] .step-node { background: var(--chrome-fill); filter: drop-shadow(0 1px 2px #000); }
.workflow-step[data-state=complete] .step-node { background: var(--mint); }
.step-heading h2 { font-size: 27px; line-height: 1; color: var(--cream); }
.workflow-step[data-state=current] .step-heading h2 { background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.workflow-step .url-form { gap: 8px; }
.workflow-step .url-form textarea { min-height: 80px; }
.workflow-step .url-form .primary { align-self: stretch; }
.workflow-step .source-download { align-self: flex-start; }
.workflow-step .or-line { margin-top: 0; }
.workflow-step .dropzone { padding: 9px 10px; }
.workflow-step .privacy-note { margin-top: auto; }
.workflow-step audio, .rail audio { width: 100%; height: 36px; }

/* intro record: black vinyl, sterling label with our cross */
.intro-player { display: flex; align-items: center; gap: var(--s3); margin-top: 1px; }
.record-art { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; background: repeating-radial-gradient(circle at center, #0c0c0e 0 1.6px, #232328 2px 2.4px, #0e0e10 2.8px 3.4px); box-shadow: 0 0 0 1px #3a3a43, 0 3px 8px #000; display: grid; place-items: center; }
.record-center { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--chrome-fill); }
.record-cross { width: 9px; height: 13px; }
.intro-details { min-width: 0; }
.intro-title { font-size: 14px; font-weight: 700; }
.intro-foot { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 12px; }
.sound-settings { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sound-settings strong { color: var(--cream); font: 600 12px var(--mono); margin-left: 4px; }
.sound-settings .text-button { min-height: 36px; }
.output-spec { margin: auto 0 0; color: var(--text); font-size: 13px; font-weight: 600; }
.output-step .process-button, .output-step .export-button { width: 100%; margin: 0; }
.output-step .export-button { justify-content: center; }

/* processing-mode switch: a sterling stud slides along a black track */
.mode-switch { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); cursor: pointer; }
.mode-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-switch-track { width: 40px; height: 22px; padding: 2px; border: 1px solid var(--line-hi); border-radius: 999px; background: #050506; box-shadow: 0 2px 4px #000 inset; transition: border-color .16s var(--ease); }
.mode-switch-track i { display: block; width: 16px; height: 16px; background: #5c5c66; -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; transition: transform .22s var(--ease), background .16s var(--ease); }
.mode-switch input:checked + .mode-switch-track { border-color: #9a9aa4; }
.mode-switch input:checked + .mode-switch-track i { transform: translateX(18px) rotate(90deg); background: var(--chrome-fill); }
.mode-switch input:focus-visible + .mode-switch-track { outline: 2px solid var(--silver); outline-offset: 3px; }
.mode-switch input:disabled + .mode-switch-track { opacity: .55; }
.mode-switch-copy strong, .mode-switch-copy small { display: block; }
.mode-switch-copy strong { color: var(--cream); font-size: 13px; font-weight: 700; }
.mode-switch-copy small { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mode-switch-state { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.output-mode-note { margin: 0; max-width: 34ch; }
.standard-recipe { display: grid; gap: 5px; padding-top: 2px; }
.standard-recipe strong { font-size: 13px; font-weight: 700; color: var(--cream); }
.standard-recipe span { color: var(--silver); font-size: 13px; font-weight: 600; }
.standard-recipe small { max-width: 38ch; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---------- library ---------- */
.queue-panel { min-width: 0; display: flex; flex-direction: column; }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4) var(--s5); flex-wrap: wrap; padding-bottom: 16px; }
.queue-head h2 { font-size: clamp(30px, 3vw, 38px); line-height: 1; }
.queue-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; margin-left: 8px; vertical-align: 6px; border-radius: 11px; background: var(--chrome-fill); color: var(--ink); font: 700 12px/1 var(--sans); letter-spacing: 0; }
.queue-tools { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.queue-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s4); padding: 8px 0; background: var(--night); border-top: 1px solid var(--line-hi); border-bottom: 1px solid var(--line); }
.check-all { display: flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.check-all input, .item-check { appearance: none; width: 18px; height: 18px; border: 1px solid #6c6c76; border-radius: 4px; background: var(--deep); display: inline-grid; place-content: center; cursor: pointer; margin: 0; flex: 0 0 auto; }
.check-all input:checked, .item-check:checked, .check-all input:indeterminate { border-color: #f4f4f8; background: var(--chrome-fill); }
.check-all input:checked:after, .item-check:checked:after { content: ''; width: 8px; height: 4px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); margin-top: -2px; }
.check-all input:indeterminate:after { content: ''; width: 8px; height: 2px; background: var(--ink); }
.check-all input:disabled { opacity: .4; cursor: not-allowed; }
.view-tabs { flex: 1; min-width: 0; display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.view-tabs::-webkit-scrollbar { display: none; }
.view-tabs button { min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 18px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .16s var(--ease), color .16s var(--ease); }
.view-tabs button:hover { background: var(--raised); color: var(--cream); }
.view-tabs button[aria-pressed=true] { background: var(--chrome-fill); border-color: #f4f4f8; color: var(--ink); font-weight: 700; box-shadow: var(--lift); }
.queue-list { flex: 1; }
.view-empty { padding: var(--s7) 0; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state strong { font: 700 30px var(--gothic); margin-top: var(--s4); }
.empty-state p { font-size: 13px; color: var(--muted); margin: var(--s2) 0 0; }
.empty-wave { height: 30px; display: flex; align-items: center; gap: 3px; }
.empty-wave span { display: block; width: 2px; border-radius: 3px; background: #6c6c76; height: 7px; }
.empty-wave span:nth-child(2), .empty-wave span:nth-child(6) { height: 14px; }
.empty-wave span:nth-child(3), .empty-wave span:nth-child(5) { height: 22px; }
.empty-wave span:nth-child(4) { height: 30px; background: var(--silver); }

/* ---------- one track ---------- */
.track { display: grid; grid-template-columns: 18px minmax(0, 1fr) 132px auto; column-gap: var(--s4); align-items: center; padding: 14px var(--s2); margin: 0 calc(-1 * var(--s2)); border-bottom: 1px solid var(--line); border-radius: 4px; transition: background .16s var(--ease); }
.track:hover { background: #ffffff06; }
.track-head { min-width: 0; }
.track-title-row { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.track-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-renamed { font-size: 11px; font-weight: 600; color: var(--amber); border: 1px solid #f0c76a59; border-radius: 3px; padding: 0 5px; white-space: nowrap; cursor: help; }
.track-note { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-render { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 3px; }
.track-render strong { color: var(--cream); font-weight: 700; }
.track-status { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.track-status:before { content: ''; width: 10px; height: 10px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; opacity: .55; }
.track-status[data-state=ready], .track-status[data-state=done], .track-status[data-state=stale], .track-status[data-state=error] { color: var(--silver); }
.track-status[data-state=ready]:before, .track-status[data-state=done]:before, .track-status[data-state=error]:before, .track-status[data-state=stale]:before { opacity: 1; }
.track-status[data-state=done] { color: var(--mint); }
.track-status[data-state=stale] { color: var(--amber); }
.track-status[data-state=error] { color: var(--red); }
.track-status[data-state=downloading], .track-status[data-state=processing], .track-status[data-state=download_queued], .track-status[data-state=process_queued] { color: var(--cream); }
.track-status[data-state=downloading]:before, .track-status[data-state=processing]:before { opacity: 1; animation: turn 1.6s var(--ease) infinite; }
@keyframes turn { to { transform: rotate(90deg); } }
.track-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s1); }
.mini-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--text); border-radius: var(--radius); padding: 0 11px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease); }
.mini-button:hover { color: var(--cream); background: var(--raised); }
a.mini-button, .mini-button[data-act=retry] { border-color: var(--line-hi); background: var(--panel-hi); color: var(--cream); }
a.mini-button:hover, .mini-button[data-act=retry]:hover { border-color: #8d8d97; background: var(--raised); }
.mini-button[data-act=toggle] { display: none; }
.track-body { grid-column: 2 / -1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s5); align-items: start; }
.track-progress, .track-error { grid-column: 1 / -1; }
.track-progress { height: 3px; background: var(--track); margin-top: var(--s2); overflow: hidden; border-radius: 3px; }
.track-progress i { display: block; height: 100%; width: 100%; background: var(--chrome-fill); transition: width .4s linear; }
.track-progress.indeterminate i { width: 30%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.track-error { margin-top: var(--s2); color: #ffb3b5; background: #b5121b1f; border: 1px solid #b5121b80; border-radius: var(--radius); padding: 8px 10px; font-size: 13px; overflow-wrap: anywhere; }
.cue-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-top: var(--s3); color: var(--text); font-size: 13px; }
.cue-row label { color: var(--muted); font-size: 12px; font-weight: 600; }
.cue-row input { width: 84px; height: 36px; background: var(--deep); border: 1px solid var(--line-hi); border-radius: var(--radius); color: var(--cream); font: 600 13px var(--mono); padding: 0 8px; }
.cue-row input:focus { border-color: var(--silver); outline: none; }
.cue-row button { min-height: 36px; border: 0; border-radius: var(--radius); background: none; color: var(--silver); font-size: 13px; font-weight: 700; padding: 0 8px; }
.cue-row button:not(:disabled):hover { background: var(--raised); color: #fff; }
.cue-row button:disabled { color: #6f6f79; cursor: default; }
.cue-row.dirty input { border-color: var(--amber); }
.cue-note { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.cue-row.dirty .cue-note { color: var(--amber); }
.players { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin-top: var(--s3); min-width: 0; }
.player { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.player-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); width: 54px; flex: 0 0 auto; }
.player[data-kind=output] .player-label { color: var(--silver); }
.track audio { display: block; flex: 1 1 0; width: 0; min-width: 0; height: 36px; }
body.compact .mini-button[data-act=toggle] { display: inline-flex; }
body.compact .track:not(.open) .cue-row, body.compact .track:not(.open) .players { display: none !important; }
body.compact .track { padding-top: var(--s2); padding-bottom: var(--s2); }

/* ---------- action bar, footer ---------- */
.queue-footer { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: var(--s3) 0; background: var(--night); border-top: 1px solid var(--line-hi); box-shadow: 0 -14px 18px -14px #000; }
.batch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.batch-actions:last-child { margin-left: auto; }
.page-foot { flex: 0 0 auto; display: flex; justify-content: space-between; gap: var(--s2) var(--s5); flex-wrap: wrap; padding: var(--s4) clamp(16px, 3vw, 40px); background: var(--night); color: var(--muted); font-size: 12px; }
.page-foot span:first-child { font: 700 16px/1 var(--gothic); letter-spacing: .02em; color: var(--silver); }
.foot-links { display: flex; gap: var(--s4); }
.foot-links a { color: var(--silver); font-weight: 700; text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.account-menu-popover a.text-button { text-decoration: none; }

/* ---------- dialogs, toast ---------- */
dialog { width: min(480px, calc(100% - 32px)); max-height: min(90vh, 760px); overflow-y: auto; color: var(--cream); padding: var(--s5); border: 1.5px solid transparent; border-radius: var(--case); background: linear-gradient(180deg, #151518, #0d0d0f) padding-box, var(--chrome) border-box; box-shadow: 0 30px 80px #000000f2; }
dialog::backdrop { background: #000000c7; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.dialog-head h2 { font-size: 34px; line-height: 1; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.dialog-head p { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.close-button { margin: -8px -8px 0 0; }
.field-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin: var(--s5) 0 var(--s2); }
.field-label span { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
dialog .field-label { margin-top: 16px; }
dialog input, dialog select { min-height: 44px; padding: 9px 11px; }
dialog .secondary { margin-top: 12px; }
.range-row { display: flex; align-items: center; gap: var(--s4); }
.range-row input { flex: 1; min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--silver); }
.range-row output { min-width: 60px; text-align: right; font: 600 13px var(--mono); color: var(--silver); }
.helper-copy { font-size: 12px; line-height: 1.6; color: var(--muted); margin: var(--s2) 0 var(--s4); }
.helper-copy b { color: var(--text); }
.folder-row { display: flex; gap: var(--s2); }
.folder-row input { height: 44px; padding: 0 12px; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: var(--s2); }
.clear-options { display: grid; gap: var(--s2); }
.clear-options .secondary { justify-content: flex-start; }
.clear-options .clear-all { color: var(--red); border-color: #b5121b99; margin-top: var(--s2); }
.clear-options .clear-all:not(:disabled):hover { background: #b5121b26; border-color: var(--house-red); }
.connection-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 12px; }
.connection-row strong, .connection-row span { min-width: 0; overflow-wrap: anywhere; }
.connection-row strong { font-size: 13px; }
.connection-row span { color: var(--muted); }
.connection-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 4px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.plan-card { display: grid; align-content: start; gap: 6px; min-height: 108px; padding: 14px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); }
.plan-card[data-current=current] { border: 1px solid transparent; background: linear-gradient(var(--panel-hi), var(--panel-hi)) padding-box, var(--chrome) border-box; }
.plan-card strong { color: var(--cream); font: 700 22px/1 var(--gothic); }
.plan-card span { min-height: 34px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-card button { min-height: 42px; margin-top: 4px; }
#publishDialog h3 { font: 700 22px/1 var(--gothic); margin: 22px 0 6px; color: var(--silver); }
#publishDialog .check-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 13px; font-weight: 600; }
#publishDialog .connection-actions input { flex: 1 1 220px; min-width: 0; }
#publishDialog .check-row input[type=checkbox] { appearance: none; width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; margin: 0; padding: 0; border: 1px solid #6c6c76; border-radius: 4px; background: var(--deep); display: inline-grid; place-content: center; }
#publishDialog .check-row input[type=checkbox]:checked { border-color: #f4f4f8; background: var(--chrome-fill); }
#publishDialog .check-row input[type=checkbox]:checked::after { content: ''; width: 8px; height: 4px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); margin-top: -2px; }
#toast { position: fixed; bottom: 84px; left: 50%; transform: translate(-50%, 14px); background: linear-gradient(var(--raised), var(--raised)) padding-box, var(--chrome) border-box; color: var(--cream); border: 1px solid transparent; border-radius: var(--radius); padding: 11px 18px; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease); z-index: 4; max-width: min(600px, 90vw); box-shadow: 0 12px 28px #000000d9; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sign-in ---------- */
.login-wrap { flex: 1; display: grid; place-items: center; padding: var(--s6) var(--s5); }
.login-card { width: min(400px, 100%); padding: 32px 30px 28px; text-align: left; border: 2px solid transparent; border-radius: var(--case); background: linear-gradient(180deg, #151518, #0c0c0e) padding-box, var(--chrome) border-box; box-shadow: 0 30px 80px #000000e6; }
.card-cross { display: block; width: 44px; height: 60px; margin: 0 0 18px; filter: drop-shadow(0 4px 6px #000000cc); }
.login-card h1 { font-size: 44px; line-height: 1; margin: 0 0 8px; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.login-card p { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.login-card input { height: 48px; padding: 0 13px; font-size: 16px; margin-bottom: 12px; }
.login-card .primary { width: 100%; height: 48px; }
.login-card .login-error { color: var(--red); min-height: 18px; margin: 10px 0 0; }
.login-mode-switch { display: flex; gap: 8px; margin: 0 0 18px; }
.login-mode-switch button { flex: 1; }
.login-card .login-fields { display: grid; gap: 10px; }
.login-card .login-fields input { margin: 0; }
.login-card .login-secondary { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-hi); color: var(--muted); text-align: center; font-size: 12px; }
.login-card .login-secondary button { min-height: 30px; }

/* ---------- account and processing-mode visibility ---------- */
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
body[data-role=user] .owner-only { display: none !important; }
body[data-role=owner] .user-only { display: none !important; }
body[data-role=user] .user-only { display: initial; }
body[data-role=owner] .owner-only { display: initial; }
body[data-role=owner] .mode-switch.owner-only { display: grid; }
body[data-processing=standard] .dj-only, body[data-processing=dj] .standard-only { display: none !important; }

/* ---------- narrower screens ---------- */
@media (max-width: 1180px) {
  .track { grid-template-columns: 18px minmax(0, 1fr) auto; row-gap: var(--s1); }
  .track-status { grid-column: 3; }
  .track-actions { grid-column: 2 / -1; justify-content: flex-start; margin-left: -10px; }
  .track-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .workflow { grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); }
  .workflow-step:first-child { border-radius: calc(var(--case) - 2px) 0 0 0; }
  .sound-step { border-radius: 0 calc(var(--case) - 2px) 0 0; }
  .workflow-step:last-child { border-radius: 0 0 calc(var(--case) - 2px) calc(var(--case) - 2px); }
  .output-step { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px 20px; }
  .output-step .step-heading { grid-column: 1; grid-row: 1 / span 2; }
  .output-spec { grid-column: 1; margin: 0 0 0 28px; }
  .output-step .process-button, .output-step .export-button { width: auto; min-width: 150px; }
}
@media (max-width: 700px) {
  .app { padding-top: 24px; padding-bottom: 28px; }
  .workspace-head { margin-bottom: 18px; }
  .workflow { grid-template-columns: minmax(0, 1fr); margin-bottom: 28px; }
  .workflow-step { padding: 18px 16px; }
  .workflow-step:first-child { border-radius: calc(var(--case) - 2px) calc(var(--case) - 2px) 0 0; }
  .sound-step { border-radius: 0; }
  .source-step { order: 1; }
  .sound-step { order: 2; }
  .output-step { order: 3; grid-column: auto; display: flex; gap: 12px; }
  .output-step .step-heading { min-height: 0; }
  .output-spec { margin: 0; }
  .output-step .process-button, .output-step .export-button { width: 100%; }
  .runner-banner { margin: -10px 0 22px; }
  .queue-head { align-items: flex-start; }
}
@media (max-width: 620px) {
  .brand-word { font-size: 21px; }
  .brand-word b { display: none; }
  .top-meta { gap: 6px; font-size: 10px; letter-spacing: .08em; }
  .icon-button { width: 40px; }
  .queue-tools { margin-left: -10px; }
  .queue-bar { flex-wrap: wrap; gap: 0 var(--s4); }
  .view-tabs { order: 3; flex-basis: 100%; padding-bottom: var(--s1); }
  .queue-bar .remove-button { margin-left: auto; }
  .track { grid-template-columns: 18px minmax(0, 1fr); align-items: start; }
  .track .item-check { margin-top: 3px; }
  .track-title, .track-note { white-space: normal; overflow-wrap: anywhere; }
  .track-status { grid-column: 2; }
  .track-actions { grid-column: 2; flex-wrap: wrap; }
  .mini-button, .cue-row button, .view-tabs button { min-height: 44px; }
  .cue-row input { height: 44px; font-size: 16px; width: 96px; }
  .url-form textarea { font-size: 16px; min-height: 72px; }
  .queue-footer { position: static; box-shadow: none; }
  .batch-actions { width: 100%; }
  .batch-actions > * { flex: 1; }
  #toast { bottom: 22px; }
}
@media (max-width: 520px) {
  .topbar { padding-left: 12px; padding-right: 10px; }
  .top-meta #modeLabel, .top-meta .account-name { display: none; }
  .account-menu summary { padding: 0 10px; }
  .connection-row { grid-template-columns: minmax(0, 1fr); }
  .connection-row span { grid-column: 1; grid-row: 2; }
  .connection-actions { grid-column: 1; grid-row: 3; flex-wrap: wrap; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { min-height: auto; }
  .login-card { padding: 26px 20px 22px; }
}
@media (max-width: 400px) {
  .top-meta { gap: 3px; letter-spacing: .01em; }
  .top-meta .icon-button { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ---------- Send to games ---------- */
.track-send { display: inline-flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--silver); }
.track-send::before { content: ''; width: 10px; height: 10px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; }
.track-send[data-state=done] { color: var(--mint); }
.track-send[data-state=review] { color: var(--amber); }
.track-send[data-state=failed], .track-send[data-state=stopped] { color: var(--red); font-weight: 600; white-space: normal; }
.track-send[data-state=sending]::before { animation: turn 1.6s var(--ease) infinite; }
.mini-button[data-act=send], .mini-button[data-act=approve] { border-color: #f4f4f8; background: var(--chrome-fill); color: var(--ink); font-weight: 700; box-shadow: var(--lift); }
.mini-button[data-act=send]:hover, .mini-button[data-act=approve]:hover { background: var(--chrome-fill-hi); color: var(--ink); }
.send-open { width: 100%; }
dialog.send-dialog { width: min(560px, calc(100% - 24px)); }
.send-step { padding: 18px 0; border-top: 1px solid var(--line-hi); }
.send-step:first-of-type { border-top: 0; padding-top: 4px; }
.send-step h3, #publishDialog .send-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 24px/1.1 var(--gothic); color: var(--cream); }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; background: var(--chrome-fill); color: var(--ink); font: 700 13px/1 var(--sans); }
.send-connect .primary { width: 100%; margin-top: 14px; }
.send-connect .check-row, .send-dialog .check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.send-dialog .check-row input[type=checkbox] { appearance: none; width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; margin: 0; padding: 0; border: 1px solid #6c6c76; border-radius: 4px; background: var(--deep); display: inline-grid; place-content: center; }
.send-dialog .check-row input[type=checkbox]:checked { border-color: #f4f4f8; background: var(--chrome-fill); }
.send-dialog .check-row input[type=checkbox]:checked::after { content: ''; width: 8px; height: 4px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); margin-top: -2px; }
.send-help { margin-top: 14px; font-size: 13px; color: var(--muted); }
.send-help summary { cursor: pointer; color: var(--silver); font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.send-help ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.send-help a { color: var(--silver); }
.send-connected { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); }
.send-connected strong { font-size: 14px; overflow-wrap: anywhere; }
.send-connected-state { grid-column: 2; font-size: 12px; color: var(--muted); }
.send-connected .text-button { grid-column: 3; grid-row: 1 / span 2; }
.send-check { grid-row: 1 / span 2; width: 18px; height: 18px; background: var(--mint); -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; }
.send-check.warn { background: var(--amber); }
.switch-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); font-size: 14px; font-weight: 700; cursor: pointer; }
.switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-row input:checked + .mode-switch-track { border-color: #9a9aa4; }
.switch-row input:checked + .mode-switch-track i { transform: translateX(18px) rotate(90deg); background: var(--chrome-fill); }
.switch-row input:focus-visible + .mode-switch-track { outline: 2px solid var(--silver); outline-offset: 3px; }
.switch-row input:disabled ~ * { opacity: .5; }
.send-list { display: grid; gap: 8px; }
.send-row { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--deep); min-width: 0; }
.send-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.send-row-title { font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-pill { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-hi); font-size: 11px; font-weight: 700; color: var(--silver); white-space: nowrap; }
.send-row[data-state=done] .send-pill { color: var(--mint); border-color: #8fe0b866; }
.send-row[data-state=review] .send-pill { color: var(--amber); border-color: #f0c76a66; }
.send-row[data-state=failed] .send-pill, .send-row[data-state=stopped] .send-pill, .send-row[data-state=blocked] .send-pill { color: var(--red); border-color: #ff787c66; }
.send-row-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.send-row-detail { font-size: 12px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.send-row[data-state=failed] .send-row-detail, .send-row[data-state=stopped] .send-row-detail { color: #ffb3b5; }
.send-row-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.send-row-actions .primary, .send-row-actions .secondary { min-height: 40px; margin: 0; }

/* Send to games: which key uploads, which games get it */
.send-pick { margin-top: 14px; }
.send-pick select { width: 100%; margin-top: 6px; }
.send-games-wrap { margin-top: 16px; }
.send-games { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 4px; padding-right: 4px; }
.send-dialog .send-games .check-row { margin-top: 8px; overflow-wrap: anywhere; }
.send-dialog .send-games .check-row:first-child { padding-bottom: 8px; border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); }

/* ---------- how-to guide (/guide, public) ---------- */
.guide-page .topbar .guide-open { min-height: 38px; padding: 0 16px; }
.guide { flex: 1; width: min(780px, 100%); margin: 0 auto; padding: var(--s7) clamp(16px, 3vw, 24px) var(--s7); }
.guide-head { margin-bottom: var(--s6); }
.guide-kicker { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.guide-head h1 { font-size: clamp(36px, 6vw, 56px); line-height: .98; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 6px; }
.guide-lead { max-width: 60ch; margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s5); }
.guide-toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 999px; color: var(--silver); font-size: 12px; font-weight: 700; text-decoration: none; transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease); }
.guide-toc a:hover { border-color: var(--silver); background: var(--panel-hi); color: #fff; }
.guide-card { margin-top: var(--s4); padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line-hi); border-radius: var(--case); background: linear-gradient(180deg, #131316, #0c0c0e); scroll-margin-top: 16px; }
.guide-card h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: clamp(26px, 4vw, 32px); line-height: 1.05; color: var(--cream); }
.guide-card h2 .step-no { width: 32px; height: 32px; font-size: 15px; box-shadow: var(--lift); }
.guide-card h3 { margin: 22px 0 8px; font: 700 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.guide-card p { max-width: 65ch; margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: var(--text); }
.guide-card a:not(.primary) { color: var(--cream); font-weight: 700; }
.guide-card b { color: var(--cream); font-weight: 700; }
.guide-card code { padding: 2px 6px; border: 1px solid var(--line-hi); border-radius: 4px; background: var(--deep); font: 13px/1 var(--mono); color: var(--cream); }
.guide-steps, .guide-list { max-width: 65ch; margin: 0 0 14px; padding: 0; list-style: none; font-size: 15px; line-height: 1.6; color: var(--text); }
.guide-steps { counter-reset: gstep; }
.guide-steps li { position: relative; counter-increment: gstep; padding: 9px 0 9px 40px; border-top: 1px solid var(--line); }
.guide-steps li:first-child { border-top: 0; }
.guide-steps li::before { content: counter(gstep); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-hi); border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--silver); }
.guide-list li { position: relative; padding: 6px 0 6px 26px; }
.guide-list li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 11px; height: 11px; background: var(--silver); -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; }
.guide-card .guide-note { margin: 16px 0 0; padding: 12px 14px; border-left: 2px solid var(--silver); border-radius: 0 var(--radius) var(--radius) 0; background: var(--deep); font-size: 13.5px; color: var(--muted); }
.guide-card .guide-warn { border-left-color: var(--amber); color: var(--text); }
.guide-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.guide-check strong { width: 100%; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.guide-check span { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 999px; background: var(--deep); font-size: 13px; font-weight: 700; color: var(--cream); }
.guide-check i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.guide-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-top: 4px; }
.guide-two > div { padding: 16px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); }
.guide-two h3 { margin-top: 0; }
.guide-two p { font-size: 14px; }
.guide-card .guide-url { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line-hi); border-radius: 8px; background: var(--night); font: 13px/1.7 var(--mono); color: var(--muted); }
.guide-url b { white-space: nowrap; }
.guide-url b { padding: 1px 5px; border-radius: 4px; background: var(--chrome-fill); color: var(--ink); }
.guide-card .guide-small { margin: 0; font-size: 13px; color: var(--muted); }
.guide-track { max-width: 65ch; margin: 0; padding: 0; list-style: none; }
.guide-track li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 30px; font-size: 14px; line-height: 1.5; }
.guide-track li::before { content: ''; position: absolute; left: 3px; top: 4px; width: 13px; height: 13px; background: var(--silver); -webkit-mask: var(--stud) center / contain no-repeat; mask: var(--stud) center / contain no-repeat; }
.guide-track li::after { content: ''; position: absolute; left: 9px; top: 22px; bottom: 2px; border-left: 1px solid var(--line-hi); }
.guide-track li:last-child { padding-bottom: 0; }
.guide-track li:last-child::before { background: var(--mint); }
.guide-track li:last-child::after { display: none; }
.guide-track span { color: var(--muted); }
.guide-fix { margin: 0; }
.guide-fix dt { padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 700; color: var(--cream); }
.guide-fix dt:first-child { padding-top: 0; border-top: 0; }
.guide-fix dd { max-width: 65ch; margin: 4px 0 14px; font-size: 14px; line-height: 1.6; color: var(--text); }
.guide-card .guide-help { margin: 20px 0 16px; padding-top: 16px; border-top: 1px solid var(--line-hi); }
.login-card .login-guide { margin: 14px 0 0; text-align: center; font-size: 13px; }
.login-card .login-guide a { color: var(--silver); font-weight: 700; }
.send-help .send-help-more { margin: 8px 0 0; }
@media (max-width: 560px) {
  .guide { padding-top: var(--s6); }
  .guide-two { grid-template-columns: 1fr; }
  .guide-page .brand-word b { display: none; }
}

/* ---------- help menu, getting started list, link tools, plan meter, search (2026-11-21) ---------- */
.help-menu summary { width: 40px; padding: 0; justify-content: center; border-radius: 50%; font-size: 16px; font-weight: 700; }
.help-menu summary::after { display: none; }
.help-menu .account-menu-popover { min-width: 250px; }
.help-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 6px 0 0; padding: 12px 12px 8px; border-top: 1px solid var(--line-hi); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: normal; }
.help-keys dt { color: var(--text); font-weight: 700; white-space: nowrap; }
.help-keys dd { margin: 0; }
.help-keys kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border: 1px solid var(--line-hi); border-radius: 4px; background: var(--deep); font: 700 11px/1.5 var(--sans); text-align: center; color: var(--cream); }

.starter { margin: 0 0 20px; padding: 18px 20px 20px; border: 1px solid var(--line-hi); border-radius: var(--case); background: linear-gradient(180deg, #141417, #0c0c0e); }
.starter-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-bottom: 14px; }
.starter-head h2 { font-size: 26px; line-height: 1.05; }
.starter-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.starter-progress { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.starter-meter { width: 120px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.starter-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--mint); transition: width .4s var(--ease); }
.starter-progress .text-button { min-height: 36px; }
.starter-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: starter; }
.starter-list li { counter-increment: starter; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 6px 12px; padding: 14px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); transition: border-color .2s var(--ease); }
.starter-list li[data-state=next] { border-color: var(--silver); }
.starter-tick { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-hi); border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--silver); }
.starter-tick::before { content: counter(starter); }
.starter-list li[data-state=next] .starter-tick { border-color: #f4f4f8; background: var(--chrome-fill); color: var(--ink); }
.starter-list li[data-state=done] .starter-tick { border-color: var(--mint); background: var(--mint); }
.starter-list li[data-state=done] .starter-tick::before { content: ''; width: 10px; height: 5px; margin-top: -3px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.starter-text { display: grid; gap: 3px; min-width: 0; }
.starter-text strong { font-size: 14px; color: var(--cream); }
.starter-text small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.starter-text a { color: var(--silver); font-weight: 700; }
.starter-list li[data-state=done] .starter-text strong { color: var(--text); }
.starter-list li > button { grid-column: 2; justify-self: start; min-height: 40px; margin-top: 6px; }

.url-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 32px; margin-top: -2px; }
.url-tools .text-button { min-height: 32px; margin-right: -6px; }
.link-hint { min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.link-hint[data-state=good] { color: var(--mint); }
.link-hint[data-state=bad] { color: var(--amber); }
.plan-meter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--text); }
.plan-meter[data-state=empty] { color: var(--amber); }
.plan-pips { display: inline-flex; gap: 5px; }
.plan-pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-hi); background: transparent; }
.plan-pips i[data-on='1'] { border-color: var(--mint); background: var(--mint); }
.plan-meter .text-button { min-height: 32px; margin-left: auto; }
.send-all { width: 100%; }
.key-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); flex-wrap: wrap; }
.key-banner .secondary { min-height: 36px; }
.library-search { flex: 0 1 220px; min-width: 120px; height: 36px; padding: 0 14px; border: 1px solid var(--line-hi); border-radius: 18px; background: var(--deep); color: var(--cream); font-size: 13px; }
.library-search::placeholder { color: #8f8f99; }
.library-search:focus { border-color: var(--silver); outline: none; box-shadow: 0 0 0 3px #e6e6ec1a; }

/* ---------- first visit tour ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 200vmax #000000c9, 0 0 0 2px var(--silver), 0 0 24px 4px #e6e6ec40; pointer-events: none; transition: left .28s var(--ease), top .28s var(--ease), width .28s var(--ease), height .28s var(--ease); }
.tour-spot.none { box-shadow: 0 0 0 200vmax #000000c9; }
.tour-card { position: fixed; width: min(370px, calc(100vw - 24px)); padding: 20px 20px 16px; border: 1.5px solid transparent; border-radius: var(--case); background: linear-gradient(180deg, #17171b, #0d0d0f) padding-box, var(--chrome) border-box; box-shadow: 0 24px 70px #000000f2; transition: left .28s var(--ease), top .28s var(--ease); }
.tour-card:focus { outline: none; }
.tour-card.docked { left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; transition: none; }
.tour-count { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.tour-card h2 { font-size: 30px; line-height: 1.02; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 3px; }
.tour-body { margin: 10px 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-hi); transition: width .2s var(--ease), background .2s var(--ease); }
.tour-dots i[data-on='1'] { width: 18px; border-radius: 3px; background: var(--silver); }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-actions .text-button { margin-left: -10px; color: var(--muted); }
.tour-gap { flex: 1; }
.tour-actions .primary, .tour-actions .secondary { min-height: 44px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card, .starter-meter i, .tour-dots i { transition: none; } }
@media (max-width: 1000px) {
  .starter-list { grid-template-columns: minmax(0, 1fr); }
  .starter-list li { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; }
  .starter-list li > button { grid-column: 3; margin-top: 0; }
  .output-step .send-all, .output-step .send-open { width: auto; min-width: 150px; }
}
@media (max-width: 700px) {
  .output-step .send-all, .output-step .send-open { width: 100%; }
}
@media (max-width: 620px) {
  .starter { padding: 16px 14px; }
  .starter-meter { width: 72px; }
  .starter-list li { grid-template-columns: 28px minmax(0, 1fr); }
  .starter-list li > button { grid-column: 2; justify-self: stretch; margin-top: 6px; min-height: 44px; }
  .url-tools .text-button, .plan-meter .text-button, .starter-progress .text-button { min-height: 44px; }
  .library-search { order: 4; flex: 1 1 100%; height: 44px; font-size: 16px; margin-bottom: var(--s2); }
  .help-menu summary { width: 40px; }
  .help-menu .account-menu-popover { right: -48px; }
}
@media (max-width: 900px) {
  .queue-bar { flex-wrap: wrap; row-gap: 0; }
  .library-search { order: 4; flex: 1 1 100%; margin-bottom: var(--s2); }
}

/* Send to games: step-by-step Roblox setup */
.setup-intro { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.setup-step { padding: 14px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--deep); }
.setup-step p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text); }
.setup-head { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--cream); }
.setup-no { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; background: var(--chrome-fill); color: var(--ink); font: 700 12px/1 var(--sans); }
.setup-url { overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--silver); }
.setup-url b { color: var(--cream); }
.setup-hint { min-height: 1em; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.setup-hint.ok { color: var(--mint); }
.setup-hint.bad { color: var(--amber); }
.owner-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.owner-choice { display: grid; gap: 2px; justify-items: start; padding: 12px 14px; min-height: 56px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.owner-choice b { font-size: 14px; }
.owner-choice small { font-size: 12px; color: var(--muted); }
.owner-choice[aria-pressed="true"] { border-color: #f4f4f8; box-shadow: inset 0 0 0 1px #f4f4f8; color: var(--cream); }
.owner-choice:focus-visible { outline: 2px solid var(--silver); outline-offset: 2px; }
.send-connect.owner-group [data-for="user"], .send-connect.owner-user [data-for="group"] { display: none; }
.key-steps { margin: 10px 0 4px; padding-left: 22px; font-size: 13px; line-height: 1.6; color: var(--text); }
.key-steps li + li { margin-top: 4px; }
.key-steps a { color: var(--silver); }
.key-steps code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--ink); color: var(--cream); }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.key-row .secondary { min-width: 76px; }
@media (max-width: 420px) { .owner-pick { grid-template-columns: 1fr; } }

/* Linkup playlists (2026-11-22) */
.playlist-bar { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; padding: 0 0 var(--s2); }
.playlist-bar button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line, #ffffff26); border-radius: 17px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.playlist-bar button[aria-pressed=true] { background: var(--text); color: var(--bg, #0b0b0c); border-color: transparent; }
.playlist-bar button .n { opacity: .6; font-weight: 500; margin-left: 4px; }
.playlist-bar .pl-new { border-style: dashed; }
.playlist-bar .pl-tools { display: inline-flex; gap: var(--s1); margin-left: auto; }
.playlist-bar .pl-tools button { border-color: transparent; font-weight: 500; opacity: .8; }
.track-playlist { font-size: 11px; font-weight: 600; border: 1px solid #ffffff40; border-radius: 3px; padding: 0 5px; white-space: nowrap; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
#listPick { width: 100%; }
