/* Krishi Crown: field-green and crown-gold. One lane colour per actor. */
:root {
  --bg: #f1f5ee; --surface: #ffffff; --surface-2: #e5ede1; --fg: #11261b; --muted: #4d6357; --line: #cfdac9;
  --brand: #1d5a3a; --brand-fg: #ffffff; --deep: #0f3524; --on-deep: #e9f3ec; --on-deep-muted: #a9c6b4;
  --gold: #e2a626; --gold-ink: #3d2a03;
  --ok: #1b7a45; --ok-bg: #dcf0e2; --bad: #a3361f; --bad-bg: #f8e1da; --warn: #8a5a00; --warn-bg: #fbeccb; --info: #1b6a86; --info-bg: #d9edf4;
  --lane-customer: #5b6b62; --lane-admin: #1d5a3a; --lane-vendor: #a8730f; --lane-delivery: #1b6a86; --lane-accounts: #7a4a8a;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1813; --surface: #13231c; --surface-2: #1a2e25; --fg: #e5efe8; --muted: #9bb1a5; --line: #2a4136;
    --brand: #62c48e; --brand-fg: #08130e; --deep: #0a2a1c; --gold: #f0b93a; --gold-ink: #2a1d02;
    --ok: #6fd49a; --ok-bg: #17382a; --bad: #f09a86; --bad-bg: #3a1f19; --warn: #f0c46a; --warn-bg: #3a2d10; --info: #6bc0e0; --info-bg: #14323f;
    --lane-customer: #9db0a5; --lane-admin: #62c48e; --lane-vendor: #e8b44a; --lane-delivery: #6bc0e0; --lane-accounts: #c79adb;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1813; --surface: #13231c; --surface-2: #1a2e25; --fg: #e5efe8; --muted: #9bb1a5; --line: #2a4136;
  --brand: #62c48e; --brand-fg: #08130e; --deep: #0a2a1c; --gold: #f0b93a; --gold-ink: #2a1d02;
  --ok: #6fd49a; --ok-bg: #17382a; --bad: #f09a86; --bad-bg: #3a1f19; --warn: #f0c46a; --warn-bg: #3a2d10; --info: #6bc0e0; --info-bg: #14323f;
  --lane-customer: #9db0a5; --lane-admin: #62c48e; --lane-vendor: #e8b44a; --lane-delivery: #6bc0e0; --lane-accounts: #c79adb;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.7rem; font-weight: 700; } h2 { font-size: 1.25rem; font-weight: 650; } h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; } a { color: var(--brand); } button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-size: 0.86em; } .muted { color: var(--muted); } .num { font-variant-numeric: tabular-nums; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .stack { display: grid; gap: 1rem; } .row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sp { margin-left: auto; }

/* ---- app shell ---- */
.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep); color: var(--on-deep); padding: 1rem .8rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; gap: .6rem; align-items: center; color: inherit; text-decoration: none; padding: .2rem .4rem; }
.side .brand svg, .site-head .brand svg { width: 2rem; height: 2rem; flex: none; }
.logo-mark { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; background: #fff; padding: .12rem; object-fit: contain; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.hero-logo { display: block; width: min(11rem, 55%); height: auto; background: #fff; border-radius: 1rem; padding: .7rem 1rem; margin-bottom: 1.2rem; }
.brand b { font-family: var(--font-display); display: block; line-height: 1; }
.brand small { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.side .portal { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: 0 .5rem; }
.side nav { display: grid; gap: .15rem; }
.side nav a { color: var(--on-deep-muted); text-decoration: none; padding: .5rem .7rem; border-radius: .45rem; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.08); color: var(--on-deep); }
.side nav a[aria-current="page"] { background: var(--gold); color: var(--gold-ink); font-weight: 650; }
.side .sub { margin-top: auto; display: grid; gap: .3rem; font-size: .86rem; border-top: 1px solid rgba(255,255,255,.18); padding-top: .8rem; }
.side .sub a, .side .sub button { color: var(--on-deep-muted); background: none; border: 0; padding: .3rem .5rem; text-align: left; cursor: pointer; text-decoration: none; border-radius: .4rem; }
.side .sub a:hover, .side .sub button:hover { background: rgba(255,255,255,.08); color: var(--on-deep); }
.topbar { display: none; }
.main { padding: 1.5rem clamp(1rem, 3vw, 2.2rem) 3rem; min-width: 0; display: grid; gap: 1.4rem; align-content: start; }
.page-head { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: end; justify-content: space-between; }
.page-head p { color: var(--muted); max-width: 42rem; margin-top: .3rem; }
.bell { position: relative; }
.bell i { position: absolute; top: -.1rem; right: .1rem; background: var(--gold); color: var(--gold-ink); font-style: normal; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 0 .35rem; }

/* ---- blocks ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 1.1rem 1.2rem; min-width: 0; }
.card > h2, .card > h3 { margin-bottom: .8rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.kpis { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; padding: .8rem 1rem; display: grid; gap: .15rem; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--brand); }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.kpi b { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi.alert b { color: var(--bad); } .kpi.good b { color: var(--ok); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.card .table-wrap { border: 0; border-radius: 0; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: .6rem .8rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; } tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
td.items { max-width: 20rem; color: var(--muted); }
td .mono, td a.mono, td.mono { white-space: nowrap; }
.empty { padding: 1.4rem; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.no { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.info { background: var(--info-bg); color: var(--info); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: .5rem; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--fg); font-size: .92rem; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); } .btn-primary:hover { background: var(--brand); filter: brightness(1.1); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); } .btn-gold:hover { background: var(--gold); filter: brightness(1.06); }
.btn-danger { color: var(--bad); border-color: var(--bad); background: transparent; } .btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: .3rem .7rem; font-size: .84rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); align-items: end; }
.field { display: grid; gap: .25rem; font-size: .8rem; font-weight: 650; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
input, select, textarea { background: var(--bg); border: 1.5px solid var(--line); border-radius: .45rem; padding: .5rem .65rem; width: 100%; min-width: 0; font-size: .95rem; color: var(--fg); font-weight: 450; }
input[type=checkbox] { width: auto; accent-color: var(--brand); }
td input, td select { padding: .35rem .5rem; }
td input[type=number] { width: 6.5rem; text-align: right; }
td select { width: auto; min-width: 9rem; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .92rem; color: var(--fg); font-weight: 500; }
.flash-wrap { display: grid; gap: .5rem; }
.flash { padding: .7rem 1rem; border-radius: .55rem; border: 1px solid; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); } .flash.error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.tabs a { padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: var(--fg); font-weight: 600; font-size: .88rem; }
.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tabs a small { opacity: .7; margin-left: .25rem; }
details.card > summary { cursor: pointer; font-family: var(--font-display); font-weight: 650; font-size: 1.05rem; }
details.card[open] > summary { margin-bottom: .9rem; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.2rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.timeline li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: .7rem; padding-bottom: .8rem; position: relative; }
.timeline li::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--brand); margin-top: .35rem; }
.timeline li::after { content: ""; position: absolute; left: .33rem; top: 1.2rem; bottom: -.1rem; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { color: var(--muted); display: block; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; padding: .8rem 0; border-top: 1px solid var(--line); align-items: center; }
.offer:first-of-type { border-top: 0; }
.offer small { color: var(--muted); display: block; }
.job { border-left: 5px solid var(--lane-delivery); }
.job-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.job-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.job-grid h4 { font-size: .72rem; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: .2rem; }
.bar { height: .6rem; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 6rem; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.access-matrix td.sel, .access-matrix th.sel { background: var(--surface-2); }

/* ---- public pages ---- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding: .6rem clamp(1rem, 3vw, 2rem); }
.site-head .in { max-width: 74rem; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.site-head .brand { display: flex; gap: .6rem; align-items: center; text-decoration: none; color: var(--fg); flex: none; }
.site-head .brand small { color: var(--muted); opacity: 1; }
.site-head nav { display: flex; gap: .2rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.site-head nav a { padding: .4rem .7rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 550; white-space: nowrap; font-size: .9rem; }
.site-head nav a:hover { background: var(--surface-2); color: var(--fg); }
.theme-btn { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 1.05rem; height: 1.05rem; }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.hero { background-color: var(--deep); color: var(--on-deep); background-image: repeating-linear-gradient(100deg, transparent 0 26px, rgba(255,255,255,.035) 26px 28px); padding: 3.5rem 0 3rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 750; margin-top: .8rem; } .hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { margin-top: 1rem; max-width: 33rem; color: var(--on-deep-muted); font-size: 1.1rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero .btn-ghost { background: transparent; border-color: rgba(233,243,236,.4); color: var(--on-deep); } .hero .btn-ghost:hover { background: rgba(233,243,236,.1); }
.people { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid rgba(233,243,236,.2); font-size: .88rem; color: var(--on-deep-muted); }
.people b { display: block; color: var(--on-deep); font-size: 1rem; font-weight: 600; }
.ledger { background: var(--surface); color: var(--fg); border-radius: .75rem; padding: 1.1rem; box-shadow: 0 1.5rem 3rem -1.2rem rgba(0,0,0,.5); }
.ledger ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .45rem; }
.ledger li { display: grid; grid-template-columns: 1fr auto; padding: .65rem .8rem; background: var(--bg); border-radius: .5rem; gap: .1rem 1rem; align-items: center; }
.ledger .price { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-align: right; }
.section { padding: 3.5rem 0 0; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
.section .lead { color: var(--muted); max-width: 40rem; margin-top: .6rem; font-size: 1.02rem; }
.section .grid { margin-top: 1.4rem; }
.linkcard { display: grid; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; padding: .9rem 1.1rem; text-decoration: none; color: var(--fg); border-top: 4px solid var(--lane, var(--brand)); }
.linkcard:hover { background: var(--surface-2); } .linkcard b { font-family: var(--font-display); font-size: 1.02rem; } .linkcard span { color: var(--muted); font-size: .88rem; }
.portal-head { display: flex; align-items: center; gap: .6rem; margin-top: 2rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.portal-head i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--lane); }
.site-foot { margin-top: 4rem; background: var(--deep); color: var(--on-deep); padding: 2rem 0; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.site-foot p { color: var(--on-deep-muted); font-size: .9rem; }
.auth { min-height: calc(100vh - 3.6rem); display: grid; place-items: center; padding: 2rem 1rem; }
.auth .box { width: min(100%, 30rem); background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; padding: 1.6rem; display: grid; gap: 1.1rem; }
.auth .box.wide { width: min(100%, 38rem); }
.demo-box { background: var(--bg); border: 1px dashed var(--line); border-radius: .55rem; padding: .8rem 1rem; font-size: .86rem; }
.demo-box table { font-size: .84rem; } .demo-box td, .demo-box th { padding: .25rem .5rem; }

/* ---- workflow page ---- */
.lanes { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .85rem; color: var(--muted); margin: 1rem 0; }
.lanes i, .dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; background: var(--lane); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); counter-reset: s; }
.steps li { counter-increment: s; position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--lane); border-radius: .6rem; padding: .8rem .9rem .9rem 3rem; min-height: 6.2rem; }
.steps li::before { content: counter(s); position: absolute; left: .8rem; top: .8rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--lane); color: #fff; display: grid; place-items: center; font-family: var(--font-mono); font-size: .8rem; }
:root[data-theme="dark"] .steps li::before { color: #08130e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li::before { color: #08130e; } }
.steps b { font-family: var(--font-display); display: block; line-height: 1.2; } .steps span { color: var(--muted); font-size: .86rem; display: block; margin-top: .2rem; }
.steps .count { margin-top: .4rem; font-family: var(--font-mono); font-size: .76rem; color: var(--fg); background: var(--surface-2); display: inline-block; padding: .05rem .5rem; border-radius: 99px; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .2rem; align-items: stretch; }
.flow li { display: flex; align-items: center; }
.flow .node { background: var(--surface); border: 1.5px solid var(--line); border-radius: .5rem; padding: .6rem .9rem; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; font-weight: 500; }
.flow li:first-child .node { background: var(--deep); color: var(--on-deep); border-color: var(--deep); }
.flow li:last-child .node { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.flow li:not(:last-child)::after { content: "→"; padding: 0 .35rem; color: var(--muted); font-size: 1.2rem; }

@media (max-width: 62rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 52rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem .8rem; gap: .3rem .8rem; }
  .side .portal { display: none; } .side nav { display: flex; overflow-x: auto; flex: 1 1 100%; order: 3; scrollbar-width: none; }
  .side nav a { white-space: nowrap; } .side .sub { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; }
  .side .brand small { display: none; } .hide-sm { display: none !important; }
}
@media (max-width: 34rem) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dt { margin-top: .4rem; } .hero { padding: 2.4rem 0 2rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---- customer shop ---- */
[hidden] { display: none !important; }
.count-badge { background: var(--gold); color: var(--gold-ink); font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 0 .4rem; margin-left: .15rem; }
.nav-form { display: inline; margin: 0; }
.nav-form button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.nav-form button:hover { text-decoration: underline; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; color: var(--fg); font-weight: 500; cursor: pointer; }
.check input { width: auto; margin-top: .25rem; }
.check.wide, .field.wide { grid-column: 1 / -1; }
.field.grow { flex: 1 1 14rem; }
.shop-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1.2rem; }
.products { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.pcard.soldout { opacity: .65; }
.pcard-link { color: inherit; text-decoration: none; display: block; }
.pcard-link:hover h3 { text-decoration: underline; }
.pbody { padding: .8rem 1rem 1rem; display: grid; gap: .35rem; }
.pbody h3 { font-size: 1.05rem; line-height: 1.25; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.price.big { font-size: 1.9rem; }
.add-form { display: flex; gap: .5rem; padding: 0 1rem 1rem; align-items: center; }
.add-form input { width: 4.8rem; }
.thumb { background: color-mix(in srgb, var(--tone) 16%, var(--surface)); border-bottom: 4px solid var(--tone); aspect-ratio: 16 / 9; display: grid; place-content: center; text-align: center; gap: .1rem; }
.thumb b { font-family: var(--font-display); font-size: 1.7rem; color: var(--tone); line-height: 1; }
.thumb span { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; }
.pdetail .thumb { border-radius: .75rem; border: 1px solid var(--line); border-bottom: 4px solid var(--tone); }
.cart-grid, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.2rem; align-items: start; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--line); }
.cart-line:first-child { border-top: 0; }
.cart-line form { display: flex; gap: .4rem; align-items: center; }
.cart-line input { width: 4.8rem; }
.cart-price, .cart-total { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.cart-total { font-size: 1.3rem; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 1.1rem 1.2rem; display: grid; gap: .6rem; }
.summary.sticky { position: sticky; top: 5rem; }
.sum { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.sum.total { border-top: 2px solid var(--line); padding-top: .6rem; font-weight: 700; font-size: 1.15rem; }
.sum-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .88rem; color: var(--muted); }
.pay-opts { display: grid; gap: .5rem; }
.pay-opt, .addr-opt { display: flex; gap: .7rem; align-items: flex-start; border: 1.5px solid var(--line); border-radius: .55rem; padding: .65rem .85rem; cursor: pointer; background: var(--bg); }
.pay-opt input, .addr-opt input { width: auto; margin-top: .3rem; }
.pay-opt:has(input:checked), .addr-opt:has(input:checked) { border-color: var(--brand); background: var(--surface-2); }
.pay-opt.off { opacity: .55; cursor: not-allowed; }
.pay-panel { margin-top: .8rem; padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: .55rem; display: grid; gap: .6rem; }
[data-addr] { display: grid; gap: .5rem; }
.addr-new { padding: .6rem 0 0; }
.addr-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.demo-banner { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); border: 1px solid var(--gold); border-radius: .55rem; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
:not(li).done { text-align: center; max-width: 36rem; margin: 2rem auto; display: grid; gap: .8rem; }
.track-bar { list-style: none; margin: 1rem 0; padding: 0; display: flex; gap: .3rem; flex-wrap: wrap; }
.track-bar li { flex: 1 1 5rem; text-align: center; font-size: .78rem; padding: .45rem .3rem; border-radius: .4rem; background: var(--surface-2); color: var(--muted); border-bottom: 4px solid var(--line); }
.track-bar li.done { border-bottom-color: var(--brand); color: var(--fg); }
.track-bar li.now { border-bottom-color: var(--gold); background: color-mix(in srgb, var(--gold) 25%, var(--surface)); color: var(--fg); font-weight: 700; }
.otp-box { background: var(--deep); color: var(--on-deep); border-radius: .7rem; padding: 1rem 1.2rem; display: grid; gap: .3rem; justify-items: start; margin: 1rem 0; }
.otp-box b { font-size: 2.2rem; letter-spacing: .35em; color: var(--gold); }
.otp-box .muted { color: inherit; opacity: .8; }
@media (max-width: 52rem) {
  .cart-grid, .checkout, .pdetail { grid-template-columns: minmax(0, 1fr); }
  .summary.sticky { position: static; }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto; }
}

dl.kv.sum { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; } dl.kv.sum dd { text-align: right; }
.sum-lines li { display: flex; justify-content: space-between; gap: .8rem; }
.nav-form button { font-family: inherit; font-size: inherit; font-weight: inherit; }
@media (max-width: 52rem) {
  .site-head .in { flex-wrap: wrap; }
  .site-head nav { order: 3; flex: 1 1 100%; display: flex; gap: .2rem 1rem; flex-wrap: wrap; }
}
.thumb.has-img { padding: 0; background: #fff; }
.thumb.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

.with-mini { display: flex; gap: .7rem; align-items: center; min-width: 0; }
.mini { width: 3rem; height: 3rem; flex: none; border-radius: .45rem; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.mini.ph { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-family: var(--font-display); font-weight: 700; }
.cart-line .mini { width: 4.5rem; height: 4.5rem; }

/* product photo gallery (images1, images2, images3 ...) */
.thumb.has-img { position: relative; }
.thumb.has-img img.alt { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; background: #fff; }
.pcard:hover .thumb.has-img img.alt, .pcard:focus-within .thumb.has-img img.alt { opacity: 1; }
.thumb .count { position: absolute; right: .5rem; bottom: .5rem; font: 600 .7rem/1 var(--font-mono); letter-spacing: .04em; text-transform: none; color: #fff; background: rgba(0,0,0,.55); padding: .3rem .5rem; border-radius: 999px; }
.gallery { display: grid; gap: .6rem; min-width: 0; }
.gal-strip { display: flex; gap: .5rem; flex-wrap: wrap; }
.gal-btn { padding: 0; width: 4.6rem; aspect-ratio: 16 / 9; border: 2px solid var(--line); border-radius: .45rem; background: #fff; cursor: pointer; overflow: hidden; }
.gal-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-btn.on { border-color: var(--brand); }
.gal-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
