/* ดำสนิท minimal แบบหน้าตั้งค่า iPhone — ไม่มีไลบรารี */
@font-face { font-family: Sukhumvit; src: url(vendor/SukhumvitSet-Text.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Sukhumvit; src: url(vendor/SukhumvitSet-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Sukhumvit; src: url(vendor/SukhumvitSet-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #000; --card: #0d0d0f; --card2: #161618; --line: #212124; --ink: #f2f2f4; --muted: #8b8b93;
  --tint: #0a84ff; --red: #ff453a; --green: #30d158; --amber: #ffb340;
  --r: 14px; --r-in: 10px; --ease: cubic-bezier(.32,.72,0,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 Sukhumvit, -apple-system, system-ui, sans-serif; }
body { padding-bottom: calc(110px + var(--safe-b)); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:active { transform: scale(.97); }
input { font: inherit; color: var(--ink); }
.ph-bold { font-size: 1.05em; vertical-align: -2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---- แถบค้นหา ---- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(0,0,0,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card2); border-radius: var(--r-in); padding: 0 12px; height: 42px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; font-size: 17px; }
.search .ph-bold { color: var(--muted); }
.icon-btn { width: 42px; height: 42px; border-radius: var(--r-in); display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); flex: 0 0 auto; }

.wrap { padding: 0 16px; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--muted); padding: 22px 16px 7px; display: flex; justify-content: space-between; }
.seg { display: flex; background: var(--card2); border-radius: 9px; padding: 2px; margin-top: 12px; }
.seg button { flex: 1; height: 32px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #2c2c30; color: var(--ink); }

/* ---- กลุ่มแบบตั้งค่า iPhone ---- */
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.row.tap:active { background: var(--card2); transform: none; }
.row-main { flex: 1; min-width: 0; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.row .val { color: var(--muted); font-weight: 600; }
.row .chev { color: var(--muted); opacity: .45; font-size: 13px; }
.row.center { justify-content: center; color: var(--tint); font-weight: 600; }
.row.danger { justify-content: center; color: var(--red); font-weight: 600; }
.foot { font-size: 12.5px; color: var(--muted); padding: 8px 16px 0; line-height: 1.5; }
.thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--card2) center/cover; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }

/* ---- ตารางสต็อก ---- */
.sm { padding: 12px 16px; }
.sm + .sm { border-top: 1px solid var(--line); }
.sm-head { display: flex; align-items: baseline; gap: 8px; }
.sm-name { flex: 1; font-weight: 600; }
.sm-color { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.sm-color b { flex: 0 0 64px; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cells { display: flex; flex-wrap: wrap; gap: 4px; }
.cell { min-width: 38px; padding: 2px 6px; border-radius: 6px; font-size: 12.5px; text-align: center; border: 1px solid var(--line); }
.cell i { font-style: normal; color: var(--muted); margin-right: 3px; }
.cell.low { color: var(--red); }
.cell.zero { opacity: .35; }

/* ---- หน้าขายของรุ่น ---- */
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 0 4px; }
.panel-head h2 { margin: 0; font-size: 21px; flex: 1; min-width: 0; }
.price { font-size: 15px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip small { color: var(--muted); font-weight: 600; }
.chip.on { border-color: var(--tint); background: rgba(10,132,255,.12); color: var(--tint); }
.chip.on small { color: var(--tint); }
.chip.zero { opacity: .4; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-top: 16px; }
.sz { height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; transition: background .2s, border-color .2s; }
.sz b { font-size: 20px; font-weight: 700; }
.sz span { font-size: 12px; color: var(--muted); }
.sz.low { border-color: rgba(255,69,58,.55); }
.sz.low span { color: var(--red); }
.sz:disabled { opacity: .3; }
.sz.adj { border-style: dashed; }
.sz em { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--tint); color: #fff; font: 700 12px/22px Sukhumvit, sans-serif; font-style: normal; }
.sz.pop { animation: pop .25s var(--ease); }
@keyframes pop { 50% { transform: scale(1.06); background: rgba(10,132,255,.16); } }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.tag.adm { border-color: rgba(255,179,64,.5); color: var(--amber); }

/* ---- แถบขายล่าง ---- */
.bar { position: fixed; left: 10px; right: 10px; bottom: calc(88px + var(--safe-b)); z-index: 6; background: rgba(22,22,24,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 10px;
  transform: translateY(calc(100% + 120px)); transition: transform .25s var(--ease); }
.bar:not(.show) { visibility: hidden; transition: transform .25s var(--ease), visibility 0s .25s; }
.bar.show { transform: none; }
body:has(.bar.show) { padding-bottom: calc(190px + var(--safe-b)); }
.bar .cart { flex: 1; min-width: 0; text-align: left; }
.bar .cart b { display: block; font-size: 18px; }
.bar .cart small { color: var(--muted); font-size: 13px; }
.pay { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pay button { height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pay button.on { background: rgba(10,132,255,.14); color: var(--tint); }
.sell { height: 48px; padding: 0 22px; border-radius: 12px; background: var(--tint); color: #fff; font-weight: 700; font-size: 17px; }
.sell:disabled { opacity: .5; }

/* ---- ชีต ---- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 20; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--sheet, #0b0b0d); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 8px 16px calc(24px + var(--safe-b)); animation: up .25s var(--ease); }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: #333; margin: 0 auto 8px; }
.sheet h3 { margin: 6px 0 0; font-size: 18px; display: flex; align-items: center; }
.sheet h3 span:first-child { flex: 1; }
.field { display: flex; align-items: center; gap: 10px; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; text-align: right; height: 28px; font-size: 16px; }
.field input::placeholder { color: #55555c; }
.line-price { flex: 0 0 72px; width: 72px; background: var(--card2); border: 0; outline: 0; border-radius: 8px; height: 32px; text-align: right; padding: 0 8px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---- toast ---- */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(160px + var(--safe-b)); z-index: 30; background: #1c1c1f; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; display: flex; align-items: center; gap: 12px; animation: up .25s var(--ease); }
.toast.top { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 12px); }
.toast span { flex: 1; }
.toast button { color: var(--tint); font-weight: 600; }
.toast.err { border-color: rgba(255,69,58,.5); }

/* ---- PIN ---- */
.pin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.pin h1 { margin: 0; font-size: 20px; font-weight: 600; }
.dots { display: flex; gap: 14px; height: 14px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #555; }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px; }
.pad button { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--line); font-size: 28px; }
.pad button.ghost { border: 0; font-size: 22px; color: var(--muted); }
.pin .err { color: var(--red); min-height: 20px; font-size: 14px; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; line-height: 1.6; }
.empty .ph-bold { font-size: 40px; display: block; margin: 0 auto 10px; opacity: .5; }
.fade-in > * { animation: fadeUp .22s var(--ease) both; }
.fade-in > *:nth-child(2) { animation-delay: .03s; } .fade-in > *:nth-child(3) { animation-delay: .06s; } .fade-in > *:nth-child(4) { animation-delay: .09s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
/* ---- กล่องใส่ตะกร้า ---- */
.sz.pick { border-color: var(--tint); background: rgba(10,132,255,.16); }
.sz.pick b, .sz.pick span { color: var(--tint); }
.buy { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 12px; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buy-row > span { color: var(--muted); font-weight: 600; font-size: 15px; }
.price-in { display: flex; align-items: center; gap: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 48px; min-width: 0; flex: 0 1 190px; }
.price-in span { color: var(--muted); font-size: 18px; }
.price-in input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; font-size: 22px; font-weight: 700; text-align: right; }
.price-in input::placeholder { color: #55555c; font-size: 16px; font-weight: 500; }
.price-in:focus-within { border-color: var(--tint); }
.price-in.need { border-color: rgba(255,69,58,.55); }
.price-in.sm { height: 40px; flex: 1 1 auto; max-width: 150px; }
.price-in.sm input { font-size: 18px; }
.buy-save { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-top: -4px; }
.buy-save input { width: 18px; height: 18px; accent-color: var(--tint); }
.stepper.big button { width: 40px; height: 40px; border-radius: 10px; }
.stepper b { min-width: 28px; text-align: center; font-size: 18px; }
.add-btn { height: 52px; border-radius: 12px; background: var(--tint); color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-btn:disabled { background: var(--card2); color: var(--muted); }
.bar .cart small .ph-bold { font-size: 13px; }

/* ---- ชีตตะกร้า ---- */
.cart-lines { display: grid; gap: 10px; margin-top: 14px; }
.cl { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.cl.need { border-color: rgba(255,69,58,.5); }
.cl-top { display: flex; align-items: center; gap: 10px; }
.cl-name { flex: 1; min-width: 0; display: grid; }
.cl-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-name small { color: var(--muted); font-size: 13px; }
.icon-btn.sm { width: 36px; height: 36px; color: var(--muted); }
.cl-bot { display: flex; align-items: center; gap: 10px; }
.cl-sub { margin-left: auto; font-size: 17px; white-space: nowrap; }
.link.more { display: flex; align-items: center; gap: 6px; margin: 12px 4px 0; font-size: 15px; }
.pay-seg { margin-top: 0; }
.pay-seg button { height: 40px; font-size: 15px; }
.pay-seg button.on { background: rgba(10,132,255,.18); color: var(--tint); }
.cart-sum { margin-top: 22px; padding: 0 4px; display: grid; gap: 6px; }
.cart-sum > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.cart-sum .net { color: var(--ink); font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.cart-sum .net b { font-size: 26px; }
.sell.big { width: 100%; height: 54px; margin-top: 16px; font-size: 18px; }
.link.danger-link { display: block; margin: 16px auto 0; color: var(--red); font-size: 15px; }

/* ---- ตัวกรอง แบรนด์/สี/ไซส์ ---- */
.fbar { margin: 4px -16px 0; }
.flbl { font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 16px 6px; }
.hs { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hs::-webkit-scrollbar { display: none; }
.hs .chip { flex: none; margin: 0; }
.chip .sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #444; display: inline-block; }
.sz.hit { border-color: var(--tint); }
.sz.hit b { color: var(--tint); }
.cell.hit { border-color: var(--tint); color: var(--tint); }
.cell.hit i { color: var(--tint); opacity: .8; }

/* ---- แถบเมนูล่าง (แบบ StockT: แคปซูลลอย เบลอพื้นหลัง) ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); z-index: 7; display: flex; justify-content: center; pointer-events: none; }
.tabbar .pill { pointer-events: auto; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(44,44,46,.82);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.tabbar button { display: grid; justify-items: center; gap: 1px; padding: 6px 18px 5px; border-radius: 999px; font-size: 11px; color: #8e8e93; transition: color .18s, background .18s; }
.tabbar button i { font-size: 21px; }
.tabbar button.on { color: var(--tint); background: rgba(120,120,128,.28); }

/* ---- หน้าเพิ่มสินค้า ---- */
.add .panel-head h2 { font-size: 26px; }
.sec-title .link, .link { color: var(--tint); font-weight: 600; font-size: 13px; }
.chip.ghost { color: var(--muted); }
.chip .ph-bold { font-size: 12px; }
.add-color { padding: 0 10px; color: var(--muted); }
.add-color input { width: 84px; background: none; border: 0; outline: 0; font-size: 15px; }
.sz-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sz-pick button { height: 44px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.sz-pick button.on { border-color: var(--tint); background: rgba(10,132,255,.14); color: var(--tint); }
.qty-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.qty { border-collapse: collapse; min-width: 100%; }
.qty th { font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 4px; text-align: center; }
.qty tbody th { text-align: left; padding-left: 12px; white-space: nowrap; color: var(--ink); max-width: 90px; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--card); }
.qty td { padding: 4px 3px; text-align: center; border-top: 1px solid var(--line); }
.qty input { width: 44px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); text-align: center; font-size: 17px; font-weight: 600; outline: 0; }
.qty input:focus { border-color: var(--tint); }
.qty small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.row input[type=file] { display: none; }

/* ==== หน้าสรุป: ธีม StockT (app2/demo.css + r-report.css) — สว่าง/มืดตามเครื่อง ==== */
html.st { --bg: #000; --card: #1c1c1e; --card2: #2c2c2e; --line: #38383a; --ink: #fff; --ink2: #ebebf5; --muted: #8e8e93;
  --tint: #0a84ff; --green: #30d158; --red: #ff453a; --orange: #ff9f0a; --sheet: #0b0b0d; --seg: #1c1c1e; }
@media (prefers-color-scheme: light) {
  html.st { color-scheme: light; --bg: #f2f2f7; --card: #fff; --card2: #f2f2f7; --line: #e3e3e8; --ink: #000; --ink2: #1c1c1e; --muted: #8a8a8e;
    --tint: #007aff; --green: #34c759; --red: #ff3b30; --orange: #ff9500; --sheet: #f2f2f7; --seg: #e9e9ef; }
  html.st .tabbar .pill { background: rgba(255,255,255,.82); box-shadow: 0 6px 22px rgba(0,0,0,.14); }
  html.st .tabbar button.on { background: rgba(120,120,128,.16); }
  html.st .toast { background: #fff; color: #000; box-shadow: 0 6px 22px rgba(0,0,0,.14); }
  html.st .sheet-bg { background: rgba(0,0,0,.3); }
}
html.st body { font-size: 17px; }
.st-page { padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 0; }
.st-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 0 16px; }
.st-title { font-size: 32px; font-weight: 700; letter-spacing: -.5px; margin: 0; }
.st-sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.circ-btn { width: 38px; height: 38px; border-radius: 999px; background: var(--card); color: var(--ink2); font-size: 18px; display: grid; place-items: center; flex: none; position: relative; }
.circ-btn::before { content: ''; position: absolute; inset: -3px; }
.circ-btn:disabled { opacity: .35; }
.circ-btn.sm { width: 34px; height: 34px; font-size: 15px; background: var(--card2); }
.st-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.st-btn.primary { background: var(--tint); color: #fff; justify-content: center; }
.st-datebar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.st-datebtn { flex: 1; justify-content: center; position: relative; overflow: hidden; min-width: 0; }
.st-datebtn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; }
.st-seg { display: flex; gap: 2px; background: var(--seg); border-radius: 999px; padding: 4px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.st-seg::-webkit-scrollbar { display: none; }
.st-seg button { flex: none; padding: 9px 13px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.st-seg button.on { background: var(--card2); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
@media (prefers-color-scheme: light) { html.st .st-seg button.on { background: #fff; } }
.st-card { background: var(--card); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.st-range { display: flex; gap: 8px; align-items: flex-end; }
.st-range label { flex: 1; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.st-range input { height: 38px; border-radius: 10px; border: 0; background: var(--card2); padding: 0 8px; font-size: 15px; color: var(--ink); min-width: 0; }
.st-calhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.st-calhead > div { flex: 1; text-align: center; display: grid; }
.st-calhead b { font-size: 16px; }
.st-calhead span { font-size: 12px; color: var(--muted); }
.dc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.dc-grid > i { font-style: normal; text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.dc-d { position: relative; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; min-height: 46px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.dc-d:disabled { opacity: .3; }
.dc-d b { font-size: 13px; font-weight: 500; }
.dc-d .dc-amt { font-size: 12px; font-weight: 700; line-height: 1.1; }
.dc-d.sel { box-shadow: 0 0 0 2px var(--tint) inset; }
.dc-d.inr { box-shadow: 0 0 0 2px var(--tint) inset; opacity: .9; }
.dc-in { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.dc-in.static { position: static; display: inline-block; margin-left: 8px; }
.st-legend { display: flex; align-items: center; gap: 4px; justify-content: center; margin-top: 10px; font-size: 11px; color: var(--muted); }
.st-sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-tile { display: grid; align-content: start; gap: 1px; }
.st-tile span { font-size: 13px; color: var(--muted); }
.st-tile b { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.st-tile.big b { font-size: 26px; }
.st-tile.profit b { color: var(--green); }
.st-delta { justify-self: start; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-top: 3px; color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.st-delta.down { color: var(--red); background: color-mix(in srgb, var(--red) 15%, transparent); }
.st-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.st-note.warn { color: var(--orange); }
.st-sec { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; }
.st-sec h2 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.3px; }
.st-sec span { flex: 1; color: var(--muted); font-size: 13px; }
.st-sec a { color: var(--tint); font-size: 15px; font-weight: 500; cursor: pointer; }
.st-list { background: var(--card); border-radius: 18px; overflow: hidden; margin-bottom: 12px; }
.st-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; width: 100%; text-align: left; }
.st-row + .st-row::before { content: ''; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--line); }
.st-row:not(.static):active { background: var(--card2); transform: none; }
.st-row .txt { flex: 1; min-width: 0; }
.st-row .name { font-size: 16px; font-weight: 500; }
.st-row .sub { font-size: 13px; color: var(--muted); }
.st-row .tags { margin-top: 4px; display: flex; gap: 4px; }
.st-row .val { font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; display: grid; }
.st-row .val small { font-size: 12px; color: var(--green); font-weight: 600; }
.st-row .val small.loss { color: var(--red); } .st-row .val small.unk { color: var(--orange); }
.st-row .val.pos { color: var(--green); } .st-row .val.neg { color: var(--red); }
.st-row .go { color: var(--muted); opacity: .5; font-size: 14px; }
.st-row .rank { width: 22px; height: 22px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.st-barw { height: 5px; border-radius: 3px; background: var(--card2); margin-top: 6px; overflow: hidden; }
.st-barw i { display: block; height: 100%; background: var(--tint); border-radius: 3px; }
.st-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: rgba(142,142,147,.2); color: var(--muted); }
.st-tag.cash { background: rgba(48,209,88,.16); color: var(--green); }
.st-tag.transfer { background: rgba(10,132,255,.16); color: var(--tint); }
.st-sizes { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; }
.st-sizes > div { flex: 1 0 30px; display: grid; justify-items: center; gap: 2px; }
.st-sizes .col { height: 90px; width: 22px; display: flex; align-items: flex-end; }
.st-sizes .col i { display: block; width: 100%; background: var(--tint); border-radius: 4px; }
.st-sizes b { font-size: 12px; } .st-sizes span { font-size: 12px; color: var(--muted); }
.st-empty { color: var(--muted); text-align: center; font-size: 14px; padding: 18px 0; }

/* ---- จอคอม/แท็บเล็ต: บีบให้อยู่กลางจอ กว้างไม่เกิน 760 ---- */
@media (min-width: 800px) {
  #app { max-width: 760px; margin: 0 auto; }
  .sheet, .bar, .toast { max-width: 740px; margin: 0 auto; }
  .bar, .toast { left: 0; right: 0; }
  .sheet { border: 1px solid var(--line); border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
