/* ════════════════════════════════════════════════════════════════════
   TOKYO ANIME HUNTER — frontend-commerce.css
   ────────────────────────────────────────────────────────────────────
   ADDITIVE. Loads AFTER frontend.css and frontend-enhancements.css.
   Nothing here overrides an existing rule; it only adds classes those
   files don't define. The originals stay untouched.

   Covers: cart · checkout · order confirmation · Hunter HQ v3 ·
           landing page v3 · shared form furniture

   THEME CONTRACT
   ──────────────
   Every colour resolves from a token already declared in frontend.css
   for BOTH :root (dark) and [data-theme="light"]. Where a new surface
   was needed it is built with color-mix() against an existing token, so
   flipping the theme flips this file too — no [data-theme] duplicates
   to keep in sync, and no hard-coded hex to go stale.

   MOBILE
   ──────
   Bottom padding on page shells clears the anchored bottom nav via
   --bottom-nav-h. Rails scroll-snap under 992px. Nothing needs hover.
   ════════════════════════════════════════════════════════════════════ */

/* ─── SHARED TOKENS (derived, theme-following) ──────────────────── */
:root {
    --tahc-panel:      color-mix(in srgb, var(--tah-surface) 92%, transparent);
    --tahc-panel-2:    color-mix(in srgb, var(--tah-surface-2) 88%, transparent);
    --tahc-line:       var(--tah-border);
    --tahc-tint:       color-mix(in srgb, var(--tah-primary) 10%, transparent);
    --tahc-tint-soft:  color-mix(in srgb, var(--tah-primary) 5%, transparent);
    --tahc-good:       color-mix(in srgb, var(--tah-success) 14%, transparent);
    --tahc-warn:       color-mix(in srgb, var(--tah-warning) 14%, transparent);
    --tahc-bad:        color-mix(in srgb, var(--tah-danger) 12%, transparent);
    --tahc-radius:     var(--radius-lg, 16px);
}

/* Clear the anchored mobile bottom nav on every commerce page shell. */
.tah-cart-page,
.tah-checkout,
.tah-confirm,
.tah-acc,
.tah-home { padding-bottom: calc(var(--bottom-nav-h, 62px) + 28px); }

@media (min-width: 992px) {
    .tah-cart-page, .tah-checkout, .tah-confirm, .tah-acc, .tah-home { padding-bottom: 48px; }
}

/* ─── FORM FURNITURE ────────────────────────────────────────────── */
.tah-lbl {
    display: block; font-family: 'Rajdhani', sans-serif; font-weight: 600;
    font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--tah-muted); margin-bottom: 4px;
}
.tah-field-error { color: var(--tah-danger); font-size: .78rem; margin-top: 3px; }
.tah-check { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.tah-check input { accent-color: var(--tah-primary); width: 16px; height: 16px; }
.tah-linkbtn {
    background: none; border: 0; padding: 0; color: var(--tah-primary);
    font: inherit; font-size: .82rem; cursor: pointer; text-decoration: none;
}
.tah-linkbtn:hover { filter: brightness(1.15); text-decoration: underline; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .82em; }

.tah-panel {
    background: var(--tahc-panel); border: 1px solid var(--tahc-line);
    border-radius: var(--tahc-radius); overflow: hidden;
}
.tah-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--tahc-line);
    background: var(--tahc-tint-soft);
}
.tah-panel-head h5 { margin: 0; font-size: 1rem; }
.tah-panel-body { padding: 18px; }
.tah-panel-credit { border-color: color-mix(in srgb, var(--tah-success) 40%, var(--tahc-line)); }
.tah-panel-pay    { border-color: color-mix(in srgb, var(--tah-warning) 40%, var(--tahc-line)); }

.tah-alert-band.is-danger {
    border-color: color-mix(in srgb, var(--tah-danger) 45%, transparent);
    background: var(--tahc-bad);
}
.tah-alert-band.is-good {
    border-color: color-mix(in srgb, var(--tah-success) 45%, transparent);
    background: var(--tahc-good);
}

