:root {
  color-scheme: light;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  --ink: #25212a;
  --muted: #625a66;
  --border: #ded8e0;
  --brand: #a7003a;
  --pink: #f9edf2;
  --paper: #fff;
  background: #f7f5f7;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
button, input:not([type=checkbox]), select { border: 1px solid var(--border); border-radius: 7px; background: white; }
button { padding: 7px 11px; font-size: .875rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
button:not(:disabled):hover { border-color: var(--brand); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
input:not([type=checkbox]), select { padding: 7px 9px; min-width: 0; font-size: .9rem; }
input[type=checkbox] { accent-color: var(--brand); width: 17px; height: 17px; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, p { margin-top: 0; }
h2 { line-height: 1.18; font-size: 1.25rem; }
.top { min-height: 70px; background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px clamp(16px, 4vw, 60px); }
.brand, .top-actions, .actions { display: flex; align-items: center; gap: 9px; }
.brand { gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--brand); color: white; font-weight: 800; letter-spacing: -.06em; }
.brand strong, .brand div span { display: block; line-height: 1.15; }
.brand div span, .privacy { color: var(--muted); font-size: .875rem; }
.privacy span { color: var(--brand); }
main { flex: 1; width: min(1540px, 100%); margin: 0 auto; padding: 24px clamp(14px, 4vw, 56px); }
.welcome { min-height: min(570px, 70vh); display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(22px, 6vw, 95px); margin: 0 auto; max-width: 1010px; }
.eyebrow { margin: 0 0 6px; font-size: .78rem; color: var(--brand); font-weight: 800; letter-spacing: .1em; }
.welcome h1 { margin: 0 0 22px; font-size: clamp(2.8rem, 7vw, 5.3rem); line-height: .98; letter-spacing: -.07em; }
.welcome-description { max-width: 34ch; color: var(--muted); font-size: 1.09rem; }
.capture-guide { max-width: 46ch; border: 1px solid var(--border); border-radius: 9px; background: var(--paper); }
.capture-guide summary { padding: 9px 12px; color: var(--brand); font-weight: 650; cursor: pointer; }
.capture-guide[open] summary { border-bottom: 1px solid var(--border); }
.capture-guide ol { margin: 12px 14px 12px 34px; padding: 0; }
.capture-guide li + li { margin-top: 8px; }
.capture-guide p { margin: 0 14px 14px; color: var(--muted); font-size: .9rem; }
.drop { border: 1px dashed #b99dab; padding: 34px 24px; border-radius: 16px; background: white; min-height: 310px; text-align: center; display: grid; place-items: center; align-content: center; }
.drop.over { background: var(--pink); border-color: var(--brand); }
.archive-mark { color: var(--brand); background: var(--pink); padding: 8px 11px; border-radius: 8px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 17px; }
.drop h2 { margin-bottom: 8px; }
.drop p { color: var(--muted); max-width: 32ch; margin-bottom: 19px; }
.drop small { margin-top: 9px; color: var(--muted); }
.primary { color: white; background: var(--brand); border-color: var(--brand); padding-inline: 14px; }
.primary:not(:disabled):hover { background: #80002c; }
.message { border: 1px solid var(--border); background: white; padding: 10px 14px; border-radius: 8px; overflow-wrap: anywhere; }
.message.error { border-color: #ba5474; color: #86002e; }
.workspace-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin: 4px 0 17px; }
.workspace-head h1 { font-size: clamp(1.3rem, 3vw, 2.15rem); line-height: 1.16; letter-spacing: -.045em; margin: 0; overflow-wrap: anywhere; }
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 10px; margin-bottom: 13px; }
.tabs button { border: 0; border-radius: 6px 6px 0 0; border-bottom: 3px solid transparent; background: transparent; padding-inline: 14px; }
.tabs button[aria-pressed=true] { border-bottom-color: var(--brand); background: var(--pink); color: var(--brand); }
.review-grid { display: grid; grid-template-columns: minmax(290px, 31%) minmax(0, 1fr); gap: 12px; }
.queue, .preview, .card { min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); }
.queue, .preview { display: flex; flex-direction: column; height: clamp(570px, 70vh, 960px); }
.queue-head, .queue-foot, .preview-bar, .pdf-toolbar, .range { padding: 10px 13px; }
.queue-head { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center; border-bottom: 1px solid var(--border); }
.queue-head input, .queue-head select { grid-column: 1 / -1; width: 100%; }
.queue-foot { border-top: 1px solid var(--border); }
.queue-foot button { width: 100%; }
.metric, .clip-meta, #position { font-size: .875rem; color: var(--muted); }
.clip-list { flex: 1; overflow: auto; }
.region-label { background: #f5f1f5; font-size: .83rem; color: #524a56; font-weight: 700; padding: 7px 11px; }
.clip { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px; padding: 5px 6px 5px 8px; border-bottom: 1px solid #efebf0; }
.clip.active { background: var(--pink); box-shadow: inset 3px 0 var(--brand); }
.clip .open-clip, .clip .icon { border: 0; background: transparent; }
.open-clip { text-align: left; display: flex; flex-direction: column; min-width: 0; padding-inline: 4px; white-space: normal; overflow-wrap: anywhere; }
.icon { font-size: 1rem; padding-inline: 6px; }
.icon[aria-pressed=true] { color: var(--brand); }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.preview-bar p { margin: 2px 0 0; }
.pdf-toolbar, .range { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .875rem; }
.pdf-toolbar { border-block: 1px solid var(--border); }
.pdf-toolbar label { margin-left: auto; }
.pdf-pane { background: #e9e5ea; flex: 1; overflow: auto; text-align: center; padding: 13px; }
.pdf-pane > p { color: var(--muted); margin: 14px 0; }
#canvas-wrap { width: max-content; min-width: 100%; }
#canvas-wrap canvas { display: block; margin: 0 auto; box-shadow: 0 1px 6px #0002; }
.range input { width: 68px; }
.range { border-top: 1px solid var(--border); }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { padding: 20px; }
.card label, dialog form > label { display: grid; gap: 4px; margin-bottom: 11px; font-size: .9rem; font-weight: 600; }
.wide { grid-column: 1 / -1; }
.attachments, .asset-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.asset-row { margin-bottom: 8px; }
#assets { padding: 0; }
.media-row { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: end; gap: 8px; margin-bottom: 9px; }
.media-row label { margin: 0; }
dialog { width: min(500px, 95vw); border: 1px solid var(--border); background: white; border-radius: 12px; padding: 20px; }
dialog::backdrop { background: #23112466; }
.dialog-foot { margin-top: 16px; justify-content: end; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .82rem; padding: 12px clamp(16px, 4vw, 60px); border-top: 1px solid var(--border); }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 740px) {
  .welcome, .review-grid, .details-grid { grid-template-columns: 1fr; }
  .welcome { padding: 22px 0; }
  .welcome h1 { margin-bottom: 14px; }
  .queue { height: 355px; }
  .preview { height: 600px; }
  .media-row { grid-template-columns: 1fr; }
  .actions { flex-wrap: wrap; }
}
