/* Layout: the whole page is a shop's glass display cabinet (etalase): a framed poster of Akang waving up top, then a
   tall cabinet with a lit sign, glass shelves holding the products, and a drawer base. Owner tools in a side drawer. */
:root {
  --floor: #d8d1c2;        /* page ground: shop floor tiles */
  --floor-2: #c4bcab;
  --panel: #fbf8f1;
  --ink: #1b1d22;
  --ink-soft: #4d5560;
  --text: #1b1d22;
  --back: #93cdb0;         /* cabinet back panel: warung mint */
  --back-2: #84bfa2;
  --metal: #c3c9cc;        /* aluminium frame */
  --metal-dark: #8e979b;
  --wood: #8a5a36;
  --wood-dark: #5a3a24;
  --glass-edge: #a8dcd6;
  --tile: #b4552d;
  --sun: #ffd34d;
  --warn: #c8342a;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --floor: #1b1f22; --floor-2: #23292c; --panel: #232b2e; --ink: #0a0e0f; --ink-soft: #a9b8b9; --text: #eef4f2;
    --back: #2d5546; --back-2: #284c3f; --metal: #5c666b; --metal-dark: #3d4549; --wood: #6d4a30; --wood-dark: #47301f;
    --glass-edge: #4f8f88; --tile: #c8673d; --sun: #ffd34d; --warn: #ff6b5e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --floor: #1b1f22; --floor-2: #23292c; --panel: #232b2e; --ink: #0a0e0f; --ink-soft: #a9b8b9; --text: #eef4f2;
  --back: #2d5546; --back-2: #284c3f; --metal: #5c666b; --metal-dark: #3d4549; --wood: #6d4a30; --wood-dark: #47301f;
  --glass-edge: #4f8f88; --tile: #c8673d; --sun: #ffd34d; --warn: #ff6b5e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--floor); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
  background-image: linear-gradient(var(--floor-2) 2px, transparent 2px), linear-gradient(90deg, var(--floor-2) 2px, transparent 2px);
  background-size: 48px 48px;
}
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.vox { background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--back), 8px 8px 0 var(--ink); }
.vox-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  font-family: var(--display); font-size: 14px; letter-spacing: .02em; padding: 9px 14px; border: 3px solid var(--ink);
  background: var(--sun); color: #1b1d22; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.vox-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.vox-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.vox-btn.ghost { background: var(--panel); color: var(--text); }
.vox-btn.danger { background: var(--warn); color: #fff; }
.vox-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- header ---------- */
header.top { padding-block: 18px 6px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand canvas { width: 44px; height: 44px; flex-shrink: 0; }
.brand b { font-family: var(--display); font-size: clamp(18px, 3.4vw, 24px); line-height: 1.05; display: block; }
.brand small { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- hero: text + Akang behind glass ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding-block: 18px 34px; }
.hero h1 { font-family: var(--display); font-size: clamp(34px, 6.2vw, 64px); line-height: .98; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--tile); }
.hero p.lead { font-size: clamp(16px, 2.1vw, 19px); max-width: 52ch; margin: 16px 0 0; }
.hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border: 2px solid var(--ink); background: var(--panel); }
.poster { position: relative; justify-self: center; width: min(100%, 440px); padding: 14px; background: linear-gradient(var(--metal), var(--metal-dark)); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.poster .pane { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 3px solid var(--ink); background: var(--back); }
.poster .pane img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster .plate { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-family: var(--display); font-size: 13px; letter-spacing: .04em; padding: 6px 14px; background: var(--sun); color: #1b1d22; border: 3px solid var(--ink); white-space: nowrap; }
.glare { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.34) 0 9%, transparent 9% 15%, rgba(255,255,255,.18) 15% 19%, transparent 19% 100%); }

/* ---------- the cabinet ---------- */
.cabinet { margin-bottom: 30px; }
.cornice { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; background: linear-gradient(var(--wood), var(--wood-dark)); border: 3px solid var(--ink); border-bottom: 0; }
.cornice .sign { font-family: var(--display); font-size: clamp(16px, 3vw, 24px); letter-spacing: .06em; color: var(--sun); text-shadow: 0 0 12px rgba(255, 211, 77, .55), 2px 2px 0 var(--ink); text-align: center; }
.cornice .lamp { width: 12px; height: 12px; background: var(--sun); border: 2px solid var(--ink); box-shadow: 0 0 10px var(--sun); flex-shrink: 0; }
.case { position: relative; padding: 16px; border: 3px solid var(--ink); border-top-width: 8px; border-top-color: var(--metal-dark);
  background: linear-gradient(90deg, var(--metal) 0 10px, transparent 10px calc(100% - 10px), var(--metal) calc(100% - 10px)),
              repeating-linear-gradient(0deg, var(--back) 0 46px, var(--back-2) 46px 48px); }