/* ─── CHECKOUT STEPPER ──────────────────────────────────────────── */
.tah-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tah-step {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    border: 1px solid var(--tahc-line); border-radius: 999px;
    color: var(--tah-muted); font-size: .82rem;
}
.tah-step .n {
    width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--tah-muted) 22%, transparent);
    font-weight: 700; font-size: .74rem; color: var(--tah-text);
}
.tah-step.is-current { border-color: var(--tah-primary); color: var(--tah-text); box-shadow: var(--tah-glow-soft); }
.tah-step.is-current .n { background: var(--tah-primary); color: #fff; }
.tah-step.is-done { border-color: color-mix(in srgb, var(--tah-success) 50%, transparent); color: var(--tah-text); }
.tah-step.is-done .n { background: var(--tah-success); color: #fff; }

/* ─── CART: NAVBAR PIP + DRAWER ─────────────────────────────────── */
.tah-cart-pip-wrap { display: inline-flex; }
.tah-cart-trigger { position: relative; }
.tah-cart-trigger.is-bumping { animation: tahBump .42s ease; }
@keyframes tahBump {
    0%, 100% { transform: scale(1); }
    35%      { transform: scale(1.22); }
    70%      { transform: scale(.94); }
}

.tah-cart-drawer {
    background: var(--tah-bg); color: var(--tah-text);
    border-left: 1px solid var(--tahc-line); width: min(420px, 92vw);
}
.tah-cart-drawer-head { border-bottom: 1px solid var(--tahc-line); background: var(--tahc-tint-soft); }
.tah-cart-drawer-head .btn-close { filter: invert(var(--tahc-close-invert, 1)); }
[data-theme="light"] .tah-cart-drawer-head .btn-close { filter: none; }
.tah-cart-drawer-body { padding: 12px 16px; }
.tah-cart-drawer-foot {
    padding: 16px; border-top: 1px solid var(--tahc-line);
    background: var(--tahc-panel);
}

.tah-cart-mini { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--tahc-line); }
.tah-cart-mini.is-blocked { opacity: .55; }
.tah-cart-mini-img {
    width: 62px; height: 62px; flex: 0 0 62px; border-radius: var(--radius-md);
    background: var(--tahc-panel-2); display: grid; place-items: center; overflow: hidden;
    border: 1px solid var(--tahc-line);
}
.tah-cart-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-cart-mini-img i { font-size: 1.3rem; color: var(--tah-muted); }
.tah-cart-mini-body { min-width: 0; flex: 1; }
.tah-cart-mini-name { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.tah-cart-mini-sub, .tah-cart-mini-price { color: var(--tah-muted); font-size: .8rem; }
.tah-cart-warn {
    background: var(--tahc-warn); border: 1px solid color-mix(in srgb, var(--tah-warning) 40%, transparent);
    border-radius: var(--radius-md); padding: 8px 12px; font-size: .82rem;
}

/* ─── CART PAGE ─────────────────────────────────────────────────── */
.tah-cart-table { display: flex; flex-direction: column; gap: 12px; }
.tah-cart-row {
    display: flex; gap: 16px; padding: 16px;
    background: var(--tahc-panel); border: 1px solid var(--tahc-line);
    border-radius: var(--tahc-radius);
}
.tah-cart-row.is-blocked { opacity: .6; border-color: color-mix(in srgb, var(--tah-danger) 35%, transparent); }
.tah-cart-row-img {
    position: relative; width: 96px; height: 96px; flex: 0 0 96px;
    border-radius: var(--radius-md); overflow: hidden; background: var(--tahc-panel-2);
    display: grid; place-items: center; border: 1px solid var(--tahc-line);
}
.tah-cart-row-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-cart-row-img i { font-size: 1.6rem; color: var(--tah-muted); }
.tah-cart-saletag {
    position: absolute; top: 6px; left: 6px; background: var(--tah-danger); color: #fff;
    width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem;
}
.tah-cart-row-body { flex: 1; min-width: 0; }
.tah-cart-row-name a { color: var(--tah-text); font-weight: 600; }
.tah-cart-row-name a:hover { color: var(--tah-primary); }
.tah-cart-row-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--tah-muted); font-size: .8rem; margin-top: 2px; }
.tah-cart-row-controls { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.tah-cart-row-price { text-align: right; min-width: 120px; }
.tah-cart-linetotal { display: block; color: var(--tah-muted); font-size: .8rem; margin-top: 4px; }
.tah-cart-flag { color: var(--tah-danger); font-size: .8rem; margin-top: 4px; }
.tah-cart-note  { color: var(--tah-warning); font-size: .8rem; margin-top: 4px; }

.tah-qty { display: inline-flex; align-items: center; border: 1px solid var(--tahc-line); border-radius: var(--radius-md); overflow: hidden; }
.tah-qty button {
    width: 34px; height: 34px; border: 0; background: var(--tahc-panel-2);
    color: var(--tah-text); cursor: pointer; display: grid; place-items: center;
}
.tah-qty button:hover:not(:disabled) { background: var(--tah-primary); color: #fff; }
.tah-qty button:disabled { opacity: .35; cursor: not-allowed; }
.tah-qty input {
    width: 52px; height: 34px; border: 0; text-align: center;
    background: transparent; color: var(--tah-text); font-weight: 600;
    -moz-appearance: textfield;
}
.tah-qty input::-webkit-outer-spin-button,
.tah-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 575.98px) {
    .tah-cart-row { flex-wrap: wrap; }
    .tah-cart-row-price { text-align: left; width: 100%; min-width: 0; }
}

/* ─── SUMMARY ───────────────────────────────────────────────────── */
.tah-summary {
    background: var(--tahc-panel); border: 1px solid var(--tahc-line);
    border-radius: var(--tahc-radius); padding: 20px;
}
.tah-summary-sticky { position: sticky; top: calc(var(--nav-h, 66px) + 16px); }
.tah-summary-title { font-size: 1.05rem; margin-bottom: 14px; }
.tah-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .9rem; }
.tah-summary-row.is-good { color: var(--tah-success); }
.tah-summary-row.is-total { font-size: 1.08rem; font-weight: 700; padding-top: 10px; }
.tah-summary-row.is-due { color: var(--tah-primary); }

