/* Cornershop admin demo. Palette and fonts follow the Cornershop brand kit
   (shop green, deep green, cream, brass). Kit tokens are mapped onto it. rem only. */
:root {
  --a-ink: #08211a; --a-muted: #5c6b5f; --a-bg: #f4efe2; --a-panel: #fbf8ef; --a-panel-alt: #efe9d8; --a-line: #ddd5c0;
  --a-brand: #14392b; --a-brand-soft: #e2e6d8; --a-cta: #e0a82e; --a-cta-ink: #08211a;
  --a-danger: #7a2e27; --a-danger-soft: #f0dcd8; --a-ok: #2e6b52; --a-ok-soft: #dfeae2; --a-warn: #8f6a1d; --a-warn-soft: #f3e8cf;
  --a-display: 'Zilla Slab', Rockwell, Georgia, serif;
  --bg: var(--a-bg); --surface: var(--a-panel); --surface-2: var(--a-panel-alt); --line: var(--a-line); --line-strong: #cbc1a8;
  --text: var(--a-ink); --muted: var(--a-muted); --accent: var(--a-brand); --accent-soft: var(--a-brand-soft); --accent-text: #fbf8ef;
  --ok: var(--a-ok); --ok-soft: var(--a-ok-soft); --warn: var(--a-warn); --warn-soft: var(--a-warn-soft); --bad: var(--a-danger); --bad-soft: var(--a-danger-soft);
  --radius: 0.5rem; --radius-sm: 0.3125rem;
  --font: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 0.0625rem 0.125rem rgb(8 33 26 / 6%), 0 0.25rem 0.75rem rgb(8 33 26 / 6%);
  --shadow-lg: 0 1rem 3rem rgb(8 33 26 / 20%);
}
:root[data-theme="dark"] {
  --a-ink: #f4efe2; --a-muted: #a3b3a5; --a-bg: #08211a; --a-panel: #112e23; --a-panel-alt: #0d271e; --a-line: #26473a;
  --a-brand: #e0a82e; --a-brand-soft: #2c3a22; --a-danger: #c25a4f; --a-danger-soft: #3a211d; --a-ok: #5ca57f; --a-ok-soft: #16352a; --a-warn: #d4a044; --a-warn-soft: #33290f;
  --bg: var(--a-bg); --surface: var(--a-panel); --surface-2: var(--a-panel-alt); --line: var(--a-line); --line-strong: #345c4b;
  --text: var(--a-ink); --muted: var(--a-muted); --accent: var(--a-brand); --accent-soft: var(--a-brand-soft); --accent-text: #08211a;
  --ok: var(--a-ok); --ok-soft: var(--a-ok-soft); --warn: var(--a-warn); --warn-soft: var(--a-warn-soft); --bad: var(--a-danger); --bad-soft: var(--a-danger-soft);
}
html, body { height: 100%; }
body { background: var(--a-bg); font-size: 0.9375rem; overflow: hidden; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--a-display); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.625rem; }
.k-btn { font-weight: 700; }
.k-btn.cta { background: var(--a-cta); border-color: var(--a-cta); color: var(--a-cta-ink); }
.k-btn.cta:hover { filter: brightness(0.95); }
.k-btn.is-done { background: var(--a-ok); border-color: var(--a-ok); color: #fff; }
.k-btn.busy { opacity: .75; cursor: progress; }
.k-toast { background: var(--a-brand); color: var(--a-panel); }
:root[data-theme="dark"] .k-toast { color: var(--a-cta-ink); }
dialog.k-dialog { overflow: visible; }
dialog.k-dialog.wide { width: min(46rem, 94vw); }
dialog.k-dialog h2 { font-size: 1.25rem; }
.muted { color: var(--a-muted); }
.req { color: var(--a-danger); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); height: 100vh; }
.shell.sb-collapsed { grid-template-columns: minmax(0, 1fr); }
.shell.sb-collapsed .sb { display: none; }
.sb { background: var(--a-panel); border-right: 0.0625rem solid var(--a-line); display: flex; flex-direction: column; gap: 1rem; padding: 1rem 0.75rem; overflow-y: auto; min-height: 0; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.25rem; }
.sb-brand { all: unset; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; font-family: var(--a-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; min-width: 0; }
.sb-brand small { display: block; font-family: var(--font); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); }
.site-mark { width: 2rem; height: 2rem; border-radius: 0.4rem; display: grid; place-items: center; background: var(--site-brand, var(--a-brand)); color: var(--site-paper, #fbf8ef); flex: none; transition: background .3s; }
.site-mark svg { width: 1.35rem; height: 1.35rem; }
.sb-nav { display: flex; flex-direction: column; gap: 0.125rem; }
.sb-nav button.it { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.65rem; border-radius: var(--radius-sm); color: var(--a-muted); font-weight: 700; font-size: 0.875rem; width: 100%; }
.sb-nav button.it:hover { background: var(--a-panel-alt); color: var(--a-ink); }
.sb-nav button.it.on { background: var(--a-brand-soft); color: var(--a-brand); }
.sb-nav .ms { font-size: 1.15rem; }
.grp-h { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.65rem; color: var(--a-muted); font-weight: 700; font-size: 0.875rem; }
.grp-h .add { all: unset; cursor: pointer; margin-left: auto; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; border-radius: 0.25rem; color: var(--a-muted); }
.grp-h .add:hover { background: var(--a-brand-soft); color: var(--a-brand); }
.grp-h .add .ms { font-size: 1rem; }
.grp-c { display: flex; flex-direction: column; gap: 0.0625rem; margin: 0 0 0.375rem 1.05rem; padding-left: 0.6rem; border-left: 0.0625rem solid var(--a-line); }
.grp-c button.it { font-weight: 500; padding: 0.35rem 0.55rem; font-size: 0.84rem; }
.dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--a-cta); margin-left: auto; flex: none; }
.nb { margin-left: auto; min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem; border-radius: 1rem; background: var(--a-cta); color: var(--a-cta-ink); font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.6rem; padding: 0.75rem 0.5rem 0; border-top: 0.0625rem solid var(--a-line); font-size: 0.78rem; color: var(--a-muted); }
.made { display: flex; align-items: center; gap: 0.45rem; font-family: var(--a-display); font-weight: 700; font-size: 0.95rem; color: var(--a-ink); }
.made svg { width: 1.1rem; height: auto; color: var(--a-cta); }
.role-badge { display: inline-block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border-radius: 1rem; background: var(--a-brand-soft); color: var(--a-brand); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; padding: 0.375rem 1.25rem; background: var(--a-panel); border-bottom: 0.0625rem solid var(--a-line); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 0.25rem; min-width: 0; font-weight: 700; }
.crumbs .site { color: var(--a-muted); font-weight: 500; white-space: nowrap; }
.crumbs .ms { color: var(--a-muted); font-size: 1.1rem; }
.crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.only-collapsed { display: none; }
.shell.sb-collapsed .only-collapsed { display: inline-grid; }
.pop-wrap { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 0.375rem); z-index: 70; width: min(19rem, 88vw); background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.5rem; }
.popover[hidden] { display: none; }
.acct-head { padding: 0.5rem 0.625rem 0.625rem; border-bottom: 0.0625rem solid var(--a-line); margin-bottom: 0.375rem; }
.acct-head b { display: block; }
.role-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 0.6rem; width: 100%; padding: 0.5rem 0.625rem; border-radius: var(--radius-sm); }
.role-opt:hover { background: var(--a-panel-alt); }
.role-opt .ms { color: var(--a-muted); }
.role-opt.on .ms { color: var(--a-brand); }
.role-opt small { display: block; color: var(--a-muted); font-size: 0.75rem; }
.acct-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 2rem; padding: 0.125rem; }
.acct-btn .k-avatar { background: var(--a-brand); color: var(--a-panel); }
:root[data-theme="dark"] .acct-btn .k-avatar { color: var(--a-cta-ink); }
.view { flex: 1; min-height: 0; overflow-y: auto; }
.view.pad { padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { color: var(--a-muted); margin-top: 0.25rem; }
.sb-scrim { display: none; }
@media (max-width: 48rem) {
  .shell, .shell.sb-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; z-index: 80; inset: 0 auto 0 0; width: min(17rem, 86vw); transform: translateX(-102%); transition: transform .22s ease; display: flex !important; box-shadow: var(--shadow-lg); }
  .shell.sb-open .sb { transform: none; }
  .shell.sb-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgb(8 33 26 / 40%); }
  .only-collapsed { display: inline-grid; }
  .topbar { padding-inline: 5vw; gap: 0.5rem; }
  .crumbs .site, .crumbs .sep { display: none; }
  .hide-sm { display: none !important; }
}

