/* Enter This — video studio styles (no build step)
   Motif: an editing suite. The tabs are a transport bar, a timeline ruler runs under the header,
   and a red "REC" light marks videos being made. The accent is the admin-set brand colour. */
/* Fonts are self-hosted (public/fonts, SIL Open Font License): no third-party requests. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f3f4f8;            /* cool paper */
  --card: #ffffff;
  --ink: #1c1f33;           /* deep indigo ink */
  --muted: #5e6582;
  --line: #dee1eb;
  --line-strong: #c9cedd;
  --brand: #0b3d91;         /* overridden by the site setting */
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, white);
  --brand-line: color-mix(in srgb, var(--brand) 35%, white);
  --rec: #e5484d;
  --ok: #1e8a4c; --ok-soft: #e4f4ea;
  --bad: #c4321f; --bad-soft: #fcebe8;
  --busy: #9a6200; --busy-soft: #fff3d6;
  --radius: 16px; --radius-sm: 10px;
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--text); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, white); outline-offset: 2px; border-radius: 8px; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header: logo · transport-bar tabs · account ---------- */
header.top { background: var(--card); position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
/* timeline ruler under the header: a tall tick every 5 small ones */
header.top::after {
  content: ""; display: block; height: 9px;
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 60px) bottom / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) bottom / 100% 5px no-repeat;
  border-bottom: 1px solid var(--line);
}
.logo { font: 700 19px/1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--brand); }

nav.tabs {
  margin-left: auto; display: flex; align-items: center; gap: 2px; padding: 4px;
  background: #eceef5; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(28, 31, 51, .06);
}
nav.tabs:empty { display: none; }
nav.tabs a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap;
  padding: 8px 15px; border-radius: 999px; transition: background-color .15s, color .15s;
}
nav.tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .8); }
nav.tabs a.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .18); }
.nav-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 6px; flex: none; }
.account { display: flex; align-items: center; gap: 14px; margin-left: 4px; }
.account form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: 600 14.5px var(--text); cursor: pointer; text-decoration: none; }
.linkbtn:hover { color: var(--ink); }