.tah-freeship-hint { font-size: .8rem; color: var(--tah-muted); }
.tah-freeship-hint.is-hit { color: var(--tah-success); }
.tah-freeship-bar { font-size: .78rem; color: var(--tah-muted); }
.tah-freeship-track { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--tah-muted) 25%, transparent); overflow: hidden; margin-bottom: 6px; }
.tah-freeship-fill { height: 100%; background: linear-gradient(90deg, var(--tah-primary), var(--tah-success)); border-radius: 999px; transition: width .35s ease; }

.tah-coupon-applied {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--tahc-good); border: 1px solid color-mix(in srgb, var(--tah-success) 40%, transparent);
    border-radius: var(--radius-md); padding: 8px 12px; font-size: .85rem;
}
.tah-credit-hint {
    background: var(--tahc-good); border: 1px solid color-mix(in srgb, var(--tah-success) 35%, transparent);
    border-radius: var(--radius-md); padding: 10px 12px; font-size: .82rem;
}
.tah-credit-applied { font-size: .82rem; color: var(--tah-muted); }
.tah-trust { display: flex; flex-wrap: wrap; gap: 10px; font-size: .74rem; color: var(--tah-muted); }
.tah-trust i { color: var(--tah-primary); }

/* ─── CHECKOUT ──────────────────────────────────────────────────── */
.tah-addr-list { display: grid; gap: 10px; }
.tah-addr, .tah-radio-row {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px;
    border: 1px solid var(--tahc-line); border-radius: var(--radius-md);
    cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.tah-addr:hover, .tah-radio-row:hover { border-color: var(--tah-primary); }
.tah-addr.is-active, .tah-radio-row.is-active {
    border-color: var(--tah-primary); background: var(--tahc-tint);
}
.tah-addr input, .tah-radio-row input { accent-color: var(--tah-primary); margin-top: 3px; }
.tah-radio-row { align-items: center; margin-bottom: 8px; }
.tah-addr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tah-addr-line { color: var(--tah-muted); font-size: .84rem; }

.tah-addr-card {
    background: var(--tahc-panel); border: 1px solid var(--tahc-line);
    border-radius: var(--tahc-radius); padding: 16px; height: 100%;
}
.tah-addr-card.is-default { border-color: var(--tah-primary); box-shadow: var(--tah-glow-soft); }
.tah-addr-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tahc-line); }

