/* DEJA dealer portal. Brand tokens from CLAUDE.md §8; no framework. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/instrument-serif-400-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/instrument-serif-400-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../assets/fonts/inter-300-500-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../assets/fonts/inter-300-500-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../assets/fonts/inter-600-700-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../assets/fonts/inter-600-700-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FAF5EF; --surface: #FFFFFF; --surface-2: #F5EFE8; --chip: #E6DCCF; --line: #E8E0D7;
  --ink: #231F1C; --text: #3A3430; --muted: #7B736C;
  --accent: #AC6242; --accent-press: #93503A; --accent-soft: #F4E6DE; --on-accent: #FFFFFF;
  --info-bg: #E1EAF9; --info-fg: #3D5A8A; --warn-bg: #F6E6C4; --warn-fg: #7A5A1E;
  --ok-bg: #E3EFE6; --ok-fg: #2F6B4F; --danger: #B3261E; --danger-bg: #F7E3E1;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, "Segoe UI", sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-card: 0 1px 2px rgb(35 31 28 / .06), 0 4px 16px rgb(35 31 28 / .05);
  --side-w: 252px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 0.9375rem/1.55 var(--sans); color: var(--text); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; letter-spacing: .005em; }
h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.375rem; line-height: 1.25; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); } .small { font-size: .8125rem; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.icon.sm { width: 16px; height: 16px; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.brand span { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.who { margin: 0 4px 14px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.who strong { display: block; color: var(--ink); font-weight: 600; font-size: .875rem; line-height: 1.3; }
.who span { font-size: .75rem; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: .9063rem; position: relative; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent-press); font-weight: 500; }
.nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--accent); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; font-weight: 600; }
.nav a .count.warn { background: var(--warn-bg); color: var(--warn-fg); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 14px 6px 0; display: grid; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; width: max-content; }
.lang button { border: 0; background: none; font: 500 .75rem var(--sans); color: var(--muted); padding: 4px 10px;
  border-radius: var(--r-pill); cursor: pointer; }
.lang button.on { background: var(--ink); color: #fff; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; }
.linkbtn:hover { color: var(--ink); }

.main { min-width: 0; padding: 32px 40px 80px; }
.wrap { max-width: 1180px; margin: 0 auto; }
.topbar { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .2s ease-out; box-shadow: 0 0 40px rgb(0 0 0 / .15); }
  body.menu-open .side { transform: none; }
  .scrim { display: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(35 31 28 / .35); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0;
    z-index: 30; height: 60px; padding: 0 8px; padding-top: env(safe-area-inset-top);
    background: rgb(250 245 239 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .topbar img { height: 30px; }
  .main { padding: 20px 16px 72px; }
  h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0;
  border-radius: var(--r-md); background: none; color: var(--ink); cursor: pointer; text-decoration: none; }
.iconbtn:hover { background: var(--surface-2); }
.dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg); }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted);
  text-decoration: none; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 20px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head a { font-size: .8125rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 18px 20px 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cols.wide-side { grid-template-columns: minmax(0, 1fr) 400px; }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .cols, .cols.wide-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .grid.g4 { gap: 10px; } .kpi { padding: 14px; } .kpi .value { font-size: 2.25rem; } .kpi .foot { font-size: .75rem; } }
.sticky { position: sticky; top: 24px; }
@media (max-width: 1080px) { .sticky { position: static; } }

.kpi { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.kpi:hover { border-color: var(--chip); }
.kpi .label { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.kpi .value { font-family: var(--serif); font-size: 2.75rem; line-height: 1.05; color: var(--ink); }
.kpi .foot { font-size: .8125rem; color: var(--muted); }
.kpi.alert { background: linear-gradient(0deg, #FFF8EA, #FFF8EA); border-color: #F0DCAF; }
.kpi.alert .value { color: var(--warn-fg); }

.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: .75rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: #FDFAF6; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.qty-big { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); line-height: 1; }
.prod { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.prod img, .prod .ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.prod strong { display: block; color: var(--ink); font-weight: 500; line-height: 1.3; }
.prod span { font-size: .8125rem; color: var(--muted); }
.code { font: 500 .75rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); letter-spacing: .02em; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 32px; height: 32px; color: var(--chip); margin-bottom: 8px; }
.empty p { max-width: 420px; margin: 8px auto 16px; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-bg); color: var(--ok-fg); } .b-warn { background: var(--warn-bg); color: var(--warn-fg); }
.b-info { background: var(--info-bg); color: var(--info-fg); } .b-danger { background: var(--danger-bg); color: var(--danger); }
.b-muted { background: var(--line); color: var(--muted); } .b-accent { background: var(--accent-soft); color: var(--accent-press); }
.b-ph { background: var(--warn-bg); color: var(--warn-fg); font-size: .6875rem; letter-spacing: .06em; }
.pill-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent);
  color: #fff; font-size: .6875rem; font-weight: 600; text-align: center; line-height: 18px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-md); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: 500 .9375rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn.ghost { background: var(--surface); color: var(--accent); border-color: var(--chip); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text); }
.btn.quiet:hover { background: var(--surface-2); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: #E9C3BF; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .8438rem; border-radius: 10px; }
.btn.block { width: 100%; min-height: 52px; font-size: 1.0625rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

/* ---------------------------------------------------------------- forms */
label.f { display: block; font-size: .8125rem; color: var(--muted); margin: 14px 0 6px; }
label.f:first-child { margin-top: 0; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search],
input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(172 98 66 / .15); }
input[type=number] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=file] { font: inherit; font-size: .875rem; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters > * { width: auto; }
.filters input[type=search] { min-width: 240px; flex: 1 1 240px; max-width: 360px; }
.searchbox { position: relative; flex: 1 1 240px; max-width: 360px; }
.searchbox .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.searchbox input { padding-left: 40px; max-width: none; }

.seg { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg a, .seg label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 9px; color: var(--text); text-decoration: none; font-size: .875rem; cursor: pointer; }
.seg a.on, .seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(35 31 28 / .12); font-weight: 500; }
.seg label { padding: 0; } .seg label span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 9px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg.full { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); width: 100%; }
.seg.full label span { justify-content: center; width: 100%; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.stepper button { width: 38px; height: 40px; border: 0; background: none; font-size: 1.125rem; color: var(--accent); cursor: pointer; border-radius: 10px; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 62px; min-height: 40px; border: 0; text-align: center; padding: 0 4px; font-variant-numeric: tabular-nums; font-weight: 500; }
.stepper input:focus { box-shadow: none; }
.stepper.has-value { border-color: var(--accent); background: #FFFBF8; }
.stepper.has-value input { background: transparent; }

/* ---------------------------------------------------------------- flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-fg); } .flash.error { background: var(--danger-bg); color: var(--danger); }
.callout { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-size: .875rem; }
.callout.warn { background: #FFF8EA; border: 1px solid #F0DCAF; color: var(--warn-fg); }
.callout.info { background: var(--info-bg); color: var(--info-fg); }

/* ---------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { color: var(--ink); font-weight: 500; text-decoration: none; display: block; }
.list a.title:hover { color: var(--accent); }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: .9063rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- order progress */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px 0 8px; counter-reset: s; }
.steps li { list-style: none; position: relative; text-align: center; font-size: .78rem; color: var(--muted); padding-top: 30px; }
.steps li::before { content: ""; position: absolute; top: 8px; left: calc(50% - 9px); width: 18px; height: 18px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--chip); z-index: 1; box-sizing: border-box; }
.steps li::after { content: ""; position: absolute; top: 16px; left: calc(-50% + 9px); right: calc(50% + 9px); height: 2px; background: var(--chip); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.done::after { background: var(--accent); }
.steps li.now { color: var(--accent-press); font-weight: 600; }
.steps li.now::before { box-shadow: 0 0 0 4px rgb(172 98 66 / .18); }
.steps.mini { grid-template-columns: repeat(5, 18px); gap: 4px; margin: 0; }
.steps.mini li { padding: 0; height: 6px; border-radius: 3px; background: var(--chip); font-size: 0; }
.steps.mini li::before, .steps.mini li::after { display: none; }
.steps.mini li.done { background: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; } .timeline li:last-child::after { display: none; }
.timeline .when { font-size: .78rem; color: var(--muted); }
.note { white-space: pre-line; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-top: 6px; font-size: .875rem; }

/* ---------------------------------------------------------------- thread */
.thread { display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: min(640px, 88%); }
.msg .bubble { padding: 14px 16px; border-radius: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.msg .meta { font-size: .75rem; color: var(--muted); margin: 6px 4px 0; }
.msg.me { align-self: flex-end; } .msg.me .bubble { background: var(--accent-soft); border-bottom-right-radius: 4px; color: var(--ink); }
.msg.me .meta { text-align: right; }
.msg.them .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.them .who-tag { color: var(--accent-press); font-weight: 600; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgb(255 255 255 / .7);
  border: 1px solid var(--line); font-size: .8125rem; text-decoration: none; color: var(--ink); max-width: 240px; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-img { display: block; width: 120px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- choice cards */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); }
.choice strong { color: var(--ink); font-weight: 500; font-size: .9063rem; display: flex; gap: 8px; align-items: center; }
.choice em { font-style: normal; font-size: .78rem; color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #FFFBF8; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- order form */
.ogroup + .ogroup { margin-top: 28px; }
.ogroup > h2 { margin-bottom: 12px; }
.oprod { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.oprod:first-of-type { border-top: 0; }
.oprod > img, .oprod > .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.oprod h3 { font-family: var(--sans); font-size: .9688rem; font-weight: 600; margin: 2px 0 8px; }
.osku { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.osku .lbl { min-width: 0; }
.osku .lbl strong { font-weight: 500; color: var(--ink); }
.osku .lbl small { display: block; color: var(--muted); font-size: .78rem; }
.summary-line { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: .875rem; }
.summary-line b { color: var(--ink); font-weight: 600; }
.cart { list-style: none; margin: 0 0 4px; padding: 0; max-height: 240px; overflow-y: auto; }
.cart li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .8438rem; }
.cart li:last-child { border-bottom: 0; }
.cart li b { font-variant-numeric: tabular-nums; color: var(--ink); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-art { position: relative; background: var(--chip) center / cover no-repeat; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(35 31 28 / .05) 40%, rgb(35 31 28 / .55)); }
.auth-art blockquote { position: absolute; left: 40px; right: 40px; bottom: 40px; margin: 0; z-index: 1; color: #fff;
  font-family: var(--serif); font-size: 2rem; line-height: 1.2; }
.auth-art blockquote small { display: block; margin-top: 10px; font: 400 .875rem var(--sans); opacity: .85; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 6vw, 96px); }
.auth-box { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-box .logo { height: 46px; margin-bottom: 36px; }
.auth-box h1 { margin-bottom: 8px; }
.auth-box .lede { color: var(--muted); margin-bottom: 26px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; font-size: .8125rem; color: var(--muted); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------------------------------------------------------------- misc */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 18px; font-size: .875rem; }
.resource { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.resource:first-child { border-top: 0; }
.resource .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-press); }
.resource .ico.doc { background: var(--info-bg); color: var(--info-fg); }
.resource .grow { flex: 1; min-width: 0; }
.resource .grow strong { display: block; font-weight: 500; color: var(--ink); }
.ann { padding: 18px 0; border-top: 1px solid var(--line); }
.ann:first-child { border-top: 0; padding-top: 0; }
.ann h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 4px 0 6px; }
.ann .body { white-space: pre-line; color: var(--text); }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.notif:first-child { border-top: 0; }
.notif .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.notif.unread .ico { background: var(--accent-soft); color: var(--accent-press); }
.notif.unread strong { color: var(--ink); }
.notif strong { font-weight: 500; display: block; }
.big-number { font-family: var(--serif); font-size: 3.5rem; line-height: 1; color: var(--ink); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.foot-note { margin-top: 40px; font-size: .78rem; color: var(--muted); text-align: center; }

@media print {
  .side, .topbar, .no-print, .flash { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}
