:root {
    /* Brand palette — rethemed to the marketing (landing) design system. The token NAMES are kept
       for compatibility with the 150+ pages that reference them; only the VALUES were remapped to
       the green / amber / ink palette so the whole app recolours coherently (see chrome.css). */
    --navy: #262D2D;        /* headings, dark text (was navy → marketing ink) */
    --gold: #F2C87A;        /* CTA, accents (was gold → amber) */
    --gold-ink: #8a6a1c;    /* darkened amber for price text (AA on white) */
    --gold-soft: #FBF4E6;   /* amber-tinted surfaces */
    --teal: #419386;        /* logistics: delivery, tracking, calculator (→ marketing green) */
    --teal-deep: #30766C;   /* hover & active states (→ green-deep) */

    /* Surfaces */
    --bg: #FBFDFD;          /* main background (paper-cool) */
    --bg-warm: #FBFAF6;     /* how-it-works, tariffs, reviews (paper-warm) */
    --bg-sea: #E7F2F8;      /* hero, calculator, info blocks (sky-soft) */

    /* Text */
    --ink: #262D2D;         /* main text */
    --muted: #4B5453;       /* secondary text */
    --text-light: #6B7371;  /* captions, service info, dates */

    /* Lines & semantic */
    --line: #E3E4E4;
    --danger: #c0392b;      /* validation, blocked, negative amounts */
    --success: #2e7d32;
    --ring: rgba(48, 118, 108, .18);

    /* Primary interactive accent → marketing green-deep */
    --accent: #30766C;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    border-bottom: 3px solid var(--gold);
    background: var(--navy);
    color: #eaf0f7;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; display: block; flex: 0 0 auto; }
/* Wordmark mirrors the marketing mock-up: uppercase ANATANI · gold dot · gold SHOP. */
.brand-word { display: inline-flex; align-items: center; gap: .5rem; }
.brand .brand-name { font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: .26em; color: #fff; }
.brand .brand-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); }
.brand .brand-suffix { font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .42em; color: var(--gold); align-self: center; }

