/* OQLAR — interactive rebuild of the design editor. Portfolio prototype by Felipe Herrera. */

:root {
  --brand: #8E3BD1;        /* top bar, 5.68:1 with white */
  --brand-dark: #7B2CBF;   /* primary buttons, 7.11:1 with white */
  --brand-ink: #6A1FB0;    /* links and focus on light grounds */
  --side: #262A33;
  --panel: #30343E;
  --panel-2: #3B404B;
  --panel-text: #E6E8EE;
  --panel-muted: #B8BDC8;
  --ground: #F4F5F8;
  --stage: #E6E8EE;
  --ink: #1F2330;
  --muted: #5B6170;
  --line: #D5D8E0;
  --danger: #B3261E;
  --ok: #1E7A46;
  --gold: #F5B301;
  --radius: 10px;
  --gutter: 24px;
  --topbar: 56px;
  font-family: 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; }
a { color: var(--brand-ink); }
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.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; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--brand-dark); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; color: #fff; }
.noscript { margin: 0; padding: 16px var(--gutter); background: #FEF3C7; color: #92400E; font-weight: 700; }

/* ---------- Portfolio bar (not part of the product) ---------- */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
  padding: 10px var(--gutter); background: #14161B; color: #fff; font-size: 13px;
}
.demo-bar a { color: #fff; font-weight: 700; }
.demo-bar__back { text-decoration: none; }
.demo-bar__back:hover { text-decoration: underline; }
.demo-bar__label { color: #C9CDD6; }
.demo-bar :focus-visible { outline-color: #fff; }
.demo-guide { margin-left: auto; }
.demo-guide summary { cursor: pointer; font-weight: 800; color: var(--gold); min-height: 24px; }
.demo-guide__body { margin-top: 8px; padding: 12px 14px; border-radius: 8px; background: #262A33; max-width: 720px; }
.demo-guide__body p { margin: 0 0 6px; line-height: 1.6; }
.demo-guide__body p:last-child { margin-bottom: 0; }
.demo-guide__body button { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 800; text-decoration: underline; min-height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 800; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--brand-dark); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--on-brand { background: #fff; color: var(--brand-dark); }
.btn--on-brand:hover { background: #F3E8FF; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); }
.btn:disabled { opacity: .55; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-ink); font-weight: 700; text-decoration: underline; min-height: 44px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar); padding: 0 16px 0 20px; background: var(--brand); color: #fff;
}
.topbar :focus-visible { outline-color: #fff; }
.logo { display: inline-flex; align-items: center; gap: 2px; color: #fff; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: .02em; min-height: 44px; }
.logo__mark { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; border-radius: 7px; background: var(--gold); color: #2A1640; font-size: 17px; }
.topbar__spacer { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 8px; background: transparent; color: inherit;
}
.icon-btn:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.icon-btn:disabled { opacity: .45; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #F3E8FF; color: var(--brand-dark); font-weight: 800; font-size: 14px; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--topbar) - 40px); }
.sidenav { background: var(--side); color: #fff; padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidenav :focus-visible { outline-color: var(--gold); }
.sidenav a, .sidenav button {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 8px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; background: none; border: 0; text-align: left; width: 100%;
}
.sidenav a:hover, .sidenav button:hover { background: rgba(255,255,255,.08); }
.sidenav a[aria-current="page"] { background: rgba(255,255,255,.14); box-shadow: inset 4px 0 0 var(--gold); }
.sidenav svg { flex: none; }
.sidenav__sep { height: 1px; background: rgba(255,255,255,.14); margin: 12px 8px; }
.sidenav__bottom { margin-top: auto; }

.dash-main { padding: 28px 32px 48px; min-width: 0; }
.dash-main:focus { outline: none; }
.dash-main h1 { font-size: 28px; line-height: 1.2; margin: 0 0 20px; }
.dash-main h2 { font-size: 19px; margin: 32px 0 14px; }

.search { position: relative; max-width: 720px; margin: 0 auto 24px; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 48px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: 0 1px 3px rgba(20,22,27,.08);
}
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }

.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px 36px; border-radius: 14px; color: #fff;
  background: linear-gradient(100deg, #2F2FD0 0%, #3B35E0 45%, #1C6DC4 100%);  /* white text >= 5.21:1 across the gradient */
}
.hero h1 { color: #fff; font-size: 34px; margin: 0 0 8px; }
.hero p { margin: 0; max-width: 520px; font-size: 16px; }
.hero__art { flex: none; }

.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.format-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center;
}
.format-card:hover { border-color: var(--brand-dark); box-shadow: 0 4px 14px rgba(123,44,191,.15); }
.format-card__shape { display: grid; place-items: center; height: 84px; }
.format-card__shape span { display: block; background: #EEE3FA; border: 2px solid var(--brand-dark); border-radius: 4px; }
.format-card strong { font-size: 15px; }
.format-card small { color: var(--muted); font-size: 13px; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; }
.tpl-card__thumb { display: grid; place-items: center; aspect-ratio: 1; width: 100%; border-radius: 10px; background: #E3E5EB; overflow: hidden; border: 1px solid var(--line); }
.tpl-card:hover .tpl-card__thumb { border-color: var(--brand-dark); }
.tpl-card__thumb svg { max-width: 100%; max-height: 100%; display: block; }
.tpl-card strong { font-size: 15px; }
.tpl-card small { color: var(--muted); font-size: 13px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.chip-btn[aria-pressed="true"] { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.results-note { color: var(--muted); margin: -8px 0 16px; }
.empty {
  padding: 36px 24px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; text-align: center;
}
.empty h2, .empty h3 { margin: 0 0 6px; font-size: 18px; }
.empty p { margin: 0 0 12px; color: var(--muted); }

.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.proj-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.proj-card__open { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; color: var(--ink); text-decoration: none; }
.proj-card__open:hover strong { text-decoration: underline; }
.proj-card__thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #E3E5EB; overflow: hidden; }
.proj-card__thumb svg { max-width: 92%; max-height: 92%; }
.proj-card__open strong, .proj-card__open small { padding: 0 14px; }
.proj-card__open strong { padding-top: 10px; font-size: 16px; overflow-wrap: anywhere; }
.proj-card__open small { color: var(--muted); font-size: 13px; }
.proj-card__actions { display: flex; gap: 4px; padding: 0 8px 8px; margin-top: auto; }
.proj-card__actions button { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--brand-ink); font-weight: 700; text-decoration: underline; }
.proj-card__actions button.danger { color: var(--danger); }

.notice { padding: 40px 24px; max-width: 560px; margin: 40px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.notice h1 { font-size: 24px; margin: 0 0 8px; }
.notice p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Editor ---------- */
.topbar--editor { gap: 8px; }
.title-field { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.title-field input {
  width: min(320px, 100%); min-width: 90px; height: 44px; padding: 0 10px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: #fff; font-weight: 800; font-size: 16px;
}
.title-field input:hover { border-color: rgba(255,255,255,.55); }
.title-field input:focus { background: #fff; color: var(--ink); outline: 3px solid #fff; outline-offset: 0; }
.save-status { font-size: 13px; white-space: nowrap; color: #fff; }
.save-status--error { background: #fff; color: var(--danger); padding: 2px 8px; border-radius: 6px; font-weight: 800; }
.topbar__group { display: flex; align-items: center; gap: 2px; }
.topbar .btn { min-height: 44px; }

.editor { display: grid; grid-template-columns: 84px auto 1fr; height: calc(100vh - var(--topbar) - 40px); min-height: 520px; }
.rail { background: var(--side); display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; overflow-y: auto; }
.rail :focus-visible { outline-color: var(--gold); outline-offset: -3px; }
.rail button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 8px 2px;
  border: 0; border-radius: 8px; background: none; color: #fff; font-size: 12px; font-weight: 700;
}
.rail button:hover { background: rgba(255,255,255,.08); }
.rail button[aria-expanded="true"] { background: var(--panel); box-shadow: inset 3px 0 0 var(--gold); }

.panel { width: 320px; background: var(--panel); color: var(--panel-text); display: flex; flex-direction: column; min-height: 0; position: relative; }
.panel :focus-visible { outline-color: var(--gold); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 8px 18px; }
.panel__head h2 { margin: 0; font-size: 17px; color: #fff; }
.panel__close { color: #fff; }
.panel__body { padding: 4px 18px 24px; overflow-y: auto; flex: 1; }
.panel__body p { margin: 0 0 12px; }
.panel__hint { color: var(--panel-muted); font-size: 13px; }
.panel label { display: block; font-weight: 700; margin: 0 0 6px; }
.panel input[type="search"], .panel input[type="text"] {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid #5A6070; background: #fff; color: var(--ink);
}
.panel input::placeholder { color: var(--muted); }
.panel .tpl-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.panel .tpl-card { color: var(--panel-text); }
.panel .tpl-card small { color: var(--panel-muted); }
.panel .tpl-card__thumb { border-color: #4A505C; background: #262A33; }
.panel .tpl-card:hover .tpl-card__thumb { border-color: var(--gold); }
.panel__section + .panel__section { margin-top: 22px; }
.panel__section h3 { margin: 0 0 10px; font-size: 14px; color: #fff; }

.el-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.el-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 8px;
  border: 1px solid #4A505C; border-radius: 10px; background: var(--panel-2); color: var(--panel-text); font-size: 13px; font-weight: 700;
}
.el-btn:hover { border-color: var(--gold); }
.text-add { display: grid; gap: 10px; }
.text-add button {
  min-height: 48px; padding: 8px 14px; border: 1px solid #4A505C; border-radius: 10px; background: var(--panel-2); color: #fff; text-align: left;
}
.text-add button:hover { border-color: var(--gold); }
.text-add .ta-h { font-size: 22px; font-weight: 900; }
.text-add .ta-s { font-size: 17px; font-weight: 700; }
.text-add .ta-b { font-size: 14px; }

.upload-drop { display: grid; gap: 8px; padding: 16px; border: 1px dashed #6A7080; border-radius: 10px; text-align: center; }
.upload-drop .btn { width: 100%; }
.field-error { display: flex; gap: 6px; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #FDECEA; color: var(--danger); font-weight: 700; font-size: 14px; }
.up-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.up-list button { padding: 0; border: 1px solid #4A505C; border-radius: 8px; background: #262A33; overflow: hidden; aspect-ratio: 1; }
.up-list button:hover { border-color: var(--gold); }
.up-list img { width: 100%; height: 100%; object-fit: contain; display: block; }

.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.panel .swatches { grid-template-columns: repeat(4, 1fr); }
.swatch { width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 8px; border: 2px solid rgba(0,0,0,.15); padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--gold); }
.custom-color { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.custom-color input[type="color"] { width: 52px; height: 44px; padding: 2px; border-radius: 8px; border: 1px solid #5A6070; background: #fff; }
.custom-color label { margin: 0; font-weight: 700; }

.layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.layer-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px;
  border: 1px solid #4A505C; border-radius: 8px; background: var(--panel-2); color: var(--panel-text); text-align: left;
}
.layer-list button[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.layer-list__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.layer-list__type { color: var(--panel-muted); font-size: 12px; }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--stage); }
.stage:focus { outline: none; }

.toolbar {
  display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 8px 14px;
  background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.toolbar__hint { color: var(--muted); margin: 0; white-space: nowrap; }
.toolbar__sep { width: 1px; align-self: stretch; margin: 4px 6px; background: var(--line); flex: none; }
.toolbar select {
  height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 150px;
}
.tb-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); font-weight: 700;
}
.tb-btn:hover:not(:disabled) { background: #F0F1F5; }
.tb-btn[aria-pressed="true"] { background: #EEE3FA; border-color: var(--brand-dark); color: var(--brand-ink); }
.tb-btn:disabled { color: #6B7080; opacity: .6; }
.tb-btn--danger { color: var(--danger); }
.size-group { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.size-group .tb-btn { border-radius: 0; }
.size-group input { width: 58px; height: 44px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.color-btn__chip { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); }
.toolbar__lock-note { color: var(--muted); font-size: 13px; white-space: nowrap; margin: 0 4px; }

/* Visible names for icon buttons */
[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 4px 8px; border-radius: 6px; background: #14161B; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 60;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }
.topbar [data-tip]::after { top: calc(100% + 4px); }

.popover {
  position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 16px); padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(20,22,27,.2);
}
.popover__title { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.popover .swatch { border-color: rgba(0,0,0,.2); }
.popover .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand-ink); }
.popover .custom-color input[type="color"] { border-color: var(--line); }

.canvas-scroll { position: relative; flex: 1; overflow: auto; min-height: 0; display: grid; }
.canvas-wrap { position: relative; margin: auto; padding: 32px; }
.canvas-wrap svg.page { display: block; background: #fff; box-shadow: 0 6px 24px rgba(20,22,27,.16); overflow: hidden; }
.layer { cursor: move; outline: none; }
.layer.is-locked { cursor: default; }
.layer:focus-visible .hit { stroke: var(--brand-ink); stroke-width: 3; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.sel-box { fill: none; stroke: var(--brand-ink); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.sel-box--locked { stroke: #6B7080; stroke-dasharray: 6 4; }
.text-editor {
  position: absolute; margin: 0; padding: 0; border: 0; outline: 2px solid var(--brand-ink); outline-offset: 2px;
  background: rgba(255,255,255,.55); resize: none; overflow: hidden; white-space: pre; line-height: 1.1;
}

.pagebar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 8px 14px; background: #fff; border-top: 1px solid var(--line);
}
.pagebar__pages, .pagebar__zoom { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagebar__label { min-width: 92px; text-align: center; font-weight: 700; }
.pagebar .tb-btn { padding: 0 10px; }
.zoom-value { min-width: 54px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Dialogs ---------- */
.dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
.dialog::backdrop { background: rgba(20,22,27,.55); }
.dialog__title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.dialog__body { margin: 0 0 20px; color: var(--muted); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.dialog--wide { width: min(900px, calc(100vw - 32px)); }
.dialog fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.dialog legend { padding: 0; margin: 0 0 8px; font-weight: 800; }
.dialog .field { margin: 0 0 18px; }
.dialog .field > label { display: block; font-weight: 800; margin: 0 0 6px; }
.dialog input[type="text"] { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #8A90A0; border-radius: 8px; }
.dialog input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.dialog .field__error { margin: 6px 0 0; color: var(--danger); font-weight: 700; font-size: 14px; }
.dialog .field__help { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700;
}
.radio-row label:has(input:checked) { border-color: var(--brand-dark); background: #F6EEFD; }
.radio-row small { color: var(--muted); font-weight: 600; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--brand-dark); margin: 0; }
.export-status { margin: 0; font-weight: 700; color: var(--ok); }

.dialog__close { position: absolute; top: 12px; right: 12px; color: var(--ink); }
.dialog__close:hover { background: #F0F1F5 !important; }

.preview-tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.preview-stage { display: grid; place-items: center; padding: 20px; border-radius: 12px; background: #E6E8EE; min-height: 360px; overflow: auto; }
.device--desktop { width: min(720px, 100%); border: 14px solid #1F2330; border-bottom-width: 22px; border-radius: 14px; background: #F4F5F8; }
.device--mobile { width: 300px; max-width: 100%; border: 12px solid #1F2330; border-radius: 34px; background: #fff; }
.feed { padding: 12px; }
.feed__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 800; font-size: 13px; }
.feed__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); }
.feed__media svg { display: block; width: 100%; height: auto; background: #fff; }
.feed__cap { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.device--desktop .feed { max-width: 460px; margin: 0 auto; background: #fff; }
.preview-pages { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }

.shortcut-table { width: 100%; border-collapse: collapse; }
.shortcut-table th, .shortcut-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.shortcut-table th { font-size: 13px; color: var(--muted); }
.shortcut-table td:first-child { white-space: nowrap; padding-right: 16px; }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid #B8BDC8; border-bottom-width: 2px; border-radius: 5px; background: #F4F5F8; font: 700 13px/1.4 ui-monospace, Consolas, monospace; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 150; width: max-content; max-width: calc(100vw - 32px); }
.toast__card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px; background: #14161B; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast__card p { margin: 0; font-weight: 700; }
.toast__card button { min-height: 36px; background: none; border: 0; color: var(--gold); font-weight: 800; text-decoration: underline; padding: 0; }
.toast__card :focus-visible { outline-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .panel { width: 280px; }
  .save-status { display: none; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .demo-guide { margin-left: 0; }
  .demo-bar__label { display: none; }
  .demo-bar { padding-block: 8px; }
  .topbar { padding: 0 8px 0 12px; }
  .dash { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; }
  .toolbar__hint { white-space: normal; font-size: 14px; }
  .sidenav { flex-direction: row; overflow-x: auto; padding: 6px 8px; gap: 4px; }
  .sidenav a, .sidenav button { flex: none; width: auto; min-height: 44px; padding: 0 12px; font-size: 14px; gap: 8px; }
  .sidenav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }
  .sidenav__sep { display: none; }
  .sidenav__bottom { margin-top: 0; }
  .dash-main { padding: 20px 16px 40px; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 26px; }
  .hero__art { display: none; }
  .format-grid { grid-template-columns: 1fr 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Editor: rail moves to the bottom, panel becomes a sheet over the canvas */
  .editor { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: calc(100vh - var(--topbar) - 40px); }
  .stage { grid-row: 1; }
  .rail { grid-row: 2; flex-direction: row; overflow-x: auto; padding: 4px; }
  .rail button { flex: 1 0 64px; min-height: 58px; font-size: 11px; }
  .rail button[aria-expanded="true"] { box-shadow: inset 0 3px 0 var(--gold); }
  .panel { position: fixed; left: 0; right: 0; bottom: 66px; width: auto; max-height: 55vh; z-index: 40; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.3); }
  .logo__word { display: none; }
  .title-field input { font-size: 15px; }
  .topbar--editor .btn { padding: 0 12px; }
  .topbar__hide-sm { display: none !important; }
  .topbar--editor .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar--editor .btn { padding: 0 10px; }
  .canvas-wrap { padding: 16px; }
  .pagebar { padding: 4px 8px; gap: 0 8px; }
  .pagebar .tb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pagebar__label { min-width: 70px; }
  .preview-stage { padding: 10px; min-height: 0; }
}
