:root {
  --bg: #f2efe8;
  --panel: #faf8f3;
  --ink: #11110f;
  --muted: #77736c;
  --line: #c9c3b8;
  --accent: #d7ff45;
  --danger: #d94132;
  --good: #24794a;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; min-height: 100dvh; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; gap: 18px; text-align: center; background: var(--ink); color: var(--bg); }
.brand-mark { font-size: 52px; line-height: .78; letter-spacing: -4px; font-weight: 900; transform: skewY(-4deg); }
.boot-line { width: 120px; height: 7px; background: var(--accent); margin: 0 auto; clip-path: polygon(0 20%,100% 0,97% 100%,3% 80%); }
.boot-screen p { margin: 0; font-size: 12px; letter-spacing: 4px; text-transform: uppercase; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 12px; background: rgba(242,239,232,.94); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 950; letter-spacing: -1.7px; font-size: 23px; line-height: .8; }
.logo small { display: block; font-size: 8px; letter-spacing: 2.5px; margin-top: 5px; font-weight: 700; }
.role-pill { border: 1px solid var(--ink); border-radius: 999px; padding: 7px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.3px; background: var(--accent); }
.main { padding: 18px 14px calc(94px + env(safe-area-inset-bottom)); max-width: 980px; margin: 0 auto; }
.hero { margin: 6px 0 24px; position: relative; }
.hero-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 2.4px; color: var(--muted); }
.hero h1 { margin: 8px 0 10px; font-size: clamp(35px, 11vw, 72px); line-height: .86; letter-spacing: -4px; max-width: 800px; }
.hero p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.45; }
.hero::after { content: ""; display: block; width: 100%; height: 10px; background: var(--ink); margin-top: 20px; clip-path: polygon(0 28%,8% 0,20% 42%,34% 10%,52% 60%,71% 20%,85% 55%,100% 4%,100% 100%,0 100%); }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 14px; }
.toolbar.one { grid-template-columns: 1fr; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--ink); background: var(--panel); border-radius: 0; padding: 13px 14px; outline: none; box-shadow: 3px 3px 0 var(--ink); }
.input:focus, .select:focus, .textarea:focus { box-shadow: 5px 5px 0 var(--accent), 6px 6px 0 var(--ink); }
.textarea { resize: vertical; min-height: 90px; }
.btn { border: 1px solid var(--ink); background: var(--ink); color: white; padding: 12px 14px; min-height: 44px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; font-size: 12px; box-shadow: 3px 3px 0 var(--accent); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--accent); }
.btn.secondary { background: var(--panel); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn.danger { background: var(--danger); }
.btn.good { background: var(--good); }
.btn.small { min-height: 36px; padding: 8px 10px; font-size: 10px; }
.btn.full { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.full-grid { grid-column: 1/-1; }
.product-card { border: 1px solid var(--ink); background: var(--panel); overflow: hidden; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s; }
.product-card:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.product-image { aspect-ratio: 4/5; background: #ded8cd; overflow: hidden; display: grid; place-items: center; }
.product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-placeholder { font-size: 38px; font-weight: 950; color: #aaa297; }
.product-body { padding: 11px; }
.product-brand { font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.product-model { font-size: 13px; color: var(--muted); margin-top: 3px; min-height: 31px; }
.product-model small { font-size: 10px; }
.product-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 12px; }
.price { font-size: 18px; font-weight: 900; white-space: nowrap; }
.price.giant { font-size: 28px; margin: 10px 0; }
.arrow { font-size: 22px; }
.size-line { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; min-height: 21px; }
.mini-size { min-width: 25px; padding: 3px 5px; border: 1px solid var(--ink); font-size: 9px; text-align: center; font-weight: 800; }
.mini-size.unavailable, .size-btn.unavailable { color: #aaa49b; background: #e6e1d8; text-decoration: line-through 2px var(--danger); opacity: .66; }
.sold-out { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.admin-stock { font-size: 9px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 8px 0 14px; }
.section-title.compact { margin-top: 0; }
.section-title h2 { margin: 0; font-size: 28px; letter-spacing: -1.4px; }
.section-title p { margin: 0; font-size: 11px; color: var(--muted); }
.bottom-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: flex; gap: 2px; overflow-x: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--ink); scrollbar-width: none; }
.nav-btn { flex: 1 0 68px; border: 0; background: transparent; color: #aaa59c; padding: 8px 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .4px; }
.nav-btn strong { display: block; font-size: 17px; margin-bottom: 4px; }
.nav-btn.active { color: var(--accent); }
.card { border: 1px solid var(--ink); background: var(--panel); padding: 14px; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 12px; }
.card.inset { margin-top: 14px; box-shadow: 2px 2px 0 var(--ink); }
.card-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h3 { margin: 0; font-size: 17px; }
.card p { color: var(--muted); margin: 7px 0; line-height: 1.4; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { display: inline-flex; border: 1px solid var(--ink); padding: 5px 8px; font-size: 9px; text-transform: uppercase; letter-spacing: .8px; background: var(--accent); white-space: nowrap; }
.badge.muted { background: #ddd7cd; }
.badge.danger { background: #ffb1a8; }
.badge.good { background: #bde9ca; }
.stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 20px; }
.stat { border: 1px solid var(--ink); background: var(--panel); padding: 15px; min-height: 116px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.stat span { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 9px; }
.stat strong { display: block; font-size: clamp(22px, 7vw, 32px); margin-top: 18px; letter-spacing: -2px; overflow-wrap: anywhere; }
.modal-backdrop { position: fixed; z-index: 60; inset: 0; background: rgba(17,17,15,.72); display: grid; align-items: end; }
.modal { background: var(--bg); max-height: 92dvh; overflow-y: auto; border-top: 2px solid var(--ink); padding: 16px 14px calc(22px + env(safe-area-inset-bottom)); animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(35px); opacity: .4; } }
.modal-handle { width: 54px; height: 5px; background: var(--ink); margin: 0 auto 18px; }
.modal h2 { margin: 0 0 15px; font-size: 30px; letter-spacing: -1.5px; }
.detail-photo { width: 100%; max-height: 46dvh; object-fit: cover; border: 1px solid var(--ink); background: #ddd7cd; }
.form-grid { display: grid; gap: 12px; }
.field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; color: var(--muted); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.variant-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.size-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.size-btn { border: 1px solid var(--ink); min-width: 48px; height: 42px; background: var(--panel); font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.size-btn.active { background: var(--accent); }
.empty { text-align: center; padding: 56px 22px; border: 1px dashed var(--muted); color: var(--muted); }
.loading { padding: 40px 0; text-align: center; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; }
.error-screen { padding: 34px 20px; min-height: 100dvh; display: grid; place-content: center; text-align: center; }
.error-screen h1 { font-size: 42px; letter-spacing: -3px; margin: 0 0 12px; }
.error-screen p { color: var(--muted); max-width: 440px; line-height: 1.5; }
.toast-root { position: fixed; z-index: 100; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; pointer-events: none; }
.toast { max-width: 520px; margin: 0 auto 8px; background: var(--ink); color: white; padding: 13px 14px; border: 1px solid white; box-shadow: 4px 4px 0 var(--accent); animation: toastin .18s; }
.toast.error { background: var(--danger); }
@keyframes toastin { from { transform: translateY(-15px); opacity: 0; } }
.profile-head { text-align: center; padding-top: 15px; margin-bottom: 18px; }
.avatar { width: 92px; height: 92px; object-fit: cover; border: 2px solid var(--ink); background: var(--accent); display: grid; place-items: center; font-size: 34px; font-weight: 900; margin: 0 auto 14px; transform: rotate(-3deg); }
.profile-head h2 { margin: 0; font-size: 30px; }
.profile-head p { color: var(--muted); }
.table-list { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.person-avatar { width: 44px; height: 44px; object-fit: cover; background: #ddd7cd; border: 1px solid var(--ink); display: grid; place-items: center; font-weight: 900; }
.person-name { font-weight: 850; }
.person-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.team-actions { display: grid; gap: 6px; }
.alert { border: 1px solid var(--ink); background: #fff5bb; padding: 12px; margin: 12px 0; font-size: 12px; line-height: 1.45; }
.danger-alert { background: #ffcbc4; }
.order-note { margin: 14px 0; padding: 12px; border-left: 5px solid var(--ink); background: #e8e3d9; color: var(--muted); font-size: 12px; line-height: 1.45; }
.instruction { white-space: pre-wrap; font: inherit; font-size: 12px; line-height: 1.5; color: var(--muted); background: #e8e3d9; border: 1px solid var(--line); padding: 12px; }
.order-item { display: grid; grid-template-columns: 70px 1fr; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.order-item img { width: 70px; height: 82px; object-fit: cover; border: 1px solid var(--ink); }
.order-item p { margin: 4px 0; }
.order-total { border-top: 1px solid var(--ink); padding-top: 12px; display: flex; justify-content: space-between; }
.link-btn { border: 0; padding: 0; background: transparent; text-decoration: underline; font-size: 11px; color: var(--ink); }
.danger-text { color: var(--danger) !important; }
@media (min-width: 720px) {
  .main { padding-left: 22px; padding-right: 22px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
  .stats { grid-template-columns: repeat(4,1fr); }
  .modal { max-width: 720px; width: 100%; margin: 0 auto; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
}
