/* DEEPMINE v11.3 — 材料市场 order book (public/material-market.mjs; docs/v11-3-market-order-book.md §5).
   Screens: list (.book-list), item detail (.book-detail), the sticky bar and trade sheet in #sheet-footer (.book-bar,
   .book-sheet) and 我的订单 (.book-orders). The chart reuses swap-market.css (.market-chart, .market-plot, …).
   Fits 320 px with the 16 px gutter: every grid/flex child may shrink (min-width: 0), numbers stay on one line and
   labels wrap (long ru/de words break instead of widening the page). Bids / buys are green, asks / sells red, like
   the 兑换 trade list. */
@layer pages {
  .book, .book-sheet, .book-bar {
    --book-bid: var(--success);
    --book-ask: var(--danger);
    --book-bid-bg: rgb(80 200 140 / .13);
    --book-ask-bg: rgb(255 120 90 / .12);
  }
  .book {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    min-width: 0;
  }
  .book > * { min-width: 0; }
  /* A grid without explicit columns sizes its one track to the longest unbreakable word (a de/ru label) and pushes
     the card past the screen; every single-column grid here gets a shrinkable track instead. */
  :is(.book, .book-sheet, .book-bar) :is(.book-error, .book-rows, .book-row-copy, .book-row-price, .book-head-copy, .book-strip,
    .book-mine, .book-mine-list, .book-depth-side, .book-depth-head, .book-levels, .book-chart, .book-trades, .book-trade-list,
    .book-bar-meter, .book-sheet-title, .book-sheet-body, .book-field, .book-quote-levels, .book-orders-list, .book-order-copy,
    .book-history, .book-history-main) { grid-template-columns: minmax(0, 1fr); }
  :is(.book, .book-sheet, .book-bar) :is(h3, h4, p, small, dt, dd, li > span, label > span, button > span, .chip, .seg > button) { overflow-wrap: anywhere; }
  :is(.book, .book-sheet, .book-bar) :is(.book-banner, .book-short, .book-cap, .market-chart-state) > span { min-width: 0; overflow-wrap: anywhere; }
  :root:not(:lang(zh)) :is(.book, .book-sheet, .book-bar) :is(h3, h4, p, small, dt, .btn > span) { hyphens: auto; -webkit-hyphens: auto; }
  .book-money { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .book-money .currency-icon { flex: none; }
  .book-money > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* Banners and notes */
  .book-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
  .book-banner > span { flex: 1 1 140px; min-width: 0; }
  .book-banner .btn { flex: none; }
  .book-note { margin: 0; }
  .book-error {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 16px;
    text-align: center;
    color: var(--text-2);
  }
  .book-error .icon { width: 22px; height: 22px; color: var(--danger); }
  .book-error p { margin: 0; font-size: var(--fs-14); font-weight: 700; color: var(--text-1); }
  .book-error small { font-size: var(--fs-12); color: var(--text-3); }
  .book-empty { min-width: 0; }

  /* ───────────── Screen A: list ───────────── */
  .book-filters { min-width: 0; }
  .book-filters > button { min-width: 0; white-space: normal; }
  .book-rows {
    display: grid;
    padding: 0;
    overflow: hidden;
  }
  .book-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-1);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }
  .book-row + .book-row { border-top: 1px solid var(--line-1); }
  .book-row:active { background: rgb(255 255 255 / .04); }
  .book-rows :focus-visible { outline-offset: -3px; }
  .book-row-art { flex: none; width: 44px; }
  .book-row-art .item-tile { width: 44px; border-radius: 11px; }
  .book-row-art .item-count { right: 2px; bottom: 3px; min-width: 18px; padding: 0 4px; font-size: 10px; }
  .book-row-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
  .book-row-name { display: flex; align-items: center; gap: 4px 6px; min-width: 0; }
  .book-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-14); font-weight: 800; }
  .book-row-name .chip { flex: 0 1 auto; min-width: 0; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-10); }
  /* Longer locales wrap the depth line (two lines at most) instead of cutting the buy-order count. */
  .book-row-depth { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-width: 0; overflow: hidden; font-size: var(--fs-12); line-height: 1.35; color: var(--text-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  /* flex: none — the nowrap copy column must not squeeze the price down to "1…"; the 44% cap still bounds it. */
  .book-row-price { flex: none; min-width: 0; max-width: 44%; display: grid; justify-items: end; gap: 2px; text-align: right; }
  .book-row-price small { font-size: var(--fs-11); font-weight: 700; line-height: 1.25; color: var(--text-3); }
  .book-row-price .book-money { max-width: 100%; font: 800 var(--fs-15)/1.1 var(--font-display); color: var(--text-1); }
  .book-row-price.is-bid small { color: var(--book-bid); }
  .book-row-price.is-none small { color: var(--text-4); font-weight: 600; white-space: normal; }
  .book-row.is-skeleton { cursor: default; pointer-events: none; }
  .book-sk { display: block; border-radius: 8px; background: var(--surface-inset); animation: book-pulse 1.4s ease-in-out infinite; }
  .book-sk-art { flex: none; width: 44px; height: 44px; border-radius: 11px; }
  .book-sk-line { flex: 1 1 auto; height: 12px; }
  .book-sk-price { flex: none; width: 56px; height: 16px; }
  @keyframes book-pulse { 50% { opacity: .5; } }
  .book-idle-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: var(--tap, 44px);
    padding: 8px 12px;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-md);
    background: transparent;
    color: var(--text-2);
    font: inherit;
    font-size: var(--fs-13);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }
  .book-idle-toggle > span:first-child { min-width: 0; }
  .book-idle-chevron { flex: none; display: grid; place-items: center; transition: transform var(--dur-2) var(--ease-out); }
  .book-idle-chevron .icon { width: 16px; height: 16px; transform: rotate(90deg); }
  .book-idle-toggle[aria-expanded="true"] .book-idle-chevron { transform: rotate(180deg); }
  .book-rows.is-idle .book-row { opacity: .82; }

  /* ───────────── Screen B: detail ───────────── */
  .book-back { justify-self: start; gap: 4px; padding: 0 14px 0 8px; }
  .book-back .back-link-arrow { display: grid; place-items: center; }
  .book-back .back-link-arrow .icon { width: 18px; height: 18px; transform: rotate(180deg); color: var(--gold-300); }
  .book-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-color: color-mix(in srgb, var(--rarity, var(--rarity-common)) 24%, var(--line-1));
  }
  .book-head-art { flex: none; width: 64px; }
  .book-head-art .item-tile { width: 64px; }
  .book-head-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
  .book-head-copy h3 { margin: 0; font-size: var(--fs-hero-title, var(--fs-18)); font-weight: 800; line-height: 1.25; }
  .book-head-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; }
  .book-head-tags .chip { font-size: var(--fs-11); }
  .book-head-held { margin: 0; font-size: var(--fs-13); color: var(--text-2); font-variant-numeric: tabular-nums; }
  .book-legacy { margin: 0; }
  .book-odds { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: var(--fs-12); color: var(--text-3); }
  .book-odds > span { flex: 1 1 160px; min-width: 0; }
  .book-odds .icon { width: 14px; height: 14px; }

  .book-strip { display: grid; gap: 6px; padding: 10px 14px; }
  .book-strip-line { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: var(--fs-13); color: var(--text-1); font-variant-numeric: tabular-nums; }
  .book-strip-line > span { min-width: 0; }
  .book-strip-line > i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); transform: translateY(-1px); }
  .book-strip-line.is-ask > i { background: var(--book-ask); }
  .book-strip-line.is-bid > i { background: var(--book-bid); }
  .book-strip-line.is-day { color: var(--text-2); }
  .book-strip-line.is-day.is-up > i { background: var(--success); }
  .book-strip-line.is-day.is-down > i { background: var(--danger); }

  .book-mine { display: grid; gap: 8px; padding: 12px 14px; border-color: var(--line-gold); }
  .book-mine h4 { margin: 0; font-size: var(--fs-14); font-weight: 800; }
  .book-mine-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .book-mine-order {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    background: var(--surface-inset);
    font-size: var(--fs-13);
    font-variant-numeric: tabular-nums;
  }
  .book-mine-order > span { flex: 1 1 150px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .book-mine-order.is-sell { box-shadow: inset 3px 0 0 var(--book-ask); }
  .book-mine-order.is-buy { box-shadow: inset 3px 0 0 var(--book-bid); }
  .book-mine-order .btn { flex: none; }
  .book-dormant { font-size: var(--fs-10); white-space: normal; }

  /* Depth: stacked on the narrowest phones, side by side from 360 px. */
  .book-depth { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  @media (min-width: 360px) { .book-depth { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .book-depth-side { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 10px; }
  .book-depth-head { display: grid; gap: 4px; }
  .book-depth-head h4 { margin: 0; font-size: var(--fs-13); font-weight: 800; }
  .book-depth-side.is-asks h4 { color: var(--book-ask); }
  .book-depth-side.is-bids h4 { color: var(--book-bid); }
  .book-depth-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; font-size: var(--fs-11); color: var(--text-3); }
  .book-depth-cols > span { min-width: 0; overflow-wrap: anywhere; }
  .book-depth-cols > span:last-child { margin-left: auto; text-align: right; }
  .book-levels { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
  .book-level {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 6px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: var(--fs-12);
    font-variant-numeric: tabular-nums;
    isolation: isolate;
  }
  .book-level::before { content: ''; position: absolute; inset: 0 0 0 auto; z-index: -1; width: var(--depth, 0%); border-radius: inherit; }
  .is-asks .book-level::before { background: var(--book-ask-bg); }
  .is-bids .book-level::before { background: var(--book-bid-bg); }
  .book-level-price { min-width: 0; font-weight: 800; }
  .is-asks .book-level-price { color: var(--book-ask); }
  .is-bids .book-level-price { color: var(--book-bid); }
  .book-level-qty { min-width: 0; margin-left: auto; color: var(--text-1); text-align: right; }
  .book-level-mine { display: inline-flex; align-items: center; gap: 4px; flex-basis: 100%; font-size: var(--fs-10); color: var(--gold-200); }
  .book-level-mine i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-300); box-shadow: 0 0 6px rgb(245 200 105 / .6); }
  .book-level.is-mine { box-shadow: inset 2px 0 0 var(--gold-300); }
  .book-level.is-rest { justify-content: center; color: var(--text-3); font-size: var(--fs-11); }
  .book-level.is-rest::before { display: none; }
  .book-depth-empty { margin: 0; padding: 14px 4px; text-align: center; font-size: var(--fs-12); color: var(--text-3); }
  .book-expand { justify-self: center; max-width: 100%; min-height: 32px; white-space: normal; font-size: var(--fs-12); }
  .book-depth.is-loading .book-depth-side { gap: 10px; }
  .book-depth.is-loading .book-sk-line { height: 14px; }

  /* Chart: the 兑换 chart at 160 px with volume bars under the line. */
  .book-chart .market-chart { height: 160px; }
  .book-chart .market-chart-state { min-height: 160px; }
  /* beats swap-market.css `.market-chart svg` (inset 0, full size) */
  .book-chart .market-chart > .book-volume { inset: auto auto 12px 10px; width: calc(100% - 20px); height: 28%; pointer-events: none; }
  .book-volume rect { fill: var(--text-3); opacity: .28; }
  .book-chart .market-card-head { flex-wrap: wrap; }
  .book-chart .market-card-head h3 { min-width: 0; white-space: normal; }
  .book-ranges > button { min-width: 0; white-space: normal; line-height: 1.2; }

  .book-trades { display: grid; gap: 8px; padding: 12px 14px; }
  .book-trades h4 { margin: 0; font-size: var(--fs-14); font-weight: 800; }
  .book-trade-list { display: grid; margin: 0; padding: 0; list-style: none; }
  .book-trade {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 2px 8px;
    padding: 7px 4px;
    border-top: 1px solid var(--line-1);
    font-size: var(--fs-12);
    font-variant-numeric: tabular-nums;
  }
  .book-trade:first-child { border-top: 0; }
  .book-trade time { color: var(--text-3); white-space: nowrap; }
  .book-trade-qty { min-width: 0; color: var(--text-2); }
  .book-trade-price { justify-self: end; min-width: 0; max-width: 100%; font-weight: 800; color: var(--text-1); }
  .book-trade-price .book-money { max-width: 100%; }
  .book-trade-mine {
    justify-self: end;
    font-style: normal;
    font-size: var(--fs-10);
    font-weight: 700;
    padding: 0 6px;
    border-radius: 4px;
    color: var(--text-on-gold);
    background: var(--gold-300);
  }
  .book-trade.is-mine { background: linear-gradient(90deg, rgb(245 200 105 / .07), transparent 70%); }
  .book-trades-empty { margin: 0; padding: 14px 4px; text-align: center; font-size: var(--fs-13); color: var(--text-3); }

  /* ───────────── Sticky bar (#sheet-footer) ───────────── */
  .book-bar { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
  .book-bar > .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding-inline: 10px; white-space: normal; line-height: 1.25; text-align: center; }
  .book-bar > .btn > span { min-width: 0; overflow-wrap: break-word; }
  .book-bar.is-progress { align-items: center; }
  .book-bar-meter { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
  .book-bar-meter small { font-size: var(--fs-11); line-height: 1.35; color: var(--text-3); }
  .book-bar.is-progress > .btn { flex: 0 1 auto; }
  .book-bar.is-closed p { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin: 0; font-size: var(--fs-13); font-weight: 700; color: var(--text-2); text-align: center; }
  .book-bar.is-closed .icon { flex: none; width: 16px; height: 16px; color: var(--warn); }

  /* ───────────── Screen C: trade sheet (#sheet-footer) ───────────── */
  .book-sheet {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-height: 72vh;
    max-height: min(72dvh, 620px);
  }
  /* 72dvh can exceed the room under the panel header on short phones, which pushed the actions behind the dock. The
     footer may shrink instead (#sheet-body above has a zero flex basis) and the sheet's own body scrolls. */
  #sheet-footer:has(> .book-sheet) { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #sheet-footer > .book-sheet { flex: 1 1 auto; min-height: 0; }
  .book-sheet > * { flex: none; min-width: 0; }
  .book-sheet-head { display: flex; align-items: center; gap: 10px; }
  .book-sheet-art { flex: none; width: 40px; }
  .book-sheet-art .item-tile { width: 40px; border-radius: 10px; }
  .book-sheet-title { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
  .book-sheet-title h3 { margin: 0; font-size: var(--fs-16); font-weight: 800; line-height: 1.25; }
  .book-sheet-title small { font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
  .book-sheet-close { flex: none; }
  .book-modes > button { min-width: 0; white-space: normal; line-height: 1.2; }
  .book-sheet.is-buy .book-modes > button[aria-pressed="true"] { color: var(--jade-200); }
  .book-sheet.is-sell .book-modes > button[aria-pressed="true"] { color: #ffd2c4; }
  .book-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .book-sheet-body > * { min-width: 0; }
  .book-field { display: grid; gap: 4px; min-width: 0; }
  .book-field > span { font-size: var(--fs-12); font-weight: 700; color: var(--text-3); }
  .book-field input { width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
  .book-chips { display: flex; flex-wrap: wrap; min-width: 0; }
  .book-chips > button { flex: 1 1 0; min-width: 0; min-height: 34px; padding-inline: 4px; font-size: var(--fs-12); white-space: normal; line-height: 1.2; }
  .book-estimate { margin: 0; padding: 2px 12px; border-radius: var(--r-md); background: var(--surface-inset); }
  .book-estimate .kv > dd { min-width: 0; max-width: 100%; font-variant-numeric: tabular-nums; }
  .book-estimate .kv > dt { min-width: 0; }
  .book-estimate .kv.is-total dd b { font: 800 var(--fs-16)/1.2 var(--font-display); color: var(--gold-100); }
  .book-footnote { margin: -4px 2px 0; font-size: var(--fs-11); line-height: 1.45; color: var(--text-3); }
  .book-short, .book-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
  .book-short > span, .book-cap > span { flex: 1 1 150px; min-width: 0; }
  .book-short .btn, .book-cap .btn { flex: none; }
  .book-switch { justify-self: start; max-width: 100%; height: auto; white-space: normal; text-align: left; }
  .book-unlock { max-width: 100%; height: auto; padding-block: 8px; white-space: normal; }
  .book-existing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
  .book-existing p { flex: 1 1 160px; min-width: 0; margin: 0; font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
  .book-quote-levels { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
  .book-quote-levels li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 6px; background: rgb(255 255 255 / .03); color: var(--text-2); }
  .book-quote-levels li > span { white-space: nowrap; }
  .book-quote-levels li.is-more { justify-content: center; color: var(--text-3); }
  .book-sheet-actions { display: flex; gap: 8px; }
  .book-sheet-actions > .btn { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; }
  .book-sheet-actions > .btn--primary { flex-grow: 1.6; }
  .book-spinner {
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgb(255 255 255 / .3);
    border-top-color: currentColor;
    animation: dm-spin .9s linear infinite;
  }
  .book-sheet .btn.is-busy, .book-more.is-busy { cursor: progress; }

  /* ───────────── Screen D: 我的订单 ───────────── */
  .book-summary { padding: 10px 14px; }
  .book-summary p { margin: 0; font-size: var(--fs-13); font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
  .book-section-head { margin: 6px 2px -2px; }
  .book-section-head h3 { min-width: 0; }
  .book-section-head > span { flex: none; }
  .book-orders-list { display: grid; gap: 8px; }
  .book-order {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 0;
    border-color: color-mix(in srgb, var(--rarity, var(--rarity-common)) 22%, var(--line-1));
  }
  .book-order.is-sell { box-shadow: inset 3px 0 0 var(--book-ask), var(--sh-1); }
  .book-order.is-buy { box-shadow: inset 3px 0 0 var(--book-bid), var(--sh-1); }
  .book-order.is-dormant { opacity: .8; }
  .book-order-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0 2px 12px;
    border: 0;
    background: transparent;
    color: var(--text-1);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }
  .book-order-art { flex: none; width: 44px; }
  .book-order-art .item-tile { width: 44px; border-radius: 11px; }
  .book-order-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
  .book-order-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; font-size: var(--fs-14); font-weight: 800; }
  .book-order-name > span:first-child { min-width: 0; }
  .book-order-name .chip { font-size: var(--fs-10); }
  .book-order-line { font-size: var(--fs-12); color: var(--text-2); font-variant-numeric: tabular-nums; }
  .book-order-fill { height: 5px; }
  .book-order-cancel { flex: none; }
  .book-history-filters > button { min-width: 0; white-space: normal; }
  .book-history { display: grid; margin: 0; padding: 0; list-style: none; overflow: hidden; }
  .book-history-row + .book-history-row { border-top: 1px solid var(--line-1); }
  .book-history-main {
    display: grid;
    gap: 3px;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--text-1);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }
  .book-history-main:active { background: rgb(255 255 255 / .04); }
  .book-history-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
  .book-history-top b { min-width: 0; font-size: var(--fs-14); font-weight: 800; }
  .book-history-top .chip { font-size: var(--fs-10); }
  .book-history-status { margin-left: auto; font-size: var(--fs-11); font-weight: 700; color: var(--text-3); }
  .book-history-row.is-filled .book-history-status { color: var(--success); }
  .book-history-row.is-fill-limit .book-history-status { color: var(--warn); }
  .book-history-line { font-size: var(--fs-12); color: var(--text-2); font-variant-numeric: tabular-nums; }
  .book-history-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
  .book-history-bottom > span { min-width: 0; color: var(--text-1); font-weight: 700; }
  .book-history-bottom time { white-space: nowrap; }
  .book-history-state { margin: 0; padding: 18px 8px; text-align: center; font-size: var(--fs-13); color: var(--text-3); }
  .book-history-state.is-loading { animation: book-pulse 1.4s ease-in-out infinite; }
  .book-more { gap: 8px; }

  /* 320–359 px: tighter rows, the price column keeps its number whole. */
  @media (max-width: 359px) {
    .book-row { gap: 8px; padding-inline: 10px; }
    .book-row-price .book-money { font-size: var(--fs-14); }
    .book-row-price { max-width: 46%; }
    .book-head { gap: 10px; padding: 10px 12px; }
    .book-order-main { gap: 8px; padding-left: 10px; }
    .book-bar > .btn { padding-inline: 8px; font-size: var(--fs-13); }
    .book-chips > button { font-size: var(--fs-11); }
  }
  @media (prefers-reduced-motion: reduce) {
    .book-sk, .book-history-state.is-loading { animation: none; }
    .book-spinner { animation-duration: 2.4s; }
    .book-idle-chevron { transition: none; }
  }
  html:is(.reduce-motion, .low-quality) :is(.book-sk, .book-history-state.is-loading) { animation: none; }
}
