/* Postwright dashboard styles. Tokens first; components after. Contrast checked to WCAG 2.2 AA. */
:root {
  /* Stack Blue palette. Change these to restyle the whole app; contrast checked to WCAG 2.2 AA. */
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --ink: #0F1B33;
  --ink-2: #33415C;
  --muted: #56627A;
  --line: #D6DDE8;
  --field: #6F7B92;
  --accent: #1555D6;
  --accent-strong: #0E3F9E;
  --accent-soft: #E9F0FD;
  --accent-2: #00A3E0;
  --side: #0A1A3A;
  --side-text: #E8EEF8;
  --side-muted: #9FB0CF;
  --side-active: #16305F;
  --side-focus: #7FB2FF;
  --ok: #1E6B45; --ok-soft: #E6F4EC;
  --warn: #7A4E00; --warn-soft: #FDF3DC;
  --bad: #A61B1B; --bad-soft: #FCEAEA;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-s: 6px;
  --radius-m: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--bg); padding: 0 4px; border-radius: 4px; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sidebar :focus-visible { outline-color: var(--side-focus); }
main:focus { outline: none; }

.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; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-s); z-index: 10; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.sidebar { background: var(--side); color: var(--side-text); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; text-decoration: none; padding: 0 10px; }
.brand:hover { color: #fff; }
.brand-dark, .brand-dark:hover { color: var(--ink); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a, .nav-soon { display: block; padding: 8px 10px; border-radius: var(--radius-s); color: var(--side-text); text-decoration: none; }
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a[aria-current="page"] { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--side-focus); }
.nav-soon { color: var(--side-muted); }
.soon-tag { display: block; font-size: .78rem; }
.nav-group { margin: 20px 10px 6px; font-size: .85rem; color: var(--side-muted); }
.who { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--side-active); display: grid; gap: 4px; }
.who a { color: var(--side-text); font-weight: 600; text-decoration: none; }
.who a:hover, .who a[aria-current="page"] { text-decoration: underline; color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--side-muted); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: #fff; }

main { padding: 32px clamp(16px, 4vw, 48px) 64px; max-width: 1240px; width: 100%; }

/* Plain layout (install, sign-in) */
.plain-head { padding: 24px clamp(16px, 4vw, 48px); }
.plain-main { max-width: 640px; margin: 0 auto; padding: 0 16px 64px; }

