/* Based on subtitles/public/styles.css (PR #511): white ground, one signal blue. */
:root {
  --ink: #0f1424;
  --muted: #5d6478;
  --line: #e3e6ee;
  --bg: #ffffff;
  --card: #ffffff;
  --soft: #f4f6fb;
  --signal: #144fff;
  --signal-ink: #ffffff;
  --error: #c0262f;
  --ok: #157347;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef1f8; --muted: #a1a8bb; --line: #2a3043; --bg: #0f1320; --card: #161b2b; --soft: #1c2234; --signal: #4d7aff;
  }
}
:root[data-theme="dark"] { --ink: #eef1f8; --muted: #a1a8bb; --line: #2a3043; --bg: #0f1320; --card: #161b2b; --soft: #1c2234; --signal: #4d7aff; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
footer.small { padding-top: 24px; padding-bottom: 32px; }
footer a { color: var(--muted); }
.error { color: var(--error); }
h1 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 6px; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 4px; }

.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--signal); position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; left: 5px; right: 5px; height: 3px; border-radius: 2px; background: #fff; }
.mark::before { top: 6px; }
.mark::after { top: 13px; right: 9px; opacity: .7; }
.pages { display: flex; gap: 4px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
.pages a, .pages span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); text-decoration: none; }
.pages a:hover { color: var(--signal); border-color: var(--signal); }
.pages span { color: var(--signal); border-color: var(--signal); }
@media (max-width: 760px) { .pages { display: none; } }

.hero { padding: 40px 0 20px; max-width: 760px; }
.hero p { color: var(--muted); margin: 0; font-size: 17px; }
.hero .notice { margin-top: 12px; font-size: 15px; color: var(--error); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--soft); transition: border-color .15s; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--signal); outline: none; }
.drop.disabled { cursor: default; opacity: .6; }
.drop.disabled:hover { border-color: var(--line); }
.chosen { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.chosen li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: var(--soft); border-radius: 8px; font-size: 14px; }
.chosen li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
select, input[type="password"] { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.wrap-row { flex-wrap: wrap; align-items: flex-end; }
.spacer { flex: 1; }
button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; display: inline-block; }
button.primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
button.ghost { background: transparent; }
button.small { padding: 4px 10px; font-size: 13px; font-weight: 500; }
button.danger { color: var(--error); }
button:disabled { opacity: .5; cursor: not-allowed; }
.bar { position: relative; height: 10px; background: var(--soft); border-radius: 999px; overflow: visible; margin-top: 14px; margin-bottom: 28px; }
.bar > div { height: 100%; width: 0; background: var(--signal); border-radius: 999px; transition: width .3s; }
.bar > span { position: absolute; left: 0; top: 14px; font-size: 13px; color: var(--muted); }

.jobhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.files { display: flex; flex-direction: column; gap: 12px; }
.filecard { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); align-items: start; }
@media (max-width: 640px) { .filecard { grid-template-columns: 1fr; } }
.thumb { width: 140px; height: 140px; border-radius: 8px; background: var(--soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb.placeholder { color: var(--muted); font-weight: 700; letter-spacing: .06em; font-size: 14px; }
.filebody { min-width: 0; }
.filehead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.filehead strong { word-break: break-word; }
.filehead button { margin-left: auto; }
pre.text { font-family: var(--font); font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; margin: 0; padding: 12px 14px; background: var(--soft); border-radius: 8px; max-height: 420px; overflow: auto; user-select: text; }
.how { padding: 24px 0 8px; max-width: 760px; }
.how h2 { margin-top: 22px; }
.how ol, .how ul { padding-left: 20px; color: var(--muted); margin: 6px 0; }
.how li { margin: 6px 0; }
.how p { color: var(--muted); margin: 6px 0; }