.tah-checkout-lines { display: flex; flex-direction: column; gap: 12px; max-height: 340px; overflow-y: auto; }
.tah-checkout-line { display: flex; align-items: center; gap: 12px; }
.tah-checkout-line-img {
    position: relative; width: 52px; height: 52px; flex: 0 0 52px; border-radius: var(--radius-md);
    overflow: hidden; background: var(--tahc-panel-2); display: grid; place-items: center;
    border: 1px solid var(--tahc-line);
}
.tah-checkout-line-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-checkout-qty {
    position: absolute; top: -4px; right: -4px; background: var(--tah-primary); color: #fff;
    min-width: 19px; height: 19px; border-radius: 999px; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; padding: 0 4px;
}
.tah-checkout-line-name { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.tah-ship-to { font-size: .85rem; }

/* ─── ORDER CONFIRMED ───────────────────────────────────────────── */
.tah-confirm-hero { text-align: center; padding: 32px 0 8px; }
.tah-confirm-check {
    width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%;
    display: grid; place-items: center; font-size: 2.2rem; color: #fff;
    background: var(--tah-success); box-shadow: 0 0 0 10px var(--tahc-good);
    animation: tahPop .5s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes tahPop { from { transform: scale(0); } to { transform: scale(1); } }
.tah-confirm-title { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 6px 0; }
.tah-order-number {
    display: inline-block; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 1.1rem; letter-spacing: .1em; padding: 10px 22px;
    border: 1px dashed var(--tah-primary); border-radius: var(--radius-md);
    background: var(--tahc-tint);
}

.tah-flow { display: flex; gap: 4px; flex-wrap: wrap; }
.tah-flow-step { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--tah-muted); font-size: .8rem; }
.tah-flow-dot {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--tahc-line); background: var(--tahc-panel-2);
}
.tah-flow-step.is-done { color: var(--tah-text); }
.tah-flow-step.is-done .tah-flow-dot { background: var(--tah-success); color: #fff; border-color: var(--tah-success); }
.tah-flow-step.is-current .tah-flow-dot { background: var(--tah-primary); border-color: var(--tah-primary); color: #fff; box-shadow: var(--tah-glow-soft); }

.tah-paychannels { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tah-paychannel { border: 1px solid var(--tahc-line); border-radius: var(--radius-md); padding: 12px; }
.tah-paychannel-label { font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; color: var(--tah-primary); }
.tah-paychannel-name { font-size: .82rem; color: var(--tah-muted); }
.tah-paychannel-no {
    background: none; border: 0; padding: 4px 0 0; color: var(--tah-text);
    font-family: ui-monospace, monospace; font-size: .92rem; cursor: pointer;
}
.tah-paychannel-no:hover { color: var(--tah-primary); }

.tah-payform { border: 1px solid var(--tahc-line); border-radius: var(--radius-md); padding: 16px; background: var(--tahc-tint-soft); }
.tah-payrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--tahc-line); }
.tah-payrow:last-child { border-bottom: 0; }

/* ─── HUNTER HQ ─────────────────────────────────────────────────── */
.tah-acc-header { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tah-acc-avatar {
    width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
    display: grid; place-items: center; font-size: 1.7rem; font-weight: 800;
    background: var(--tah-primary); color: #fff; box-shadow: var(--tah-glow-soft); flex: 0 0 68px;
}
.tah-acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tah-acc-name { font-size: clamp(1.3rem, 3.4vw, 1.9rem); margin: 2px 0 6px; }
.tah-acc-chips { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--tah-muted); }
.tah-acc-chips i { color: var(--tah-primary); }
.tah-acc-chips .is-gold i { color: var(--tah-warning); }
.tah-acc-credit {
    text-align: right; padding: 12px 20px; border-radius: var(--tahc-radius);
    border: 1px solid var(--tahc-line); background: var(--tahc-tint);
}
.tah-acc-credit .lbl { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tah-muted); }
.tah-acc-credit .val { font-size: 1.35rem; font-weight: 800; color: var(--tah-primary); }

.tah-acc-nav button {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: none; border: 0; padding: 12px 14px; border-radius: var(--radius-md);
    color: var(--tah-muted); font-size: .92rem; cursor: pointer;
}
.tah-acc-nav button:hover { background: var(--tahc-tint-soft); color: var(--tah-text); }
.tah-acc-nav button.active { background: var(--tahc-tint); color: var(--tah-text); font-weight: 600; }
.tah-acc-nav button.active i { color: var(--tah-primary); }
.tah-acc-nav-val { margin-left: auto; font-size: .8rem; color: var(--tah-primary); font-weight: 700; }
.tah-acc-nav .tah-pip { margin-left: auto; }