.home-link { color: #cdd7e4; text-decoration: none; white-space: nowrap; }
.home-link:hover { color: var(--gold); }

/* The links/lang/account section. On desktop it's the inline row after the brand (taking the
   remaining width); on mobile it collapses behind the burger (see the media query below). */
.header-menu { display: flex; align-items: center; gap: 1.5rem; flex: 1; }

/* Burger toggle — hidden on desktop, shown on mobile by the media query. */
.nav-burger { display: none; margin-left: auto; cursor: pointer; color: #cdd7e4; padding: .25rem; }
.nav-burger:hover { color: var(--gold); }
.nav-burger svg { width: 26px; height: 26px; display: block; }

.nav { display: flex; gap: 1.25rem; align-items: center; }
.nav a { color: #cdd7e4; text-decoration: none; }
.nav a:hover { color: var(--gold); }
/* Sign-out sits in the navy header, so it needs light styling rather than the navy link default. */
.site-header .btn-link { color: #cdd7e4; }
.site-header .btn-link:hover { color: var(--gold); }

/* The language switcher anchors the right section (everything except the logo and Home).
   Built as a <details> dropdown so it matches the nav links instead of a native <select>. */
.culture-switch { margin-left: auto; position: relative; }
.lang-toggle {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem;
    color: #cdd7e4; user-select: none;
}
.lang-toggle::-webkit-details-marker { display: none; }
.lang-toggle::marker { content: ""; }
.lang-toggle:hover, .lang-menu[open] .lang-toggle { color: var(--gold); }
.lang-caret { width: 14px; height: 14px; transition: transform .15s ease; }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }
.lang-pop {
    position: absolute; top: calc(100% + .6rem); right: 0; z-index: 40; margin: 0;
    display: flex; flex-direction: column; min-width: 9rem; padding: .3rem;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.lang-option {
    text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
    color: var(--ink); padding: .45rem .6rem; border-radius: 6px;
}
.lang-option:hover { background: var(--bg); color: var(--accent); }
.lang-option.is-current { font-weight: 600; color: var(--accent); }

/* --- Mobile header: collapse the links/lang/account row behind a burger so it never
   overflows on narrow viewports. The toggle is a CSS-only checkbox (no JS required). --- */
@media (max-width: 768px) {
    .site-header { flex-wrap: wrap; gap: .75rem 1rem; padding: .85rem 1.25rem; }
    .brand { margin-right: auto; }
    .nav-burger { display: inline-flex; }

    .header-menu {
        order: 3; flex-basis: 100%; display: none;
        flex-direction: column; align-items: flex-start; gap: 1rem;
        padding-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .12);
    }
    .nav-toggle:checked ~ .header-menu { display: flex; }

    /* Stack the right-hand section instead of pushing it off-screen. */
    .culture-switch { margin-left: 0; }
    .nav { flex-direction: column; align-items: flex-start; gap: 1rem; width: 100%; }
    .nav .nav-inline { display: block; }
    /* Open the language dropdown in flow (no absolute overlay) on mobile. */
    .lang-pop { position: static; box-shadow: none; min-width: 0; margin-top: .4rem; }
}

.content { max-width: 960px; margin: 0 auto; padding: 3rem 2rem; }

.hero { text-align: center; padding: 4rem 2rem; background: var(--bg-sea); border-radius: 20px; margin: 1rem 0; }
.hero-slogan { font-size: 2.75rem; margin: 0 0 .5rem; color: var(--navy); }
.hero-slogan::after { content: ""; display: block; width: 64px; height: 3px; margin: 1rem auto 0; background: var(--gold); border-radius: 2px; }
.hero-tagline { font-size: 1.15rem; color: var(--text-light); }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem;
}

/* A card holding a data grid scrolls horizontally only when the table genuinely doesn't fit
   (many columns + long localized text on a narrow viewport). The table itself stays a real
   table so it stretches to fill the card on wide screens; the card — scoped with :has so plain
   cards keep visible overflow — provides the scroll on narrow ones. */
.panel:has(> .grid),
.acct-card:has(.grid),
.bal-history:has(.grid) { overflow-x: auto; }

.site-footer {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    color: #aab6c6;
    background: var(--navy);
    border-top: 3px solid var(--gold);
}

/* Forms & tables (Stage 1) */
.form-panel { max-width: 540px; }
.form-panel label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
/* Unified control appearance (input/select/textarea) ported to Tailwind @apply (Styles/app.css),
   kept unlayered there to preserve the cascade against per-area input overrides below. */
.form-panel label.check { font-weight: 400; display: flex; align-items: center; gap: .5rem; }
.form-panel label.check input { width: auto; }
/* Match label weight in the gap-based account/management forms. */
.topup-form > label { font-weight: 600; margin-top: .25rem; }
.topup-form label.check { font-weight: 400; flex-direction: row; align-items: center; gap: .5rem; }
.topup-form label.check input { width: auto; }

/* Searchable country selector */
.country-select { position: relative; }
.country-list {
    list-style: none; margin: .25rem 0 0; padding: .25rem; position: absolute; z-index: 30; width: 100%;
    max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
    border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.country-list li { padding: .5rem .6rem; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.country-list li:hover { background: var(--bg); }

/* Phone with dial-code prefix */
.phone-field { display: flex; align-items: stretch; }
.phone-field .dial-code {
    display: inline-flex; align-items: center; justify-content: center; min-width: 3.75rem; padding: 0 .6rem;
    border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px;
    background: var(--bg); color: var(--muted); font-weight: 600;
}
.phone-field .dial-code:empty::before { content: "+"; }
/* Specific enough to beat the general `.form-panel input…` radius so the left corners
   stay square and the input visually joins the dial-code prefix. */
.form-panel .phone-field input.phone-local { width: auto; flex: 1; border-radius: 0 6px 6px 0; }
.agreements { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.validation-summary, .field-validation-error, span.text-danger { color: var(--danger); font-size: .9rem; }
.validation-summary ul { margin: 0; padding: 0; list-style: none; text-align: left; }
.field-hint { display: block; color: var(--muted); font-size: .82rem; margin: .25rem 0 0; }
.pw-strength { height: 6px; background: var(--line); border-radius: 3px; margin: .4rem 0 .1rem; overflow: hidden; }
.pw-strength span { display: block; height: 100%; width: 0; background: transparent; transition: width .2s ease, background .2s ease; }
.password-field { position: relative; display: block; }
.password-toggle {
    position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; padding: .25rem; margin: 0; cursor: pointer;
    color: var(--muted); line-height: 0;
}
.password-toggle:hover { color: var(--ink); }
.password-toggle svg { width: 20px; height: 20px; }
.notice { color: var(--success); font-weight: 600; }
/* .btn-primary / .btn-secondary / .btn-link (incl. their a.* variants) ported to Tailwind @apply
   components (Styles/app.css). */
.nav-inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
/* .grid table base ported to Tailwind @apply components (Styles/app.css). */
/* The goods row links out to a shared dialog instead of an inline search field. (Goods-table layout —
   photo column, footer emphasis, product/comment, nomenclature cell — now lives in Orders/Details.cshtml
   as Tailwind utilities.) */
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--teal-deep); text-decoration: underline; }
.link-button:hover { color: var(--navy); }
/* Nomenclature dialog: keep the type-ahead results anchored to the search box, and lay the
   JP-name + Translate button out on one row. */
.nomen-dialog { min-width: min(32rem, 92vw); }
.nomen-dialog .nomen-dialog-search { position: relative; }
.nomen-dialog .nomen-search { width: 100%; }
.nomen-dialog .nomen-results { position: absolute; z-index: 5; left: 0; right: 0; }
.nomen-dialog .nomen-dialog-create { margin-top: 1rem; }
.nomen-dialog .nomen-translate-row { display: flex; gap: .5rem; align-items: center; }
.nomen-dialog .nomen-translate-row input { flex: 1; }
/* Маржа row sits directly under the charges Итого; muted label, the value picks up the brand accent. */
.order-charges tfoot .order-charges-margin td { border-top: none; color: var(--muted); }
.order-charges-margin #margin-total { color: var(--gold-ink); font-weight: 700; }
/* "Send for confirmation" sits at the right edge under the charges table. */
.order-charges-actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin-top: 1rem; }
/* Drop .btn-primary's stock top margin here so it lines up with the secondary button beside it. */
.order-charges-actions .btn-primary, .order-charges-actions .btn-secondary { margin-top: 0; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.row-actions form { display: inline; }

/* Wide variant for catalog browsing — uses the available width (≈8 cards per row)
   on large screens, staying fluid below. */
.content--wide { max-width: 1600px; }

/* Product / detail pages align to the shared 1180px column used by the header, footer and landing
   (same max-width + 2.5rem gutters, narrowing to 1.25rem below 720px), so their content edges line
   up with the chrome instead of sitting in a narrower 960px column. */
.content--product { max-width: 1180px; padding-left: 2.5rem; padding-right: 2.5rem; }
@media (max-width: 720px) {
    .content--product { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ---------- Account area ---------- */
/* Higher cap so full-HD screens use the width instead of squeezing the lists into a narrow
   centred column; stays fluid (fills the viewport) below the cap, so smaller screens are
   unaffected. */
.content--account { max-width: 1560px; }

/* Management area: data-dense tables benefit from the extra width on large screens. */
.content--manage { max-width: 1880px; }

/* ---------- Rich pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: 1.5rem; }
.pager-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.25rem; height: 2.25rem; padding: 0 .55rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
    color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; line-height: 1;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.pager-btn:hover { background: var(--gold-soft); border-color: var(--gold); }
.pager-btn.is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager-btn.is-disabled { color: var(--muted); background: var(--bg); opacity: .55; pointer-events: none; }
.pager-gap { padding: 0 .15rem; color: var(--muted); }
.pager-info { margin-left: auto; color: var(--muted); font-size: .85rem; }

.acct-shell { display: grid; grid-template-columns: 248px 1fr; gap: 2rem; align-items: start; }

/* Sidebar */
.acct-sidebar {
    position: sticky; top: 1.5rem;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1rem;
    display: flex; flex-direction: column;
}
.acct-id { display: flex; gap: .75rem; align-items: center; padding: .35rem .4rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.acct-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.acct-id-text { display: flex; flex-direction: column; min-width: 0; }
.acct-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-level { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; padding: .12rem .5rem; border-radius: 999px; align-self: flex-start; margin-top: .3rem; }
.lvl-new { background: #eceeec; color: var(--text-light); }
.lvl-verified { background: #e7f3e8; color: var(--success); }
.lvl-vip { background: #f7ecd0; color: #8a6a1c; }
.lvl-blocked { background: #fbe3e0; color: var(--danger); }

.acct-nav { display: flex; flex-direction: column; gap: .12rem; }
.acct-link {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: .92rem; position: relative; text-align: left;
}
.acct-link svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-linecap: round; stroke-linejoin: round; }
.acct-link:not(.is-soon):not(.is-active):hover { background: var(--bg); color: var(--ink); }
.acct-link.is-active { background: rgba(11, 35, 65, .06); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.acct-link.is-soon { color: #b8b2a8; cursor: default; }
.acct-soon { margin-left: auto; font-style: normal; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: #b8b2a8; border: 1px solid var(--line); border-radius: 999px; padding: .05rem .42rem; }
/* "Needs attention" count badge on a manager sidebar link — pushed to the right end of the flex row.
   Kept calm (soft green rounded square, not an alarming red pill) since these queues can sit for a while. */
.acct-badge { margin-left: auto; flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 .32rem; border-radius: 5px; background: #e9f7ee; border: 1px solid #2e7d32; color: #1e6b2b; font-size: .64rem; font-weight: 700; line-height: 1; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.acct-link.is-active .acct-badge { background: #e9f7ee; }
.acct-nav-divider { height: 1px; background: var(--line); margin: .6rem .4rem; }
.acct-signout { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.acct-link.as-button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; }

/* Main column */
.acct-main { min-width: 0; }
.acct-head { margin-bottom: 1.5rem; }
.acct-greeting { color: var(--muted); margin: 0 0 .1rem; font-size: .95rem; }
.acct-head h1 { margin: 0; font-size: 1.9rem; line-height: 1.1; }
/* Order code, status badge and customer link share one baseline-aligned row. */
.acct-head-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: .5rem; }
.acct-head-row .btn-secondary { margin-top: 0; }
.acct-head-meta { color: var(--muted); font-size: .9rem; margin-left: auto; }
.acct-head-customer { color: var(--muted); text-decoration: none; }
.acct-head-customer:hover { text-decoration: underline; }

.acct-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
/* .acct-card / .acct-card--accent ported to Tailwind @apply components (Styles/app.css). */
.acct-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.acct-card-head h2 { margin: 0; font-size: 1.05rem; }
.acct-card-lead { color: var(--muted); margin: 0 0 1rem; }

.acct-facts { margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.acct-facts > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.acct-facts dt { color: var(--muted); margin: 0; font-size: .9rem; white-space: nowrap; flex: 0 0 auto; }
.acct-facts dd { margin: 0; font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.acct-cardlink { display: inline-block; margin-top: 1.2rem; color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 600; }

.acct-copy { display: flex; gap: .5rem; }
.acct-copy input { flex: 1; min-width: 0; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.btn-copy { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; font: inherit; white-space: nowrap; }
.btn-copy.is-copied { background: var(--success); border-color: var(--success); }

.acct-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.acct-tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; display: flex; flex-direction: column; gap: .45rem; }
.acct-tile svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); opacity: .65; }
.acct-tile-name { font-weight: 600; }
.acct-tile-soon { font-size: .78rem; color: var(--muted); }
.acct-tile-stat { font-size: .95rem; font-weight: 600; color: var(--gold-ink); }
.acct-tile-stat--alert { color: var(--danger); }
.acct-tile-action { align-self: flex-start; margin-top: auto; background: #fff; border: 1px solid var(--line); color: var(--accent); padding: .35rem .75rem; font-size: .82rem; font-weight: 600; }
.acct-tile-action:hover { border-color: var(--accent); }

/* Collapsible sidebar nav, used by both the manager's (~20 entries) and the customer's (~11). Either
   one outruns a phone screen and pushes the page itself below the fold. Off on desktop entirely: the
   toggle is hidden and the nav shows as normal. Still scoped to --collapsible rather than .acct-sidebar
   so a sidebar can opt out. The checkbox stays focusable — it is the disclosure control — so it is
   hidden by size/opacity rather than `display: none`. */
.acct-nav-check { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.acct-nav-toggle { display: none; }

@media (max-width: 860px) {
    .acct-shell { grid-template-columns: 1fr; gap: 1.25rem; }
    .acct-sidebar { position: static; }
    .acct-cards, .acct-tiles { grid-template-columns: 1fr; }

    /* Collapsed, the sidebar is one compact strip: who you are on the left, the menu button on the
       right. Expanded, the nav and sign-out drop onto their own full-width rows below it. */
    .acct-sidebar--collapsible { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem; }
    /* Basis 0, not auto: with flex-wrap on, the browser decides the line break from the base size, so
       an `auto` basis lets a long customer name claim the whole row and push the button below it. At 0
       both share the row and the name ellipsises into whatever is left. */
    .acct-sidebar--collapsible .acct-id { flex: 1 1 0; min-width: 0; border-bottom: 0; padding: 0; margin: 0; }
    .acct-sidebar--collapsible .acct-avatar { width: 36px; height: 36px; font-size: .95rem; }

    .acct-sidebar--collapsible .acct-nav-toggle {
        display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; cursor: pointer; user-select: none;
        padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px;
        background: var(--bg); color: var(--ink); font-size: .9rem; font-weight: 600;
    }
    .acct-sidebar--collapsible .acct-nav-toggle svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-linecap: round; stroke-linejoin: round; }
    .acct-nav-caret { transition: transform .15s ease; }
    .acct-nav-check:checked + .acct-nav-toggle .acct-nav-caret { transform: rotate(180deg); }
    .acct-nav-check:focus-visible + .acct-nav-toggle { outline: 2px solid var(--accent); outline-offset: 2px; }

    .acct-sidebar--collapsible .acct-nav,
    .acct-sidebar--collapsible .acct-signout { flex-basis: 100%; }
    .acct-sidebar--collapsible .acct-signout { margin-top: .2rem; padding-top: .6rem; }
    .acct-nav-check:not(:checked) ~ .acct-nav,
    .acct-nav-check:not(:checked) ~ .acct-signout { display: none; }
}

/* --- Balance & top-ups (Stage 2) --- */
.bal-amount { font-size: 2rem; font-weight: 700; margin: .25rem 0; color: var(--gold-ink); }
.bal-amount--muted { color: var(--muted); }
.bal-hint { color: var(--muted); font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
/* "Lot price" toggle under a goods-row quantity input (marketplace orders): small, right-aligned. */
.goods-lot-label { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; margin-top: .35rem; font-size: .8rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.goods-lot-label input { margin: 0; }
.bal-history { margin-top: 1.5rem; }
.bal-filter { margin: .5rem 0 1rem; align-items: center; }
.bal-empty { color: var(--muted); }
/* .num column alignment + pos/neg colours ported to Tailwind @apply components (Styles/app.css). */
.bal-pager { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.bal-pageinfo { color: var(--muted); }

.topup-form { display: flex; flex-direction: column; gap: .35rem; }
.topup-methods { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 1rem 0; display: grid; gap: .5rem; }
.topup-method { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; }
.topup-method em { color: var(--muted); font-style: normal; font-size: .82rem; }
.topup-bank { list-style: none; padding: 0; display: grid; gap: .3rem; }

/* Invoice wording: only a bank transfer raises one. Shown by default and hidden once a method that
   raises no invoice is picked, rather than the other way round — a browser without :has() then errs
   towards showing two optional fields instead of hiding fields it can never reveal. */
.topup-invoice { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
.topup-invoice legend { font-weight: 600; padding: 0 .35rem; }
.topup-invoice > label { font-weight: 600; margin-top: .25rem; }
.topup-hint { color: var(--muted); font-size: .82rem; }
/* /manage/topups: the required yen field of a USD/EUR-invoiced row, with its hint stacked
   beneath so the reminder doesn't stretch the nowrap actions cell into a mile-wide row. */
.topup-confirm-foreign { display: inline-flex; flex-direction: column; gap: .15rem; vertical-align: middle; }
.topup-confirm-foreign .topup-hint { white-space: normal; max-width: 15rem; }
/* Amount + invoice-currency pair. The currency choice follows the same bank-only reveal as the
   invoice fieldset: only a bank transfer raises an invoice, so only it can be billed in USD/EUR. */
.topup-amount { display: flex; gap: .5rem; }
.topup-amount input { flex: 1; }
.topup-form:has(.topup-method input:checked:not([value="BankTransfer"])) .topup-invoice,
.topup-form:has(.topup-method input:checked:not([value="BankTransfer"])) .topup-currency { display: none; }
.field-errors { color: var(--danger); font-size: .9rem; }

.checkout-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; }
.balance-summary { display: flex; gap: 2rem; margin: 1rem 0; }
.balance-summary div { display: flex; flex-direction: column; }
.balance-summary .muted { color: var(--muted); font-size: .85rem; }
.balance-summary strong { font-size: 1.5rem; color: var(--gold-ink); }
/* Action buttons that open the balance dialogs (top-up / adjust / credit), in the balance card. */
.balance-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.balance-actions .btn-primary, .balance-actions .btn-secondary { margin-top: 0; }
.row-actions { display: flex; gap: .5rem; }
.acct-tile--link { text-decoration: none; color: inherit; cursor: pointer; }
.acct-tile--link:hover { border-color: var(--teal-deep); }

/* --- Manager transactions + manual top-up (Stage 2) --- */
.txn-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: 1rem 0; }
.txn-filters label { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); gap: .2rem; }
.txn-filters input, .txn-filters select { min-width: 9rem; }
.txn-grid td { vertical-align: top; }
.txn-lines { list-style: none; margin: 0; padding: 0; font-size: .85rem; display: grid; gap: .15rem; }
.txn-lines li { display: flex; gap: .6rem; justify-content: space-between; }
.txn-acct { color: var(--muted); }
.txn-lines .pos { color: #1e7e34; }
.txn-lines .neg { color: var(--danger); }
.form-notice { color: #1e7e34; background: #e9f7ee; border: 1px solid #b6e0c4; border-radius: 6px; padding: .6rem .8rem; }

/* --- Orders (Stage 3) --- */
.acct-head-action { display: inline-block; margin-top: .8rem; text-decoration: none; }
/* Consecutive sections are evenly spaced even when a <form> wraps a card (goods/charges submit
   each live in their own form), so the seller section gets the same gap as everything else. */
.acct-card + .acct-card, .order-alert + .acct-card,
.acct-card + form, form + .acct-card, form + form { margin-top: 1.25rem; }
/* …but inside the cards grid, the grid `gap` owns the spacing — the stray top margin on the second
   card would otherwise shrink/offset it and break the equal-height stretch. */
.acct-cards > .acct-card { margin-top: 0; }
.acct-card h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.order-desc { max-width: 22rem; }
/* First-photo thumbnail column on the order lists (customer + manager): a fixed, compact cell so the
   thumbnail never stretches the row; blank when the order has no product photo. */
.order-thumb-col { width: 3.5rem; }
.order-thumb-col img { display: block; width: 3rem; height: 3rem; object-fit: cover; border-radius: .25rem; border: 1px solid var(--color-line, #e4e7e3); }
/* Manager order "request" card: item identity on the left, plain context on the right, paired
   row-by-row so the two columns stay aligned. */
.order-request-grid { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .9rem; }
.order-request-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.order-request-row > div { word-break: break-word; }
@media (max-width: 720px) { .order-request-row { grid-template-columns: 1fr; gap: .3rem; } }
/* .order-status pills (orders + parcels) ported to Tailwind @apply components (Styles/app.css). */
.order-price-subtotal { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .3rem; }
.order-price-subtotal dt, .order-price-subtotal dd { font-weight: 600; }
.order-price-total { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .3rem; }
.order-price-total dt { font-weight: 700; font-size: 1.05rem; }
.order-price-total dd { font-weight: 700; font-size: 1.05rem; color: var(--gold-ink); }
.order-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.1rem; }
.order-actions form { margin: 0; }
.order-actions .btn-primary, .order-actions .btn-secondary { margin-top: 0; }
.order-alert { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; background: var(--bg-warm); border: 1px solid rgba(216, 176, 106, .55); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.order-alert p { margin: 0; }
.order-alert .btn-primary { margin-top: 0; text-decoration: none; }
.order-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.order-timeline li { display: flex; gap: 1rem; align-items: baseline; padding-left: 1rem; border-left: 2px solid var(--line); }
.order-timeline-when { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-timeline-what { font-weight: 500; }

/* --- Warehouse & parcels (Stage 5) --- */
.customs-decl { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: .85rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; margin: 0; }
/* Parcel .order-status--* variants ported to Tailwind @apply components (Styles/app.css). */

/* --- Catalogue config + services (Stage 6) --- */
.row-inactive { opacity: .5; }
.row-actions { display: flex; gap: .4rem; align-items: center; }
.row-actions form { margin: 0; }
/* Config list action cells: keep the <td> a normal table cell (a flex <td> breaks the row),
   and put the flex on an inner wrapper. Compact icon buttons stay on one line, right-aligned. */
.actions-cell { white-space: nowrap; text-align: right; width: 1%; }
.actions-cell .row-actions { justify-content: flex-end; }
.row-actions--icons { flex-wrap: nowrap; margin: 0; }
/* Some lists put .row-actions straight on the <td>. A flex <td> drops out of the table row and
   renders at a different height than the data cells beside it, so keep it a real cell and lay the
   action forms out inline within it. */
td.row-actions { display: table-cell; vertical-align: middle; white-space: nowrap; margin: 0; }
td.row-actions .inline-form { display: inline-flex; align-items: center; flex-wrap: nowrap; margin: 0; vertical-align: middle; }
td.row-actions > form { display: inline-flex; align-items: center; vertical-align: middle; }
/* The action buttons sit beside a tall number input: drop .btn-primary's stock top margin and
   match both buttons' padding so Confirm/Reject line up on the input's vertical centre. */
td.row-actions .btn-primary, td.row-actions .btn-secondary { margin-top: 0; padding: .5rem 1rem; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.btn-icon:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.btn-icon svg { width: 18px; height: 18px; }
a.btn-icon { text-decoration: none; }
.btn-icon--danger:hover { border-color: var(--danger); color: var(--danger); }
.service-buttons { flex-wrap: wrap; }
.service-buttons form { margin: 0; }

/* --- Notifications (Stage 8) --- */
.notif-bell { position: relative; display: inline-flex; align-items: center; color: inherit; }
.notif-badge { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 .25rem; border-radius: 999px; display: grid; place-items: center; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notif { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.notif--unread { font-weight: 500; }
.notif--unread .notif-body strong::before { content: "● "; color: var(--danger); font-size: .7em; vertical-align: middle; }
.notif-body { display: flex; flex-direction: column; gap: .2rem; }
.notif-when { color: var(--muted); font-size: .8rem; }
.notif-actions { display: flex; gap: .4rem; flex: 0 0 auto; }
.notif-actions form { margin: 0; }

/* --- Rich-text editor (CMS) --- */
.rich-editor { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: .35rem; background: #fff; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.rich-btn { font: inherit; font-size: .8rem; line-height: 1; padding: .35rem .55rem; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; color: var(--ink); }
.rich-btn:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.rich-btn.rt-b { font-weight: 700; }
.rich-btn.rt-i { font-style: italic; }
.rich-btn.rt-source { margin-left: auto; }
.rich-btn[disabled] { opacity: .45; cursor: default; }
.rich-btn[disabled]:hover { border-color: var(--line); color: var(--ink); }
/* Source mode: the raw textarea takes the editing surface's place under the toolbar. Monospace and
   a matching min-height so switching modes doesn't make the panel jump. */
.rich-editor .rich-source { display: block; width: 100%; min-height: 12rem; padding: .8rem 1rem;
    border: 0; outline: none; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo,
    Consolas, monospace; font-size: .85rem; line-height: 1.55; tab-size: 2; white-space: pre; }
.rich-editor .rich-source:focus { box-shadow: inset 0 0 0 2px var(--ring); }
.rich-area { min-height: 12rem; padding: .8rem 1rem; outline: none; line-height: 1.6; }
.rich-area:focus { box-shadow: inset 0 0 0 2px var(--ring); }
.rich-area h2, .rich-area h3 { margin: .8rem 0 .4rem; }
.rich-area ul, .rich-area ol { margin: .4rem 0 .4rem 1.4rem; }
.rich-area blockquote { margin: .6rem 0; padding-left: .9rem; border-left: 3px solid var(--line); color: var(--muted); }

/* --- Public content presentation --- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.content-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.content-cover { width: 100%; height: 160px; object-fit: cover; display: block; }
.content-card-body { padding: .9rem 1rem; }
.content-card-body h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
.content-card-body h2 a { color: var(--ink); text-decoration: none; }
.content-card-body h2 a:hover { color: var(--accent); }
.content-date { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .4rem; }
.content-more { color: var(--accent); text-decoration: none; font-size: .9rem; }
.content-article { max-width: 760px; margin: 0 auto; }
.content-hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; }
.content-body { line-height: 1.7; }
.content-body h2, .content-body h3, .content-body h4 { margin: 1.4rem 0 .5rem; }
.content-body p { margin: .7rem 0; }
.content-body ul, .content-body ol { margin: .7rem 0 .7rem 1.5rem; }
.content-body blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--gold); color: var(--muted); }
.content-body a { color: var(--teal-deep); }
.footer-nav { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.footer-nav a { color: #aab6c6; text-decoration: none; font-size: .85rem; }
.footer-nav a:hover { color: var(--gold); }
.filter-row { display: flex; gap: .6rem; margin-bottom: .8rem; }

.agreement-link { color: var(--accent); text-decoration: underline; }
.agreement-link:hover { text-decoration: none; }

.agreement-updates { list-style: none; padding: 0; margin: 1rem 0; }
.agreement-updates li { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.agreement-version { color: var(--muted); font-size: .85rem; }

/* --- Address book --- */
.address-list { display: grid; gap: .8rem; margin-bottom: 1.2rem; }
.address-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.address-body p { margin: .3rem 0 0; color: var(--muted); }
.address-default { display: inline-block; margin-left: .5rem; font-size: .75rem; color: #8a6a1c; border: 1px solid var(--gold); border-radius: 4px; padding: 0 .35rem; }
.address-actions { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; flex: 0 0 auto; }
.address-actions form { margin: 0; }

/* --- Support chat --- */
.chat-list { display: grid; gap: .6rem; margin-top: 1rem; }
.chat-row { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; }
.chat-row:hover { border-color: var(--accent); }
.chat-meta { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; }
.chat-status { display: inline-block; margin-left: .5rem; font-size: .72rem; padding: .05rem .4rem; border-radius: 4px; border: 1px solid var(--line); }
.chat-status.is-open { color: #1e7e34; border-color: #1e7e34; }
.chat-status.is-closed { color: var(--muted); }
.chat-unread { background: var(--danger); color: #fff; border-radius: 999px; min-width: 1.3rem; text-align: center; padding: .05rem .4rem; font-size: .75rem; }
.chat-thread { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.chat-msg { display: flex; }
.chat-msg.is-mine { justify-content: flex-end; }
.chat-bubble { max-width: 75%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.chat-msg.is-mine .chat-bubble { background: var(--bg-sea); border-color: #bcd9e6; }
.chat-author { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: .2rem; }
.chat-body { margin: 0; white-space: pre-wrap; }
.chat-time { display: block; font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.chat-ref { color: var(--teal-deep); font-weight: 600; text-decoration: underline; }
.chat-ref:hover { color: var(--navy); }
/* Read receipt on the viewer's own messages: muted "Sent" until the other party reads it. */
.chat-receipt { display: block; font-size: .68rem; color: var(--muted); margin-top: .1rem; }
.chat-receipt.is-read { color: var(--gold-ink); font-weight: 600; }
.chat-receipt.is-read::before { content: "✓✓ "; }
.chat-receipt:not(.is-read)::before { content: "✓ "; }
.chat-attachments { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.chat-thumb { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.chat-file { font-size: .85rem; color: var(--teal-deep); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .5rem; }
.chat-composer textarea { resize: vertical; }
.message-us { margin-top: .6rem; }
.message-us .btn-secondary { margin-top: 0; }

/* --- Top-bar user status --- */
/* The pill lives in the navy header, so it stays translucent with a gold hairline
   rather than a stark white chip. */
.topbar-group { display: inline-flex; align-items: center; gap: .75rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(216, 176, 106, .4); color: #eaf0f7; }
.topbar-user { display: inline-flex; flex-direction: column; line-height: 1.15; text-decoration: none; color: inherit; }
.topbar-user:hover .topbar-name { color: var(--gold); }
.topbar-name { font-weight: 600; font-size: .9rem; color: #fff; }
.topbar-balance { font-size: .8rem; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Scoped under .nav so the alert colour out-specifies `.nav a` — otherwise the danger icon
   inherits the light nav-link colour and blends into its own pale background. */
.nav .topbar-alert { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; padding: .2rem .5rem; border-radius: 999px;
    background: #fbeae8; color: var(--danger); border: 1px solid #f0cfc9; font-size: .85rem; font-weight: 600; }
.nav .topbar-alert.is-parcel { background: #eef4ec; color: #1e7e34; border-color: #cfe3cf; }
.nav .topbar-alert svg { width: 16px; height: 16px; }
/* Keep the alert's own colour on hover — `.nav a:hover` would otherwise turn the icon gold. */
.nav .topbar-alert:hover { filter: brightness(.96); color: var(--danger); }
.nav .topbar-alert.is-parcel:hover { color: #1e7e34; }

/* --- Service requests on entity pages --- */
.service-reqs { list-style: none; margin: 0 0 1rem; padding: 0; }
.service-reqs li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.service-reqs li .num { margin-left: auto; font-variant-numeric: tabular-nums; }
.svc-status { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.svc-status.svc-completed { color: #1e7e34; border-color: #cfe3cf; }
.svc-status.svc-cancelled { color: var(--muted); text-decoration: line-through; }

/* ============================================================
   Landing page (home) — ported from the marketing mock-up
   ============================================================ */
.content--home { max-width: none; padding: 0; }
.home-wrap { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }

/* --- Hero --- */
.home-hero { position: relative; background: var(--bg-sea); padding: 3.5rem 0 9rem; overflow: hidden; }
.home-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.home-hero-content { position: relative; z-index: 1; }
.home-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; margin-bottom: 2rem;
    border-radius: 999px; background: rgba(255, 248, 238, .8); border: 1px solid rgba(216, 176, 106, .35);
    color: #7c5a27; font-size: .9rem; font-weight: 500; }
.home-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.home-hero-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: .95; letter-spacing: -.04em;
    color: var(--navy); margin: 0 0 1.5rem; }
.home-hero-title .accent { color: var(--gold); }
.home-hero-text { font-size: 1.15rem; line-height: 1.7; color: var(--muted); max-width: 34rem; margin: 0 0 2.5rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.home-btn { display: inline-flex; align-items: center; justify-content: center; padding: .95rem 2rem; border-radius: 999px;
    font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease; }
.home-btn--primary { background: var(--teal); color: #fff; box-shadow: 0 14px 30px rgba(73, 151, 142, .3); }
.home-btn--primary:hover { background: var(--teal-deep); transform: translateY(-2px); }
.home-btn--ghost { background: rgba(255, 255, 255, .7); border-color: #fff; color: var(--teal); }
.home-btn--ghost:hover { background: #fff; color: var(--teal-deep); }
.home-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 3.5rem; }
.home-stat-value { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.home-stat-label { color: var(--muted); margin-top: .25rem; }

/* Hero glass card */
.home-hero-visual { position: relative; display: flex; justify-content: center; }
.home-hero-visual::before { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
    background: rgba(134, 187, 184, .3); filter: blur(80px); z-index: 0; }
.home-card { position: relative; z-index: 1; width: 100%; max-width: 32rem; padding: 2.5rem;
    background: rgba(255, 255, 255, .65); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .7); border-radius: 36px; box-shadow: 0 30px 60px rgba(0, 0, 0, .1); }
.home-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.home-card-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .4em; color: var(--gold-ink); font-weight: 600; margin-bottom: .5rem; }
.home-card-title { font-size: 1.7rem; font-weight: 800; line-height: 1.15; color: var(--navy); margin: 0; }
.home-card-emblem { width: 60px; height: 60px; flex: 0 0 auto; border-radius: 18px; display: grid; place-items: center;
    font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--teal), var(--gold)); box-shadow: 0 10px 24px rgba(73, 151, 142, .4); }
.home-card-items { display: flex; flex-direction: column; gap: 1.1rem; }
.home-card-item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 22px;
    background: rgba(255, 255, 255, .7); border: 1px solid #fff; }
.home-card-icon { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center;
    font-size: 1.2rem; font-weight: 800; color: var(--teal); background: rgba(73, 151, 142, .1); }
.home-card-item-title { font-weight: 700; color: var(--ink); }
.home-card-item-desc { font-size: .9rem; color: var(--muted); margin-top: .2rem; }
.home-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0, 0, 0, .06); }
.home-card-concept-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .25em; color: var(--muted); margin-bottom: .3rem; }
.home-card-concept { font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.home-card-more { padding: .7rem 1.4rem; border-radius: 999px; background: var(--gold); color: var(--navy);
    font-weight: 700; border: 0; cursor: pointer; text-decoration: none; box-shadow: 0 10px 24px rgba(216, 176, 106, .35);
    transition: background .15s ease, color .15s ease; }
.home-card-more:hover { background: var(--teal-deep); color: #fff; }

/* Wave divider into the features section */
.home-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; z-index: 1; }
.home-wave svg { width: 100%; height: 140px; display: block; }

/* Shared section heads */
.home-section-head { text-align: center; max-width: 48rem; margin: 0 auto 4rem; }
.home-kicker { font-size: .85rem; text-transform: uppercase; letter-spacing: .35em; margin-bottom: 1rem; }
.home-section-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em;
    color: var(--navy); margin: 0 0 1.5rem; line-height: 1.12; }
.home-section-lead { font-size: 1.15rem; line-height: 1.7; color: var(--muted); margin: 0; }
.home-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

/* --- Features --- */
.home-features { background: linear-gradient(to bottom, #fcfbfb, var(--bg-warm)); padding: 6rem 0; margin-top: -1px; }
.home-features .home-kicker { color: var(--teal); }
.home-feature { background: #fff; border: 1px solid rgba(0, 0, 0, .05); border-radius: 32px; padding: 2.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03); transition: transform .2s ease, box-shadow .2s ease; }
.home-feature:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0, 0, 0, .08); }
.home-feature-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
    font-size: 1.8rem; background: rgba(73, 151, 142, .1); margin-bottom: 1.75rem; }
.home-feature h3 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: 0 0 1rem; }
.home-feature p { color: var(--muted); line-height: 1.7; margin: 0; }

/* --- How it works --- */
.home-steps { background: var(--bg-warm); padding: 6rem 0; }
.home-steps .home-kicker { color: var(--gold-ink); }
.home-step { background: #fff; border: 1px solid rgba(216, 176, 106, .2); border-radius: 32px; padding: 2.5rem; }
.home-step-num { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
    font-size: 1.3rem; font-weight: 800; margin-bottom: 1.75rem; }
.home-step h3 { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin: 0 0 1.25rem; line-height: 1.15; }
.home-step p { color: var(--muted); line-height: 1.7; font-size: 1.05rem; margin: 0; }
.home-step--1 .home-step-num { background: #fff4df; color: #c08a3e; }
.home-step--2 .home-step-num { background: #eaf6f4; color: var(--teal); }
.home-step--3 .home-step-num { background: #eef7f6; color: var(--teal-deep); }

@media (max-width: 900px) {
    .home-hero { padding-bottom: 7rem; }
    .home-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .home-grid3 { grid-template-columns: 1fr; }
}

/* ---------- UpGarage catalog (Stage 12) ---------- */
.upg-searchbar { display: flex; gap: .6rem; margin: 1rem 0 1.5rem; }
.upg-searchbar input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.upg-searchbar .btn-primary { margin-top: 0; }

.upg-filters { margin: 1rem 0 1.5rem; }
.upg-filter-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: end; margin-top: .8rem; }
.upg-filter { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--muted); }
.upg-filter select,
.upg-filter input { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
.upg-filter input { width: 8rem; }
.upg-filter input[type="search"] { width: 12rem; } /* exclude-words: fit the placeholder */
.upg-filter select:focus, .upg-filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.upg-conditions { display: flex; flex-wrap: wrap; gap: .8rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; margin: 0; }
.upg-conditions legend { font-size: .82rem; color: var(--muted); padding: 0 .3rem; }
.upg-conditions .check { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; }
/* Price-range filter inputs. NB: not ".upg-price" — that class is the gold product-price display. */
.upg-price-range { align-items: center; }
.upg-price-range input { width: 6rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
.upg-price-range input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* Category landing: three root categories per row (responsive), each a card listing its
   top subcategories (the manager-curated highest-weight ones — see MarketplaceCategory.Weight). */
.cat-roots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.upg-catgroup { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 1rem 1.1rem; }
.upg-catgroup h2 { font-size: 1.05rem; margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 2px solid var(--gold); }
.upg-catgroup h2 a { color: var(--navy); text-decoration: none; }
.upg-catgroup h2 a:hover { color: var(--teal-deep); }
.upg-catlist { list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .05rem .6rem; }
.upg-catlist a { display: block; padding: .3rem .45rem; border-radius: 6px; color: var(--ink); text-decoration: none;
    font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upg-catlist a:hover { background: var(--bg-sea); color: var(--teal-deep); }
@media (max-width: 860px) { .cat-roots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-roots { grid-template-columns: 1fr; } }

/* Search result cards reuse .content-card */
.upg-card-img { display: block; aspect-ratio: 1 / 1; background: var(--bg); overflow: hidden; }
.upg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upg-price { font-weight: 800; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.upg-price--lg { font-size: 1.8rem; margin-bottom: 1rem; }
.upg-stock { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .02em; padding: .15rem .6rem; border-radius: 999px; margin: -.5rem 0 1rem; }
.upg-stock.is-instock { color: var(--teal); background: rgba(73, 151, 142, .12); }
.upg-stock.is-soldout { color: var(--danger); background: rgba(193, 60, 60, .1); }
.upg-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.upg-cond { border: 1px solid var(--line); border-radius: 999px; padding: .05rem .5rem; }

/* Dense catalog grid (≈8 across on a wide screen, like the source sites): compact
   vertical cards shared by the UpGarage and Yahoo result/seller pages, so the
   customer sees many items before scrolling. */
/* Aggregated search: one section per marketplace, each a heading + "see all" over a catalog grid. */
.agg-section { margin: 1.75rem 0 2.5rem; }
.agg-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.agg-section-head h2 { margin: 0; font-size: 1.25rem; }
.agg-count { color: var(--muted); font-size: .95rem; font-weight: 600; }
.agg-seeall { color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; flex: 0 0 auto; }
.agg-seeall:hover { color: var(--teal-deep); }
.agg-note { margin: .9rem 0 0; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-top: 1rem; }
.catalog-grid .content-card-body { padding: .5rem .6rem .6rem; display: flex; flex-direction: column; }
.catalog-grid .upg-card-img { position: relative; }
.catalog-grid .content-card-body h2 { font-size: .82rem; line-height: 1.3; margin: 0 0 .35rem; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-grid .upg-price { font-size: 1.05rem; line-height: 1.2; }
.catalog-grid .upg-meta { font-size: .72rem; margin-top: auto; padding-top: .4rem; }

/* Yahoo auction extras: corner source badge, 現在/即決 price stack, icon meta. */
.yh-source { position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: .25rem;
    background: var(--navy); color: #fff; font-size: .56rem; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; padding: .15rem .4rem; border-top-right-radius: 8px; }
.yh-source-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.yh-prices { display: flex; flex-direction: column; gap: .05rem; }
.yh-price-buyout { font-weight: 700; font-size: 1.05rem; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Meta at the bottom of the card; icons stand in for the bid/time labels. */
.yh-meta { align-items: center; gap: .7rem; }
.yh-stat { display: inline-flex; align-items: center; gap: .25rem; font-variant-numeric: tabular-nums; }
.yh-stat svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--teal); }
.yh-stat .yh-countdown.is-ended { color: var(--muted); }
/* Clickable category breadcrumb on the Yahoo/UpGarage product pages. */
.cat-crumbs a { color: var(--accent); }
.cat-crumbs a:hover { color: var(--teal); text-decoration: underline; }
.cat-crumb-sep { color: var(--muted); }

.upg-product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.upg-gallery-main { width: 100%; height: 420px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff; cursor: zoom-in; }
.upg-gallery-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.upg-gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.upg-thumb { padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 8px; }
.upg-thumb img { transition: border-color .15s, box-shadow .15s; }
.upg-thumb:hover img, .upg-thumb:focus-visible img { border-color: var(--accent); }
.upg-thumb.is-active img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
/* Seller-supplied Q&A photos mixed into the gallery: a subtle dashed accent tells them apart. */
.upg-thumb--seller img { border-style: dashed; border-color: var(--accent); }

/* Full-screen product photo viewer (lightbox), built by gallery.js. */
html.upg-lb-open { overflow: hidden; }
.upg-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .95); }
.upg-lightbox[hidden] { display: none; }
.upg-lb-stage { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; align-items: center; justify-content: center; }
.upg-lb-img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.upg-lb-close, .upg-lb-nav { position: absolute; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer; line-height: 1; transition: background .15s; }
.upg-lb-close:hover, .upg-lb-nav:hover, .upg-lb-close:focus-visible, .upg-lb-nav:focus-visible { background: rgba(255, 255, 255, .28); }
.upg-lb-close { top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; font-size: 1.9rem; }
.upg-lb-nav { top: 50%; transform: translateY(-50%); width: 3.25rem; height: 3.25rem; font-size: 2.4rem; }
.upg-lb-prev { left: 1rem; }
.upg-lb-next { right: 1rem; }
.upg-lb-counter { position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%); padding: .3rem .8rem; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: .9rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .upg-lb-nav { width: 2.75rem; height: 2.75rem; font-size: 2rem; }
    .upg-lb-close { top: .5rem; right: .5rem; }
    .upg-lb-prev { left: .35rem; }
    .upg-lb-next { right: .35rem; }
}
.yh-countdown.is-ended { color: var(--muted); }
/* Ended / sold auction badge on the Yahoo listing page (mirrors .upg-stock.is-soldout). */
.yh-ended-badge { display: inline-block; margin: 0 0 .6rem; padding: .3rem .7rem; border-radius: 6px;
    font-weight: 700; font-size: .85rem; letter-spacing: .03em; color: var(--muted); background: rgba(0, 0, 0, .06); }
.yh-ended-badge.is-sold { color: var(--danger); background: rgba(193, 60, 60, .1); }
.yh-ended-note { margin-top: .6rem; }

/* Mercari seller page header: avatar + name + rating. */
.mrc-seller-head { display: flex; align-items: center; gap: .9rem; }
.mrc-seller-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--line); }

/* Manager: marketplace category editor rows (Stage 13). */
.cat-list { display: flex; flex-direction: column; gap: .4rem; }
.cat-row { display: grid; grid-template-columns: minmax(12rem, 1.4fr) 1fr 1fr auto auto; gap: .5rem; align-items: center; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cat-row.is-hidden { opacity: .55; }
.cat-row-src { display: flex; align-items: baseline; gap: .4rem; min-width: 0; }
.cat-row-src > span[lang=ja] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-level { font-size: .7rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 .35rem; }
.cat-path { font-size: .72rem; color: var(--muted); }
.cat-row input[type=text], .cat-row input[type=number], .cat-row input:not([type]) { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; min-width: 0; }
.cat-weight { width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.cat-actions { margin-top: .8rem; }
/* Category-page action rows (sync/auto-translate and CSV export/import): center the row so nothing
   flex-stretches, and drop the primary's stock top margin so a/button, primary/secondary all sit on
   one line at the equal height the base .btn-* classes now guarantee. */
.cat-toolbar { align-items: center; }
.cat-toolbar .btn-primary { margin-top: 0; }
.cat-csv-import { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
@media (max-width: 720px) { .cat-row { grid-template-columns: 1fr 1fr; } .cat-row-src { grid-column: 1 / -1; } }
.upg-info .btn-secondary { margin-top: 1rem; text-decoration: none; display: inline-block; }
/* Manual-order form lives on the public layout, so it can't lean on the account-area input styles. */
.upg-order-form { margin-top: 1rem; }
.upg-order-form label { font-weight: 600; font-size: .9rem; margin-top: .25rem; }
.upg-order-form input,
.upg-order-form textarea {
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px;
    font: inherit; background: #fff; color: var(--ink); box-sizing: border-box;
}
.upg-order-form textarea { width: 100%; resize: vertical; }
.upg-order-form input[type=number] { width: 6rem; }
.upg-order-form input:focus,
.upg-order-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.upg-order-form .btn-primary { align-self: flex-start; }
/* Yahoo bid box (Stage 18). Public layout too, so it needs the same standalone input styling. */
.bid-form { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.bid-form label { font-weight: 600; font-size: .9rem; }
.bid-form input[type=number] {
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px;
    font: inherit; background: #fff; color: var(--ink); box-sizing: border-box;
    width: 100%; font-variant-numeric: tabular-nums;
}
.bid-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.bid-form .btn-primary { align-self: flex-start; }
.bid-form .field-hint { margin-top: 0; }
.bid-current { margin-top: 1rem; }
.bid-flash { margin-top: 1rem; }
/* External-source link shown as a value in a facts list: code text + small outlink glyph. */
.ext-link { display: inline-flex; align-items: center; gap: .3rem; }
.ext-link svg { width: .9em; height: .9em; opacity: .7; flex: 0 0 auto; }
/* Busy state (js-busy-form): dim the button and prefix a spinning ring while the action is in flight. */
.btn-primary.is-busy, .btn-secondary.is-busy { opacity: .75; cursor: progress; }
.btn-primary.is-busy::before, .btn-secondary.is-busy::before {
    content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5rem; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
/* Description / Questions share one tabbed card on the product page: space the card from the product
   block above, and drop the standalone-card top margin the panel classes below would add inside it. */
.upg-tabs { margin-top: 1.5rem; }
.upg-tabs .upg-desc, .upg-tabs .upg-questions { margin-top: 0; }
.upg-desc { margin-top: 1.5rem; }
/* Description lines are one block <div> each (see DescriptionHtml) so their breaks survive the Google
   Website Translate widget. pre-wrap is kept for intra-line spacing/wrapping; each line has no embedded
   newline, so translation can't flatten it. Blank source lines become a small paragraph gap. */
.upg-desc-body { white-space: pre-wrap; line-height: 1.7; }
.upg-desc-gap { height: .8em; }

/* Questions to seller (product page + manager queue). */
.upg-questions { margin-top: 1.5rem; }
.upg-question-form { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.upg-question-form textarea { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); resize: vertical; }
.upg-question-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.upg-question-form .btn-primary, .upg-question-form .btn-secondary { align-self: flex-start; margin-top: 0; }
.upg-question-list { display: flex; flex-direction: column; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; margin: 0; }
.upg-question-list legend { font-size: .82rem; color: var(--muted); padding: 0 .3rem; }
.upg-question-list .check { display: flex; align-items: flex-start; gap: .5rem; font-size: .95rem; line-height: 1.4; }
.upg-question-list .check input { margin-top: .25rem; flex: 0 0 auto; }
.upg-q-text { white-space: pre-wrap; line-height: 1.6; }

/* Customer's questions + seller replies shown on the product page. */
.upg-seller-photos { margin: 1rem 0 1.5rem; }
.upg-seller-photos h3 { margin: 0 0 .25rem; font-size: 1rem; }
.upg-seller-photos .field-hint { margin: 0 0 .5rem; }
.upg-qa-threads { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0 1.5rem; }
.upg-qa-threads h3 { margin: 0 0 .25rem; font-size: 1rem; }
.upg-qa-thread { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .75rem; }
.upg-qa-question, .upg-qa-answer { display: flex; flex-direction: column; gap: .3rem; }
.upg-qa-answer { border-left: 3px solid var(--accent); padding-left: .8rem; }
.upg-qa-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.upg-qa-pending { margin: 0; }
.upg-qa-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.upg-qa-photos a { display: block; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.upg-qa-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upg-q-original { border-left: 3px solid var(--line); padding-left: .8rem; color: var(--muted); }
.upg-q-reject { margin-top: .5rem; }
.form-success { color: var(--teal); background: rgba(73, 151, 142, .12); border-radius: 8px; padding: .5rem .8rem; font-weight: 600; }

@media (max-width: 760px) {
    .upg-product { grid-template-columns: 1fr; }
}

/* --- Account security / 2FA --- */
.muted { color: var(--muted); font-size: .9rem; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); padding: .55rem 1.1rem; border-radius: 6px; cursor: pointer; font: inherit; line-height: 1.2; transition: background .15s ease, color .15s ease; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.sec-2fa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.sec-2fa-head h2 { margin: 0 0 .25rem; }
.sec-badge { flex: 0 0 auto; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.sec-badge.is-on { background: #e8f3ea; color: var(--success); }
.sec-badge.is-off { background: #f2efe9; color: var(--muted); }
.sec-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.sec-actions form { margin: 0; }
.sec-actions .btn-primary, .sec-actions .btn-secondary, .sec-actions .btn-danger { margin-top: 0; }
.sec-warn { color: var(--danger); font-weight: 600; }
.sec-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1.5rem; }
.sec-steps li { padding-left: .3rem; }
.sec-qr { display: inline-block; background: #fff; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.sec-qr svg { display: block; width: 180px; height: 180px; }
.sec-key { display: inline-block; margin-top: .4rem; padding: .3rem .6rem; background: var(--gold-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 1rem; letter-spacing: .08em; }
.recovery-codes { list-style: none; margin: 1rem 0; padding: 1rem; background: var(--gold-soft); border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; max-width: 28rem; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .06em; }

/* Feedback round 1: type-ahead search results (seller / nomenclature) */
.search-results { list-style: none; margin: .25rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-height: 16rem; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.search-results li { padding: .5rem .75rem; cursor: pointer; border-bottom: 1px solid var(--line); font-size: .95rem; }
.search-results li:last-child { border-bottom: none; }
.search-results li:hover { background: var(--gold-soft); }

/* Feedback round 1: customer-facing warehouse photo gallery */
.warehouse-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; margin-top: .5rem; }
.warehouse-photo { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; }
.warehouse-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) { .warehouse-photos { grid-template-columns: repeat(2, 1fr); } }

/* Email detail: a left-aligned two-column description table (label / value), values wrap freely. */
.mail-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1.5rem; margin: 0; align-items: baseline; }
.mail-facts dt { margin: 0; color: var(--muted); font-size: .9rem; }
.mail-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .mail-facts { grid-template-columns: 1fr; gap: .15rem; } .mail-facts dd { margin-bottom: .5rem; } }

/* Email detail action forms: stacked label + control, separated from the facts above. */
.mail-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; }
.mail-actions .row-actions { margin: 0; }
.mail-action-field { display: flex; flex-direction: column; gap: .35rem; max-width: 28rem; position: relative; }
.mail-action-field label { color: var(--muted); font-size: .9rem; }
.mail-action-field .field-row { display: flex; gap: .5rem; align-items: stretch; }
.mail-action-field .field-row input[type=text], .mail-action-field .field-row input[type=number] { flex: 1 1 auto; }
/* Buttons sit beside the input: drop their stock top margin and let them match the input height. */
.mail-action-field .field-row .btn-primary, .mail-action-field .field-row .btn-secondary { margin-top: 0; flex: 0 0 auto; white-space: nowrap; }

.check-docs { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.check-doc { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.check-doc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.check-doc-pdf { font-weight: 600; font-size: .8rem; letter-spacing: .05em; color: var(--danger); }

/* Feedback round 1: personal-use customs block + tariff/nomenclature option lists */
.customs-block { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: .75rem 0; }
.address-personal-use { margin-top: .4rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tariff-set { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; margin: .5rem 0; }
.tariff-option { display: block; font-weight: normal; }
.company-invoice-inputs { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; margin: .5rem 0; }

/* Notification bell dropdown popup (header) */
.notif-menu { position: relative; display: inline-flex; }
.notif-bell { background: none; border: 0; padding: 0; cursor: pointer; }
.notif-popup { position: absolute; top: calc(100% + .5rem); right: 0; width: min(360px, calc(100vw - 2rem)); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); z-index: 200; overflow: hidden; }
.notif-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.notif-popup-head form { margin: 0; }
/* Override the header's light .btn-link colour inside the white popup. */
.site-header .notif-popup .btn-link { color: var(--accent); }
.site-header .notif-popup .btn-link:hover { color: var(--gold-ink); }
.notif-popup-empty { padding: 1.25rem .9rem; color: var(--muted); margin: 0; }
.notif-popup-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.notif-popup-item > a, .notif-popup-item > div { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-popup-item > a:hover { background: var(--gold-soft); }
.notif-popup-item .notif-when { color: var(--muted); font-size: .78rem; }
.notif-popup-item--unread > a strong::before,
.notif-popup-item--unread > div strong::before { content: "● "; color: var(--danger); font-size: .7em; vertical-align: middle; }
.notif-popup-foot { display: block; padding: .65rem .9rem; text-align: center; font-size: .9rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-popup-foot:hover { background: var(--gold-soft); }

/* --- Navigation tab bar (manager user / customer pages) --- */
.tab-bar { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin: 1rem 0 1.25rem; }
.tab-link { padding: .6rem 1.1rem; cursor: pointer; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.tab-link:hover { color: var(--navy); background: var(--gold-soft); }
.tab-link.is-active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
/* In-page tab buttons (Timeline / Price history / Transfers) reuse .tab-link but need their native chrome reset. */
button.tab-link { background: none; border: none; border-bottom: 2px solid transparent; font: inherit; }
.tab-bar button.tab-link { margin-bottom: -2px; }
/* A toolbar action (e.g. "Cancel order") sits at the right edge of the tab bar, clear of the underline. */
.tab-bar .tab-bar-action { margin-left: auto; align-self: center; }
/* Right-aligned action above a tab panel's table (e.g. "Add correction" in Transfers). */
.tab-panel-actions { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.user-status-actions { margin-top: 1.25rem; }

/* Confirmation dialogs (cancel order / add correction) ported to Tailwind @apply components
   (Styles/app.css): dialog.modal + ::backdrop + h2, and .modal-actions incl. the shared button sizing. */

/* Per-tariff parcel automation toggles (customer parcels page) */
.automation-list { list-style: none; margin: .5rem 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.automation-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.automation-toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; }
.automation-toggle input[disabled] { cursor: not-allowed; }
.automation-name code { font-weight: 400; color: var(--muted); }
.automation-policy { font-size: .85rem; color: var(--muted); }
.automation-hint { color: var(--text-light); }
.badge-locked { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; background: var(--line); color: var(--muted); }

/* Customer parcel-creation wizard (Account/Parcels/New). The [hidden] guard ensures the attribute
   wins over component classes that set their own display (e.g. .bal-hint/.topup-method), which the
   step/branch toggling relies on. */
[hidden] { display: none !important; }
.parcel-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; padding: 0; counter-reset: parcel-step; }
.parcel-steps li { counter-increment: parcel-step; display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; color: var(--muted); padding: .35rem .8rem .35rem .45rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.parcel-steps li::before { content: counter(parcel-step); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); color: var(--muted); font-size: .8rem; flex: 0 0 auto; }
.parcel-steps li.is-active { color: var(--navy); border-color: var(--gold); background: var(--gold-soft); }
.parcel-steps li.is-active::before { background: var(--gold); color: var(--navy); }
.parcel-step-nav { display: flex; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.parcel-step-nav .btn-primary, .parcel-step-nav .btn-secondary { margin-top: 0; }
.parcel-branch { border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; margin: 1rem 0 0; }
.parcel-branch > legend { font-weight: 600; padding: 0 .4rem; }
.parcel-check { display: flex; align-items: center; gap: .5rem; margin: 1rem 0; font-weight: 400; }
.parcel-check input { width: auto; }
.parcel-warehouse { line-height: 1.5; margin: 0; }
.parcel-review { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: .4rem 1rem; margin: 0; }
.parcel-review dt { font-weight: 600; color: var(--muted); }
.parcel-review dd { margin: 0; }

/* Pallets grouped under a shipment (manager shipment detail) */
.shipment-pallet { margin: 0 0 1.5rem; }
.shipment-pallet > h3 { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.pallet-inline-form { display: inline; margin-left: auto; }
.pallet-inline-form button { margin: 0; }

/* Sortable + filterable tables (.sortable-table) */
.sortable-table button.th-sort {
    display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: 0; padding: 0; margin: 0;
    font: inherit; font-weight: 600; color: inherit; cursor: pointer;
}
.sortable-table th.num button.th-sort { flex-direction: row-reverse; }
.sortable-table button.th-sort:hover { color: var(--teal-deep); }
.sortable-table button.th-sort::after { content: '\2195'; opacity: .35; font-size: .85em; }
.sortable-table button.th-sort[data-dir="asc"]::after { content: '\2191'; opacity: 1; }
.sortable-table button.th-sort[data-dir="desc"]::after { content: '\2193'; opacity: 1; }
.sortable-table .tbl-filters th { padding-top: .3rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.sortable-table .tbl-filters input { width: 100%; min-width: 0; box-sizing: border-box; padding: .3rem .45rem; font-size: .85rem; }

/* --- OEM parts: public make/part-number ordering (Pages/Public/OemParts) --- */
.oem-lead { color: var(--muted); margin: .4rem 0 0; max-width: 60ch; }

.oem-search { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin: .25rem 0 0; }
.oem-search .oem-field { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 12rem; }
.oem-search label { font-weight: 600; font-size: .85rem; color: var(--muted); }
.oem-search input, .oem-search select { height: 2.85rem; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.oem-search select { cursor: pointer; }
.oem-search [data-maker-other] { margin-top: .3rem; }
/* Give the button the same explicit height as the inputs (button UA line-height differs, so matching
   padding/line-height alone left it a few px short); flex-center the label within it. */
.oem-search .btn-primary { margin-top: 0; flex: 0 0 auto; height: 2.85rem; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; }

.oem-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.oem-result.is-known { background: var(--gold-soft); border-color: #e7d4ad; }
.oem-result-info { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.oem-result-pn { font-weight: 700; color: var(--ink); }
.oem-result-title { color: var(--muted); }
.oem-result-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .15rem .5rem; border-radius: 999px; }
.oem-badge-known { background: var(--teal); color: #fff; }
.oem-badge-new { background: #ececec; color: var(--muted); }
.oem-result .btn-secondary { margin-top: 0; }

.oem-cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.oem-cart-head h2 { margin: 0; }
.oem-cart-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.oem-empty { color: var(--muted); margin: .75rem 0 0; }
.oem-cart { display: flex; flex-direction: column; gap: .6rem; margin-top: .75rem; }

.oem-item { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .9rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.oem-item-main { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 12rem; min-width: 0; }
.oem-item-pn { font-weight: 700; color: var(--ink); }
.oem-item-title { color: var(--muted); font-size: .9rem; }
.oem-item-note { display: flex; flex-direction: column; gap: .25rem; flex: 2 1 14rem; }
.oem-item-qty { display: flex; flex-direction: column; gap: .25rem; flex: 0 0 5rem; }
.oem-item label span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.oem-item input { padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.oem-remove { color: var(--danger); font-size: 1rem; flex: 0 0 auto; align-self: center; }

.oem-actions { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.oem-actions .btn-primary { margin-top: 0; }

@media (max-width: 560px) {
    .oem-search .btn-primary { flex: 1 1 100%; }
    .oem-item-note, .oem-item-qty { flex: 1 1 100%; }
}

/* --- Order-by-URL: public manual order form (Pages/Public/OrderByUrl), matches the OEM parts look --- */
/* The order's real constraints (one store per order), called out above the form on both hosts. */
.ourl-rules { margin: .9rem 0 0; padding: .7rem .9rem; border-left: 3px solid var(--line); background: var(--surface, #f7f7f9); border-radius: 0 8px 8px 0; max-width: 60ch; }
.ourl-rules-title { margin: 0; font-weight: 700; font-size: .9rem; }
.ourl-rules ul { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.ourl-rules li + li { margin-top: .25rem; }

.acct-head-actions { margin: .75rem 0 0; }

.ourl-form { margin-top: .25rem; }
.ourl-pos { border: 1px solid var(--line); border-radius: 8px; padding: .1rem .9rem .9rem; margin-top: .75rem; background: #fff; }
.ourl-pos legend { font-weight: 700; padding: 0 .4rem; color: var(--ink); }
/* Product name + quantity share a row; quantity is a fixed narrow column. */
.ourl-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.ourl-row .ourl-grow { flex: 1 1 12rem; }
.ourl-row .ourl-qty { flex: 0 0 6rem; }
.ourl-field { display: flex; flex-direction: column; gap: .25rem; margin-top: .6rem; }
.ourl-field label { font-weight: 600; font-size: .85rem; color: var(--muted); }
.ourl-field input, .ourl-field textarea { padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; line-height: 1.5; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.ourl-field textarea { resize: vertical; min-height: 3.25rem; }
.ourl-field span.field-validation-error { font-size: .85rem; }
.ourl-actions { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.ourl-actions .btn-primary, .ourl-add { margin-top: 0; }

/* Preliminary cost calculator (UpGarage/Yahoo product pages). Teal logistics accent on a sea-blue
   card; item/commission/domestic rows, an in-Japan subtotal, the chosen international plan, and the
   grand total. Amounts are filled client-side by shipping-calculator.js. */
.calc { margin-top: 0; }
.calc-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.1rem; }
.calc-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.calc-field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.calc-country, .calc-weight, .calc-quantity {
    width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink); font: inherit;
}
.calc-country:focus, .calc-weight:focus, .calc-quantity:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.calc-weight-input { display: flex; align-items: stretch; }
.calc-weight-input .calc-weight, .calc-weight-input .calc-quantity { border-radius: 8px 0 0 8px; }
.calc-unit {
    display: inline-flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line); border-left: 0;
    border-radius: 0 8px 8px 0; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .85rem;
}

.calc-plans { border: 0; padding: 0; margin: 0 0 1.1rem; min-inline-size: 0; }
.calc-plans legend { padding: 0; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .45rem; }
.calc-plans-list { display: flex; flex-direction: column; gap: .4rem; }
.calc-plan {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3rem .6rem;
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
}
.calc-plan:hover { border-color: var(--teal); }
.calc-plan.is-active { border-color: var(--teal); background: rgba(73, 151, 142, .07); box-shadow: inset 0 0 0 1px var(--teal); }
.calc-plan input { margin: 0; accent-color: var(--teal-deep); }
.calc-plan-name { font-weight: 600; font-size: .92rem; }
.calc-plan-price { font-weight: 700; color: var(--gold-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-plan-meta { grid-column: 2 / -1; font-size: .78rem; color: var(--muted); }

.calc-breakdown { margin: 0; display: flex; flex-direction: column; gap: .1rem; }
.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .8rem; border-radius: 10px; }
.calc-row dt { margin: 0; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.calc-row dd { margin: 0; text-align: right; white-space: nowrap; }
.calc-label { font-weight: 600; font-size: .95rem; }
.calc-sub { font-size: .78rem; color: var(--muted); }
.calc-yen { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-alt { display: block; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-row--subtotal { background: var(--bg-sea); }
.calc-row--subtotal .calc-yen { color: var(--accent); }
.calc-row--total { background: rgba(193, 60, 60, .07); margin-top: .3rem; }
.calc-row--total .calc-label { font-size: 1.02rem; }
.calc-row--total .calc-yen { color: var(--danger); font-size: 1.15rem; }

.calc-status { margin: .8rem 0 0; color: var(--muted); font-size: .85rem; }
.calc-unavailable { margin-top: .8rem; }

/* Fetch/re-fetch loader: three vertical bars pulsing in a wave, centered over the results area.
   Stale figures stay visible but dimmed while a re-fetch is in flight. On the first load the area
   is empty, so it gets a min-height for the loader to sit in. */
.calc-results { position: relative; }
.calc.is-loading .calc-results { min-height: 2.6rem; }
.calc-loader { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: .35rem; pointer-events: none; }
.calc-loader span {
    width: 5px; height: 1.6rem; border-radius: 3px; background: var(--teal);
    animation: calc-loader-bar .9s ease-in-out infinite;
}
.calc-loader span:nth-child(2) { animation-delay: .15s; }
.calc-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes calc-loader-bar {
    0%, 100% { transform: scaleY(.35); opacity: .55; }
    50% { transform: scaleY(1); opacity: 1; }
}
.calc.is-loading .calc-breakdown, .calc.is-loading .calc-plans { opacity: .45; transition: opacity .2s; }

.calc-notes { margin-top: 1.2rem; padding: .9rem 1rem; background: var(--bg-warm); border-radius: 10px; }
.calc-notes-title { margin: 0 0 .4rem; font-weight: 700; font-size: .85rem; }
.calc-notes ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.calc-notes li { font-size: .82rem; color: var(--muted); }

@media (max-width: 560px) {
    .calc-controls { grid-template-columns: 1fr; }
    .calc-plan { grid-template-columns: auto 1fr; }
    .calc-plan-price { grid-column: 2; text-align: right; }
}

/* --- Russian warehouse counter (Stage 24) ---------------------------------
   Used on a phone, standing at a counter, often one-handed: rows are tall enough
   to hit without aiming, actions sit at the end of each row rather than in a
   toolbar, and the code field is the largest thing on its screen. */
.counter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line, #e3e6ea);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.counter-row-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.counter-row-main strong { font-variant-numeric: tabular-nums; }
.counter-meta { font-size: 0.85rem; color: var(--muted, #667); overflow-wrap: anywhere; }

/* 44px is the smallest thing a thumb hits reliably. */
.counter-action { min-height: 44px; display: inline-flex; align-items: center; margin-top: 0; white-space: nowrap; }

.counter-empty { color: var(--muted, #667); margin: 0; }
.counter-notice { border-left: 3px solid var(--accent, #0e6b6b); }

/* A table wider than the phone scrolls inside its own box; the page itself never does. */
.table-scroll { overflow-x: auto; }

/* Whole row is the hit target, not just the 16px box. */
.counter-pick .counter-row { padding: 0; }
.counter-check { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; width: 100%; cursor: pointer; }
.counter-check input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 auto; }

.counter-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.counter-actions .btn-primary { min-height: 44px; margin-top: 0; }

.counter-send { margin-top: 1.25rem; border-top: 1px solid var(--line, #e3e6ea); padding-top: 0.9rem; }
.counter-send summary { cursor: pointer; font-weight: 600; }
.counter-send input { margin-bottom: 0.6rem; }

/* The code is read aloud and typed once: give it room and don't let the browser
   autocorrect a six-character string into something else. */
.counter-code-input {
    font-size: 1.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-align: center;
    font-variant-numeric: tabular-nums;
    min-height: 56px;
}

.counter-code-form { max-width: 22rem; }
.counter-abandon { margin-top: 0.75rem; }

/* --- Reviews (Stage 24) --- */
/* The staff moderation queue and the review form. The landing page's cards are a different design and
   live in landing.css with the rest of the marketing surface. */
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.review-card { border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 1rem 1.1rem; background: var(--surface, #fff); }
.review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.review-stars { color: #d9a406; letter-spacing: 0.1em; white-space: nowrap; }
.review-text { margin: 0.5rem 0 0; overflow-wrap: anywhere; }
.review-reply { margin: 0.75rem 0 0; padding-left: 0.9rem; border-left: 3px solid var(--accent, #0e6b6b); color: var(--muted, #667); }
.review-date { margin: 0.75rem 0 0; color: var(--muted, #667); font-size: 0.8rem; }
.review-rating-pick { display: flex; gap: 0.5rem; align-items: center; }
.review-rating-pick label { display: inline-flex; align-items: center; gap: 0.25rem; }

@media (max-width: 560px) {
    .counter-row { flex-direction: column; align-items: stretch; }
    .counter-action { justify-content: center; }
}