/* Page heads and sections */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.section-head h2 { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; margin: 0 0 20px; }
.panel.narrow { max-width: 640px; margin-inline: auto; }
.narrow-form { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.empty { background: var(--surface); border: 1px dashed var(--field); border-radius: var(--radius-m); padding: 28px; color: var(--ink-2); }
.subhead { margin: 24px 0 12px; }

/* Alerts and tags */
.flash-region:empty { display: none; }
.alert { padding: 12px 16px; border-radius: var(--radius-s); margin: 0 0 16px; border-left: 4px solid; border-radius: 0; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.alert-danger { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.tag { display: inline-block; font-size: .82rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.tag-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag-danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-s); border: 1px solid var(--field); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-quiet { border-color: transparent; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { border-color: var(--field); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .6; cursor: progress; }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.panel { padding: 24px; }
fieldset.panel > legend { font-size: 1.25rem; font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: 16px; }
fieldset.panel > legend + * { clear: both; }
.field { margin: 0 0 18px; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: 6px; }
.req { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
fieldset.panel > .hint { margin: 0 0 18px; }
.field-error { color: var(--bad); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: var(--radius-s); padding: 9px 12px; }
textarea { resize: vertical; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; margin: 6px 0 16px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--bad); border-width: 2px; }
input[type=file] { font: inherit; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; margin: 8px 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.checks legend { font-weight: 600; margin-bottom: 6px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.form-actions, .save-bar { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.inline-form, .toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.toolbar { margin-bottom: 20px; }
.field.inline { margin: 0; }
.toolbar .field.inline { flex: 1 1 260px; max-width: 360px; }
details.more { border-top: 1px solid var(--line); margin: 8px 0 16px; padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; }

/* Colour fields */
.grid-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
.color-pair { display: flex; gap: 8px; }
.color-pair input[type=color] { width: 44px; height: 42px; padding: 2px; border: 1px solid var(--field); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; flex: none; }
.color-pair input[type=text] { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }

/* Error summary */
.error-summary { border: 2px solid var(--bad); background: var(--surface); border-radius: var(--radius-m); padding: 16px 20px; margin-bottom: 20px; }
.error-summary h2 { color: var(--bad); font-size: 1.1rem; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--bad); font-weight: 600; }
.error-summary:focus { outline: 3px solid var(--bad); outline-offset: 2px; }

/* Tables */
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { font-size: .9rem; color: var(--ink-2); border-bottom: 2px solid var(--line); }
.data tbody th { font-weight: 600; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-hint { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.price-table input { padding: 6px 8px; }

/* Install */
.install-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 20px; flex-wrap: wrap; counter-reset: s; }
.install-steps li { counter-increment: s; font-size: .9rem; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.install-steps li::before { content: counter(s) ". "; }
.install-steps li[aria-current="step"] { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.steps-list li { margin-bottom: 6px; }

/* Dashboard */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.check-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--field); flex: none; margin-top: 2px; }
.is-done .check-mark { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }
.check-label { font-weight: 600; }
.is-done .check-label { color: var(--muted); text-decoration: line-through; }
.check-hint { display: block; color: var(--muted); font-size: .92rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; }
.stat-label { font-size: .95rem; font-weight: 600; color: var(--ink-2); margin: 0 0 4px; }
.stat-value { font-size: 2rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.meter { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; background: var(--accent); }

/* Client cards: each card wears the client's own brand */
.client-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.client-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; position: relative; }
.client-card:hover { border-color: var(--field); }
.client-card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch { height: 112px; background: var(--sw-bg); display: grid; place-items: center; position: relative; border-bottom: 6px solid var(--sw-primary); }
.swatch::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sw-accent); }
.swatch img { max-height: 76px; max-width: 70%; object-fit: contain; }
.swatch-initial { width: 56px; height: 56px; border-radius: 50%; background: var(--sw-primary); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }
.client-card-body { padding: 14px 16px 16px; }
.client-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.client-card h3 a { color: var(--ink); text-decoration: none; }
.client-card h3 a::after { content: ""; position: absolute; inset: 0; }
.client-card h3 a:focus-visible { outline: none; }
.client-card p { margin: 0; }

/* Brand editor */
.brand-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.preview-sticky { position: sticky; top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; }
.preview-sticky h2 { font-size: 1.1rem; }
.website-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.website-row .field { flex: 1 1 280px; }
.website-row .btn { margin-top: 31px; }
.job-status:empty { display: none; }
.job-status { margin: -6px 0 16px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg); color: var(--ink-2); }
.job-status.is-error { background: var(--bad-soft); color: var(--bad); }
.suggestions { border: 2px solid var(--accent); border-radius: var(--radius-m); padding: 16px 18px; margin: 0 0 20px; background: var(--surface); }
.suggestions h3 { margin-bottom: 4px; }
.suggestions ul { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.suggestions li { border-top: 1px solid var(--line); }
.suggestions .check { margin: 0; padding: 8px 0; }
.sugg-label { font-weight: 600; display: block; }
.sugg-value { color: var(--ink-2); white-space: pre-line; font-size: .93rem; }
.logo-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.logo-current { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px; background: repeating-conic-gradient(#eef0f3 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--line); z-index: 2; }

/* The live post preview */
.post-mock { --pm-bg: #FBF1F1; --pm-primary: #993132; --pm-accent: #C9A45C; --pm-text: #3A1414; --pm-cta-text: #fff;
  --pm-head: "Playfair Display", serif; --pm-body: "Poppins", sans-serif; --pm-script: "Great Vibes", cursive;
  aspect-ratio: 1080 / 1350; background: var(--pm-bg); color: var(--pm-text); border-radius: var(--radius-s); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8% 9%; gap: 4%; overflow: hidden; container-type: inline-size; margin-bottom: 16px; }
.pm-logo { width: 22cqw; height: 16cqw; display: grid; place-items: center; }
.pm-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-logo span { width: 14cqw; height: 14cqw; border-radius: 50%; background: var(--pm-primary); color: var(--pm-cta-text); display: grid; place-items: center; font-family: var(--pm-head); font-size: 7cqw; font-weight: 700; }
.pm-headline { font-family: var(--pm-head); color: var(--pm-primary); font-size: 10.5cqw; line-height: 1.05; font-weight: 700; margin: 0; text-transform: uppercase; }
.pm-rule { width: 30%; height: 2px; background: var(--pm-accent); }
.pm-accent { font-family: var(--pm-script); font-size: 8.5cqw; line-height: 1.1; margin: 0; }
.pm-body { font-family: var(--pm-body); font-size: 4.4cqw; margin: 0; }
.pm-cta { font-family: var(--pm-body); background: var(--pm-primary); color: var(--pm-cta-text); font-weight: 700; font-size: 4.4cqw; padding: 2.6cqw 6cqw; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.pm-foot { font-family: var(--pm-body); font-size: 3.6cqw; margin: 0; opacity: .85; }
.contrast-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.contrast-notes li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.contrast-notes .tag { white-space: nowrap; }

/* Settings */
.subnav ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin: 0 0 20px; }
.subnav a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.subnav a:hover { border-color: var(--field); color: var(--ink); }
.settings-section { scroll-margin-top: 20px; }
.test-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.test-result { flex-basis: 100%; margin: 0; font-size: .95rem; }
.test-result:empty { display: none; }
.test-result.ok { color: var(--ok); }
.test-result.bad { color: var(--bad); }

/* Responsive */
@media (max-width: 1080px) {
  .brand-editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { order: -1; }
  .preview-sticky { position: static; display: grid; grid-template-columns: 220px 1fr; gap: 0 20px; }
  .preview-sticky > h2, .preview-sticky > .hint { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 16px; gap: 12px; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .nav-group { display: none; }
  .soon-tag { display: none; }
  .who { flex-direction: row; display: flex; gap: 16px; border: 0; padding-top: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .preview-sticky { grid-template-columns: minmax(0, 1fr); }
  .post-mock { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Image library (0.2.0) */
.lede { color: var(--ink-2); max-width: 70ch; margin-top: -12px; margin-bottom: 24px; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.add-option { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; display: flex; flex-direction: column; align-items: flex-start; }
.add-option h3 { margin-bottom: 8px; }
.add-option .field { width: 100%; }
.add-option > .btn { margin-top: auto; }
.job-box { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.job-message { margin: 0 0 8px; font-weight: 600; }
.job-box progress { width: 100%; height: 10px; accent-color: var(--accent); }
.job-box.is-error .job-message { color: var(--bad); }
.job-result ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.notice { border-left: 4px solid var(--warn); border-radius: 0 var(--radius-m) var(--radius-m) 0; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) auto; gap: 0 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 16px 0; margin-bottom: 16px; }
.filter-actions { display: flex; gap: 12px; align-items: center; padding-top: 29px; margin-bottom: 18px; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.photo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; position: relative; display: flex; flex-direction: column; }
.photo-card:hover { border-color: var(--field); }
.photo-card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo-card img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; display: block; background: var(--bg); }
.photo-meta { padding: 10px 12px 12px; display: grid; gap: 6px; }
.photo-title { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3; }
.photo-title::after { content: ""; position: absolute; inset: 0; }
.photo-title:focus-visible { outline: none; }
.photo-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.qbadge { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.q-high { background: var(--ok-soft); color: var(--ok); }
.q-mid { background: var(--warn-soft); color: var(--warn); }
.q-low { background: var(--bad-soft); color: var(--bad); }
.tag-accent { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.pager { display: flex; gap: 20px; align-items: center; justify-content: center; margin: 24px 0; }
.asset-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.asset-preview { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.asset-preview img { display: block; width: 100%; height: auto; background: repeating-conic-gradient(#eef0f3 0% 25%, #fff 0% 50%) 50% / 20px 20px; }
.asset-preview figcaption { padding: 16px 20px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.swatch-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--field); display: inline-block; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #7F1414; border-color: #7F1414; color: #fff; }
.danger-zone h2 { font-size: 1.1rem; }
@media (max-width: 1080px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .field:first-of-type { grid-column: 1 / -1; }
  .filter-actions { padding-top: 0; }
  .asset-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .filters { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { grid-template-columns: 1fr; gap: 0; }
}
.head-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Content planner (0.3.0) */
.plan-theme { color: var(--ink-2); margin: 6px 0 0; max-width: 70ch; }
.plan-bar { display: grid; gap: 12px; }
.plan-progress { margin: 0; font-size: 1.05rem; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.export-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.plan-more { margin: 0; padding-top: 10px; }
.mix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 24px; }
.mix-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.mix-row label { font-weight: 400; }
.mix-label { display: block; font-weight: 600; }
.mix-row .hint { margin: 2px 0 0; }
.narrow-field { max-width: 260px; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--field); border-radius: 0 var(--radius-m) var(--radius-m) 0; scroll-margin-top: 20px; }
.post-card.status-approved { border-left-color: var(--ok); }
.post-card.status-changes { border-left-color: var(--warn); }
.post-card.status-rejected { border-left-color: var(--bad); opacity: .8; }
.post-card article { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; padding: 18px 20px; }
.post-visual { display: grid; gap: 8px; align-content: start; }
.visual-photos { display: grid; gap: 4px; border-radius: var(--radius-s); overflow: hidden; }
.visual-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.visual-photos.count-3 { grid-template-columns: 1fr 1fr; }
.visual-photos.count-3 img:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.visual-photos.count-3 img:not(:first-child) { aspect-ratio: 1; }
.visual-placeholder { aspect-ratio: 4 / 5; border: 1px dashed var(--field); border-radius: var(--radius-s); display: grid; place-content: center; text-align: center; padding: 12px; gap: 4px; font-weight: 600; background: var(--bg); }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.post-date { color: var(--ink); font-weight: 700; }
.post-headline { font-size: 1.3rem; margin: 0 0 6px; }
.post-support { color: var(--ink-2); margin: 0 0 10px; }
.post-ctas { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.post-ctas:empty { display: none; }
.cta-chip { font-size: .88rem; font-weight: 600; border: 1px solid var(--field); border-radius: 999px; padding: 3px 12px; }
.cta-chip.offer { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.qa-flags { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: .93rem; }
.qa-flags li { padding: 6px 10px 6px 12px; border-left: 3px solid; background: var(--warn-soft); color: var(--warn); }
.qa-flags li.qa-bad { background: var(--bad-soft); color: var(--bad); }
.post-details { border-top: 1px solid var(--line); padding: 8px 0; }
.post-details summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.caption-text { white-space: normal; margin-top: 10px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-s); max-width: 70ch; }
.post-details .facts { margin-top: 10px; }
.comments { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.small-head { font-size: .95rem; margin-bottom: 6px; }
.comments ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.post-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }
.tool summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .95rem; padding: 4px 0; }
.tool[open] { flex-basis: 100%; }
.tool form { display: grid; gap: 8px; max-width: 560px; padding: 8px 0 4px; }
.tool label:not(.check) { font-weight: 600; }
.tool .hint { margin: 0; }
.tool .btn { justify-self: start; }
.pick-grid label { display: block; cursor: pointer; }
.pick-line { display: flex; gap: 8px; align-items: flex-start; }
.pick-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.photo-title-plain { font-weight: 600; }
.pick-grid .photo-card:has(input:checked) { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (max-width: 760px) {
  .post-card article { grid-template-columns: minmax(0, 1fr); }
  .post-visual { max-width: 240px; }
  .mix-grid { grid-template-columns: minmax(0, 1fr); }
}

/* AI images (0.4.0) */
.bulk-images { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; flex-basis: 100%; }
.bulk-images .hint { margin: 0; }
.post-visual .check { margin: 0; }

/* Post studio (0.5.0) */
.studio-bar .form-actions { margin-top: 4px; }
.studio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.studio-post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; scroll-margin-top: 20px; }
.studio-preview { width: 300px; overflow: hidden; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); position: relative; }
.studio-controls .post-headline { margin-bottom: 12px; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.file-list:empty { display: none; }
.file-chip { display: inline-block; font-size: .9rem; font-weight: 600; padding: 4px 12px; border: 1px solid var(--field); border-radius: 999px; text-decoration: none; color: var(--ink); }
.file-chip:hover { border-color: var(--ink); color: var(--ink); }
#studio-stage { position: absolute; left: -30000px; top: 0; width: 1px; height: 1px; overflow: visible; }
@media (max-width: 760px) {
  .studio-post { grid-template-columns: minmax(0, 1fr); }
  .studio-preview { width: 100%; max-width: 300px; }
}

/* AI design (0.6.0) */
.ai-tool { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.ai-tool > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
.ai-body { padding-top: 8px; }
.ai-body fieldset.field { border: 0; padding: 0; margin: 0 0 12px; }
.ai-body legend { font-weight: 600; margin-bottom: 4px; }
.ai-body .job-box { margin: 12px 0; }
.ai-body h3 { margin-top: 18px; }
.ai-body h3:focus-visible, .ai-card h4:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ai-list:empty { display: none; }
.ai-body [hidden] { display: none !important; }
.ai-body .check-hint { font-weight: 400; }
.ai-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px; background: var(--surface); }
.ai-card.is-chosen { border: 2px solid var(--ok); padding: 11px; }
.ai-card h4 { font-size: 1rem; margin: 0 0 2px; }
.ai-card p { margin: 0 0 6px; }
.ai-shots { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.ai-shot { width: 200px; overflow: hidden; position: relative; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); }
.ai-shot.is-small { width: 96px; }
.ai-flags { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.ai-flags .tag { margin-right: 4px; }

/* ---------- 0.7.0 ---------- */
/* Click to enlarge */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 96vh; }
.lightbox::backdrop { background: rgba(10, 14, 24, .86); }
.lb-frame { background: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 94vh; }
.lb-img { max-width: 100%; max-height: calc(94vh - 130px); object-fit: contain; margin: 0 auto; background: repeating-conic-gradient(#eef0f4 0% 25%, #fff 0% 50%) 50% / 24px 24px; }
.lb-caption { margin: 0; font-weight: 600; }
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lb-bar [data-lb="close"] { margin-left: auto; }
.lb-count { color: var(--muted, #4a5468); min-width: 5em; text-align: center; }
a[data-lightbox] { cursor: zoom-in; display: block; }
a[data-lightbox]:focus-visible { outline-offset: 3px; }
/* Settings sub-sections */
.subfields { border: 1px solid var(--line, #d7dbe3); border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 16px; }
.subfields legend { font-weight: 700; padding: 0 6px; }
/* Catalogue */
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { flex: 1 1 320px; margin: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.search-inline { display: flex; gap: 8px; align-items: center; }
.head-links { margin: 0; }
.cat-head { margin: 28px 0 8px; font-size: 1.1rem; }
.catalog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.catalog-item { display: grid; grid-template-columns: 200px 1fr; gap: 16px; border: 1px solid var(--line, #d7dbe3); border-radius: 10px; padding: 14px; background: #fff; }
.catalog-item.is-hidden { opacity: .7; background: #f6f7f9; }
.catalog-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.catalog-photos a:first-child { grid-column: 1 / -1; }
.catalog-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.catalog-name { margin: 2px 0 6px; font-size: 1.15rem; }
.feature-list { margin: 6px 0; padding-left: 20px; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; margin: 8px 0; }
.spec-list div { border-left: 3px solid var(--accent); padding-left: 8px; }
.spec-list dt { font-size: .85rem; color: var(--muted, #4a5468); }
.spec-list dd { margin: 0; font-weight: 600; }
.add-item { margin: 12px 0 4px; }
@media (max-width: 720px) { .catalog-item { grid-template-columns: 1fr; } }

/* Planner page */
.stat-tiles { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat-tiles li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; background: #fff; }
.stat-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-ok { border-color: #1F7A4D !important; }
.stat-ok .stat-num { color: #1F7A4D; }
.stat-warn { border-color: #9A5B00 !important; background: #FFF8EB !important; }
.stat-warn .stat-num { color: #8A4F00; }
.approve-meter { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.approve-meter label { font-weight: 600; white-space: nowrap; }
.approve-meter progress { flex: 1; height: 12px; accent-color: #1F7A4D; }
.plan-summary .plan-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.cal-scroll { overflow-x: auto; }
.plan-cal { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.plan-cal th { text-align: left; font-size: .85rem; color: var(--muted); padding: 4px 6px; }
.plan-cal td { border: 1px solid var(--line); vertical-align: top; height: 92px; padding: 4px; background: #fff; }
.plan-cal td.cal-empty { background: #F5F6F8; }
.plan-cal td.has-posts { background: #FCFCFD; }
.cal-day { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-chip { display: block; font-size: .8rem; line-height: 1.25; padding: 4px 6px; margin-bottom: 3px; border-radius: 5px; text-decoration: none; color: var(--ink); background: #EEF1F6; border-left: 4px solid #8A93A6; overflow-wrap: anywhere; }
.cal-chip:hover { text-decoration: underline; color: var(--ink); }
.cal-chip .chip-type { font-weight: 700; }
.cal-chip.st-approved { background: #E7F5EE; border-left-color: #1F7A4D; }
.cal-chip.st-changes { background: #FFF4E0; border-left-color: #9A5B00; }
.cal-chip.st-rejected { background: #F3F3F3; border-left-color: #999; color: #555; text-decoration: line-through; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.cal-legend .cal-chip { display: inline-block; margin: 0; }
.plan-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; position: sticky; top: 0; z-index: 5; padding: 14px 20px; }
.plan-filters .field { margin: 0; }
.filter-count { margin: 0 0 0 auto; color: var(--muted); align-self: center; }
.week-head { font-size: 1.15rem; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.post-card { border-left-width: 5px !important; }
.post-card.status-approved { border-left-color: #1F7A4D !important; }
.post-card.status-changes { border-left-color: #9A5B00 !important; }
.post-card.status-draft { border-left-color: #8A93A6 !important; }
.design-thumb img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.visual-photos a img { width: 100%; height: 100%; object-fit: cover; }
.copy-btn { margin-top: 8px; }
.zoom-link { display: inline-block; margin: 4px 8px 0; }

/* Posts gallery and AI designs */
.gallery-month { margin: 0 0 28px; }
.gallery-month h2 { font-size: 1.25rem; margin: 0 0 12px; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gallery-tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.tile-btn { all: unset; box-sizing: border-box; display: flex; flex-direction: column; cursor: pointer; width: 100%; }
.tile-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile-btn img, .ai-tile > a img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #F0F2F5; }
.tile-btn .visual-placeholder { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; background: #F0F2F5; color: var(--muted); }
.tile-meta { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.tile-date { font-size: .85rem; color: var(--muted); }
.tile-title { font-weight: 600; line-height: 1.3; color: var(--ink); }
.tile-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tile-btn:hover .tile-title { text-decoration: underline; }
.post-dialog { width: min(1100px, 96vw); max-height: 94vh; border: 0; border-radius: 12px; padding: 0; }
.post-dialog::backdrop { background: rgba(10, 14, 24, .7); }
.pd-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.pd-head h3 { margin: 4px 0 0; font-size: 1.3rem; }
.pd-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 18px 22px 24px; }
.pd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 6px 0; }
.pd-thumbs img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.pd-visuals > a img { max-width: 100%; border-radius: 8px; }
.pd-text .caption-text { white-space: normal; background: #F7F8FA; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 4px 0 8px; }
.pd-text .copy-btn { margin: 0 8px 12px 0; }
.pd-links { margin-top: 12px; }
.small-head { font-size: .95rem; margin: 12px 0 4px; }
@media (max-width: 760px) { .pd-body { grid-template-columns: 1fr; } }

/* Team roles */
.check-grid { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.check-grid legend { font-weight: 700; padding: 0 6px; }
.check-grid .hint { grid-column: 1 / -1; margin: 0 0 4px; }
.perm-table td { text-align: center; }
.perm-table th[scope="row"] { font-weight: 600; }

/* ---------- 0.9.0 Dashboard ---------- */
.dash-head h1 { margin-bottom: 2px; }
.dash-head p { margin: 0; }
.queue-tiles { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.queue-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); border-top: 4px solid var(--line); }
.queue-tile > a, .queue-tile:not(:has(a)) { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; color: var(--ink); text-decoration: none; height: 100%; }
.queue-tile.is-clear { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.queue-tile > a:hover .q-go { text-decoration: underline; }
.queue-tile.tone-base { border-top-color: var(--accent); }
.queue-tile.tone-accent { border-top-color: var(--accent-2); }
.queue-tile.tone-warn { border-top-color: #C27C00; }
.q-num { font-size: 2rem; font-weight: 700; line-height: 1.05; }
.queue-tile.is-clear .q-num { color: var(--ok); }
.q-label { color: var(--ink-2); }
.q-go { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.week-days { list-style: none; margin: 0; padding: 0; }
.day-head { font-size: 1rem; margin: 14px 0 8px; }
.week-days > li:first-child .day-head { margin-top: 0; }
.week-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.week-post { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.week-post img, .wp-placeholder { width: 64px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--ink-2); }
.wp-body p { margin: 0; }
.wp-client { font-size: .85rem; color: var(--muted); }
.wp-title { font-weight: 600; }
.wp-state { margin-top: 4px !important; }
.nudge { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 0 0 16px; }
.nudge p { margin: 0 0 6px; }
.nudge-links { display: flex; flex-wrap: wrap; gap: 6px; }
.progress-table td, .progress-table th { vertical-align: middle; }
.client-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.bar { display: inline-block; width: 90px; height: 8px; background: #E3E8F0; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.bar.bar-2 > span { background: var(--accent); }
.setup-card progress { width: 100%; height: 8px; accent-color: var(--accent); }
.setup-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.setup-list li { display: flex; flex-direction: column; }
.saved-strip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.saved-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.note-feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.note-feed p { margin: 0; }
.note-body { color: var(--ink-2); font-size: .9rem; border-left: 3px solid var(--line); padding-left: 8px; margin-top: 2px !important; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; margin: 0; }
.panel > .section-head:first-child { margin-top: 0; }

/* ---------- 0.9.1 Post studio ---------- */
.studio-bar { position: sticky; top: 0; z-index: 6; box-shadow: 0 2px 10px rgba(15, 27, 51, .06); }
.studio-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 10px; }
.studio-progress { margin: 0; font-size: 1.1rem; }
.studio-filter { margin: 0; }
.studio-filter label { margin-right: 6px; }
.studio-bar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.size-pills { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.size-pills legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill > span { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border: 1px solid var(--field); border-radius: 999px; font-size: .92rem; background: var(--surface); }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill input:checked + span .pill-dim { color: #DCE6FB; }
.pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pill-dim { color: var(--muted); font-size: .85rem; }
.size-pills .hint { flex-basis: 100%; margin: 4px 0 0; }
.studio-post { grid-template-columns: 340px minmax(0, 1fr); }
.studio-left { display: flex; flex-direction: column; gap: 8px; }
.studio-preview { width: 340px; cursor: zoom-in; box-shadow: 0 2px 10px rgba(15, 27, 51, .10); }
.preview-actions { display: flex; gap: 8px; justify-content: center; }
.style-pick { border: 0; padding: 0; margin: 4px 0 12px; display: flex; align-items: center; gap: 0; }
.style-pick legend { float: left; font-weight: 600; margin-right: 12px; padding: 0; }
.seg { border: 1px solid var(--field); background: var(--surface); color: var(--ink); padding: 6px 16px; font: inherit; font-weight: 600; cursor: pointer; margin-left: -1px; }
.seg:first-of-type { border-radius: 999px 0 0 999px; margin-left: 0; }
.seg:last-of-type { border-radius: 0 999px 999px 0; }
.seg[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; position: relative; z-index: 1; }
.seg:focus-visible { position: relative; z-index: 2; }
.file-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 10px; }
.file-chip img { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; display: block; }
.file-chip a[download] { color: var(--ink); text-decoration: none; }
.file-chip a[download]:hover { text-decoration: underline; }
.ai-shot.is-zoomable { cursor: zoom-in; }
.ai-shot.is-zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.live-zoom .zoom-canvas { margin: 0 auto; overflow: hidden; border-radius: 6px; }
.layout-picker { width: min(1180px, 96vw); max-height: 94vh; border: 0; border-radius: 12px; padding: 0 22px 22px; }
.layout-picker::backdrop { background: rgba(10, 14, 24, .7); }
.lp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; background: #fff; padding: 16px 0 8px; z-index: 1; }
.lp-head h2 { margin: 0; }
.lp-hint { margin: 0 0 12px; }
.lp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); gap: 14px; }
.lp-item { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 7px; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.lp-item:hover { border-color: var(--line); }
.lp-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lp-item[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.lp-frame { display: block; width: 150px; overflow: hidden; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); pointer-events: none; }
.lp-name { font-size: .9rem; font-weight: 600; color: var(--ink); }
@media (max-width: 860px) { .studio-post { grid-template-columns: 1fr; } .studio-preview { width: 100%; max-width: 340px; } }