.tah-turn-band {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 14px;
    border-radius: var(--tahc-radius); text-decoration: none; color: var(--tah-text);
    background: var(--tahc-tint); border: 1px solid var(--tah-primary); box-shadow: var(--tah-glow-soft);
}
.tah-turn-pulse, .tah-dot-live {
    width: 9px; height: 9px; border-radius: 50%; background: var(--tah-live, #FF3355);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--tah-live, #FF3355) 70%, transparent);
    animation: tahPulse 1.6s infinite; flex: 0 0 9px; display: inline-block;
}
@keyframes tahPulse {
    70%  { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.tah-ordcard, .tah-casecard, .tah-kuji-card {
    border: 1px solid var(--tahc-line); border-radius: var(--tahc-radius);
    background: var(--tahc-panel); margin-bottom: 12px; overflow: hidden;
}
.tah-ordcard-head, .tah-casecard-head {
    display: flex; align-items: center; gap: 12px; width: 100%;
    background: none; border: 0; padding: 16px; text-align: left; color: var(--tah-text); cursor: pointer;
}
.tah-ordcard-head:hover, .tah-casecard-head:hover { background: var(--tahc-tint-soft); }
.tah-ordcard-head > div:first-child, .tah-casecard-head > div:first-child { flex: 1; min-width: 0; }
.tah-ordcard-no { font-family: ui-monospace, monospace; font-weight: 700; }
.tah-ordcard-body, .tah-casecard-body { padding: 0 16px 16px; border-top: 1px solid var(--tahc-line); padding-top: 16px; }
.tah-ordcard-items { display: flex; flex-direction: column; gap: 10px; }
.tah-ordcard-item { display: flex; align-items: center; gap: 12px; }
.tah-ordcard-thumb {
    width: 48px; height: 48px; flex: 0 0 48px; border-radius: var(--radius-sm);
    overflow: hidden; background: var(--tahc-panel-2); display: grid; place-items: center;
    border: 1px solid var(--tahc-line);
}
.tah-ordcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tah-ordcard-totals { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tahc-line); font-size: .88rem; }
.tah-ordcard-totals > div { display: flex; justify-content: space-between; padding: 3px 0; }
.tah-ordcard-totals .is-total { font-weight: 700; border-top: 1px solid var(--tahc-line); margin-top: 6px; padding-top: 8px; }
.tah-ordcard-totals .is-good { color: var(--tah-success); }
.tah-ordcard-totals .is-due  { color: var(--tah-primary); font-weight: 700; }
.tah-ordcard-pays { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tahc-line); }
.tah-track { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--tahc-tint-soft); font-size: .85rem; }

/* Store credit */
.tah-credit-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 24px; border-radius: var(--tahc-radius);
    border: 1px solid var(--tah-primary); background: var(--tahc-tint); box-shadow: var(--tah-glow-soft);
}
.tah-credit-big { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; color: var(--tah-primary); line-height: 1.1; }
.tah-lots { display: flex; flex-direction: column; gap: 10px; }
.tah-lot {
    display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-md);
    border: 1px solid var(--tahc-line); background: var(--tahc-panel);
}
.tah-lot.is-expiring { border-color: color-mix(in srgb, var(--tah-warning) 50%, transparent); background: var(--tahc-warn); }
.tah-ledger-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--tahc-line); }
.tah-ledger-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 34px; }
.tah-ledger-icon.is-in  { background: var(--tahc-good); color: var(--tah-success); }
.tah-ledger-icon.is-out { background: var(--tahc-bad);  color: var(--tah-danger); }

/* Kuji */
.tah-kuji-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; }
.tah-slot-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.tah-slot-chip {
    padding: 6px 12px; border-radius: var(--radius-md); font-size: .8rem;
    border: 1px solid var(--tahc-line); display: inline-flex; flex-direction: column; line-height: 1.2;
}
.tah-slot-chip small { font-size: .66rem; color: var(--tah-muted); }
.tah-slot-chip.is-paid   { border-color: color-mix(in srgb, var(--tah-success) 50%, transparent); }
.tah-slot-chip.is-unpaid { border-color: color-mix(in srgb, var(--tah-danger) 45%, transparent); }
.tah-slot-chip.is-turn   { border-color: var(--tah-primary); box-shadow: var(--tah-glow-soft); }
.tah-kuji-warn, .tah-kuji-tip { margin: 0 16px 14px; padding: 10px 12px; border-radius: var(--radius-md); font-size: .82rem; }
.tah-kuji-warn { background: var(--tahc-bad); color: var(--tah-danger); }
.tah-kuji-tip  { background: var(--tahc-tint-soft); color: var(--tah-muted); }

