/* Gondolia portal. CLD 4.1; Gondolia brand system and app shell, CLD 1.1 · 2026-11-05 */
@font-face { font-family: Manrope; src: url("/brand/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
/* Latin subset, 24 kB woff2 (CLD 2.1); the full TTF above loads only for a character outside it */
@font-face { font-family: Manrope; src: url("/brand/Manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2248, U+2260, U+2264-2265, U+25CF, U+2713, U+FEFF, U+FFFD; }
:root {
  /* Gondolia brand tokens (brand system: web/storemap_ui/brand/gondolia-system/tokens.json) */
  --canvas:#F7F6FA; --surface:#FFFFFF; --sunken:#EFEDF4; --line:#E3E0EA; --line-control:#8C88A0;
  --ink:#1C1B2E; --ink-2:#46435A; --muted:#5E5B6E;
  --spot:#5B3CF5; --spot-strong:#4529D6; --on-spot:#FFFFFF; --spot-soft:#ECE8FF; --focus:#5B3CF5;
  --success:#1E7A46; --success-soft:#E3F2E8; --warning:#8A5A00; --warning-soft:#FFF1D6;
  --danger:#B42335; --danger-soft:#FCE8EA; --info:#2F5FB3; --info-soft:#E8EFFC;
  --r-sm:6px; --r-md:10px; --r-lg:16px; --r-xl:22px;
  --shadow-card:0 1px 2px rgba(28,27,46,.06), 0 8px 24px rgba(28,27,46,.07);
  --shadow-pop:0 4px 10px rgba(28,27,46,.10), 0 20px 48px rgba(28,27,46,.16);
  /* older names the screens still use */
  --bg:var(--canvas); --card:var(--surface); --fg:var(--ink); --mut:var(--muted); --acc:var(--spot); --acc2:var(--spot-soft);
  --ok:var(--success); --warn:var(--warning); --bad:var(--danger);
}
* { box-sizing:border-box; }
html, body { margin:0; height:100%; background:var(--canvas); color:var(--ink); font:15px/1.5 Manrope, "Segoe UI", system-ui, sans-serif; }
a { color:var(--spot); text-decoration:none; } a:hover { text-decoration:underline; }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }

/* ---- the app frame: fixed top bar and side menu, only the page scrolls ---- */
body { display:grid; grid-template-rows:64px minmax(0,1fr); grid-template-columns:240px minmax(0,1fr); height:100vh; overflow:hidden; }
header#top { grid-column:1 / -1; display:flex; align-items:center; gap:20px; padding:0 20px; background:var(--surface); border-bottom:1px solid var(--line); z-index:5; }
header .logo { width:200px; flex:none; display:flex; align-items:center; }
header .logo img { height:34px; width:auto; display:block; }
header .search { flex:1; max-width:620px; margin:0 auto; height:44px; display:flex; align-items:center; gap:10px; padding:0 14px; background:var(--sunken); border-radius:var(--r-md); }
header .search input { border:0; background:transparent; padding:0; height:100%; outline:0; }
header .search:focus-within { outline:2px solid var(--focus); outline-offset:2px; }
#who { flex:none; display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px; }
#who a { color:var(--ink-2); font-weight:600; }
aside#side { grid-row:2; background:var(--surface); border-right:1px solid var(--line); padding:14px 12px 16px; display:flex; flex-direction:column; gap:2px; }
#storenav { flex:1; display:flex; flex-direction:column; gap:2px; min-height:0; }
#side .grp { padding:8px 14px 6px; font-size:12px; font-weight:700; color:var(--muted); text-transform:none; }
#side .grp.store { color:var(--ink); font-size:14px; padding-bottom:8px; }
#side a { height:40px; display:flex; align-items:center; gap:8px; padding:0 14px; border-radius:var(--r-md); color:var(--ink-2); font-size:14px; font-weight:500; text-decoration:none; }
#side a:hover { background:var(--sunken); }
#side a.on { background:var(--spot-soft); color:var(--ink); font-weight:700; }
#side a .n { margin-left:auto; padding:1px 8px; border-radius:999px; background:var(--warning-soft); color:var(--warning); font-size:12px; font-weight:700; }
#side .bottom { margin-top:auto; padding-top:10px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:2px; }
main#main { grid-row:2; grid-column:2; overflow-y:auto; padding:28px 32px 48px; }
body.bare header .search { visibility:hidden; }
body.bare { grid-template-columns:minmax(0,1fr); } body.bare aside#side { display:none; } body.bare main#main { grid-column:1; }
main > * { max-width:1400px; }

h1 { font-size:28px; line-height:36px; letter-spacing:-.015em; margin:0 0 18px; } h2 { font-size:17px; line-height:24px; margin:0 0 10px; }
.mut { color:var(--muted); } .small { font-size:13px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px 22px; margin-bottom:16px; }
.grid { display:grid; gap:16px; } .g2 { grid-template-columns:1fr 1fr; } .g3 { grid-template-columns:repeat(3,1fr); } .g4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1100px) { .g4 { grid-template-columns:1fr 1fr; } }
@media (max-width:900px) { .g2, .g3 { grid-template-columns:minmax(0,1fr); } }
label.f { display:block; margin-bottom:12px; } label.f span { display:block; font-size:13px; font-weight:600; color:var(--ink); margin-bottom:4px; }
input, select, textarea { font:inherit; padding:9px 12px; border:1px solid var(--line-control); border-radius:var(--r-md); background:var(--surface); color:var(--ink); width:100%; }
input[type=checkbox] { width:auto; accent-color:var(--spot); }
button, .btn { font:inherit; font-weight:600; padding:9px 16px; border-radius:var(--r-md); border:1px solid var(--spot); background:var(--spot); color:var(--on-spot); cursor:pointer; display:inline-block; text-decoration:none; }
button:hover, .btn:hover { background:var(--spot-strong); text-decoration:none; }
button.sec, .btn.sec { background:var(--surface); color:var(--ink); border:1.5px solid var(--line-control); }
button.sec:hover, .btn.sec:hover { background:var(--sunken); }
button.danger { background:var(--surface); color:var(--danger); border:1.5px solid var(--line-control); }
button:disabled { opacity:.45; cursor:default; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.row > * { flex:0 0 auto; } .row select, .row input:not(.grow) { width:auto; } .row .grow { flex:1 1 200px; }
table { border-collapse:collapse; width:100%; } th, td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
th { font-size:13px; color:var(--muted); font-weight:600; } tr.click:hover { background:var(--sunken); cursor:pointer; }
.thumb { width:44px; height:44px; object-fit:contain; background:var(--sunken); border-radius:var(--r-sm); }
.tag { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:600; background:var(--sunken); color:var(--muted); margin:1px 2px; white-space:nowrap; }
.st-confirmed { background:var(--success-soft); color:var(--success); } .st-ai_sure { background:var(--info-soft); color:var(--info); } .st-suggested { background:var(--warning-soft); color:var(--warning); }
.code { font-family:ui-monospace, Consolas, monospace; font-size:12px; }
.steps { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 16px; padding:0; list-style:none; }
.steps li { padding:6px 12px; border-radius:999px; background:var(--sunken); color:var(--ink-2); font-size:13px; font-weight:600; }
.steps li.done { background:var(--success-soft); color:var(--success); } .steps li.now { background:var(--spot); color:var(--on-spot); }
.bar { height:8px; background:var(--sunken); border-radius:4px; overflow:hidden; } .bar i { display:block; height:100%; background:var(--spot); }
#toast { position:fixed; right:20px; bottom:20px; background:var(--ink); color:#fff; padding:12px 16px; border-radius:var(--r-md); opacity:0; transition:opacity .2s; pointer-events:none; z-index:20; max-width:420px; box-shadow:var(--shadow-pop); }
#toast.on { opacity:1; } #toast.err { background:var(--danger); }
.login { max-width:900px; margin:32px auto; }
.login .brand { display:flex; justify-content:center; margin:0 0 24px; } .login .brand img { width:240px; height:auto; }
canvas.plan { width:100%; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); cursor:pointer; }
.v3d { position:relative; width:100%; height:560px; border-radius:var(--r-lg); overflow:hidden; background:#16151F; }
.v3d.small { height:380px; } .v3d canvas { display:block; width:100%; height:100%; }
.v3d .hud { position:absolute; left:10px; top:10px; background:rgba(28,27,46,.78); color:#F2F1F8; padding:6px 10px; border-radius:var(--r-md); font-size:12px; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin:0 4px 0 10px; vertical-align:-1px; }

/* dashboard (CLD 1.1) */
.pagehead { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.pagehead h1 { margin:0; } .pagehead .sub { color:var(--muted); font-size:14px; margin-top:4px; }
.stat { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px 20px; display:flex; flex-direction:column; gap:4px; color:var(--ink); text-decoration:none; }
.stat:hover { text-decoration:none; }
.stat .l { font-size:13px; font-weight:600; color:var(--muted); } .stat .v { font-size:30px; line-height:36px; font-weight:700; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.stat .s { font-size:12px; font-weight:500; color:var(--muted); }
.stat.warn { background:var(--warning-soft); border-color:transparent; } .stat.warn .l, .stat.warn .v, .stat.warn .s { color:var(--warning); }
.dash { display:grid; grid-template-columns:minmax(0,2fr) minmax(300px,1fr); gap:16px; margin-top:16px; }
@media (max-width:1100px) { .dash { grid-template-columns:minmax(0,1fr); } main table { display:block; max-width:100%; overflow-x:auto; } }
.needs a { display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); color:var(--ink); font-size:14px; }
.needs a:last-child { border-bottom:0; } .needs a b { color:var(--warning); }
.feed div { padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; } .feed div:last-child { border-bottom:0; } .feed .mut { font-size:13px; }
.mapwell { position:relative; background:var(--sunken); border-radius:var(--r-lg); padding:12px; }
.mapwell { display:flex; flex-direction:column-reverse; justify-content:flex-end; align-self:start; gap:10px; }
.mapwell .lab { padding:2px 6px; font-size:13px; font-weight:600; color:var(--ink-2); }
/* stores (CLD 1.1) */
.stores { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:22px; }
.scard { display:flex; flex-direction:column; background:var(--surface); border-radius:var(--r-xl); overflow:hidden; color:var(--ink); box-shadow:var(--shadow-card); }
.scard:hover { text-decoration:none; box-shadow:var(--shadow-pop); }
.scard .pic { height:190px; background:var(--sunken); display:flex; align-items:center; justify-content:center; position:relative; }
.scard .pic img { width:96px; height:auto; opacity:.9; }
.scard .pic .badge { position:absolute; left:14px; top:14px; }
.scard .body { padding:16px 20px 18px; display:flex; flex-direction:column; gap:3px; }
.scard .body b { font-size:17px; } .scard .body span { font-size:14px; color:var(--muted); }
.addcard { min-height:280px; border:2px dashed #C9C5D4; border-radius:var(--r-xl); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:var(--ink); font-weight:600; }
.addcard:hover { text-decoration:none; background:var(--surface); }
.addcard i { width:52px; height:52px; border-radius:26px; background:var(--spot); color:var(--on-spot); display:flex; align-items:center; justify-content:center; font-style:normal; font-size:26px; line-height:1; }
/* new store landing (CLD 1.1) */
.firststeps { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:20px; max-width:880px; }
@media (max-width:900px) { .firststeps { grid-template-columns:1fr; } }
.firststeps .card { display:flex; flex-direction:column; gap:12px; padding:28px; margin:0; }
.firststeps .num { width:44px; height:44px; border-radius:22px; background:var(--sunken); color:var(--ink); font-weight:700; display:flex; align-items:center; justify-content:center; }
.firststeps .card:first-child .num { background:var(--ink); color:#fff; }
.firststeps h2 { margin:0; font-size:20px; } .firststeps .btn { margin-top:auto; text-align:center; }

/* shelf editor */
.shelfwrap { display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:16px; }
.baynav select { width:auto; }
@media (max-width:1100px) { .shelfwrap { grid-template-columns:1fr; } }
.bay { position:relative; background:#FAF9FC; border:3px solid var(--ink-2); border-radius:4px; user-select:none; }
.shelf { position:relative; height:86px; border-bottom:6px solid var(--line-control); }
.shelf .lab { position:absolute; left:-30px; bottom:2px; width:26px; text-align:right; font-size:11px; color:var(--muted); }
.shelf.over { background:var(--spot-soft); }
.pk { position:absolute; bottom:0; height:78px; border:1px solid var(--line-control); border-radius:3px; background:#fff center/contain no-repeat;
  font-size:10px; line-height:1.15; overflow:hidden; cursor:grab; display:flex; align-items:flex-end; touch-action:none; }
.pk span { background:rgba(255,255,255,.9); width:100%; padding:1px 2px; }
.pk.suggested { border:2px dashed var(--warning); } .pk.ai_sure { border:2px solid var(--info); } .pk.confirmed { border:2px solid var(--success); }
.pk.sel { outline:3px solid var(--spot); z-index:3; } .pk.drag { opacity:.85; cursor:grabbing; z-index:4; box-shadow:var(--shadow-pop); }
.palette .it { display:flex; gap:6px; align-items:center; padding:5px; border:1px solid var(--line); border-radius:var(--r-sm); margin-bottom:4px; cursor:grab; background:#fff; }
.palette .it img { width:30px; height:30px; object-fit:contain; }
.baynav { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.drawer { position:fixed; right:0; top:0; bottom:0; width:min(520px, 100vw); background:var(--surface); box-shadow:var(--shadow-pop); padding:22px; overflow:auto; z-index:10; }
.drawer .x { float:right; }
.drawer img.big { width:140px; height:140px; object-fit:contain; border-radius:var(--r-md); float:right; margin:0 0 8px 10px; background:var(--sunken); }
pre { background:var(--ink); color:#E9E7F2; padding:12px; border-radius:var(--r-md); overflow:auto; font-size:12px; }
/* store dashboard aisles (CLD 2.1) */
.needs a.quiet b { color:var(--muted); font-weight:500; }
.aisles .aisle { display:flex; align-items:center; gap:12px; width:100%; padding:10px 4px; margin:0; background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; color:var(--ink); text-align:left; cursor:pointer; font:inherit; box-shadow:none; }
.aisles .aisle:last-child { border-bottom:0; } .aisles .aisle:hover { background:var(--sunken); }
.aisles .an, .secs .sn { flex:none; width:32px; height:32px; border-radius:8px; background:var(--sunken); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.aisles .ah, .secs .sw { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; font-size:14px; font-weight:600; }
.aisles .ah > span:first-child, .secs .sw > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aisles .ah .mut, .secs .sw .mut { font-size:12px; font-weight:500; }
.aisles .chev { color:var(--muted); font-size:20px; }
.aisles .ahead { display:flex; align-items:center; gap:10px; margin-bottom:12px; } .aisles .ahead h2 { margin:0; }
.aisles .back { flex:none; width:32px; height:32px; padding:0; margin:0; border-radius:8px; background:var(--sunken); color:var(--ink); border:0; font-size:20px; cursor:pointer; box-shadow:none; }
.aisles .segs { display:flex; gap:4px; padding:4px; background:var(--sunken); border-radius:10px; }
.aisles .segs button { flex:1; padding:7px 0; margin:0; border:0; border-radius:7px; background:none; color:var(--muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer; box-shadow:none; }
.aisles .segs button.on { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-card); }
.secs { max-height:440px; overflow:auto; margin-top:6px; }
.secs a { display:flex; align-items:center; gap:12px; padding:9px 4px; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.secs a:last-child { border-bottom:0; } .secs a:hover { background:var(--sunken); text-decoration:none; }
.secs .ck { flex:none; min-width:26px; padding:2px 8px; border-radius:999px; background:var(--warning-soft); color:var(--warning); font-size:12px; text-align:center; }

/* ---- phone (CLD 2.1): side menu slides out from the left, one column, no sideways scroll ---- */
.menubtn { display:none; }
#sideback[hidden] { display:none; }
@media (max-width:760px) {
  body { grid-template-columns:minmax(0,1fr); grid-template-rows:56px minmax(0,1fr); }
  header#top { gap:10px; padding:0 12px; }
  .menubtn { display:flex; flex:none; width:40px; height:40px; padding:0; margin:0; align-items:center; justify-content:center; background:none; border:0; border-radius:var(--r-md); color:var(--ink); }
  .menubtn:hover { background:var(--sunken); }
  body.bare .menubtn { display:none; }
  header .logo { width:auto; } header .logo img { height:28px; }
  header .search { height:40px; padding:0 10px; min-width:0; }
  #who .em { display:none; }
  aside#side { position:fixed; z-index:30; top:0; bottom:0; left:0; width:min(300px, 84vw); padding-top:20px; box-shadow:var(--shadow-pop);
    transform:translateX(-105%); transition:transform .22s ease; visibility:hidden; overflow-y:auto; }
  body.menu-open aside#side { transform:none; visibility:visible; }
  #sideback { position:fixed; inset:0; z-index:25; background:rgba(28,27,46,.38); }
  main#main { grid-column:1; padding:20px 16px 40px; }
  h1 { font-size:24px; line-height:30px; }
  .card { padding:16px; }
  .pagehead { align-items:stretch; } .pagehead .row { width:100%; } .pagehead .row > * { flex:1; text-align:center; }
  .stat { padding:14px 16px; } .stat .v { font-size:24px; line-height:30px; }
  .dash { grid-template-columns:minmax(0,1fr); }
  .firststeps { grid-template-columns:minmax(0,1fr) !important; }
  main table { display:block; max-width:100%; overflow-x:auto; }
  main table th, main table td { min-width:56px; } main table td.small { min-width:160px; } main table td input { min-width:72px; }   /* wide tables scroll inside their card instead of crushing */
  main pre, main code { white-space:pre-wrap; word-break:break-word; }
  .row { flex-wrap:wrap; }
}
@media (max-width:760px) and (prefers-reduced-motion:reduce) { aside#side { transition:none; } }

/* Items page (CLD 2.1) */
.itools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:16px; }
.itools select { width:auto; height:44px; }
.isearch { flex:1 1 320px; min-width:0; height:44px; display:flex; align-items:center; gap:10px; padding:0 14px; background:var(--surface); border:1px solid var(--line-control); border-radius:var(--r-md); }
.isearch:focus-within { outline:2px solid var(--focus); outline-offset:2px; }
.isearch input { border:0; padding:0; height:100%; outline:0; background:transparent; }
.itable { padding:6px 10px; }
.itable table { width:100%; border-collapse:collapse; }
.itable th { text-align:left; padding:12px 12px; border-bottom:1px solid var(--line); }
.itable td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; font-size:14px; }
.itable tbody tr:last-child td { border-bottom:0; }
.iname { display:flex; align-items:center; gap:12px; min-width:0; }
.iname .thumb { flex:none; display:block; }
.iname > span:last-child { display:flex; flex-direction:column; min-width:0; }
.iname .n { font-weight:600; } .iwm { display:none; } .iname .b { font-size:13px; color:var(--muted); }
.iw { white-space:nowrap; }
.st-none { background:var(--sunken); color:var(--muted); }
.ifoot { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; }
.ifoot button { padding:6px 14px; }
@media (max-width:760px) {
  .itools select { flex:1 1 140px; }
  .isearch { flex-basis:100%; }
  .itable { padding:0 4px; }
  .itable table { display:table; }
  .itable .ic { display:none; }
  .itable td, .itable th { min-width:0 !important; padding:10px 8px; }
  .itable .iw { display:none; } .iwm { display:block !important; }
  .iname .thumb { width:36px; height:36px; }
}

/* shelf editor in the Gondolia design (CLD 2.1) */
button.sm, .btn.sm { padding:5px 12px; font-size:13px; }
.sbar { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.segs { display:inline-flex; gap:4px; padding:4px; background:var(--sunken); border-radius:10px; max-width:100%; overflow-x:auto; }
.segs button { flex:none; padding:7px 14px; margin:0; border:0; border-radius:7px; background:none; color:var(--muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.segs button:hover { background:rgba(28,27,46,.06); color:var(--ink); }
.segs button.on { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-card); }
.sstrip { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 10px; margin-bottom:6px; scroll-snap-type:x proximity; }
.sstrip button { flex:none; scroll-snap-align:start; width:132px; display:flex; align-items:center; gap:8px; padding:8px 10px; margin:0; text-align:left;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:var(--r-md); font:inherit; cursor:pointer; position:relative; }
.sstrip button:hover { background:var(--sunken); }
.sstrip button.on { border:2px solid var(--spot); padding:7px 9px; background:var(--spot-soft); }
.sstrip .sn { flex:none; width:26px; height:26px; border-radius:7px; background:var(--sunken); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; }
.sstrip button.on .sn { background:var(--spot); color:#fff; }
.sstrip .sw { font-size:12px; font-weight:600; line-height:1.25; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.sstrip .ck { position:absolute; top:-6px; right:-4px; min-width:20px; padding:1px 6px; border-radius:999px; background:var(--warning-soft); color:var(--warning); font-size:11px; text-align:center; border:1px solid var(--surface); }
.shead { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; } .shead h2 { margin:0; flex:1; }
.legend { display:flex; gap:2px; flex-wrap:wrap; }
.bayframe { padding-left:26px; }
.shelf .lab { left:-24px; width:18px; bottom:6px; font-weight:700; }
.pk { border-radius:4px; background-color:#fff; }
.pk.ai_sure { border-color:var(--info); }
#sel .empty { padding:6px 0; }
.pick { display:flex; gap:16px; align-items:flex-start; }
.pick .big { flex:none; width:96px; height:96px; object-fit:contain; border-radius:var(--r-md); background:var(--sunken); display:block; }
.pinfo { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.pinfo .pt { display:flex; gap:8px; align-items:flex-start; justify-content:space-between; } .pinfo .pt b { font-size:16px; }
.pspot { font-weight:600; font-size:14px; }
.pact { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; }
.step { display:inline-flex; align-items:center; gap:8px; padding:2px; border:1px solid var(--line); border-radius:var(--r-md); font-size:13px; }
.step button { width:32px; height:32px; padding:0; }
.tcl { max-height:360px; overflow:auto; }
.tci { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.tci:last-child { border-bottom:0; }
.tci img, .tci .ph, .palette .it .ph { flex:none; width:36px; height:36px; object-fit:contain; border-radius:6px; background:var(--sunken); }
.tci .lnk { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; padding:0; margin:0; background:none; border:0; color:var(--ink); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.tci .lnk:hover { background:none; text-decoration:underline; } .tci .lnk .mut { font-size:12px; }
.palette .it { padding:6px 8px; gap:10px; } .palette .it .small { display:flex; flex-direction:column; } .palette .it .mut { font-size:12px; }
.palette .it button { flex:none; width:32px; height:32px; padding:0; font-size:18px; }
.palette select { width:auto; }
@media (max-width:760px) {
  .sstrip button { width:112px; }
  .pick .big { width:64px; height:64px; }
  .shelf { height:70px; } .pk { height:62px; }
  .legend { order:3; width:100%; }
  .v3d.small { height:280px; }
}

/* To check page (CLD 2.1) */
.tcsides { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:16px; }
.tcsides .card { margin:0; }
.tcsides .secs { max-height:none; }
.secs .chev { color:var(--muted); font-size:18px; margin-left:4px; }
.secs .sn { flex:none; width:32px; height:32px; border-radius:8px; background:var(--sunken); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.secs .sw { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; font-size:14px; font-weight:600; }
.secs .sw .mut { font-size:12px; font-weight:500; }
@media (max-width:760px) { .tcsides { grid-template-columns:minmax(0,1fr); } .tctop { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }

/* Walks page (CLD 2.1) */
.wdrop { display:flex; flex-direction:column; align-items:center; gap:6px; padding:34px 20px; margin-bottom:12px; text-align:center; cursor:pointer;
  background:var(--surface); border:2px dashed var(--line-control); border-radius:var(--r-xl); }
.wdrop:hover, .wdrop.over { border-color:var(--spot); background:var(--spot-soft); }
.wdrop.busy { pointer-events:none; opacity:.8; }
.wdrop input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.wdrop .wic { width:52px; height:52px; border-radius:26px; background:var(--spot); display:flex; align-items:center; justify-content:center; margin-bottom:4px; }
.wdrop .wl { font-size:17px; font-weight:700; }
.wopts { margin:0 0 20px; font-size:14px; } .wopts summary { cursor:pointer; color:var(--ink-2); font-weight:600; } .wopts p { margin:8px 0; }
.walks .walk { padding:14px 0; border-bottom:1px solid var(--line); } .walks .walk:last-child { border-bottom:0; padding-bottom:4px; }
.whead { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.whead .wt { display:flex; flex-direction:column; gap:2px; min-width:0; } .whead .wt b { font-size:15px; }
.whead .wr { display:flex; align-items:center; gap:10px; }
.st-bad { background:var(--danger-soft); color:var(--danger); }
.wtrack { list-style:none; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; padding:0; margin:14px 0 0; }
.wtrack li { display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:600; color:var(--muted); }
.wtrack .dot { height:6px; border-radius:3px; background:var(--sunken); }
.wtrack li.done .dot { background:var(--success); } .wtrack li.done { color:var(--success); }
.wtrack li.now .dot { background:var(--spot); } .wtrack li.now { color:var(--ink); }
.wtrack li.bad .dot { background:var(--danger); } .wtrack li.bad { color:var(--danger); }
@media (prefers-reduced-motion:no-preference) { .wtrack li.now:not(.bad) .dot { animation:wpulse 1.6s ease-in-out infinite; } }
@keyframes wpulse { 50% { opacity:.45; } }
@media (max-width:760px) { .wdrop { padding:26px 16px; } .wtrack li span:last-child { font-size:11px; } }

/* Settings page (CLD 2.1) */
.setgrid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:start; }
.setgrid .card { margin-bottom:16px; }
.setlinks { display:flex; flex-direction:column; }
.setlinks a { display:flex; flex-direction:column; gap:2px; padding:11px 0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.setlinks a:last-child { border-bottom:0; } .setlinks a:hover b { color:var(--spot); }
.qrrow { display:flex; gap:16px; align-items:center; margin-bottom:12px; }
.qrrow img { width:120px; height:120px; flex:none; background:#fff; border:1px solid var(--line); border-radius:8px; }
@media (max-width:900px) { .setgrid { grid-template-columns:minmax(0,1fr); } }

/* Picker app page (CLD 2.1) */
.apigrid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:16px; align-items:start; }
.apigrid .card { margin-bottom:16px; }
.card.note { background:var(--warning-soft); border-color:transparent; color:var(--warning); }
.card.note a { color:var(--warning); font-weight:700; text-decoration:underline; }
.calls .call { display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--line); }
.calls .call:last-child { border-bottom:0; }
.calls code, .card code { font-family:ui-monospace, Consolas, monospace; font-size:12px; background:var(--sunken); padding:1px 6px; border-radius:5px; word-break:break-all; }
.calls .call code { display:inline-block; margin-top:4px; }
.verb { flex:none; width:46px; text-align:center; padding:2px 0; border-radius:6px; font-size:11px; font-weight:700; }
.v-get { background:var(--info-soft); color:var(--info); } .v-post { background:var(--success-soft); color:var(--success); }
.ans p { margin:10px 0 0; } .ans .say { font-weight:600; } .ans .bad { color:var(--danger); }
.raw { margin-top:14px; } .raw summary { cursor:pointer; font-size:13px; font-weight:600; color:var(--ink-2); } .raw pre { margin:8px 0 0; max-height:320px; }
@media (max-width:900px) { .apigrid { grid-template-columns:minmax(0,1fr); } }

/* picker keys (CLD 2.1) */
.klist .krow { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.klist .krow:last-child { border-bottom:0; }
.klist .kt { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.newkey { background:var(--success-soft); color:var(--ink); border-radius:var(--r-md); padding:12px 14px; margin:8px 0 6px; }
.newkey input { font-size:13px; background:var(--surface); }

/* loading and error states (CLD 2.1) */
.loadstate { display:flex; align-items:center; gap:10px; padding:28px 4px; color:var(--muted); font-size:14px; }
.spin { width:18px; height:18px; border-radius:50%; border:2.5px solid var(--line); border-top-color:var(--spot); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .spin { animation:none; } }
.errstate { max-width:560px; } .errstate h2 { margin-bottom:6px; } .errstate p { margin:0 0 14px; }
.empty-state { text-align:center; padding:36px 20px; } .empty-state h2 { margin-bottom:6px; } .empty-state p { margin:0 auto 14px; max-width:460px; }
.itools[hidden] { display:none; }   /* CLD 2.1 */
.planfail { display:flex; align-items:center; justify-content:center; gap:12px; min-height:200px; color:var(--muted); background:var(--surface); border-radius:var(--r-md); }   /* CLD 2.1 */

/* accessibility (CLD 2.1) */
.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 { position:fixed; left:12px; top:-60px; z-index:50; padding:10px 16px; background:var(--ink); color:#fff; border-radius:var(--r-md); font-weight:700; }
.skip:focus { top:12px; text-decoration:none; }
main#main:focus { outline:none; }
.itable .lnk.n { padding:0; margin:0; background:none; border:0; color:var(--ink); font:inherit; font-weight:600; text-align:left; cursor:pointer; }
.itable .lnk.n:hover { background:none; text-decoration:underline; }
#drawer-h:focus { outline:none; }

/* 3D on a phone: asked first (CLD 2.1) */
.ask3d { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px; text-align:center; color:#E9E7F2; }
.ask3d span { color:#cfcde0; font-size:14px; } .ask3d a:not(.btn) { color:#cfc6ff; }
@media (max-width:760px) { .v3d { height:420px; } }

/* history (CLD 2.1) */
.hist { padding:6px 22px; }
.hrow { display:flex; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); font-size:14px; }
.hrow:last-child { border-bottom:0; } .hrow.undone { opacity:.55; }
.hk { flex:none; width:8px; height:8px; border-radius:4px; margin-top:7px; background:var(--muted); }
.hk-shelf { background:var(--spot); } .hk-items { background:var(--success); } .hk-store { background:var(--warning); } .hk-bad { background:var(--danger); } .hk-ok { background:var(--success); }

/* place by exact size (CLD 1.1) */
.fitwrap { display:grid; grid-template-columns:400px minmax(0,1fr); gap:16px; align-items:start; } .fitwrap > div { display:flex; flex-direction:column; gap:16px; min-width:0; }
.fitform { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; } .fitform label { display:flex; flex-direction:column; gap:4px; font-size:12px; font-weight:600; color:var(--muted); } .fitform .wide { grid-column:1 / -1; } .fitform input, .fitform select { width:100%; box-sizing:border-box; }
.st-danger { background:var(--danger-soft); color:var(--danger); } .fitwhy { margin:10px 0; } .fitdl { display:grid; grid-template-columns:96px 1fr; gap:8px 12px; margin:12px 0 0; font-size:14px; } .fitdl dt { color:var(--muted); font-weight:600; } .fitdl dd { margin:0; } .fitnotes { margin:12px 0 0; padding-left:18px; }
.felev { margin-top:12px; } .felev svg { width:100%; height:auto; display:block; } .felev .fz { font-size:12px; fill:var(--ink-2); font-family:inherit; } .felev .ft { font-size:10px; font-weight:700; fill:#1C1B2E; font-family:inherit; }
.fit3d { height:460px; margin-top:12px; }
@media (max-width:1100px) { .fitwrap { grid-template-columns:1fr; } }

/* stores shared between companies (CLD 1.1) */
.grp.store .shby { display:block; font-size:12px; font-weight:500; color:var(--muted); margin-top:2px; text-transform:none; letter-spacing:0; }
.shrow { padding:12px 0; border-top:1px solid var(--line); gap:8px; align-items:center; } .shrow:first-of-type { border-top:0; } .shrow .small { margin-top:4px; }
.chk { display:inline-flex; align-items:center; gap:6px; margin-right:14px; font-weight:500; color:var(--ink); }
