* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
button,input,select,textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: var(--transparent); touch-action: manipulation; }
button,a,input,select,textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--focus); }
button { border: 0; background: none; min-height: 44px; }
button:disabled { cursor: default; opacity: .45; }
h1,h2,p { margin: 0; }
h1 { font-size: clamp(29px,7.6vw,38px); font-weight: 650; letter-spacing: -.045em; line-height: 1.22; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.4; letter-spacing: -.025em; font-weight: 650; }
small,.muted { color: var(--text-muted); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.topbar { height: 82px; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; max-width: 580px; margin: auto; padding: 8px 20px; background: var(--bg); border-bottom: 1px solid var(--line); gap: 12px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0; min-width: 78px; }
.brand strong { letter-spacing: .12em; font-size: 18px; line-height: 1.2; }
.brand img { width: 68px; height: 24px; object-fit: contain; object-position: left; }
.controls { display: flex; align-items: center; gap: 3px; }
.languages { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.languages button { min-width: 44px; font-size: 12px; font-weight: 650; padding: 0 7px; }
.languages button.active { background: var(--text); color: var(--surface); }
.theme { border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; font-size: 12px; margin-left: 4px; min-width: 48px; background: var(--surface); }
main { max-width: 580px; margin: 0 auto; padding: 24px 20px 260px; min-height: calc(100dvh - 82px); }
.eyebrow { font: 11px var(--font-mono); letter-spacing: .11em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.hero { margin: 24px 0 28px; }
.hero p { margin-top: 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.hero.compact { margin-top: 22px; margin-bottom: 24px; }
.progress { display: flex; gap: 6px; margin-top: 10px; }
.progress span { flex: 1; height: 3px; background: var(--line); }
.progress span.current { background: var(--accent); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-button { text-align: left; font-size: 12px; padding: 2px 0; color: var(--text-secondary); display: flex; align-items: center; gap: 7px; }
.profile-button svg { width: 14px; }
.demo-pill { color: var(--accent); font: 10px var(--font-mono); border: 1px solid var(--line); padding: 4px 7px; border-radius: 4px; flex: none; }
.industry-list { display: grid; gap: 12px; }
.industry-tile { display: flex; align-items: center; gap: 20px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 23px 20px; text-align: left; min-height: 110px; }
.tile-number { font: 14px var(--font-mono); color: var(--text-muted); }
.industry-tile strong { font-size: 23px; font-weight: 600; display: block; letter-spacing: -.035em; }
.industry-tile small { display: block; margin-top: 4px; font-size: 12px; }
.check { border: 1px solid var(--line-strong); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-left: auto; flex: none; color: var(--transparent); }
.selected { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
.selected .check { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.check svg { width: 15px; height: 15px; }
.genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.genre-tile { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 15px 12px; min-height: 92px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.genre-tile strong { font-size: 15px; font-weight: 550; }
.genre-tile .row-between { font: 11px var(--font-mono); color: var(--text-muted); }
.genre-tile .check { width: 19px; height: 19px; }
.primary,.secondary { border-radius: 10px; min-height: 54px; padding: 13px 20px; font-weight: 600; text-align: center; width: 100%; }
.primary { color: var(--on-accent); background: var(--accent); }
.secondary { border: 1px solid var(--line); background: var(--surface); }
.text-button { color: var(--text-secondary); font-size: 12px; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.button-row { display: flex; gap: 10px; align-items: center; }
.button-row .secondary { width: auto; min-width: 75px; padding: 12px; }
.bottom-actions { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,580px); background: var(--bg); border-top: 1px solid var(--line); padding: 12px 20px max(16px,env(safe-area-inset-bottom)); z-index: 20; }
.bottom-actions .action-info { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 9px; color: var(--text-secondary); }
.bottom-actions.with-nav { bottom: calc(71px + env(safe-area-inset-bottom)); }
.bottom-actions p { font-size: 11px; margin-top: 8px; color: var(--text-muted); line-height: 1.5; }
#nav:empty { display: none; }
#nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,580px); z-index: 25; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px 12px max(8px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); min-height: 71px; }
#nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-muted); padding: 2px; font-size: 10px; }
#nav button.active { color: var(--accent); font-weight: 650; }
.repeat { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; text-align: left; padding: 17px 16px; display: flex; gap: 13px; align-items: center; width: 100%; margin-bottom: 24px; }
.repeat strong { font-size: 14px; display: block; }
.repeat small { display: block; font-size: 11px; margin-top: 4px; }
.repeat .arrow { margin-left: auto; }
.tabs { display: flex; background: var(--surface-subtle); border-radius: 8px; padding: 3px; margin-bottom: 8px; }
.tabs button { flex: 1; min-width: 0; min-height: 44px; border-radius: 6px; font-size: 12px; padding: 8px; }
.tabs button.active { background: var(--surface); color: var(--text); font-weight: 600; }
.section-heading { padding: 20px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 1px; }
.section-heading p { font-size: 12px; color: var(--text-muted); margin: 7px 0 3px; }
.product-card { display: flex; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); min-height: 108px; }
.product-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 0; }
.product-text { min-width: 0; flex: 1; }
.product-name { display: block; font-size: 14px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.product-meta { display: block; color: var(--text-muted); font-size: 10px; margin: 0 0 5px; letter-spacing: .01em; }
.product-last { font-size: 11px; margin-top: 6px; color: var(--text-secondary); display: block; }
.image-slot { flex: none; width: 48px; height: 60px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); position: relative; }
.image-slot::after { content: ''; position: absolute; top: 20px; left: 15px; width: 16px; height: 19px; border: 1px solid var(--line-strong); border-radius: 3px; }
.qty-button,.select-product { border: 1px solid var(--line-strong); border-radius: 50%; min-width: 44px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; flex: none; font: 16px var(--font-mono); }
.qty-button.has-qty { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.select-product.selected { color: var(--accent); }
.reason { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-secondary); }
.empty p { margin-bottom: 20px; }
.search-box { width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; min-height: 52px; padding: 12px 14px; }
.category-select { width: 100%; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 48px; background: var(--surface); }
.search-meta { font: 11px var(--font-mono); color: var(--text-muted); margin-bottom: 5px; }
.field { display: block; margin-top: 24px; }
.field span { display: block; font-weight: 550; font-size: 13px; margin-bottom: 9px; }
.field small { font-weight: 400; font-size: 11px; margin-left: 8px; }
.field input,.field textarea { width: 100%; max-width: 100%; min-height: 52px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 12px; }
.field input[type=date] { min-width: 0; appearance: none; }
.field textarea { resize: vertical; height: 100px; }
.notice { padding: 12px 14px; margin-top: 16px; border: 1px solid var(--line); background: var(--surface-subtle); border-radius: 8px; font-size: 12px; color: var(--text-secondary); }
.error { color: var(--negative); font-size: 13px; margin-top: 16px; }
.success-mark { width: 60px; height: 60px; border: 1px solid var(--positive); border-radius: 50%; color: var(--positive); display: grid; place-items: center; margin: 36px 0 24px; }
.success-mark svg { width: 28px; height: 28px; }
.order-number { padding: 23px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 30px 0 22px; }
.order-number strong { font: 16px var(--font-mono); overflow-wrap: anywhere; display: block; margin-top: 10px; }
.status { color: var(--text-secondary); background: var(--surface-subtle); border-radius: 4px; font-size: 11px; padding: 7px 9px; display: inline-block; }
.status.delivered { color: var(--positive); background: var(--positive-soft); }
.history-card { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 18px 16px; margin: 0 0 12px; }
.history-card strong { font: 11px var(--font-mono); display: block; margin: 8px 0 12px; overflow-wrap: anywhere; }
.history-card time { color: var(--text-muted); font-size: 12px; }
.history-items { font-size: 13px; padding-top: 12px; color: var(--text-secondary); }
.detail-line { display: flex; gap: 16px; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 15px 0; font-size: 13px; }
.detail-line span:last-child { white-space: nowrap; font-family: var(--font-mono); }
.detail-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-backdrop { position: fixed; inset: 82px 0 0; background: var(--overlay); z-index: 35; }
.sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,580px); max-height: calc(100dvh - 94px); border-radius: 22px 22px 0 0; background: var(--surface); z-index: 40; padding: 14px 24px max(20px,env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet-handle { width: 32px; height: 3px; margin: 0 auto 8px; background: var(--line-strong); border-radius: 4px; }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-heading h2 { font-size: 15px; padding: 10px 0; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; flex: none; }
.sheet-product { font-size: 18px; line-height: 1.45; font-weight: 550; margin: 3px 0 6px; overflow-wrap: anywhere; }
.unit-toggle { display: flex; gap: 6px; margin: 15px 0 0; }
.unit-toggle button { min-width: 80px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; padding: 7px 16px; }
.unit-toggle button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.wheel-layout { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 9px auto; }
.wheel-frame { height: 220px; width: 140px; position: relative; }
.wheel-selection { position: absolute; top: 88px; height: 44px; width: 100%; background: var(--surface-subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 7px; pointer-events: none; }
.wheel { position: relative; height: 220px; overflow-y: scroll; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 88px 0; touch-action: pan-y; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font: 25px var(--font-mono); color: var(--text-muted); opacity: .5; }
.wheel-item.current { opacity: 1; color: var(--text); font-size: 29px; font-weight: 600; }
.wheel-layout .icon-button { border: 1px solid var(--line); border-radius: 50%; font: 24px var(--font-mono); }
.wheel-help { text-align: center; font-size: 11px; color: var(--text-muted); margin: 0 0 12px; }
.sheet .reason { margin: 0 0 10px; font-size: 11px; }
.sheet .text-button { width: 100%; text-align: center; }
#toast { position: fixed; bottom: 179px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 9px; background: var(--text); color: var(--surface); font-size: 12px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity var(--duration); }
#toast.visible { opacity: 1; }
.account-link { display: block; margin: 20px auto 0; }
html[data-modal] { overflow: hidden; }
html[lang=km] { line-height: 1.7; }
html[lang=km] h1 { line-height: 1.6; font-size: 30px; letter-spacing: 0; }
html[lang=km] .product-name { line-height: 1.7; }
html[lang=km] .primary { line-height: 1.7; }
@media (min-width: 620px) { .topbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } main { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
@media (max-height: 730px) { .sheet { padding-top: 8px; } .wheel,.wheel-frame { height: 176px; } .wheel { padding: 66px 0; } .wheel-selection { top: 66px; } .wheel-layout { margin: 3px auto; } .sheet-product { font-size: 16px; } .sheet .text-button { min-height: 44px; } }
/* POCHI v2 */
.product-photo { width: 64px; height: 72px; flex: none; object-fit: contain; border-radius: 7px; background: var(--surface); }
.product-spec { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.product-price { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.industry-tile { min-height: 80px; padding: 16px; gap: 12px; }
.industry-tile strong { font-size: 17px; line-height: 1.55; letter-spacing: 0; }
.genre-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); margin-bottom: 10px; }
.genre-group summary { min-height: 44px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; list-style: none; }
.genre-group summary::after { content: '+'; color: var(--text-muted); }
.genre-group[open] summary::after { content: '−'; }
.genre-group summary strong { font-size: 15px; }
.genre-group summary span { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.genre-group .genre-tile { min-height: 90px; }
.suggested-pick { margin: 0 0 22px; padding: 20px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line); }
.suggested-pick .primary { display: flex; gap: 9px; align-items: center; justify-content: center; }
.suggested-pick p { font-size: 12px; color: var(--text-secondary); margin: 12px 0; }
.selection-count { display: block; font-size: 27px; color: var(--accent); animation: count-in var(--duration) ease-out; }
@keyframes count-in { from { transform: translateY(5px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
.estimate { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; gap: 8px; border-top: 1px solid var(--line); }
.estimate strong { font: 24px var(--font-mono); }
.restock { margin-bottom: 28px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.restock h2 { font-size: 18px; }
.restock .product-card:last-child { border-bottom: 0; }
html[lang=km] .industry-tile strong { font-size: 16px; }
html[lang=km] .theme { font-size: 10px; padding: 0 5px; }
html[lang=km] .controls { gap: 1px; }
html[lang=km] .genre-group summary { flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .selection-count { animation: none; } }