.tah-prize-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--tahc-line); border-radius: var(--tahc-radius); background: var(--tahc-panel); height: 100%; }
.tah-prize-img { position: relative; width: 84px; height: 84px; flex: 0 0 84px; border-radius: var(--radius-md); overflow: hidden; background: var(--tahc-panel-2); display: grid; place-items: center; }
.tah-prize-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-prize-body { min-width: 0; flex: 1; }
.tah-dispatch { display: flex; gap: 4px; margin: 8px 0 4px; }
.tah-dispatch-step { width: 100%; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--tah-muted) 28%, transparent); }
.tah-dispatch-step.is-done { background: var(--tah-primary); }

/* Support */
.tah-dispo { margin-top: 14px; padding: 14px; border-radius: var(--radius-md); background: var(--tahc-good); border: 1px solid color-mix(in srgb, var(--tah-success) 35%, transparent); font-size: .88rem; }
.tah-csat { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .85rem; color: var(--tah-muted); }
.tah-csat button { background: none; border: 0; color: var(--tah-warning); font-size: 1.1rem; cursor: pointer; padding: 0 2px; }
.tah-csat.is-done i { color: var(--tah-warning); }

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE v3
   ═══════════════════════════════════════════════════════════════════ */

.tah-hero2 { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); background: var(--tah-hero-grad); }
.tah-hero2-glow {
    position: absolute; inset: -30% -10% auto -10%; height: 70%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--tah-primary) 26%, transparent), transparent);
    filter: blur(46px); pointer-events: none;
}
.tah-hero2-grid {
    position: absolute; inset: 0; pointer-events: none; opacity: .18;
    background-image:
        linear-gradient(color-mix(in srgb, var(--tah-secondary) 30%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--tah-secondary) 30%, transparent) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 78%);
}
.tah-hero2-inner { position: relative; display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 992px) { .tah-hero2-inner { grid-template-columns: 1.15fr .85fr; } }

.tah-hero2-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--tahc-line); background: var(--tahc-panel);
    font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tah-muted);
}
.tah-hero2-title {
    font-family: 'Orbitron', sans-serif; font-weight: 900; text-transform: uppercase;
    font-size: clamp(2rem, 6.5vw, 4rem); line-height: 1.06; margin: 18px 0 16px; letter-spacing: .01em;
}
.tah-hero2-rotate { color: var(--tah-primary); text-shadow: var(--tah-glow); display: inline-block; min-height: 1.06em; }
.tah-hero2-sub { color: var(--tah-muted); font-size: clamp(.95rem, 1.6vw, 1.08rem); max-width: 56ch; }
.tah-hero2-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 28px; }
.tah-hero2-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.tah-hero2-stat b { display: block; font-family: 'Orbitron', sans-serif; font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--tah-text); }
.tah-hero2-stat span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tah-muted); }