.case .glare { z-index: 2; background: linear-gradient(110deg, rgba(255,255,255,.22) 0 6%, transparent 6% 11%, rgba(255,255,255,.12) 11% 13%, transparent 13% 60%, rgba(255,255,255,.1) 60% 63%, transparent 63%); }
.tools { position: relative; z-index: 3; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px; margin: 0 10px 18px; background: var(--panel); border: 3px solid var(--ink); }
.search { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: var(--floor); padding: 7px 10px; }
.search input { border: 0; background: transparent; outline: 0; width: 100%; min-width: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fbtn { font-family: var(--mono); font-weight: 700; font-size: 13px; padding: 6px 10px; border: 2px solid var(--ink); background: var(--panel); cursor: pointer; }
.fbtn[aria-pressed="true"] { background: var(--ink); color: var(--sun); }

.shelf { position: relative; padding: 0 10px; margin-bottom: 26px; }
.shelf .items { display: grid; gap: 16px; align-items: end; padding-inline: 4px; position: relative; z-index: 1; }
.shelf .plate { height: 16px; margin-top: -2px; position: relative; z-index: 0;
  background: linear-gradient(rgba(255,255,255,.75), rgba(200,235,240,.35)); border-top: 3px solid rgba(255,255,255,.95);
  border-bottom: 4px solid var(--glass-edge); box-shadow: 0 10px 12px -6px rgba(0,0,0,.35); }
.shelf .plate::before, .shelf .plate::after { content: ""; position: absolute; top: -3px; bottom: -22px; width: 8px; background: var(--metal-dark); border: 2px solid var(--ink); }
.shelf .plate::before { left: 6px; }
.shelf .plate::after { right: 6px; }

.item { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-bottom: 10px; }
.item .pic { position: relative; aspect-ratio: 1 / 1; background: #ffffff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.25); overflow: hidden; display: grid; place-items: center; }
.item .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .pic .noimg { font-family: var(--mono); font-size: 12px; color: #6b7278; }
.tag { position: absolute; top: 10px; right: -6px; z-index: 2; transform: rotate(6deg); font-family: var(--mono); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
  padding: 4px 10px 4px 16px; background: var(--sun); color: #1b1d22; border: 2px solid var(--ink); clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.tag::before { content: ""; position: absolute; left: 5px; top: 50%; width: 5px; height: 5px; margin-top: -3px; border-radius: 50%; background: var(--ink); }
.pf { position: absolute; left: 8px; top: 8px; z-index: 2; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border: 2px solid var(--ink); color: #fff; }
.star { position: absolute; left: 8px; bottom: 8px; z-index: 2; font-family: var(--display); font-size: 11px; padding: 3px 7px; background: var(--sun); color: #1b1d22; border: 2px solid var(--ink); }
.item .label { background: var(--panel); border: 2px solid var(--ink); padding: 8px 10px; display: grid; gap: 4px; }
.item h3 { font-size: 15px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.item .cat { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.item .note { font-size: 13px; color: var(--ink-soft); margin: 0; overflow-wrap: anywhere; }
.item .vox-btn { width: 100%; font-size: 13px; padding: 8px 10px; }

.empty-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-inline: 4px; }
.ghost-item { aspect-ratio: 1 / 1; border: 3px dashed rgba(27, 29, 34, .45); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--ink); text-align: center; padding: 8px; background: rgba(255,255,255,.18); }
.empty-note { position: relative; z-index: 3; margin: 0 10px 18px; padding: 14px 16px; background: var(--panel); border: 3px solid var(--ink); }
.empty-note h2 { font-family: var(--display); font-size: 20px; }
.empty-note p { margin: 6px 0 10px; color: var(--ink-soft); max-width: 60ch; }

.base { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; background: linear-gradient(var(--wood), var(--wood-dark)); border: 3px solid var(--ink); border-top: 0; }
.drawer-front { height: 46px; border: 3px solid var(--ink); background: linear-gradient(var(--wood), var(--wood-dark)); display: grid; place-items: center; }
.drawer-front i { width: 56px; height: 8px; background: var(--metal); border: 2px solid var(--ink); }

footer { padding-block: 10px 40px; font-size: 13px; color: var(--ink-soft); }

/* ---------- owner drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; background: rgba(10, 15, 16, .45); }
.drawer .sheet { width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--floor); border-left: 3px solid var(--ink);
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 16px; }
.sheet h2 { font-family: var(--display); font-size: 22px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.form { padding: 16px; display: grid; gap: 12px; margin-top: 16px; }
.form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.form label span.hint { font-weight: 500; color: var(--ink-soft); font-size: 12px; }
.form input[type=text], .form input[type=url], .form select, .form textarea { border: 2px solid var(--ink); background: var(--floor); padding: 9px 10px; width: 100%; min-width: 0; }
.form textarea { resize: vertical; min-height: 64px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drop { border: 3px dashed var(--ink); padding: 12px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--floor); cursor: pointer; }
.drop.over { background: var(--sun); color: #1b1d22; }
.drop .thumb { width: 84px; height: 84px; border: 2px solid var(--ink); background: var(--panel); display: grid; place-items: center; overflow: hidden; font-family: var(--mono); font-size: 11px; }
.drop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.check { display: flex !important; align-items: center; gap: 8px; }
.err { color: var(--warn); font-weight: 700; font-size: 13px; min-height: 1em; margin: 0; }
.list { display: grid; gap: 10px; margin-top: 18px; }
.li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 2px solid var(--ink); background: var(--panel); }
.li img, .li .ph { width: 52px; height: 52px; object-fit: cover; border: 2px solid var(--ink); background: var(--floor-2); }
.li .t { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { display: flex; gap: 4px; }
.mini button { border: 2px solid var(--ink); background: var(--panel); width: 34px; height: 34px; cursor: pointer; font-weight: 800; }
.mini button.del { background: var(--warn); color: #fff; }
.savebar { position: sticky; bottom: 0; margin-top: 18px; padding: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.status { font-family: var(--mono); font-size: 12px; }
.confirm { padding: 12px; margin-top: 10px; display: grid; gap: 10px; }
.lockwrap { justify-content: center; align-items: center; padding: 16px; }
.lockbox { width: min(380px, 100%); padding: 20px; display: grid; gap: 10px; }
.lockbox h2 { font-family: var(--display); font-size: 22px; }
.lockbox p { margin: 0; }
.lockbox input { border: 2px solid var(--ink); background: var(--floor); padding: 10px 12px; width: 100%; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .poster { order: -1; }
  .two { grid-template-columns: 1fr; }
  .empty-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .vox-btn { transition: none; } }
