/* Vionra Creator — design tokens, components, app shell */
:root {
  /* Dark: warm ink surfaces, softened outlines, yellow kept to actions and the active state */
  --bg: #141311; --surface: #1c1b18; --raised: #262420; --line: #3f3d37; --edge: #4a4740;
  --text: #ece8dc; --muted: #aaa69a; --faint: #8a877d;
  --accent: #f2c200; --accent-ink: #171612; --accent-soft: #3a3210;
  --link: #f2c200; --mark: #f2c200; --mark-ink: #171612; --on-bg: #3a3210; --on-ink: #f2c200;
  --bar-bg: #1c1b18; --bar-ink: #ece8dc; --bar-rule: #f2c200; --hard: #000000;
  --select: #5aa9ff;
  --gold: #f2c200; --danger: #ff8a80; --danger-soft: #2f1917; --ok: #4fd69c;
  --shadow: 6px 6px 0 var(--hard);
  --r: 3px; --tap: 40px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* Light: warm paper instead of white, soft ink instead of black */
  --bg: #efece4; --surface: #f9f7f1; --raised: #ebe7dc; --line: #c9c4b6; --edge: #2a2925;
  --text: #1f1e1b; --muted: #57544c; --faint: #6c6961;
  --accent: #f4c81e; --accent-ink: #1f1e1b; --accent-soft: #f7e7a1;
  --link: #1f1e1b; --mark: #1f1e1b; --mark-ink: #f4c81e; --on-bg: #f4c81e; --on-ink: #1f1e1b;
  --bar-bg: #f4c81e; --bar-ink: #1f1e1b; --bar-rule: #2a2925; --hard: #1f1e1b;
  --select: #1a5fd0;
  --gold: #7a5200; --danger: #b3261e; --danger-soft: #fbe5e2; --ok: #0a6b3d;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Type */
.h-display { font: 800 24px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.h-panel { font: 700 20px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Buttons */
.btn { height: var(--tap); padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--link); color: var(--accent-ink); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--link); }
.btn-gold { background: transparent; border-color: var(--gold); color: var(--gold); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--raised); color: var(--text); border-color: transparent; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-dashed { border-style: dashed; background: transparent; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--tap); padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--link); font-weight: 600; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .row { justify-content: space-between; }
.input, .select, .textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--text); }
.textarea { resize: vertical; line-height: 1.4; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--link); }
.input-sm { min-height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
.error-text { color: var(--danger); font-size: 13px; font-weight: 500; }
.ok-text { color: var(--ok); font-size: 13px; font-weight: 500; }
input[type="range"] { width: 100%; margin: 0; accent-color: var(--link); height: 24px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--link); width: 16px; height: 16px; margin: 0; }
input[type="color"] { width: 36px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 500; cursor: pointer; }