.tah-hero2-visual { display: none; }
@media (min-width: 992px) { .tah-hero2-visual { display: block; } }
.tah-crate { position: relative; height: 400px; }
.tah-crate-card {
    position: absolute; border-radius: var(--tahc-radius); overflow: hidden;
    border: 1px solid var(--tahc-line); background: var(--tahc-panel-2);
    box-shadow: 0 18px 46px color-mix(in srgb, var(--tah-bg) 70%, transparent);
    display: grid; place-items: center;
}
.tah-crate-card img { width: 100%; height: 100%; object-fit: cover; }
.tah-crate-ph { font-size: 2rem; color: var(--tah-muted); }
.tah-crate-1 { width: 60%; height: 60%; top: 0;   right: 6%;  transform: rotate(-4deg); animation: tahFloat 7s ease-in-out infinite; }
.tah-crate-2 { width: 46%; height: 46%; bottom: 6%; left: 0;   transform: rotate(5deg);  animation: tahFloat 9s ease-in-out infinite .6s; }
.tah-crate-3 { width: 40%; height: 40%; bottom: 0;  right: 16%; transform: rotate(-8deg); animation: tahFloat 8s ease-in-out infinite 1.2s; }
.tah-crate-4 { width: 32%; height: 32%; top: 18%;   left: 10%;  transform: rotate(9deg);  animation: tahFloat 10s ease-in-out infinite .3s; }
@keyframes tahFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.tah-ticker2 {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    border-top: 1px solid var(--tahc-line); border-bottom: 1px solid var(--tahc-line);
    background: var(--tahc-panel); overflow: hidden;
}
.tah-ticker2-label {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; font-size: .74rem; color: var(--tah-primary);
}
.tah-ticker2-track { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.tah-ticker2-track::-webkit-scrollbar { display: none; }
.tah-ticker2-item { white-space: nowrap; font-size: .84rem; color: var(--tah-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.tah-ticker2-item:hover { color: var(--tah-primary); }
.tah-ticker2-item.is-hot { color: var(--tah-primary); font-weight: 600; }

.tah-ways { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tah-way {
    position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px 22px;
    border: 1px solid var(--tahc-line); border-radius: var(--tahc-radius);
    background: var(--tah-card-grad); text-decoration: none; color: var(--tah-text);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tah-way:hover { transform: translateY(-4px); border-color: var(--tah-primary); box-shadow: var(--tah-glow-soft); color: var(--tah-text); }
.tah-way.is-feature { border-color: var(--tah-primary); box-shadow: var(--tah-glow-soft); }
.tah-way-icon { width: 46px; height: 46px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--tahc-tint); color: var(--tah-primary); font-size: 1.35rem; }
.tah-way h3 { font-size: 1.15rem; margin: 6px 0 0; }
.tah-way p { color: var(--tah-muted); font-size: .88rem; margin: 0; flex: 1; }
.tah-way-go { font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--tah-primary); display: inline-flex; align-items: center; gap: 6px; }
.tah-way-flag { position: absolute; top: 14px; right: 14px; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--tah-primary); color: #fff; }

.tah-firehero { padding: clamp(36px, 5vw, 64px) 0; background: linear-gradient(180deg, var(--tahc-bad), transparent); }
.tah-firehero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.tah-firehero-title { font-size: clamp(1.5rem, 4.5vw, 2.6rem); margin: 4px 0; }
.tah-firehero-tag { color: var(--tah-muted); margin: 0; }
.tah-firehero-timer { text-align: right; }

.tah-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.tah-rail > * { flex: 0 0 220px; scroll-snap-align: start; }
.tah-rail::-webkit-scrollbar { height: 6px; }
.tah-rail::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--tah-muted) 40%, transparent); border-radius: 999px; }
@media (min-width: 992px) {
    .tah-rail { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; }
    .tah-rail > * { flex: initial; }
}

.tah-draft-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tah-draft-card {
    display: flex; flex-direction: column; border: 1px solid var(--tahc-line);
    border-radius: var(--tahc-radius); overflow: hidden; background: var(--tah-card-grad);
    text-decoration: none; color: var(--tah-text); transition: transform .18s ease, border-color .18s ease;
}
.tah-draft-card:hover { transform: translateY(-4px); border-color: var(--tah-primary); color: var(--tah-text); }
.tah-draft-card-img { position: relative; aspect-ratio: 16 / 9; background: var(--tahc-panel-2); display: grid; place-items: center; overflow: hidden; }
.tah-draft-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-draft-card-img i { font-size: 2.2rem; color: var(--tah-muted); }
.tah-draft-phase { position: absolute; top: 10px; left: 10px; }
.tah-draft-turn { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--tah-bg) 78%, transparent); font-size: .72rem; }
.tah-draft-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tah-draft-name { font-size: 1.02rem; margin: 0; }
.tah-draft-top { font-size: .82rem; color: var(--tah-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tah-draft-top i { color: var(--tah-warning); }
.tah-draft-val { color: var(--tah-primary); font-weight: 700; }
.tah-draft-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--tah-muted); }
.tah-draft-cta { margin-top: auto; font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--tah-primary); }

.tah-promise { display: flex; gap: 16px; align-items: flex-start; margin-top: 24px; padding: 20px 22px; border-radius: var(--tahc-radius); border: 1px solid var(--tah-primary); background: var(--tahc-tint); }
.tah-promise i { font-size: 1.6rem; color: var(--tah-primary); flex: 0 0 auto; }
.tah-promise strong { display: block; margin-bottom: 3px; }

.tah-cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tah-cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px; border: 1px solid var(--tahc-line); border-radius: var(--tahc-radius); background: var(--tahc-panel); text-decoration: none; color: var(--tah-text); transition: border-color .18s ease, transform .18s ease; }
.tah-cat:hover { border-color: var(--tah-primary); transform: translateY(-3px); color: var(--tah-text); }
.tah-cat-img { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--tahc-tint); color: var(--tah-primary); font-size: 1.4rem; }
.tah-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.tah-cat-name { font-size: .82rem; text-align: center; font-weight: 600; }

