.looppoint-surface {
  color-scheme: dark;
  --background: #101418;
  --panel: #171e24;
  --raised: #1e272e;
  --border: #35434d;
  --text: #f3f7f9;
  --muted: #a8bac5;
  --focus: #78e9c5;
  --warning: #ffbc7c;
  --error: #ffadaa;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.looppoint-surface { background: var(--background); color: var(--text); }
.looppoint-surface { margin: 0; }
a { color: var(--focus); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: 1rem; margin-bottom: 0.2rem; }
h3 { font-size: 1rem; margin-bottom: 0.45rem; }
p { color: var(--muted); }
.shell { width: min(100% - 48px, 1120px); margin-inline: auto; }
.topbar { border-bottom: 1px solid #28323a; }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 63px; }
.brand { display: inline-flex; gap: 0.55rem; align-items: center; color: var(--text); font-weight: 750; text-decoration: none; }
.brand-mark { display: inline-flex; gap: 3px; align-items: center; width: 32px; height: 32px; padding: 5px; border-radius: 7px; background: var(--focus); }
.brand-mark i { width: 2px; height: 8px; background: #13261f; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 13px; }
.brand-mark i:nth-child(3) { height: 20px; }
nav { display: flex; align-items: center; gap: 0.9rem; }
nav a, .bottom > a:last-child { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 0.88rem; }
nav a:hover, .bottom a:hover { color: var(--focus); }
.intro { max-width: 750px; padding: 53px 0 30px; }
h1 { margin-bottom: 1rem; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -0.048em; text-wrap: balance; }
.intro p { margin-bottom: 0; font-size: 1.03rem; max-width: 580px; }
.workbench { min-width: 0; border: 1px solid var(--border); background: var(--panel); border-radius: 17px; overflow: hidden; }
.import, .export { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; }
.import { margin: 13px; padding: 14px; border: 1px dashed #4a5c66; border-radius: 10px; background: #131a20; }
.import.drag { border-color: var(--focus); background: #17312a; }
.import p { margin: 2px 0 0; font-size: 0.83rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid #52636d; border-radius: 7px; padding: 0.48rem 0.8rem; background: #223038; color: var(--text); font-weight: 650; text-decoration: none; text-align: center; font-size: 0.88rem; cursor: pointer; }
.button:hover:not(:disabled) { background: #30414b; }
.button.primary { color: #10231d; background: var(--focus); border-color: var(--focus); }
.button.primary:hover:not(:disabled) { background: #a2f4d9; }
.button.quiet { background: transparent; color: var(--muted); }
button:disabled { opacity: 0.46; cursor: default; }
#audio-input:disabled + label { opacity: 0.46; cursor: default; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { margin: 4px; }
#audio-input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }
.activity { margin: 0 19px; min-height: 1.6rem; color: var(--focus); font-size: 0.87rem; }
.activity[data-error] { color: var(--error); }
.workgrid { display: grid; grid-template-columns: minmax(215px, 30%) minmax(0, 1fr); border-block: 1px solid var(--border); min-width: 0; }
.queue { border-right: 1px solid var(--border); background: #141b21; min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; min-width: 0; padding: 14px 16px; }
.edit-head { padding-inline: 0; }
.count { background: var(--raised); color: var(--muted); border-radius: 20px; padding: 2px 9px; font: 0.82rem/1.55 var(--mono); }
.placeholder { padding: 0 16px; color: var(--muted); font-size: 0.89rem; margin-bottom: 15px; }
.file-list { list-style: none; margin: 0; padding: 0 8px 8px; max-height: 568px; overflow: auto; }
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) 43px; gap: 4px; align-items: start; margin-bottom: 4px; }
.queue-item button { text-align: left; color: var(--text); width: 100%; min-height: 53px; min-width: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 6px 8px; cursor: pointer; }
.queue-item button:hover, .queue-item button[aria-current="true"] { border-color: #4c6c63; background: #203832; }
.file-name { display: block; font-size: 0.89rem; overflow-wrap: anywhere; font-weight: 600; }
.file-state { display: block; color: var(--muted); font-size: 0.75rem; }
.file-state[data-kind="error"] { color: var(--error); }
.file-state[data-kind="review"] { color: var(--warning); }
.row-selection { display: grid; min-height: 44px; width: 43px; place-items: center; cursor: pointer; }
.row-selection input { width: 17px; height: 17px; margin: 0; accent-color: var(--focus); }
.edit { min-width: 0; padding: 0 16px 13px; }
.detail { color: var(--muted); font-size: 0.82rem; margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs button { background: #131b21; border: 1px solid var(--border); border-radius: 7px; min-height: 44px; padding: 0.4rem 0.67rem; color: var(--muted); font-size: 0.83rem; font-weight: 670; cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: #72ceb4; color: var(--focus); background: #1b342d; }
.scope { padding: 7px; background: #11181e; border: 1px solid var(--border); border-radius: 8px; }
canvas { width: 100%; height: 156px; display: block; }
.scope-labels { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 3px 5px; color: var(--muted); font: 0.72rem/1.5 var(--mono); }
.scope-labels > :nth-child(2) { text-align: center; }
.transport { padding: 9px 0 6px; }
.volume { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-left: auto; color: var(--muted); font-size: 0.82rem; }
.volume input { width: 75px; accent-color: var(--focus); }
.panel { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 5px; }
.panel > p { margin-bottom: 0.65rem; }
.candidates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.candidates:empty { display: none; }
.candidates button[aria-pressed="true"] { color: var(--focus); border-color: var(--focus); }
.range-details { display: grid; grid-template-columns: repeat(2, minmax(0, 155px)); gap: 8px; margin-bottom: 7px; }
.range-details label { color: var(--muted); font-size: 0.82rem; }
.range-details input { display: block; width: 100%; min-height: 44px; border: 1px solid #52636d; border-radius: 6px; font: 0.93rem var(--mono); color: var(--text); padding: 7px; background: #11181e; }
.range-details input[aria-invalid="true"] { border-color: var(--error); }
.metadata { display: grid; grid-template-columns: minmax(70px, 105px) minmax(0, 1fr); gap: 5px 10px; margin: 0; font-size: 0.88rem; }
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; overflow-wrap: anywhere; }
.export { background: #1b242b; }
.prepared { margin: 0; padding: 0 20px 12px; background: #1b242b; font-size: 0.85rem; }
.prepared a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.info { max-width: 780px; padding: 40px 0 12px; }
.info h2, .policy h2 { font-size: 1.23rem; }
.format-list { margin: 10px 0 0; }
.format-list div { border-top: 1px solid var(--border); padding: 12px 0; }
.format-list dt { font-weight: 650; }
.format-list dd { color: var(--muted); margin: 3px 0 0; }
.bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: 30px; min-height: 68px; }
.policy { max-width: 700px; padding-top: 52px; }
.policy > p { margin-bottom: 1.45rem; }
@media (max-width: 720px) {
  .shell { width: calc(100% - 24px); }
  .header-content { flex-wrap: wrap; gap: 4px 14px; }
  nav { gap: 9px; flex-wrap: wrap; }
  .intro { padding: 32px 0 22px; }
  .intro p { font-size: 0.95rem; }
  .import, .export { align-items: flex-start; flex-direction: column; }
  .workgrid { grid-template-columns: minmax(0, 1fr); }
  .queue { border-right: none; border-bottom: 1px solid var(--border); }
  .file-list { max-height: 272px; }
  .edit { padding-inline: 11px; }
  .volume { margin-left: 0; }
}
@media (max-width: 380px) {
  .shell { width: calc(100% - 16px); }
  .import { margin: 7px; }
  .scope-labels { font-size: 0.66rem; }
}