/* Segmented control, chips, tabs */
.seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.seg > button { flex: 1; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg > button[aria-pressed="true"], .seg > button[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.seg.seg-accent > button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { height: 32px; flex: none; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: transparent; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs > button { height: 38px; flex: none; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.tabs > button[aria-selected="true"] { border-color: var(--link); color: var(--text); }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--accent-soft); color: var(--link); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge-gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.badge-ok { background: transparent; border: 1px solid var(--ok); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.empty { padding: 24px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; min-width: 3px; background: var(--accent); border-radius: 2px; }
.meter.warn > i { background: var(--danger); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tables (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 12px; background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.stat b { display: block; font: 800 28px/1.1 var(--display); letter-spacing: .02em; }
.stat span { font-size: 12px; color: var(--muted); }

/* Modal, menu, toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 5, 10, .72); }
.modal { width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.modal.modal-md { max-width: 640px; } .modal.modal-lg { max-width: 980px; } .modal.modal-full { max-width: 1280px; height: calc(100dvh - 32px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.menu { position: fixed; z-index: 110; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.menu button, .menu a { width: 100%; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font-weight: 500; font-size: 14px; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--raised); }
.menu .menu-info { padding: 8px 10px 10px; color: var(--muted); font-size: 13px; }
.toasts { position: fixed; z-index: 200; left: 50%; top: 68px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-weight: 500; }
.toast.error { border-color: var(--danger); } .toast.ok { border-color: var(--ok); }
.banner { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--accent-soft); font-size: 13px; }

/* ---------- App shell ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: 76px 344px minmax(0, 1fr) 312px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "banner banner banner banner" "top top top top" "rail panel stage insp"; }
.app[data-mode="easy"] { grid-template-columns: 76px 344px minmax(0, 1fr) 0; }
.app[data-mode="easy"] .inspector, .app[data-mode="easy"] [data-adv] { display: none; }
#banner-slot { grid-area: banner; }
.topbar { grid-area: top; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 12px 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand svg { flex: none; }
.brand b { font: 800 24px/1 var(--display); letter-spacing: .1em; }
.brand span { font: 500 15px/1 var(--font); color: var(--muted); padding-left: 9px; border-left: 1px solid var(--line); }
.topnav { display: flex; gap: 4px; }
#account-slot { display: flex; align-items: center; gap: 10px; }
.usage { width: 140px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }

.rail { grid-area: rail; display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.rail button { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.15; }
.rail button:hover { color: var(--text); }
.rail button[aria-pressed="true"] { background: var(--accent-soft); color: var(--link); }
.rail .icon { width: 20px; height: 20px; }

.panel { grid-area: panel; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 24px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.inspector { grid-area: insp; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 24px; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; }
.panel > *, .inspector > * { flex-shrink: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.stage { grid-area: stage; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; background: var(--bg); }
.stage-bar { display: flex; align-items: center; gap: 8px; }
.stage-title { flex: 1; min-width: 0; text-align: center; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-title b { color: var(--text); font-weight: 600; }
.canvas-area { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; touch-action: none; }
.canvas-box { position: relative; box-shadow: var(--shadow); line-height: 0; }
.canvas-box canvas { display: block; width: 100%; height: 100%; }
.sel { position: absolute; border: 1.5px solid var(--select); pointer-events: none; }
.sel.hover { border-style: dashed; opacity: .7; }
.sel .tagname { position: absolute; left: -1.5px; bottom: 100%; padding: 1px 7px; background: var(--select); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.handle { position: absolute; width: 12px; height: 12px; margin: -6px; background: #fff; border: 1.5px solid var(--select); pointer-events: auto; touch-action: none; }
.handle::after { content: ''; position: absolute; inset: -12px; }
.handle.br { right: 0; bottom: 0; cursor: nwse-resize; } .handle.tl { left: 0; top: 0; cursor: nwse-resize; }
.handle.tr { right: 0; top: 0; cursor: nesw-resize; } .handle.bl { left: 0; bottom: 0; cursor: nesw-resize; }
.guide { position: absolute; background: var(--select); pointer-events: none; }
.inline-edit { position: absolute; z-index: 5; border: 1.5px solid var(--select); background: rgba(0, 0, 0, .85); color: #fff; padding: 6px 8px; resize: none; outline: none; font: 600 16px/1.3 var(--font); }
.format-strip { display: flex; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; scrollbar-width: none; align-self: center; max-width: 100%; }
.format-strip::-webkit-scrollbar { display: none; }
.format-strip button { flex: none; width: 78px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 6px 2px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 11px; font-weight: 500; }
.format-strip button i { display: block; border: 2px solid var(--faint); border-radius: 3px; }
.format-strip button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.format-strip button[aria-pressed="true"] i { border-color: var(--link); }

/* Panel pieces */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); text-align: center; cursor: pointer; }
.dropzone.over { border-color: var(--link); color: var(--text); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--raised); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-pressed="true"] { border-color: var(--link); }
.thumb .n { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.thumb .x { position: absolute; right: 2px; top: 2px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; line-height: 1; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); text-align: left; }
.tpl canvas { width: 100%; aspect-ratio: 1; border-radius: 8px; border: 2px solid var(--line); background: var(--raised); display: block; }
.tpl[aria-pressed="true"] { color: var(--text); } .tpl[aria-pressed="true"] canvas { border-color: var(--link); }
.tpl .name { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; }
.fav { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--faint); }
.fav[aria-pressed="true"] { color: var(--gold); } .fav[aria-pressed="true"] .icon { fill: currentColor; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--text); font: 700 15px var(--display); letter-spacing: .04em; }
.word.br { width: 100%; height: 0; padding: 0; border: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; }
.swatch[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.layer-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.layer-row[aria-current="true"] { border-color: var(--link); }
.layer-row .name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 38px; }
.page-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.page-logo { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--link); display: flex; align-items: center; justify-content: center; font: 800 16px var(--display); overflow: hidden; }
.bulk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.bulk-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.bulk-card img { width: 100%; display: block; border-radius: 4px; background: #000; }
.coach { position: fixed; z-index: 120; max-width: 300px; padding: 14px; border: 1.5px solid var(--mark); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--raised); font: 600 12px ui-monospace, monospace; text-align: center; }
.only-mobile { display: none; }