.tah-trustband { padding: clamp(40px, 6vw, 72px) 0; background: var(--tahc-tint-soft); border-top: 1px solid var(--tahc-line); border-bottom: 1px solid var(--tahc-line); }
.tah-journey { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tah-journey-step { position: relative; padding: 22px; border: 1px solid var(--tahc-line); border-radius: var(--tahc-radius); background: var(--tahc-panel); }
.tah-journey-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tah-primary); color: #fff; font-family: 'Orbitron', sans-serif; font-weight: 700; margin-bottom: 12px; }
.tah-journey-step h4 { font-size: 1rem; margin: 0 0 6px; }
.tah-journey-step p { color: var(--tah-muted); font-size: .85rem; margin: 0; }
.tah-trustpills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; justify-content: center; }
.tah-trustpills span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--tahc-line); background: var(--tahc-panel); font-size: .78rem; color: var(--tah-muted); }
.tah-trustpills i { color: var(--tah-primary); }

.tah-finalcta { padding: clamp(48px, 7vw, 88px) 0; }
.tah-finalcta-title { font-size: clamp(1.5rem, 4.5vw, 2.6rem); margin: 6px 0 4px; }

/* ─── AUTH ──────────────────────────────────────────────────────── */
.tah-sso {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    margin-bottom: 12px; padding: .85rem 1rem; border-radius: 12px;
    font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.tah-sso-google   { background: #fff; color: #1f1f1f; border-color: rgba(0, 0, 0, .12); }
.tah-sso-facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.tah-sso-email    { background: transparent; color: var(--tah-text); border-color: var(--tah-secondary); }
.tah-sso-email:hover { border-color: var(--tah-primary); color: var(--tah-primary); }
.tah-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--tah-muted); font-size: .78rem; }
.tah-or::before, .tah-or::after { content: ''; flex: 1; height: 1px; background: var(--tahc-line); }
.tah-login-form { text-align: left; }

/* ─── REDUCED MOTION ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tah-crate-card, .tah-turn-pulse, .tah-dot-live,
    .tah-confirm-check, .tah-cart-trigger.is-bumping { animation: none !important; }
    .tah-way:hover, .tah-draft-card:hover, .tah-cat:hover { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════
   BOTTOM NAV — OVERFLOW FIX
   ──────────────────────────────────────────────────────────────────
   THE CAUSE: flex items default to `min-width: auto`, which means they
   refuse to shrink below their own content width. If any single item is
   wider than a fifth of the screen — a long label, generous padding, a
   raised centre button — the whole row overflows sideways instead of the
   items compressing to fit. `min-width: 0` is the fix; everything else
   here is making sure nothing else can reintroduce the problem.
   ══════════════════════════════════════════════════════════════════ */

.tah-front .tah-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;                 /* left+right already define the width */
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    overflow-x: hidden;          /* the bar can never scroll internally */
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);   /* iPhone home bar */
}

.tah-front .tah-bottom-nav > a {
    flex: 1 1 0 !important;      /* five equal columns, all allowed to shrink */
    min-width: 0 !important;     /* ← THE ACTUAL FIX */
    width: auto !important;
    max-width: 20%;              /* hard ceiling: nothing can exceed 1/5 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px;
    overflow: hidden;
    text-align: center;
}

.tah-front .tah-bottom-nav > a > i {
    font-size: 1.15rem;
    line-height: 1;
}

.tah-front .tah-bottom-nav > a > span {
    display: block;
    max-width: 100%;
    font-size: .62rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;     /* truncate rather than push the row wider */
}

/* The raised centre button must not be exempt from shrinking. */
.tah-front .tah-bottom-nav > a.tah-bottom-kuji {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 20%;
    transform: none;
}

/* Belt and braces — nothing on a phone should scroll the page sideways.
   `clip` not `hidden`: hidden creates a scroll container and silently
   breaks every `position: sticky` descendant (the checkout summary card).
   `clip` does the same visual job without that side effect. */
@media (max-width: 991.98px) {
    html, body {
        max-width: 100%;
        overflow-x: clip;
    }
}

/* Very narrow phones (sub-360px) — shrink type rather than truncate. */
@media (max-width: 359.98px) {
    .tah-front .tah-bottom-nav > a > span { font-size: .56rem; }
    .tah-front .tah-bottom-nav > a > i    { font-size: 1.05rem; }
}