/* ---------- editor ---------- */
.editor { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ed-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; border-bottom: 0.0625rem solid var(--a-line); background: var(--a-bg); flex-wrap: wrap; }
.ed-title { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.ed-title b { font-family: var(--a-display); font-size: 1.15rem; white-space: nowrap; }
.slug { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; color: var(--a-muted); }
.status { display: inline-flex; align-items: center; gap: 0.3rem; min-width: 9.5rem; height: 1.625rem; padding: 0 0.6rem; border-radius: 1rem; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.status .ms { font-size: 0.95rem; }
.status.ok { background: var(--a-ok-soft); color: var(--a-ok); }
.status.warn { background: var(--a-warn-soft); color: var(--a-warn); }
.status.busy { background: var(--a-panel-alt); color: var(--a-muted); }
.grow { flex: 1; }
.seg { display: inline-flex; padding: 0.1875rem; gap: 0.125rem; background: var(--a-panel-alt); border: 0.0625rem solid var(--a-line); border-radius: var(--radius-sm); }
.seg button { all: unset; cursor: pointer; display: inline-grid; place-items: center; min-width: 1.875rem; height: 1.75rem; padding: 0 0.375rem; border-radius: 0.25rem; color: var(--a-muted); font-weight: 700; font-size: 0.8125rem; }
.seg button .ms { font-size: 1.1rem; }
.seg button.on { background: var(--a-panel); color: var(--a-brand); box-shadow: var(--shadow); }
.seg button:focus-visible { outline: 0.125rem solid var(--a-cta); }
.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 25rem; }
.panes.form-only { grid-template-columns: minmax(0, 1fr); }
.panes.form-only .pv-host { display: none; }
.panes.form-only .panel { max-width: 46rem; width: 100%; margin: 0 auto; border-left: 0; }
.pv-host { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: color-mix(in srgb, var(--a-panel-alt) 70%, var(--a-line)); background-image: radial-gradient(circle at 0.0625rem 0.0625rem, color-mix(in srgb, var(--a-ink) 12%, transparent) 0.0625rem, transparent 0); background-size: 1.25rem 1.25rem; }
.pv-stage { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); }
.pv-frame { display: block; border: 0; background: #fff; transform-origin: 0 0; border-radius: 0.375rem; box-shadow: 0 0.75rem 2.5rem rgb(8 33 26 / 22%); }
.pv-host.dev-mobile .pv-frame { border-radius: 1.75rem; outline: 0.5rem solid #1b2621; }
.pv-host.dev-mobile .pv-stage { top: 1.5rem; }
.pv-host::after { content: attr(data-scale); position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 0.25rem; background: var(--a-panel); color: var(--a-muted); border: 0.0625rem solid var(--a-line); font-size: 0.72rem; font-weight: 700; pointer-events: none; }
.panel { position: relative; min-height: 0; overflow-y: auto; background: var(--a-bg); border-left: 0.0625rem solid var(--a-line); padding: 1rem; display: flex; flex-direction: column; }
@media (max-width: 64rem) {
  .editor { height: auto; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .pv-host { height: 58vh; }
  .panel { border-left: 0; border-top: 0.0625rem solid var(--a-line); overflow: visible; }
  .view.ed-view { overflow-y: auto; }
}

/* panel contents */
.pn-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.pn-head b { font-family: var(--a-display); font-size: 1.05rem; }
.pn-head small { display: block; color: var(--a-muted); font-size: 0.78rem; }
.tip { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.875rem; border-radius: var(--radius); background: var(--a-brand); color: #fbf8ef; margin-bottom: 0.875rem; font-size: 0.84rem; }
:root[data-theme="dark"] .tip { background: var(--a-cta); color: var(--a-cta-ink); }
.tip .ms { color: var(--a-cta); }
:root[data-theme="dark"] .tip .ms { color: var(--a-cta-ink); }
.tip button { all: unset; cursor: pointer; margin-left: auto; opacity: .75; }
.lock-note { display: flex; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--a-muted); background: var(--a-panel-alt); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
.lock-note .ms { font-size: 1rem; }
.acc { background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.acc.sel { border-color: var(--a-cta); box-shadow: 0 0 0 0.125rem color-mix(in srgb, var(--a-cta) 35%, transparent); }
.acc.is-hidden { border-style: dashed; opacity: .7; }
.acc.global { background: var(--a-panel-alt); }
.acc + .acc { margin-top: 0.5rem; }
.acc-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.5rem 0.55rem 0.75rem; cursor: pointer; user-select: none; }
.acc-ic { color: var(--a-brand); font-size: 1.15rem; }
.acc-title { flex: 1; min-width: 0; }
.acc-title b { display: block; font-size: 0.875rem; }
.acc-title small { display: block; color: var(--a-muted); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-actions { display: flex; gap: 0.0625rem; }
.ib { all: unset; cursor: pointer; width: 1.75rem; height: 1.75rem; display: inline-grid; place-items: center; border-radius: 0.25rem; color: var(--a-muted); }
.ib:hover { background: var(--a-brand-soft); color: var(--a-brand); }
.ib.danger:hover { background: var(--a-danger-soft); color: var(--a-danger); }
.ib[disabled] { opacity: .3; pointer-events: none; }
.ib .ms { font-size: 1.05rem; }
.chev { color: var(--a-muted); transition: transform .15s; }
.acc.open .chev { transform: rotate(180deg); }
.acc.open .acc-head { border-bottom: 0.0625rem solid var(--a-line); }
.acc-body { padding: 0.875rem; background: var(--a-panel-alt); border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-direction: column; gap: 0.875rem; }
.acc.global .acc-body { background: var(--a-bg); }
.tag { font-size: 0.6875rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 1rem; background: var(--a-warn-soft); color: var(--a-warn); white-space: nowrap; }
.tag.g { background: var(--a-brand-soft); color: var(--a-brand); }
.plus { all: unset; cursor: pointer; align-self: center; width: 1.6rem; height: 1.6rem; margin: 0.3rem auto; border: 0.0625rem dashed var(--line-strong); border-radius: 50%; display: grid; place-items: center; color: var(--a-muted); }
.plus:hover { color: var(--a-brand); border-color: var(--a-brand); background: var(--a-brand-soft); }
.plus .ms { font-size: 1rem; }
.gap { height: 0.5rem; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--a-cta) 55%, transparent); } 100% { box-shadow: 0 0 0 0.25rem transparent; } }

/* fields */
.fld { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.fld > label, .fld-l { font-size: 0.75rem; font-weight: 700; color: var(--a-muted); display: flex; align-items: center; gap: 0.35rem; }
.fld .help { font-size: 0.72rem; color: var(--a-muted); }
.fld .k-input, .fld .k-textarea { background: var(--a-panel); }
.fld .k-textarea { min-height: 4.5rem; }
.fld input[type="number"] { width: 6rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.img-field { display: flex; gap: 0.625rem; align-items: center; background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius-sm); padding: 0.4rem; }
.img-field img, .img-field .ph { width: 4.5rem; height: 3.375rem; object-fit: cover; border-radius: 0.25rem; flex: none; }
.img-field .ph { display: grid; place-items: center; background: var(--a-panel-alt); color: var(--a-muted); }
.img-field .meta { flex: 1; min-width: 0; font-size: 0.78rem; }
.img-field .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-field .meta small { color: var(--a-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-field .acts { display: flex; gap: 0.125rem; }
.rep { gap: 0.4rem; }
.rep-item { background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius-sm); }
.rep-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.25rem 0.3rem 0.5rem; cursor: pointer; font-size: 0.82rem; }
.rep-n { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; background: var(--a-panel-alt); color: var(--a-muted); font-size: 0.6875rem; font-weight: 700; flex: none; }
.rep-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rep-sum .ms { font-size: 1rem; vertical-align: -0.2rem; color: var(--a-brand); margin-right: 0.25rem; }
.rep-body { padding: 0.625rem; border-top: 0.0625rem solid var(--a-line); display: flex; flex-direction: column; gap: 0.625rem; }
.rep-add { align-self: flex-start; }
.rep-item.open .chev { transform: rotate(180deg); }
@media (min-width: 64.0625rem) and (max-width: 80rem) { .panes { grid-template-columns: minmax(0, 1fr) 22rem; } }
.counter { margin-left: auto; font-weight: 600; }
.counter.over { color: var(--a-danger); }
.serp { background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius-sm); padding: 0.75rem; font-family: Arial, sans-serif; }
.serp .u { font-size: 0.75rem; color: var(--a-ok); }
.serp .t { color: #1a0dab; font-size: 1.05rem; line-height: 1.3; margin: 0.15rem 0; }
:root[data-theme="dark"] .serp .t { color: #8ab4f8; }
.serp .d { font-size: 0.8rem; color: var(--a-muted); }
.sec-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); margin: 1rem 0 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.4rem; }
.preset { all: unset; box-sizing: border-box; cursor: pointer; border: 0.125rem solid var(--a-line); border-radius: var(--radius-sm); padding: 0.4rem; background: var(--a-panel); display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; }
.preset:hover { border-color: var(--line-strong); }
.preset.on { border-color: var(--a-cta); }
.preset .sw { display: flex; height: 1.4rem; border-radius: 0.2rem; overflow: hidden; }
.preset .sw i { flex: 1; }
.k-select .k-opt .ms { font-size: 1.1rem; }

/* block picker */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 0.5rem; max-height: 60vh; overflow: auto; }
.pick { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.75rem; border: 0.0625rem solid var(--a-line); border-radius: var(--radius); background: var(--a-panel); }
.pick:hover { border-color: var(--a-brand); background: var(--a-brand-soft); }
.pick .ms { color: var(--a-brand); font-size: 1.5rem; }
.pick b { display: block; font-size: 0.875rem; }
.pick small { color: var(--a-muted); font-size: 0.75rem; line-height: 1.35; display: block; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: 0.5rem; max-height: 56vh; overflow: auto; padding: 0.125rem; }
.media-pick { all: unset; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; border: 0.125rem solid transparent; position: relative; background: var(--a-panel-alt); }
.media-pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.media-pick span { display: block; font-size: 0.6875rem; padding: 0.25rem 0.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-pick:hover, .media-pick.on { border-color: var(--a-cta); }
.drop { border: 0.125rem dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; padding: 1rem; color: var(--a-muted); cursor: pointer; text-align: center; font-size: 0.82rem; min-height: 6rem; }
.drop .ms { font-size: 1.75rem; }
.drop:hover, .drop.over { border-color: var(--a-brand); background: var(--a-brand-soft); color: var(--a-brand); }

/* ---------- cards & lists (dashboard, posts, gallery, inbox) ---------- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.card { background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius); padding: 1rem 1.125rem; min-width: 0; }
.card h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; margin-bottom: 0.75rem; }
.card h3 .ms { color: var(--a-brand); }
.card h3 .k-btn { margin-left: auto; }
.list-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.55rem 0; border-top: 0.0625rem solid var(--a-line); font-size: 0.875rem; }
.list-row:first-of-type { border-top: 0; }
.list-row .grow { min-width: 0; }
.list-row small { display: block; color: var(--a-muted); font-size: 0.75rem; }
.empty { color: var(--a-muted); font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; }
.welcome { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; background: var(--a-brand); color: #fbf8ef; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
:root[data-theme="dark"] .welcome { background: var(--a-panel); color: var(--a-ink); border: 0.0625rem solid var(--a-line); }
.welcome h1 { font-size: 1.5rem; }
.welcome p { opacity: .85; margin-top: 0.25rem; }
.pill { display: inline-flex; align-items: center; gap: 0.25rem; height: 1.375rem; padding: 0 0.5rem; border-radius: 1rem; font-size: 0.72rem; font-weight: 700; white-space: nowrap; background: var(--a-panel-alt); color: var(--a-muted); }
.pill.ok { background: var(--a-ok-soft); color: var(--a-ok); }
.pill.warn { background: var(--a-warn-soft); color: var(--a-warn); }
.pill.cta { background: color-mix(in srgb, var(--a-cta) 25%, transparent); color: var(--a-ink); }
.thumb { width: 3.25rem; height: 2.5rem; border-radius: 0.25rem; object-fit: cover; flex: none; background: var(--a-panel-alt); }
.k-table td .sub { color: var(--a-muted); font-size: 0.75rem; }
.k-table tr.click { cursor: pointer; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
@media (max-width: 60rem) { .post-layout { grid-template-columns: minmax(0, 1fr); } }
.form-stack { display: flex; flex-direction: column; gap: 0.875rem; }
.pc-preview { border-radius: var(--radius); overflow: hidden; border: 0.0625rem solid var(--a-line); background: #fff; color: #2a1d14; }
.pc-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.pc-preview .b { padding: 0.875rem 1rem 1rem; }
.pc-preview .d { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5b3a24; }
.pc-preview h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; margin: 0.3rem 0; }
.pc-preview p { font-size: 0.82rem; color: #6b5c50; margin: 0; }
.media-cards { display: grid; gap: 0.875rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.mcard { background: var(--a-panel); border: 0.0625rem solid var(--a-line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.mcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mcard .b { padding: 0.625rem 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8rem; }
.mcard .b b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .b small { color: var(--a-muted); }
.mcard .k-input { height: 1.875rem; font-size: 0.78rem; }
.mcard .acts { display: flex; justify-content: space-between; align-items: center; }
.inbox { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 52rem) { .inbox { grid-template-columns: minmax(0, 1fr); } }
.msg-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 0.625rem; width: 100%; padding: 0.625rem 0.75rem; border-radius: var(--radius-sm); }
.msg-row:hover { background: var(--a-panel-alt); }
.msg-row.on { background: var(--a-brand-soft); }
.msg-row .udot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--a-cta); margin-top: 0.4rem; flex: none; visibility: hidden; }
.msg-row.unread .udot { visibility: visible; }
.msg-row.unread b { font-weight: 800; }
.msg-row small { display: block; color: var(--a-muted); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.5rem 1rem; font-size: 0.875rem; margin: 1rem 0; }
.kv .k { color: var(--a-muted); }
.theme-layout { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 64rem) { .theme-layout { grid-template-columns: minmax(0, 1fr); } }
.theme-pv { position: sticky; top: 0; height: min(40rem, 75vh); border-radius: var(--radius); overflow: hidden; border: 0.0625rem solid var(--a-line); }
.colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.color-f { display: flex; align-items: center; gap: 0.5rem; }
.swatch { position: relative; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-sm); border: 0.0625rem solid var(--line-strong); flex: none; overflow: hidden; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.color-f .k-input { font-family: ui-monospace, Consolas, monospace; font-size: 0.8125rem; }
.live-overlay { position: fixed; inset: 0; z-index: 90; background: rgb(8 33 26 / 70%); display: flex; flex-direction: column; padding: 1rem; gap: 0.75rem; }
.live-overlay[hidden] { display: none; }
.live-bar { display: flex; align-items: center; gap: 0.75rem; color: #fbf8ef; flex-wrap: wrap; }
.live-bar .url { font-family: ui-monospace, Consolas, monospace; font-size: 0.8125rem; background: rgb(255 255 255 / 12%); padding: 0.25rem 0.625rem; border-radius: 1rem; }
.live-overlay .pv-host { flex: 1; border-radius: var(--radius); }