/* ---------- Type ---------- */
main { padding: 36px 0 72px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.12; font-weight: 700; margin: 0 0 8px; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 650; margin: 34px 0 12px; }
h3 { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 24px; max-width: 68ch; }
.hint { font-weight: 400; color: var(--muted); font-size: 14px; }
code { background: #eceef5; padding: 1px 6px; border-radius: 6px; font-size: 90%; }
/* section titles inside forms: sentence case, marked by a short clip-coloured bar */
.section-title { font: 650 17px/1.3 var(--display); color: var(--ink); margin: 30px 0 6px; padding-left: 12px; border-left: 4px solid var(--brand); }
.card > .section-title:first-of-type, form.card > .section-title:first-of-type { margin-top: 4px; }

/* ---------- Panels ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty p { max-width: 52ch; margin: 0 auto 18px; }
.empty .btn { margin: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font: 650 15px/1 var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: filter .15s, background-color .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { filter: brightness(.95); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: #f6f7fb; filter: none; }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn.danger, .linklike.danger { color: var(--bad); }
.btn.ghost.danger { border-color: #efc3bd; }
.btn.ghost.danger:hover { background: var(--bad-soft); }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fbfbfd; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
textarea { min-height: 96px; resize: vertical; }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); }
input[type=file]::file-selector-button { font: 600 14px var(--text); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; margin-right: 10px; cursor: pointer; }
input[type=color] { width: 60px; height: 42px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.checks label, label.inline { display: flex; gap: 9px; align-items: center; font-weight: 500; margin: 8px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Messages & status ---------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin: 8px 0 18px; border: 1px solid var(--line); background: var(--card); }
.alert.ok { background: var(--ok-soft); border-color: #bfe3cb; color: #135c31; }
.alert.bad { background: var(--bad-soft); border-color: #f2c7c0; color: #7a1d12; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.badge.busy { background: var(--busy-soft); color: var(--busy); }
/* the REC light: only on things that are being made right now */
.badge.busy::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rec); animation: rec 1.4s ease-in-out infinite; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.done { background: var(--brand-soft); color: var(--brand); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.muted { background: #eceef5; color: var(--muted); }
@keyframes rec { 50% { opacity: .25; } }
.spinner { width: 18px; height: 18px; border: 3px solid #f1e2b8; border-top-color: var(--busy); border-radius: 50%; display: inline-block; animation: spin 1s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.qc-pass { color: var(--ok); font-weight: 650; } .qc-fail { color: var(--bad); font-weight: 650; } .qc-warn { color: var(--busy); font-weight: 650; }
details summary { cursor: pointer; color: var(--muted); margin-top: 8px; font-weight: 500; }
details summary:hover { color: var(--ink); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
/* wide tables scroll inside their panel instead of squeezing the text */
.card:has(> table) { overflow-x: auto; }
.card > table { min-width: 720px; }
.card > table td:first-child { min-width: 180px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tr.row-link:hover td { background: #f8f9fc; }
.row-link td a { font-weight: 650; text-decoration: none; color: var(--ink); }
.row-link td a:hover { color: var(--brand); }

/* ---------- Videos on the review page ---------- */
.videos { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.videos video { width: 100%; background: #0d0f1a; border-radius: 12px; display: block; }
.v9x16 video { max-height: 560px; object-fit: contain; }

/* ---------- Landing ---------- */
.hero { padding: 72px 0 44px; text-align: left; max-width: 780px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -.03em; }
.hero p { font-size: 19px; color: var(--muted); max-width: 60ch; margin: 18px 0 28px; }
.steps, section.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 10px 0 36px; text-align: left; }
section.features { margin: 24px 0 36px; }
.cta-band { text-align: center; padding: 44px 24px; margin: 24px 0 36px; background: var(--brand-soft); border-color: var(--brand-line); }
.custom-block { margin: 24px 0 36px; }
.auth { max-width: 440px; margin: 44px auto; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px; border: 1px solid var(--line); }
footer { color: var(--muted); font-size: 14px; padding: 28px 0; border-top: 1px solid var(--line); }

/* ---------- Admin ---------- */
.admin-tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 4px; margin: 8px 0 24px; background: #eceef5; border: 1px solid var(--line); border-radius: 999px; }
.admin-tabs a { padding: 7px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-radius: 999px; }
.admin-tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .8); }
.admin-tabs a.on { color: var(--ink); background: var(--card); box-shadow: 0 1px 2px rgba(28, 31, 51, .12); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat .n { font: 700 34px/1.1 var(--display); letter-spacing: -.02em; }

/* ---------- Brands ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.brand-card { margin: 0; }
.brand-swatch { height: 116px; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.brand-swatch img { max-height: 80px; max-width: 80%; }
.brand-swatch span { color: #fff; font: 700 21px/1.2 var(--display); text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.brand-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.brand-pick label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px; cursor: pointer; font-weight: 650; margin: 0; background: #fff; }
.brand-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.brand-pick .dot { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.brand-pick small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Clips (video sources) ---------- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card.clip { margin: 0; padding: 0; overflow: hidden; }
.clip-thumb { position: relative; aspect-ratio: 16 / 9; background: #e6e8f0; }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-len { position: absolute; right: 8px; bottom: 8px; background: rgba(13, 15, 26, .78); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.clip-body { padding: 12px 14px 14px; }
.clip-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.clip-said { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.clip-tags { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.clip-tags span { font-size: 12px; background: #eceef5; border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.clip-edit { margin-top: 10px; font-size: 13.5px; }
.clip-edit form { display: grid; gap: 6px; margin-top: 6px; }
.lib-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: 380px; overflow: auto; margin-top: 10px; padding: 2px; }
.lib-pick label { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; font-weight: 500; font-size: 13px; background: #fff; }
.lib-pick label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.lib-pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #e6e8f0; }
.lib-pick span { display: block; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-pick input { position: absolute; opacity: 0; }
.checks label.muted { opacity: .5; }

/* chips: filters and "kinds of clips" */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 18px; }
.filters input[type=search] { width: auto; min-width: 220px; border-radius: 999px; }
.chip, .lib-cats label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; background: #fff; margin: 0; cursor: pointer; }
.chip span { color: var(--muted); }
.chip:hover, .lib-cats label:hover { border-color: var(--brand-line); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.on span { color: inherit; opacity: .8; }
.lib-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.lib-cats label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.lib-cats input { width: 15px; height: 15px; }

/* ---------- Wizard: the steps read like a timeline ---------- */
.wz-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 0; padding: 0; margin: 4px 0 20px; position: relative; }
.wz-progress li { position: relative; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 6px 18px 6px 0; cursor: pointer; }
.wz-progress li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid var(--line-strong); font-weight: 700; font-size: 12.5px; color: var(--muted); flex: none; }
.wz-progress li:not(:last-child)::after { content: ""; width: 22px; height: 2px; background: var(--line-strong); margin-left: 8px; border-radius: 2px; }
.wz-progress li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.wz-progress li.done::after { background: var(--ok); }
.wz-progress li.on { color: var(--ink); font-weight: 650; }
.wz-progress li.on span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.wz-step h2 { margin-top: 0; }
.wz-terms { margin: 0 0 16px 20px; padding: 0; line-height: 1.6; max-width: 70ch; }
.wz-terms li { margin-bottom: 6px; }
.wz-nav { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 8px 0 10px; }
.wz-cards label { position: relative; margin: 0; border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px 16px; cursor: pointer; font-weight: 400; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.wz-cards label strong { font: 650 17px/1.25 var(--display); }
.wz-cards label:hover { border-color: var(--brand-line); }
.wz-cards label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.wz-cards input { position: absolute; opacity: 0; }
.wz-cards span { font-size: 13.5px; color: var(--muted); }
.wz-cards label.muted { opacity: .6; cursor: not-allowed; }
.wz-cards label.muted:hover { border-color: var(--line-strong); }
/* "What's included" for Member Basic */
.plan-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.plan-card > div { padding: 22px 24px; }
.plan-card > div + div { border-left: 1px solid var(--line); background: var(--brand-soft); }
.plan-card h3 { margin-bottom: 8px; }
.plan-card ul { margin: 0; padding-left: 18px; line-height: 1.7; }
@media (max-width: 640px) { .plan-card { grid-template-columns: 1fr; } .plan-card > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.wz-summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
.wz-summary dt { font-weight: 650; color: var(--muted); }
.wz-summary dd { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  header.top .wrap { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; padding-bottom: 10px; }
  .account { margin-left: auto; }
  nav.tabs { order: 3; margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  nav.tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main { padding-top: 24px; }
  .card { padding: 20px; }
  .hero { padding-top: 44px; }
  .wz-progress li { padding-right: 10px; }
  .wz-progress li:not(:last-child)::after { width: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* v0.18 AI pictures: option block + pill radio group */
.wz-pics { margin: 14px 0 4px; padding: 12px 14px; border: 1px dashed var(--brand-line); border-radius: var(--radius-sm); background: var(--brand-soft); }
.wz-pics .inline { margin: 0 0 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; }
.seg label { margin: 0; display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* v0.21 storyboard */
.storyboard .sb-idea { font: 600 20px/1.35 var(--display); margin: 4px 0 6px; }
.sb-beats { list-style: none; counter-reset: beat; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.sb-beat { counter-increment: beat; position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 12px 46px; background: #fff; }
.sb-beat::before { content: counter(beat); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 600 13px/24px var(--text); text-align: center; }
.sb-head { display: flex; gap: 8px; align-items: center; }
.sb-see { margin: 6px 0 8px; color: var(--ink); }
.sb-label { font-size: 13px; margin: 6px 0 2px; }
.sb-beat textarea { min-height: 54px; }

/* v0.22 video editor */
.ed-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.ed { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .ed { grid-template-columns: 1fr; } }
.ed-stage { position: sticky; top: 12px; }
.ed-player { position: relative; background: #0b0d18; border-radius: var(--radius); overflow: hidden; display: flex; justify-content: center; }
.ed-player video { display: block; max-width: 100%; max-height: 62vh; }
.ed-novideo { color: #cfd3e6; padding: 60px 24px; text-align: center; }
.ed-vignette { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.ed-cap { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; color: #fff; font-weight: 800; text-align: center;
  text-shadow: 0 0 3px #000, 0 2px 4px #000; white-space: nowrap; }
.ed-cap.pos-top { top: 14%; } .ed-cap.pos-center { top: 46%; } .ed-cap.pos-lower { bottom: 30%; } .ed-cap.pos-bottom { bottom: 16%; }
.ed-timeline { display: flex; gap: 4px; align-items: stretch; margin: 12px 0 8px; padding: 6px; border-radius: var(--radius-sm);
  background: #12152a; overflow-x: auto; flex-wrap: nowrap; position: relative; min-height: 66px; }
.ed-clip { position: relative; flex: 1 1 0; min-width: 44px; height: 54px; border-radius: 7px; background: #2a2f4d center / cover no-repeat;
  cursor: grab; border: 2px solid transparent; color: #fff; font: 700 12px/1 var(--text); }
.ed-clip.gfx { background-color: color-mix(in srgb, var(--brand) 70%, #222); }
.ed-clip.bite::after { content: "🗣"; position: absolute; right: 4px; bottom: 3px; font-size: 12px; }
.ed-clip span { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); border-radius: 4px; padding: 2px 5px; }
.ed-clip i { position: absolute; left: -9px; top: 18px; font-style: normal; color: #ffd400; font-size: 14px; }
.ed-clip.on { border-color: #ffd400; } .ed-clip.over { border-color: #fff; border-style: dashed; } .ed-clip.drag { opacity: .4; }
.ed-tl-total { position: absolute; right: 8px; bottom: -18px; font-size: 12px; color: var(--muted); }
.ed-tl-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.ed-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.ed-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--bg); border-radius: 999px; margin-bottom: 10px; }
.ed-tabs button { border: 0; background: none; padding: 7px 12px; border-radius: 999px; font: 600 13px var(--text); color: var(--muted); cursor: pointer; }
.ed-tabs button.on { background: var(--brand); color: var(--brand-ink); }
.ed-pane h3 { margin: 14px 0 4px; font-size: 15px; }
.ed-pane h3:first-child { margin-top: 4px; }
.ed-src { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.ed-slider { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; margin: 6px 0; }
.ed-slider output { font-size: 13px; color: var(--muted); min-width: 48px; text-align: right; }
.ed-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 6px 0 12px; }
.ed-looks button { border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; padding: 6px; font: 600 12px var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ed-looks button.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-line); }
.ed-looks .sw { width: 100%; height: 26px; border-radius: 6px; background: linear-gradient(120deg, #f4b56a, #5b8fd8 60%, #2c3e50); }
.sw-warm { filter: sepia(.3) saturate(1.2); } .sw-cool { filter: hue-rotate(-14deg) saturate(.9); } .sw-cinematic { filter: contrast(1.1) saturate(.85) sepia(.1); }
.sw-vintage { filter: sepia(.6) saturate(.8); } .sw-bw { filter: grayscale(1) contrast(1.15); } .sw-punchy { filter: contrast(1.25) saturate(1.4); }
.sw-soft { filter: contrast(.85) brightness(1.08); } .sw-faded { filter: contrast(.8) brightness(1.08) saturate(.8); }
.g2x { grid-template-columns: 1fr 120px; }
.ed-save { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* v0.23 storyboard footage + timings */
.sb-secs { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 auto; font-weight: 500; font-size: 13px; }
.sb-secs input { width: 70px; padding: 4px 6px; }
.sb-head { flex-wrap: wrap; }
.sb-clips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.sb-clip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px 3px 3px; }
.sb-clip img { width: 44px; height: 28px; object-fit: cover; border-radius: 5px; }
.checks.shapes label { display: flex; gap: 6px; align-items: baseline; }
details.more summary { cursor: pointer; margin: 8px 0; font-weight: 600; }

/* v0.26: delivery advice and the kind-of-video cards */
.delivery { margin: 8px 0 0; font-size: .92rem; }
.delivery ul { list-style: none; margin: 4px 0 0; padding: 0; }
.delivery li { padding: 1px 0; font-weight: 400; }
.delivery li.qc-pass { color: inherit; }
.delivery li.qc-warn { color: var(--busy); }
.path-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.response-pick label[hidden] { display: none; }

/* v0.27: what we learned from the brand's website */
.site-profile { background: #fafafa; }
.site-offer { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.site-offer label.inline { margin: 0; white-space: nowrap; }
.site-offer input[type=text] { flex: 1; margin: 0; }
.site-logo { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.site-logo img { max-height: 64px; max-width: 260px; padding: 8px; border-radius: 8px; }

/* v0.27: one confirmation covers the whole form */
.confirm-all { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 16px; background: #fafafa; }
.confirm-all ul { margin: 6px 0 0 26px; padding-left: 16px; }
.confirm-all li { margin: 2px 0; color: var(--muted, #555); }

/* v0.27: use more of large screens (the page column was capped at 1080px, so text looked squeezed) */
.wrap { max-width: min(1360px, 94vw); padding: 0 clamp(20px, 3vw, 48px); }
.hero { max-width: 1040px; }
.hero h1 { letter-spacing: -.02em; }
.hero p { max-width: 72ch; }
.sub { max-width: 84ch; }
form.card, .card form { max-width: 1100px; }
@media (min-width: 1600px) {
  body { font-size: 17px; }
  .hero p { font-size: 20px; }
}

/* v0.28: one-button remixes */
.remix-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.remix-buttons form { margin: 0; }
.remix-buttons .btn { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; }
.remix-buttons .btn span { font-weight: 400; font-size: 13px; opacity: .75; }

/* admin pipeline (test view) */
.trail-step { border-top: 1px solid #e4e4e0; padding: .6rem 0; }
.trail-step pre, .card pre { white-space: pre-wrap; word-break: break-word; font-size: .78rem; max-height: 420px; overflow: auto; background: #f5f5f2; padding: .6rem; border-radius: 6px; }
.trail-kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; font-size: .9rem; }
.trail-kv dt { color: #777; text-transform: capitalize; }
.trail-kv dd { margin: 0; word-break: break-word; }
.pipe-table td { font-size: .85rem; vertical-align: top; }

/* app desktop at enterthis.com (v0.38) */
.desk-hero { margin: 8px 0 26px; }
.desk-hero h1 { margin-bottom: 6px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); margin-left: 6px; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.app-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid #e4e4e0; border-radius: 14px;
  background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.app-tile:hover, a.app-tile:focus-visible { border-color: var(--brand); box-shadow: 0 6px 22px rgba(0,0,0,.07); transform: translateY(-2px); }
.app-tile.soon { opacity: .6; cursor: default; }
.app-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-name { font-weight: 700; font-size: 1.15rem; }
.app-tag { color: #666; font-size: .93rem; flex: 1; }
.app-state { font-size: .85rem; font-weight: 600; color: var(--brand); }
.app-tile.soon .app-state { color: #888; }

/* v0.39: a desktop wallpaper behind every page, and a full desktop (glass tiles, taskbar, clock) at enterthis.com */
body {
  background:
    radial-gradient(1100px 700px at 12% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(900px 650px at 100% 10%, rgba(124, 92, 255, .16), transparent 70%),
    radial-gradient(1000px 800px at 60% 110%, rgba(0, 170, 210, .14), transparent 70%),
    linear-gradient(160deg, #eef1fb 0%, #f4f2fb 50%, #eef6f8 100%);
  background-attachment: fixed;
}
header.top { background: color-mix(in srgb, var(--card) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.card { box-shadow: 0 1px 2px rgba(20, 24, 60, .05), 0 8px 28px rgba(20, 24, 60, .06); }

body.desk {
  color: #fff; min-height: 100vh;
  background:
    radial-gradient(900px 600px at 18% 22%, color-mix(in srgb, var(--brand) 85%, #4f7cff), transparent 65%),
    radial-gradient(800px 640px at 82% 30%, #7b4dff, transparent 62%),
    radial-gradient(1000px 700px at 55% 100%, #00a6c8, transparent 60%),
    linear-gradient(135deg, #0c1a4a 0%, #1b1550 45%, #08203a 100%);
  background-attachment: fixed;
}
body.desk header.top { background: rgba(12, 18, 50, .35); }
body.desk header.top::after { display: none; }
body.desk header.top a, body.desk header.top .linkbtn, body.desk .logo, body.desk .logo span { color: #fff; }
body.desk nav.tabs { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); box-shadow: none; }
body.desk nav.tabs a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
body.desk nav.tabs a.on { background: rgba(255, 255, 255, .24); color: #fff; }
body.desk main { padding-bottom: 120px; }
body.desk footer { display: none; }
body.desk .desk-hero h1, body.desk .desk-hero .sub { color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
body.desk .desk-hero .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .6); background: transparent; }
body.desk .app-tile {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
body.desk a.app-tile:hover, body.desk a.app-tile:focus-visible { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .45); }
body.desk .app-icon svg { stroke: #fff; }
body.desk .app-name { color: #fff; }
body.desk .app-tag { color: rgba(255, 255, 255, .78); }
body.desk .app-state { color: #fff; }
body.desk .app-tile.soon { opacity: .55; }
body.desk .app-tile.soon .app-state { color: rgba(255, 255, 255, .7); }

.taskbar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: rgba(20, 24, 56, .55); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px;
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
}
.taskbar a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px; transition: background .15s; }
.taskbar a:hover, .taskbar a:focus-visible { background: rgba(255, 255, 255, .16); }
.taskbar svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task-start svg { fill: rgba(255, 255, 255, .9); stroke: none; }
.task-clock { display: flex; flex-direction: column; align-items: flex-end; padding: 0 10px 0 14px; margin-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, .18); font-size: 12.5px; line-height: 1.3; color: #fff; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* v0.39: Tech Tools */
.tech-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.tech-tabs a { padding: 7px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14.5px; }
.tech-tabs a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tech-form input, .tech-form select, .tech-form textarea { width: 100%; }
.tech-form textarea { font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tech-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tech-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; }
.tech-facts dt { color: var(--muted); }
.tech-facts dd { margin: 0; word-break: break-word; }
.tech-scroll { overflow-x: auto; margin-bottom: 14px; }
.tech-scroll td, .tech-scroll th { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: top; }
.tech-break { word-break: break-all; }
.tech-flag td { background: var(--bad-soft); }
.tech-pre { white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto; background: #f6f7fb; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* v0.39.1: Tech Tools shows it's working: the button greys out, a wheel turns and a bar runs across */
.tech-go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn.is-busy, .btn:disabled { background: #9aa0b4; border-color: #9aa0b4; color: #fff; cursor: progress; box-shadow: none; }
.tech-busy { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; }
.tech-busy[hidden], .tech-bar[hidden] { display: none; }
.tech-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand);
  animation: tech-spin .8s linear infinite; flex: none; }
.tech-bar { position: relative; height: 4px; margin-top: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tech-bar span { position: absolute; top: 0; left: -40%; width: 40%; height: 100%; border-radius: 999px; background: var(--brand);
  animation: tech-bar 1.3s ease-in-out infinite; }
@keyframes tech-spin { to { transform: rotate(360deg); } }
@keyframes tech-bar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .tech-spin { animation-duration: 2.4s; } .tech-bar span { animation-duration: 3s; } }

/* v0.39.2: every page uses the desktop's blue wallpaper. Text on the wallpaper is white; cards stay white with dark text. */
body {
  color: #fff;
  background:
    radial-gradient(900px 600px at 18% 22%, color-mix(in srgb, var(--brand) 85%, #4f7cff), transparent 65%),
    radial-gradient(800px 640px at 82% 30%, #3d4fd6, transparent 62%),
    radial-gradient(1000px 700px at 55% 100%, #0a6fb8, transparent 60%),
    linear-gradient(135deg, #0a1a4a 0%, #0e1f5c 45%, #08203a 100%);
  background-attachment: fixed;
}
body.desk { background:
    radial-gradient(900px 600px at 18% 22%, color-mix(in srgb, var(--brand) 85%, #4f7cff), transparent 65%),
    radial-gradient(800px 640px at 82% 30%, #3d4fd6, transparent 62%),
    radial-gradient(1000px 700px at 55% 100%, #0a6fb8, transparent 60%),
    linear-gradient(135deg, #0a1a4a 0%, #0e1f5c 45%, #08203a 100%);
  background-attachment: fixed; }
header.top { background: rgba(10, 18, 56, .4); }
header.top::after { display: none; }
header.top a, header.top .linkbtn, .logo, .logo span { color: #fff; }
nav.tabs { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); box-shadow: none; }
nav.tabs a { color: rgba(255, 255, 255, .82); }
nav.tabs a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
nav.tabs a.on { background: rgba(255, 255, 255, .24); color: #fff; }
main h1, main h2, main h3, main .section-title { color: #fff; }
main .sub, main .hint, main .hero p { color: rgba(255, 255, 255, .8); }
main a { color: #b9cdff; }
main a.btn, header.top a.btn { color: var(--brand-ink); }
main .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .6); background: transparent; }
footer { color: rgba(255, 255, 255, .7); border-top-color: rgba(255, 255, 255, .15); }
/* inside cards, panels and tables: dark text on white, as before */
.card, .alert, table, .tech-pre, .admin-tabs, .tech-tabs a:not(.on) { color: var(--ink); }
.card h1, .card h2, .card h3, .card h4, .card .section-title { color: var(--ink); }
.card .sub, .card .hint { color: var(--muted); }
.card a:not(.btn) { color: var(--brand); }
.card .btn.ghost { color: var(--brand); border-color: var(--brand); }
.tech-tabs a:not(.on) { background: rgba(255, 255, 255, .92); }
.tech-tabs a.on { background: var(--brand); border-color: rgba(255, 255, 255, .5); color: #fff; }

/* v0.40: PDF Editor */
.pdf-start { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; }
.pdf-drop { flex: 1 1 420px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 26px;
  border: 2px dashed var(--line-strong); border-radius: var(--radius); text-align: center; transition: border-color .15s, background .15s; }
.pdf-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.pdf-drop.busy { opacity: .7; pointer-events: none; }
.pdf-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pdf-uploading { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.pdf-uploading[hidden] { display: none; }
.pdf-blank { display: flex; align-items: center; }
.pdf-listhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pdf-quota { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0 16px; }
.pdf-quota span { display: block; height: 100%; background: var(--brand); }
.pdf-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.pdf-actions form { display: inline; }

body.pdf-app main { padding: 14px 0 20px; }
body.pdf-app main .wrap { max-width: none; padding: 0 14px; }
body.pdf-app footer { display: none; }
.pdf-editor { background: #f4f5f9; color: var(--ink); border-radius: var(--radius); box-shadow: 0 14px 44px rgba(0, 0, 0, .25); overflow: hidden; }
.pdf-top, .pdf-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.pdf-top a, .pdf-editor a { color: var(--brand); }
.pdf-back { font-size: 20px; text-decoration: none; padding: 2px 8px; }
.pdf-name { font-weight: 600; border: 1px solid transparent; background: transparent; padding: 6px 8px; border-radius: 8px; min-width: 200px; width: 34ch; max-width: 46vw; }
.pdf-name:hover, .pdf-name:focus { border-color: var(--line-strong); background: #fff; }
.pdf-spacer { flex: 1; }
.pdf-sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.pdf-ib { min-width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 17px; color: var(--ink); }
.pdf-ib:disabled { opacity: .4; cursor: default; }
.pdf-zoom { font-size: 13px; padding: 0 8px; }
#pdf-save.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.pdf-tools button, .pdf-tool-file { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 5px 6px;
  border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; font-size: 11.5px; color: var(--muted); }
.pdf-tools button:hover, .pdf-tool-file:hover { background: #f0f2f8; color: var(--ink); }
.pdf-tools button.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.pdf-tools svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pdf-style { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.pdf-style input[type=number] { width: 62px; padding: 5px; }
.pdf-style input[type=range] { width: 90px; }
.pdf-style input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pdf-style select { padding: 5px; }
.pdf-hint { margin: 0; padding: 6px 14px; font-size: 13px; color: var(--muted); background: #fafbfd; border-bottom: 1px solid var(--line); }
.pdf-msg { margin: 0; padding: 8px 14px; font-size: 14px; }
.pdf-msg.ok { background: var(--ok-soft); color: var(--ok); }
.pdf-msg.bad { background: var(--bad-soft); color: var(--bad); }
.pdf-body { display: grid; grid-template-columns: 172px 1fr 230px; height: calc(100vh - 260px); min-height: 460px; }
.pdf-side, .pdf-right { background: #fff; overflow: auto; padding: 10px; }
.pdf-side { border-right: 1px solid var(--line); }
.pdf-right { border-left: 1px solid var(--line); }
.pdf-side-head, .pdf-side-acts { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.pdf-side-acts .btn { padding: 4px 8px; font-size: 12px; }
.pdf-side-acts .btn:disabled { opacity: .45; }
.pdf-thumbs { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pdf-thumb { position: relative; padding: 4px; border-radius: 8px; border: 2px solid transparent; cursor: grab; }
.pdf-thumb canvas { display: block; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.pdf-thumb.picked { border-color: var(--brand); background: var(--brand-soft); }
.pdf-thumb.dragging { opacity: .4; }
.pdf-thumb.drop-before { box-shadow: 0 -4px 0 var(--brand); }
.pdf-thumb.drop-after { box-shadow: 0 4px 0 var(--brand); }
.pdf-thumb-n { display: block; text-align: center; font-size: 12px; color: var(--muted); }
.pdf-pick { position: absolute; top: 6px; left: 6px; z-index: 2; }
.pdf-thumb-tools { position: absolute; top: 6px; right: 6px; display: none; flex-direction: column; gap: 2px; }
.pdf-thumb:hover .pdf-thumb-tools, .pdf-thumb:focus-within .pdf-thumb-tools { display: flex; }
.pdf-thumb-tools button { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.pdf-side-add { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pdf-side-add .btn, .pdf-side-add select { width: 100%; font-size: 12.5px; text-align: center; }
.pdf-view { overflow: auto; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 22px; background: #e7e9f0; }
.pdf-page { position: relative; flex: none; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.pdf-page canvas { display: block; }
.pdf-ink { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.pdf-view[data-tool="select"] .pdf-a { cursor: move; }
.pdf-view:not([data-tool="select"]) .pdf-ink { cursor: crosshair; }
.pdf-view[data-tool="text"] .pdf-ink, .pdf-view[data-tool="replace"] .pdf-ink { cursor: text; }
.pdf-selbox { fill: none; stroke: #2a6df4; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.pdf-handle { fill: #fff; stroke: #2a6df4; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: nwse-resize; }
.pdf-preview { pointer-events: none; }
.pdf-pageno { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }
.pdf-typing { position: absolute; z-index: 5; margin: 0; padding: 0 2px; border: 1px dashed #2a6df4; background: rgba(255, 255, 255, .85); resize: none; overflow: hidden; outline: none; white-space: pre; min-height: 1.2em; }
.pdf-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.pdf-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
.pdf-tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pdf-panel label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pdf-panel input:not([type=checkbox]):not([type=color]), .pdf-panel select, .pdf-panel textarea { width: 100%; }
.pdf-panel .btn { margin-top: 4px; }
.pdf-field span { display: block; font-size: 12.5px; color: var(--ink); word-break: break-word; }
.pdf-field-inline { display: flex !important; gap: 6px; align-items: flex-start; }
.pdf-foot { margin: 0; padding: 6px 14px; background: #fff; border-top: 1px solid var(--line); color: var(--muted) !important; }
body.pdf-readonly .pdf-tools, body.pdf-readonly #pdf-save { opacity: .45; pointer-events: none; }
.pdf-dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(640px, 94vw); color: var(--ink); }
.pdf-dialog::backdrop { background: rgba(8, 14, 40, .55); }
.pdf-dialog canvas { width: 100%; height: auto; border: 1px dashed var(--line-strong); border-radius: 10px; touch-action: none; background: #fff; cursor: crosshair; }
.pdf-sign-modes, .pdf-sign-row, .pdf-sign-type { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.pdf-sign-type input { flex: 1; }
.pdf-busy { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(8, 14, 40, .35); }
.pdf-busy[hidden] { display: none; }
.pdf-busy-box { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; min-width: 280px; padding: 18px 22px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.pdf-busy-box .tech-bar { grid-column: 1 / -1; margin-top: 4px; }
@media (max-width: 900px) {
  .pdf-body { grid-template-columns: 1fr; height: auto; }
  .pdf-side, .pdf-right { max-height: 260px; }
  .pdf-thumbs { flex-direction: row; overflow-x: auto; }
  .pdf-view { min-height: 70vh; }
}
.pdf-editor .hint, .pdf-dialog .hint { color: var(--muted); }
.pdf-editor h3, .pdf-dialog h3 { color: var(--ink); }
.pdf-editor .btn.ghost, .pdf-dialog .btn.ghost { color: var(--brand); border-color: var(--brand); background: #fff; }
.pdf-editor .linkbtn, .pdf-dialog .linkbtn { color: var(--brand); }