/* ---------- Phone / narrow ---------- */
@media (max-width: 900px) {
  :root { --tap: 44px; }
  .only-mobile { display: initial; } .only-desktop { display: none !important; }
  .app, .app[data-mode="easy"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "banner" "top" "stage" "panel" "rail"; }
  .topbar { height: 56px; padding: 0 8px 0 12px; gap: 8px; }
  .brand b { font-size: 20px; } .brand span { display: none; }
  .topbar { overflow: hidden; }
  .usage { display: none; }
  .stage { padding: 8px 12px; gap: 8px; height: 46dvh; }
  .app.sheet-tall .stage { height: 26dvh; } .app.sheet-tall .format-strip { display: none; }
  .format-strip { padding: 4px; border-radius: 12px; }
  .format-strip button { width: auto; height: 36px; flex-direction: row; gap: 6px; padding: 0 10px; justify-content: center; }
  .format-strip button i { transform: scale(.5); margin: -6px; }
  .panel { border-right: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 14px 14px 20px; }
  .inspector { display: none; }
  .rail { flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail button { flex: 1 0 64px; min-height: 52px; }
  .rail .spacer { display: none; }
  .chip, .seg > button, .word { height: 40px; } .swatch { width: 36px; height: 36px; }
  .input, .select, .textarea { font-size: 16px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal.modal-md, .modal.modal-lg, .modal.modal-full { max-width: none; max-height: 94dvh; height: auto; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .modal.modal-full { height: 94dvh; }
  .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.rail, .panel, .inspector { overscroll-behavior: contain; }
.card-nav { position: absolute; top: 50%; z-index: 4; width: 40px; height: 64px; margin-top: -32px; padding: 0 0 6px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--surface); color: var(--text); font: 700 30px/1 var(--display); box-shadow: 3px 3px 0 var(--hard); }
.card-nav.prev { left: 0; } .card-nav.next { right: 0; }
.card-nav:hover { background: var(--on-bg); color: var(--on-ink); }
.safe { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(90, 169, 255, .30) 0 6px, rgba(90, 169, 255, .12) 6px 12px); }
.safe.top { top: 0; height: 14%; align-items: flex-end; border-bottom: 1.5px dashed var(--select); }
.safe.bot { bottom: 0; height: 22%; align-items: flex-start; border-top: 1.5px dashed var(--select); }
.safe span { margin: 4px; padding: 1px 6px; background: var(--select); color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; white-space: nowrap; }
.dropveil { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center; padding-top: 12px; background: rgba(20, 19, 17, .35); pointer-events: none; }
.dropveil > div { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; padding: 12px 22px; border: 2px dashed var(--accent); border-radius: 4px; background: var(--surface); color: var(--text); box-shadow: 6px 6px 0 var(--hard); text-align: center; }
.dropveil b { font: 800 22px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.dropveil span { color: var(--muted); }
/* About section below the editor (real page content for visitors and search engines) */
.about { border-top: 2px solid var(--edge); background: var(--surface); }
.about-inner { max-width: 1040px; margin: 0 auto; padding: 48px 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.about h1 { font: 800 clamp(30px, 5vw, 46px)/1.05 var(--display); letter-spacing: .01em; text-transform: uppercase; max-width: 20ch; }
.about h2 { font: 800 22px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.about p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 70ch; }
.about-lead { font-size: 18px !important; color: var(--text) !important; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 8px 0 12px; }
.about-grid > div { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--bg); box-shadow: 3px 3px 0 var(--hard); }
.about-grid p { font-size: 15px; }
.about details { border-top: 1.5px solid var(--line); padding: 12px 0; }
.about summary { cursor: pointer; font-weight: 700; font-size: 17px; min-height: 28px; }
.about details p { margin-top: 8px; }
.about-foot { margin-top: 12px; font-size: 14px !important; }
@media (max-width: 430px) { .brand b { display: none; } }
/* ---------- Newsroom look: outlines, hard shadows, square corners ---------- */
a, .link-btn { text-decoration: underline; text-underline-offset: 2px; }
.h-panel { font: 800 26px/1 var(--display); letter-spacing: .03em; }
.btn, .input, .select, .textarea, .chip, .word, .seg, .dropzone, .card, .layer-row, .page-row, .bulk-card, .stat { border-width: 1.5px; }
.btn { background: var(--surface); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--hard); box-shadow: 3px 3px 0 var(--hard); }
.btn-primary:hover { border-color: var(--hard); filter: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--hard); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hard); }
.btn-primary:disabled { transform: none; }
.btn-gold { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-ghost, .btn-dashed, .btn-danger { background: transparent; }
.seg { border-color: var(--edge); border-radius: var(--r); }
.seg > button { border-radius: 1px; }
.seg > button[aria-pressed="true"], .seg > button[aria-selected="true"] { background: var(--on-bg); color: var(--on-ink); }
.seg.seg-accent > button[aria-pressed="true"] { background: var(--mark); color: var(--mark-ink); }
.chip[aria-pressed="true"] { background: var(--mark); border-color: var(--mark); color: var(--mark-ink); }
.badge { border-radius: 2px; background: var(--on-bg); color: var(--on-ink); }
.meter > i { background: var(--mark); } .meter.warn > i { background: var(--danger); }
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--mark); }
.modal { border: 2px solid var(--edge); border-radius: 4px; }
.menu, .toast, .coach { border: 1.5px solid var(--edge); border-radius: 4px; box-shadow: 4px 4px 0 var(--hard); }
.menu button, .menu a { border-radius: 2px; }
.topbar { background: var(--bar-bg); color: var(--bar-ink); border-bottom: 2px solid var(--bar-rule); }
.topbar .brand, .topbar .btn-ghost, .topbar .muted, .topbar .usage, .topbar .usage * { color: var(--bar-ink); }
.topbar .btn-ghost:hover { background: rgba(0, 0, 0, .1); }
.topbar .meter { background: rgba(0, 0, 0, .22); }
.brand span { color: inherit; border-left-color: currentColor; opacity: .8; }
.avatar { border: 1.5px solid var(--edge); background: var(--surface); }
.rail { border-right: 2px solid var(--edge); }
.rail button { border-radius: var(--r); }
.rail button[aria-pressed="true"] { background: var(--on-bg); color: var(--on-ink); }
.panel { border-right: 2px solid var(--edge); }
.inspector { border-left: 2px solid var(--edge); }
.canvas-box { box-shadow: 8px 8px 0 var(--hard); }
.format-strip { border: 1.5px solid var(--edge); border-radius: var(--r); box-shadow: 3px 3px 0 var(--hard); }
.format-strip button { border-radius: 1px; }
.format-strip button[aria-pressed="true"] { background: var(--on-bg); color: var(--on-ink); }
.format-strip button[aria-pressed="true"] i { border-color: var(--on-ink); }
.tpl canvas { border-radius: 2px; border-width: 1.5px; }
.tpl[aria-pressed="true"] canvas { border-color: var(--mark); box-shadow: 4px 4px 0 var(--accent); }
.thumb { border-radius: 2px; } .word { border-radius: 2px; } .chip { border-radius: 16px; }
.dropzone { border-style: dashed; background: var(--raised); }
.fav[aria-pressed="true"] { color: var(--mark); }
@media (max-width: 900px) {
  .panel { border-right: 0; border-top: 2px solid var(--edge); border-radius: 0; }
  .rail { border-right: 0; border-top: 1.5px solid var(--edge); }
  .modal, .modal.modal-md, .modal.modal-lg, .modal.modal-full { border-radius: 0; border-left: 0; border-right: 0; }
  .canvas-box { box-shadow: 5px 5px 0 var(--hard); }
  .card-nav { width: 32px; height: 52px; margin-top: -26px; font-size: 24px; opacity: .92; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
