/* ==========================================================================
   Subtitle Studio · dicekorea.com
   SRT 자막 다국어 번역 & 싱크 편집기
   외부 CDN·폰트 의존성 없음. CSP `default-src 'self'; style-src 'self';
   script-src 'self'` 환경에서 그대로 동작합니다. (인라인 script/style 0개)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFE;
  --ink: #0F172A;
  --ink-2: #3B4A63;
  --muted: #6B7A90;
  --line: #E3E9F4;
  --line-soft: #EEF2F9;
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-soft: #EDF3FF;
  --green: #0E9F6E;
  --green-soft: #E7F8F0;
  --amber: #B45309;
  --amber-soft: #FEF5E7;
  --red: #D92D20;
  --red-soft: #FEECEB;
  --violet: #6D28D9;
  --violet-soft: #F3EEFF;
  --radius-lg: 20px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 38px -28px rgba(15, 23, 42, .45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
          "Malgun Gothic", "Noto Sans KR", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .92em; }

.wrap { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(150deg, #3B82F6, #1D4ED8);
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .8);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.brand__text small { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #EEF2F9; border-radius: 11px;
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--muted); padding: 6px 11px; border-radius: 8px;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.seg button:hover { color: var(--ink-2); }
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.seg--wide { display: flex; flex-wrap: wrap; width: 100%; }
.seg--wide button { flex: 1 1 0; padding: 8px 10px; font-size: 12px; text-align: center; }
.seg--three button { min-width: 0; line-height: 1.3; flex: 1 1 calc(33.333% - 4px); }
.seg--tiny { padding: 2px; border-radius: 9px; }
.seg--tiny button { padding: 5px 8px; font-size: 11.5px; border-radius: 7px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer;
  padding: 9px 15px; border-radius: 10px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
}
.btn:hover { border-color: #C8D5EC; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 8px 18px -12px rgba(37, 99, 235, .95);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: #EEF2F9; color: var(--ink-2); }
.btn--sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn--lg { width: 100%; padding: 12px 18px; font-size: 14.5px; border-radius: 12px; }
.btn--danger { color: var(--red); border-color: #F4D3D0; background: #fff; }
.btn--danger:hover { background: var(--red-soft); border-color: #EFC4C0; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.quick {
  font-family: var(--mono); font-size: 11.5px; padding: 6px 8px; color: var(--ink-2);
}

/* ---------- hero ---------- */

.hero { padding: 42px 0 6px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .13em;
  color: var(--brand); text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--brand);
}
.hero h1 {
  margin-top: 14px;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.24; letter-spacing: -.035em; font-weight: 700;
  max-width: 22em; word-break: keep-all;
}
.hero h1 em {
  font-style: normal; color: var(--brand);
  background: linear-gradient(transparent 62%, #DCE7FF 62%);
  padding: 0 2px;
}
.hero__sub { margin-top: 14px; max-width: 56em; font-size: 15px; color: var(--ink-2); }
.hero__sub strong { color: var(--ink); font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px;
  box-shadow: var(--shadow-sm);
}
.chips li::before { content: "✓"; color: var(--green); font-weight: 700; font-size: 12px; }

/* ---------- layout ---------- */

.studio {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 28px;
}

.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 20px;
}
.card__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.card__num {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12.5px; font-weight: 700; margin-top: 1px;
}
.card__title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.card__hint { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* ---------- fields ---------- */

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field + .field--wide { margin-top: 14px; }

.field > label,
.field .label,
label.inline {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2);
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none; -webkit-appearance: none;
}
input[type="text"], select { height: 42px; padding-top: 0; padding-bottom: 0; }
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: #CFD9EA; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}
input::placeholder, textarea::placeholder { color: #A6B2C4; }

.fi-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.fi-note strong { color: var(--ink-2); font-weight: 650; }

.is-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;
}

/* ---------- drop zone ---------- */

.drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 20px 16px;
  text-align: center;
  border: 1.5px dashed #C5D5EF; border-radius: 14px;
  background: linear-gradient(180deg, #F8FBFF, #F3F7FE);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: #EDF3FF; }
.drop.is-over { box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.drop__input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}
.drop__icon { color: var(--brand); display: grid; place-items: center; }
.drop__title { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.drop__hint { font-size: 11.5px; color: var(--muted); }

.load-meta {
  margin: 8px 0 14px; font-size: 12px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.load-meta strong { color: var(--brand-dark); }

/* ---------- examples ---------- */

.examples { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.example {
  display: flex; align-items: center; gap: 9px; text-align: left;
  font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  padding: 8px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.example:hover { border-color: #C7D6F2; background: #fff; color: var(--ink); }
.example__num {
  flex: none; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 700; color: var(--brand);
}
.example__text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example__meta {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px;
}

#pasteArea {
  font-family: var(--mono); font-size: 12px; min-height: 112px; line-height: 1.5;
  white-space: pre; overflow: auto;
}
#btnParse { align-self: flex-start; }

/* ---------- exports ---------- */

.exports { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.export {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: var(--surface-2);
}
.export__main { display: flex; flex-direction: column; min-width: 0; }
.export__main strong { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--brand-dark); }
.export__hint { font-size: 11px; color: var(--muted); }
.export__actions { display: flex; gap: 5px; flex: none; }

/* ---------- pills ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--amber { background: var(--amber-soft); color: var(--amber); }
.pill--red { background: var(--red-soft); color: var(--red); }
.pill--blue { background: var(--brand-soft); color: var(--brand); }
.pill--violet { background: var(--violet-soft); color: var(--violet); }
.pill--grey { background: #EEF2F9; color: var(--muted); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--engine { font-size: 11.5px; padding: 5px 11px; }
.only-mobile { display: none; }
.pill--engine.is-ai { background: var(--green-soft); color: var(--green); }
.pill--engine.is-fallback { background: var(--brand-soft); color: var(--brand); }
.pill--engine.is-busy { background: var(--amber-soft); color: var(--amber); }

/* ---------- sections ---------- */

.section { margin-top: 34px; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 14px;
}
.section__head > div:first-child { flex: 1 1 380px; min-width: 0; }
.section__title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.section__desc { margin-top: 3px; font-size: 13px; color: var(--muted); }

/* ---------- editor ---------- */

.editor { min-width: 0; }
.editor__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.editor__body { display: flex; flex-direction: column; gap: 12px; }

.editor__foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 2px 2px 0;
}

/* tools card */

.tools { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tool-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 4px 0;
}
.tool-row:first-child { padding-top: 0; }
.tool-row__label {
  flex: none; width: 62px; padding-top: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  color: var(--muted); text-transform: uppercase;
}
.tool-row__main {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-2);
}
.tool-row__main > label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.tool-row__main input[type="number"] {
  width: 76px; height: 34px; padding: 0 8px; font-size: 13px;
  font-variant-numeric: tabular-nums; text-align: center;
}
.tool-row__main #maxChars { width: 64px; }

.range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range__dash { color: var(--muted); }
.offset {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-left: 10px; border-left: 1px solid var(--line-soft);
}
.offset input[type="number"] { width: 82px; }

/* timeline */

.timeline { border-top: 1px dashed var(--line); padding-top: 10px; }
.timeline__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 6px;
}
.timeline__meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0; color: var(--ink-2); }
.timeline__track { width: 100%; height: 42px; }
.timeline__track svg { display: block; width: 100%; height: 42px; }
.tl__bar {
  fill: #C7D9F9; stroke: #A9C4F4; stroke-width: .4;
  cursor: pointer; transition: fill .12s ease;
}
.tl__bar:hover { fill: var(--brand); }
.tl__bar.is-active { fill: var(--brand); }
.tl__bar.is-warn { fill: #F5D3A6; stroke: #E7B778; }
.tl__bar.is-warn.is-active, .tl__bar.is-warn:hover { fill: var(--amber); }
.tl__base { fill: #EDF2FA; }

/* cue list */

.cues { display: flex; flex-direction: column; gap: 10px; }

.cue {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cue:focus-within { border-color: #BFD3FF; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.cue.is-active { border-color: #BFD3FF; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.cue.is-warn { border-color: #F0D6B4; }

.cue__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px; background: linear-gradient(180deg, #FBFCFE, #FFFFFF);
  border-bottom: 1px solid var(--line-soft);
}
.cue__num {
  flex: none; display: grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 5px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cue.is-warn .cue__num { background: var(--amber); }
.cue__times { display: flex; align-items: center; gap: 4px; }
.cue__time {
  width: 108px; height: 30px; padding: 0 6px;
  font-family: var(--mono); font-size: 11.5px; text-align: center;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cue__arrow { color: var(--muted); font-size: 11px; }
.cue__dur {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
  background: #F4F7FC; border-radius: 6px; padding: 2px 7px;
}
.cue__badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  padding: 2px 7px; border-radius: 999px;
  background: #EEF2F9; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.badge--ok { background: var(--green-soft); color: var(--green); }
.badge--warn { background: var(--amber-soft); color: var(--amber); }
.badge--lang { background: var(--violet-soft); color: var(--violet); }
.cue__spacer { flex: 1 1 auto; }

.cue__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 11px 14px 13px; }
.cue__pane { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cue__k {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  color: var(--muted); text-transform: uppercase;
}
.cue__lang { font-style: normal; font-weight: 700; color: var(--violet); text-transform: none; letter-spacing: 0; }
.cue__text {
  width: 100%; min-height: 44px; padding: 7px 9px; resize: vertical;
  font-size: 13.5px; line-height: 1.5; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  white-space: pre-wrap;
}
.cue__pane--tr .cue__text { background: #FBF8FF; border-color: #EDE6FA; }
.cue__text:focus { background: #fff; }

.cue__warn {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 14px 11px; padding: 6px 9px;
  font-size: 11.5px; color: var(--amber);
  background: var(--amber-soft); border-radius: 8px;
}
.cue__warn span + span::before { content: "·"; margin-right: 6px; color: #D8B47C; }

/* ---------- history ---------- */

.saves { margin-top: 4px; }
.history { display: flex; flex-direction: column; gap: 10px; }
.history__item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.history__main { min-width: 0; flex: 1 1 auto; }
.history__title {
  font-size: 13.5px; font-weight: 650; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 4px; font-size: 11.5px; color: var(--muted);
}
.history__meta .pill { font-size: 10.5px; padding: 2px 8px; }
.history__actions { display: flex; gap: 6px; flex: none; }

/* ---------- empty / footer / toast ---------- */

.empty {
  padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface-2);
}
.empty strong { display: block; color: var(--ink-2); font-size: 13.5px; margin-bottom: 4px; }

.foot {
  margin: 38px 0 0; padding: 22px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; line-height: 1.7;
}
.foot p + p { margin-top: 6px; }
.foot strong { color: var(--ink-2); font-weight: 650; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: #0F172A; color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; z-index: 80;
  box-shadow: 0 18px 34px -18px rgba(15, 23, 42, .8);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: min(92vw, 520px); text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.clip-helper { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sidebar > .card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .cue__body { grid-template-columns: minmax(0, 1fr); }
  .tool-row { flex-direction: column; gap: 6px; }
  .tool-row__label { width: auto; padding-top: 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .card { padding: 17px; border-radius: 16px; }
  .topbar__inner { height: 58px; }
  .brand__text small { display: none; }
  .pill--engine #modePillText { display: none; }
  .pill--engine .only-mobile { display: inline; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 24px; }
  .eyebrow { font-size: 10.5px; letter-spacing: .08em; }
  .hero__sub { font-size: 13.5px; }
  .section { margin-top: 26px; }
  .btn { padding: 8px 12px; font-size: 13px; }
  .brand__mark { width: 30px; height: 30px; border-radius: 10px; }
  .brand__text strong { font-size: 14px; }
  .seg button { padding: 6px 9px; }
  .seg--wide button { flex: 1 1 100%; }
  .seg--three button { flex: 1 1 100%; }
  .tools { padding: 12px; }
  .cue__head { padding: 8px 11px; gap: 6px; }
  .cue__body { padding: 10px 11px 12px; }
  .cue__warn { margin: 0 11px 10px; }
  .cue__time { width: 96px; font-size: 11px; }
  .tool-row__main input[type="number"] { width: 64px; }
  .offset { padding-left: 0; border-left: 0; }
  .history__item { align-items: flex-start; flex-direction: column; gap: 10px; }
  .history__actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 420px) {
  .topbar__actions .btn--ghost { display: none; }
  .cue__badges { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .toast, .btn, .chips, .examples, .drop, .tools, .editor__foot, .sidebar { display: none !important; }
  body { background: #fff; }
  .card, .cue { box-shadow: none; break-inside: avoid; }
}
