/* ==========================================================================================
   screens/game-panels.css — rich text, unit thumbnails & glyphs (gameComponents.js), detail panel,
   bond popup, enemy / match-info drawer, 机变 overlay.
   ========================================================================================== */

/* ---- rich text (official markup, js/ui/richText.js) ---- */
.rt { white-space: normal; }
.rt-vup { color: #3fb6ff; }
.rt-vdown { color: #ff6a4a; }
.rt-rem { color: #f49800; }
.rt-note { color: var(--text-lo); }
.rt-kw { color: #2fd0ff; }
.rt-mint { color: var(--mint-400); }
.rt-hl { color: var(--gold-2); }
.rt-term { color: #9fd4ff; border-bottom: 1px dotted rgba(159, 212, 255, .6); }

/* ---- unit thumbnail ---- */
.uthumb {
  --ut: .72rem; --tc: var(--tier-1);
  position: relative; display: inline-block; width: var(--ut); height: var(--ut); flex: none;
}
.uthumb--xs { --ut: .34rem; } .uthumb--sm { --ut: .54rem; } .uthumb--lg { --ut: 1.1rem; }
.uthumb--t1 { --tc: var(--tier-1); } .uthumb--t2 { --tc: var(--tier-2); } .uthumb--t3 { --tc: var(--tier-3); }
.uthumb--t4 { --tc: var(--tier-4); } .uthumb--t5 { --tc: var(--tier-5); } .uthumb--t6 { --tc: var(--tier-6); }
.uthumb__art {
  position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #1a201d, #111513); background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 30%, #1a201d), #111513);
  border: 1px solid var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 60%, var(--line-2));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--ut) * .16), calc(100% - var(--ut) * .16) 100%, 0 100%);
}
.uthumb__art img { width: 100%; height: 100%; object-fit: cover; }
.uthumb--item .uthumb__art img { object-fit: contain; width: 84%; height: 84%; }
.uthumb--enemy .uthumb__art { background: linear-gradient(160deg, #3a1c18, #140d0c); border-color: rgba(255, 90, 74, .45); }
.uthumb__glyph { font-weight: 900; font-size: calc(var(--ut) * .44); color: var(--text-md); }
/* The tier mark readable at every thumbnail size — at least 16 / 15 / 12 px (md / sm / xs), never scaled down: it was
   .22rem × .66 ≈ 10 px (the owner, 2026-11-14 「看不清该干员所处等级的标识」, §37.201; themed icons: ui-theme.css). */
.uthumb .uthumb__tier { position: absolute; left: -.04rem; top: -.04rem; --tier-h: max(.26rem, 16px); filter: drop-shadow(0 0 1px rgba(0, 0, 0, .85)); }
.uthumb--sm .uthumb__tier { --tier-h: max(.24rem, 15px); }
.uthumb--xs .uthumb__tier { --tier-h: max(.18rem, 12px); left: -.03rem; top: -.03rem; }
.uthumb.is-golden .uthumb__art { border-color: var(--gold); box-shadow: inset 0 0 calc(var(--ut) * .18) rgba(255, 198, 0, .45); }
.uthumb.is-golden::after { content: ''; position: absolute; inset: -2px; border: 1px solid rgba(255, 198, 0, .7); pointer-events: none; clip-path: inherit; }
.uthumb.is-dim .uthumb__art img { filter: grayscale(.85) brightness(.55); }
.uthumb__tag { position: absolute; right: 0; bottom: 0; font-size: calc(var(--ut) * .17); line-height: 1.2; padding: 0 .03rem; background: #a9c3d8; color: #0b1520; font-weight: 700; }
/* 0.2.0 补位: the small 「替补」 mark of a stand-in's thumbnail (the result lineup, bond popup members — screens/result.js,
   ui/bondStrip.js) */
.uthumb__si { position: absolute; right: 0; bottom: 0; font-size: max(calc(var(--ut) * .2), 8px); line-height: 1.2; padding: 0 .03rem; background: var(--ice); color: var(--ice-900); font-weight: 700; opacity: .9; pointer-events: none; }
.bandicon { --bi: .6rem; display: inline-grid; place-items: center; width: var(--bi); height: var(--bi); flex: none; overflow: hidden; background: #111513; }
.bandicon img { width: 100%; height: 100%; object-fit: cover; }
.bandicon__txt { font-weight: 900; font-size: calc(var(--bi) * .44); color: var(--mint-400); }
.bandicon--xs { --bi: .26rem; } .bandicon--sm { --bi: .42rem; } .bandicon--lg { --bi: 1.14rem; } .bandicon--xl { --bi: 2.2rem; }
.sprite { object-fit: contain; }

/* ---- detail panel ---- */
.dpanel {
  --bk-c: var(--mint-500);
  /* --dp-b: the bottom inset of the slot (the right slot above an open shop, the phone's left slot above the corner
     buttons: devices.css); the landscape-phone rule below sizes the scaled card from it */
  --dp-b: 1.02rem;
  position: absolute; left: 2.3rem; top: 2.1rem; bottom: var(--dp-b); width: 4.9rem; max-height: 8.4rem; z-index: 9;
  display: flex; flex-direction: column;
  background: rgba(11, 15, 13, .97); border: 1px solid var(--line-2); box-shadow: 0 .14rem .4rem rgba(0, 0, 0, .65);
  animation: panel-in var(--t-slow) var(--ease-out);
}
@keyframes panel-in { from { opacity: 0; transform: translateX(-.3rem); } }
/* docked right (the selected unit's underframe is on the left: gameLogic panelSide / panelSlots — keep the insets in
   sync with PANEL_RIGHT_GAP / PANEL_RIGHT_BOTTOM(_SHOP)); above the shop bar while it is open */
.dpanel--right { left: auto; right: .9rem; --dp-b: 1.02rem; animation-name: panel-in-r; }
.dpanel--right.is-shop { --dp-b: 3.78rem; }
@keyframes panel-in-r { from { opacity: 0; transform: translateX(.3rem); } }
/* The detail card on a landscape phone (the owner, 2026-11-29: proportions off across the match UI): at the phone's 40 px
   root the px floors below made the stats twice the size of the text around them, in two columns (a ≤ 430 px rule), with
   the skill and the talent pushed out of view. Here the card keeps the desktop composition — the design's rem sizes,
   four stat columns — drawn 1.3× from its docking corner (a transform: taps map); its layout height is the slot's
   height divided by the factor, so the drawn card ends on the slot's bottom (--dp-b) as before, and the content scrolls
   in .dpanel__scroll. The drawn width is 4.9rem × 1.3 — gameLogic/panel.js panelSlots widens the slots the same way
   (PHONE_PANEL_K), so the card still moves aside for the selected unit. */
@keyframes panel-in-phone { from { opacity: 0; transform: translateX(-.3rem) scale(1.3); } }
@keyframes panel-in-r-phone { from { opacity: 0; transform: translateX(.3rem) scale(1.3); } }
@media (max-height: 600px) and (pointer: coarse), (max-height: 600px) and (any-pointer: coarse) {
  .dpanel {
    transform: scale(1.3); transform-origin: 0 0;
    bottom: auto; height: calc((100% - 2.1rem - var(--dp-b)) / 1.3); max-height: calc(8.4rem / 1.3);
    animation-name: panel-in-phone;
  }
  .dpanel--right { transform-origin: 100% 0; animation-name: panel-in-r-phone; }
  .dpanel .dstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dpanel .dhead__name { font-size: calc(.32 * var(--t)); }
  .dpanel .dstat__k { font-size: calc(.13 * var(--t)); }
  .dpanel .dstat__v { font-size: calc(.17 * var(--t)); }
  .dpanel .dsec__title { font-size: calc(.18 * var(--t)); }
  .dpanel .dtext { font-size: calc(.15 * var(--t)); }
  .dpanel .sw-sec__head { height: .62rem; }
  .dpanel .sw-sec__name { font-size: calc(.25 * var(--t)); }
  /* the bond popup opened next to the card clears the wider drawn card (gameLogic/panel.js bondPopupPlace `k`) */
  .bpop.bpop--beside { left: calc(7.32rem + 4.9rem * .3); }
  .bpop.bpop--besideR { right: calc(5.92rem + 4.9rem * .3); }
}
.dpanel__close { position: absolute; right: .08rem; top: .08rem; z-index: 2; width: .38rem; height: .38rem; display: grid; place-items: center; background: rgba(0, 0, 0, .5); border: 1px solid var(--line-2); color: var(--text-lo); }
.dpanel__close:hover { color: #fff; border-color: var(--line-3); }
.dpanel__close .icon { width: .2rem; height: .2rem; }
.dpanel__scroll { flex: 1; min-height: 0; overflow: auto; padding: .18rem .2rem .2rem; display: flex; flex-direction: column; gap: .14rem; }
.dhead { display: flex; gap: .16rem; }
.dhead__art { position: relative; width: 1.3rem; height: 1.9rem; flex: none; overflow: hidden; background: linear-gradient(180deg, #1c2421, #0e1210); border: 1px solid var(--line-2); }
.dhead__art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dhead__art.is-golden { border-color: var(--gold); box-shadow: 0 0 .16rem rgba(255, 198, 0, .35); }
.dhead__art .uthumb { margin: .4rem auto; display: block; }
.dhead__icon { width: 1.1rem; height: 1.1rem; flex: none; display: grid; place-items: center; background: radial-gradient(circle, #26302c, #111513); border: 1px solid var(--line-2); }
.dhead__icon img { width: 88%; height: 88%; object-fit: contain; }
.dhead__icon .icon { width: .5rem; height: .5rem; color: var(--mint-500); }
.dhead__icon.is-golden { border-color: var(--gold); }
.dhead__icon--enemy { background: radial-gradient(circle, #3a1c18, #140d0c); border-color: rgba(255, 90, 74, .45); }
.dhead__icon--enemy.is-boss { border-color: var(--orange-hi); box-shadow: 0 0 .18rem rgba(255, 110, 40, .45); }
.dhead__icon--enemy.is-elite { border-color: var(--gold-2); }
.dhead__info { display: flex; flex-direction: column; gap: .05rem; min-width: 0; padding-top: .02rem; flex: 1; }
.dhead__chips { display: flex; align-items: center; gap: .08rem; flex-wrap: wrap; }
.dhead__name { font-size: max(calc(.32 * var(--t)), 16px); font-weight: 900; letter-spacing: .04em; line-height: 1.2; }
.dhead__en { font-family: var(--font-display); font-size: calc(.12 * var(--t)); letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase; }
/* 0.2.0 补位: the replaced operator under a stand-in's name (「银灰的替补」, ui/detailPanel.js ChessDetail) */
.dhead__for { display: block; font-size: max(calc(.13 * var(--t)), 9px); letter-spacing: .04em; color: var(--ice); }
.dhead__flavor { font-size: calc(.13 * var(--t)); color: var(--text-lo); font-style: italic; }
.dhead__class { display: flex; align-items: center; gap: .06rem; flex-wrap: wrap; font-size: calc(.15 * var(--t)); color: var(--text-md); margin-top: .06rem; }
.dhead__class .sep { width: 1px; height: .16rem; background: var(--line-2); }
.dhead__prof, .dhead__sub { width: .24rem; height: .24rem; object-fit: contain; }
.dhead__pos { font-size: calc(.12 * var(--t)); padding: 0 .06rem; border: 1px solid var(--line-2); color: var(--text-lo); }
.dtag-elite, .dtag-token, .dtag-kind { font-size: calc(.13 * var(--t)); font-weight: 700; padding: .01rem .08rem; letter-spacing: .08em; }
.dtag-elite { background: var(--gold); color: #1d1400; }
.dtag-token { background: #a9c3d8; color: #0b1520; }
/* 0.2.0 自选编队 / 补位: the card of a 自选 piece, of a chess fielded as its stand-in (ui/detailPanel.js ChessDetail) */
.dtag-diy { font-size: calc(.13 * var(--t)); font-weight: 700; padding: .01rem .08rem; letter-spacing: .08em; background: var(--mint-500); color: var(--text-on-mint); }
.dtag-standin { font-size: calc(.13 * var(--t)); font-weight: 700; padding: .01rem .08rem; letter-spacing: .08em; background: var(--ice); color: var(--ice-900); }
.dtag-kind { border: 1px solid var(--line-2); color: var(--text-lo); font-weight: 500; }
.drank { font-size: calc(.13 * var(--t)); font-weight: 700; padding: .01rem .08rem; }
.drank--normal { background: var(--bg-4); color: var(--text-md); }
.drank--elite { background: var(--gold-2); color: #1d1400; }
.drank--boss { background: var(--orange); color: #fff; }
.dhp { position: relative; height: .18rem; margin-top: .08rem; background: #0a0d0c; border: 1px solid var(--line-2); }
.dhp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2bb65a, #56e08a); }
.dhp--enemy i { background: linear-gradient(90deg, #b5261a, #ff5a4a); }
.dhp span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .12rem; color: #fff; text-shadow: 0 1px 2px #000; }
.dtrait { display: flex; gap: .08rem; align-items: flex-start; font-size: calc(.14 * var(--t)); line-height: 1.6; color: var(--text-md); padding: .08rem .1rem; background: rgba(255, 255, 255, .03); border-left: 2px solid var(--line-3); }
.dtrait .icon { width: .16rem; height: .16rem; margin-top: .03rem; color: var(--text-lo); flex: none; }
.dstats-wrap { display: flex; gap: .12rem; align-items: stretch; }
/* compact 4 × 2 grid (label over value): the skill stays close under the 特质 block (user playtest #3 item 8) */
/* (enemy / token cards: the grid is a direct child of the column-flex scroller — it must not grow to fill the card) */
.dstats { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.dstats-wrap > .dstats { flex: 1; }
/* A label wraps instead of 「生命…」 when the column is narrow (1280×720 and below); a value never runs into the next cell. */
.dstat { display: flex; flex-direction: column; justify-content: center; gap: .01rem; min-width: 0; padding: .04rem .05rem; background: #0f1311; }
.dstat__k { font-size: max(calc(.13 * var(--t)), 12px); line-height: 1.12; letter-spacing: -.02em; color: var(--text-lo); overflow-wrap: anywhere; }
.dstat__row { display: flex; align-items: baseline; min-width: 0; white-space: nowrap; overflow: hidden; }
/* A short landscape phone: four columns are ~33px, so 「1,274」 ran into 「1,133」. Two columns there. */
@media (max-height: 430px) { .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dstat__v { font-size: max(calc(.17 * var(--t)), 13px); line-height: 1.15; color: #fff; }
.dstat small { font-size: calc(.11 * var(--t)); color: var(--text-dim); margin-left: .04rem; }
/* live stats (user playtest #4 item 7): buffed values green, debuffed red (the official card), the difference beside
   them; a 实时 (battle) / 开战时 (prep preview) tag over the grid's right edge */
.dstats.is-live, .dstats-wrap.is-live { margin-top: .14rem; }
.dstats.is-live, .dstats-wrap.is-live .dstats { position: relative; }
.dstat.is-up .dstat__v { color: #6dfa9c; text-shadow: 0 0 .08rem rgba(80, 240, 140, .35); }
.dstat.is-up small { color: #56e08a; }
.dstat.is-down .dstat__v { color: var(--red-premium); text-shadow: 0 0 .08rem rgba(255, 84, 84, .3); }
.dstat.is-down small { color: #ff8a80; }
.dstats__tag {
  position: absolute; right: -1px; bottom: 100%; padding: .01rem .08rem; font-size: calc(.11 * var(--t)); font-weight: 700; letter-spacing: .1em;
  color: var(--text-on-mint); background: var(--mint-500); pointer-events: auto; cursor: help;
}
.dstats__tag.is-battle { background: var(--orange); color: #1d0c00; }
.drange { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .06rem; padding: .06rem .1rem; background: #0f1311; border: 1px solid var(--line); min-width: 1.1rem; }
.rgrid { --rg: .14rem; display: grid; gap: 2px; }
.rgrid i { width: var(--rg); height: var(--rg); border: 1px solid rgba(255, 255, 255, .06); }
.rgrid i.on { background: rgba(246, 163, 41, .25); border-color: var(--amber); }
.rgrid i.self { background: var(--mint-500); border-color: var(--mint-400); }
.rgrid-all { font-size: calc(.16 * var(--t)); font-weight: 700; color: var(--amber); padding: .02rem .06rem; border: 1px solid var(--amber); background: rgba(246, 163, 41, .25); }
.dsec { display: flex; flex-direction: column; gap: .08rem; }
.dsec__title { display: flex; align-items: baseline; gap: .1rem; font-size: max(calc(.18 * var(--t)), 13px); font-weight: 700; color: var(--mint-400); padding-bottom: .04rem; border-bottom: 1px solid var(--line); }
.dtext { font-size: max(calc(.15 * var(--t)), 12px); line-height: 1.65; color: var(--text-md); }
.dskill { display: flex; gap: .12rem; align-items: center; }
.dskill__icon { width: .62rem; height: .62rem; flex: none; object-fit: cover; border: 1px solid var(--line-3); background: #0a0d0c; }
.dskill__icon--empty { display: grid; place-items: center; }
.dskill__icon--empty b { font-family: var(--font-display); font-size: calc(.2 * var(--t)); color: var(--mint-400); letter-spacing: .02em; }
.dskill__slot { display: inline-block; margin-right: .06rem; padding: 0 .05rem; vertical-align: .02rem; font-family: var(--font-display);
  font-size: calc(.12 * var(--t)); line-height: 1.5; color: var(--text-lo); border: 1px solid var(--line-3); }
.dskill__meta { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.dskill__name { font-size: calc(.19 * var(--t)); }
.dskill__tags { display: flex; flex-wrap: wrap; gap: .06rem; align-items: center; }
.dsp { font-size: calc(.12 * var(--t)); padding: 0 .06rem; line-height: 1.6; font-weight: 700; }
.dsp--time { background: #7fd37a; color: #0b1a0a; }
.dsp--atk { background: #ff8a3d; color: #1f0c00; }
.dsp--def { background: #f2bd3e; color: #1f1400; }
.dsp--trig { border: 1px solid var(--line-3); color: var(--text-lo); font-weight: 500; }
.dsp__num { display: inline-flex; align-items: center; gap: .03rem; font-size: calc(.13 * var(--t)); color: var(--text-lo); }
.dsp__num b { color: #fff; }
.dsp__num .icon { width: .14rem; height: .14rem; color: var(--gold); }
.dtalent { display: flex; flex-direction: column; gap: .02rem; }
.dtalent b { font-size: calc(.15 * var(--t)); color: var(--text-hi); }
/* the operator's own effect (特质, user playtest #3 item 8): compact, right under the header, gold accent */
.dgarrison {
  display: flex; flex-direction: column; gap: .04rem; padding: .07rem .1rem .08rem; flex: none;
  background: linear-gradient(90deg, rgba(242, 189, 62, .1), rgba(242, 189, 62, .02) 70%); border-left: 3px solid var(--gold-2);
}
.dgarrison__head { display: flex; align-items: center; gap: .08rem; }
.dgarrison__k { font-size: calc(.14 * var(--t)); font-weight: 900; letter-spacing: .12em; color: var(--gold-2); }
.dgarrison__type { display: inline-flex; align-items: center; gap: .04rem; font-size: calc(.12 * var(--t)); line-height: 1.5; color: var(--gold-2); padding: 0 .07rem 0 .03rem; border: 1px solid rgba(242, 189, 62, .4); }
.dgarrison__icon { width: .18rem; height: .18rem; object-fit: contain; }
.dgarrison__text { font-size: calc(.15 * var(--t)); line-height: 1.55; color: var(--text-hi); }
.dtag-loadout { display: inline-block; margin-left: .08rem; vertical-align: .02rem; font-size: calc(.11 * var(--t)); font-weight: 700; letter-spacing: .06em;
  padding: 0 .06rem; line-height: 1.6; background: var(--mint-500); color: #062019; }
.dmodule { display: flex; align-items: center; flex-wrap: wrap; gap: .08rem; font-size: calc(.15 * var(--t)); }
.dmodule__name { color: var(--text-hi); }
/* official module type icon (local-client art, white glyph) on a dark tile; the type letter without it */
.dmodule__icon { flex: none; display: inline-grid; place-items: center; width: .4rem; height: .4rem; background: linear-gradient(180deg, #2a322f, #151a18); border: 1px solid var(--gold-2); border: 1px solid color-mix(in srgb, var(--gold-2) 60%, transparent); }
.dmodule__icon img { width: 80%; height: 80%; object-fit: contain; }
.dmodule__icon b { font-size: calc(.2 * var(--t)); font-weight: 700; line-height: 1; color: var(--gold-2); }
.dmodule__type { font-family: var(--font-display); font-size: calc(.12 * var(--t)); letter-spacing: .1em; padding: 0 .06rem; border: 1px solid var(--line-3); color: var(--text-lo); }
.dmodule.is-none .dmodule__name { color: var(--text-dim); font-weight: 500; }
.ditem { display: flex; gap: .1rem; align-items: flex-start; }
.ditem__text { display: flex; flex-direction: column; gap: .02rem; min-width: 0; }
.ditem__text b { font-size: calc(.15 * var(--t)); }
.ditem__desc { font-size: calc(.13 * var(--t)); line-height: 1.55; color: var(--text-lo); }
.ditem__progress { display: flex; gap: .08rem; align-items: baseline; margin: .04rem 0 0; font-size: calc(.13 * var(--t)); color: var(--text-lo); }
.ditem__progress strong { color: var(--mint-500); font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dempty { font-size: calc(.14 * var(--t)); }
.dhint { display: flex; align-items: flex-start; gap: .06rem; font-size: calc(.14 * var(--t)); color: var(--text-lo); line-height: 1.6; }
.dhint .icon { width: .16rem; height: .16rem; margin-top: .03rem; flex: none; }
/* a merge-completing shop / reward card's 可晋升 destination (the tag's colour; touch shows no title — QA 6b) */
.dhint--merge { color: var(--gold); }
/* a rule the official item text leaves out (items.json `note`: 突变细胞 returns to the hand after each use) */
.dhint--rule { color: var(--text-md); }
/* 变形同构体's 天赋栏 (detailPanel MorphPairings, DESIGN §21.26): one line per bond — 【bond】 | the items that pair with it;
   本局禁用 struck through, the pairing a wearer wears highlighted. Px floors keep it readable on phones (1rem = 40 px). */
.dmorph { display: flex; flex-direction: column; gap: .05rem; font-size: max(calc(.14 * var(--t)), 9px); line-height: 1.5; color: var(--text-md); }
.dmorph__lead { margin: 0; color: var(--text-hi); }
.dmorph__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.dmorph__row { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: .06rem; align-items: baseline; padding: .02rem .06rem;
  background: rgba(255, 255, 255, .025); border-left: 2px solid transparent; }
.dmorph__bond { font-weight: 700; color: var(--mint-400); white-space: nowrap; }
.dmorph__items { min-width: 0; overflow-wrap: anywhere; }
.dmorph__row.is-off .dmorph__bond { color: var(--text-dim); text-decoration: line-through; text-decoration-color: rgba(255, 84, 84, .6); }
.dmorph__row.is-off .dmorph__items { color: var(--text-dim); }
.dmorph__row.is-worn { background: rgba(78, 216, 175, .14); border-left-color: var(--mint-400); }
.dmorph__item.is-worn { color: #fff; font-weight: 700; }
.dmorph__tag { display: inline-block; margin-left: .06rem; padding: 0 .05rem; font-size: max(calc(.11 * var(--t)), 8px); line-height: 1.5; font-weight: 700; white-space: nowrap; }
.dmorph__tag.is-on { background: var(--mint-500); color: #062019; }
.dmorph__tag.is-off { border: 1px dashed rgba(255, 255, 255, .25); color: var(--text-dim); font-weight: 500; }
.dmorph__none { margin: 0; color: var(--gold-2); }
/* a bond item's line: what it gives a 变形同构体 wearer (MorphGrantLine) */
.dhint--morph { font-size: max(calc(.14 * var(--t)), 9px); color: var(--text-md); }
.dhint--morph.is-worn { color: var(--mint-400); }
.dhint--morph.is-off { color: var(--text-dim); }
.dactions { display: flex; justify-content: flex-end; gap: .1rem; padding-top: .06rem; border-top: 1px solid var(--line); }
.dsell { margin-left: .06rem; color: #1d1400; }
.dfactions { display: flex; flex-wrap: wrap; gap: .06rem; }
.dfaction { display: inline-flex; align-items: center; gap: .04rem; font-size: calc(.13 * var(--t)); color: var(--amber); padding: 0 .08rem 0 .02rem; border: 1px solid rgba(246, 163, 41, .45); }
.dfaction img { width: .22rem; height: .22rem; object-fit: contain; }
.dabil { margin: 0; padding-left: .2rem; display: flex; flex-direction: column; gap: .05rem; font-size: calc(.15 * var(--t)); line-height: 1.6; color: var(--text-md); }
.dabil li.is-off { color: var(--text-dim); }
.dabil li.is-off .rt-term { color: var(--text-dim); border-bottom-color: transparent; }

/* ---- enemy / info drawer ---- */
.edrawer {
  --bk-c: var(--amber);
  position: absolute; left: 50%; top: 1.08rem; transform: translateX(-50%); width: 7.4rem; max-height: calc(100% - 4.4rem); z-index: 9;
  display: flex; flex-direction: column; background: rgba(11, 15, 13, .97); border: 1px solid var(--line-2); box-shadow: 0 .14rem .4rem rgba(0, 0, 0, .65);
  animation: drawer-in var(--t-slow) var(--ease-out);
}
@keyframes drawer-in { from { opacity: 0; transform: translate(-50%, -.2rem); } }
.edrawer__top { display: flex; align-items: flex-end; justify-content: space-between; padding: .08rem .12rem 0 .16rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(122, 126, 128, .5), rgba(92, 96, 98, .42) 60%, rgba(80, 84, 86, .36)); }
.edrawer__top .tabs { border-bottom: 0; }
.edrawer__close { width: .34rem; height: .34rem; margin-bottom: .06rem; display: grid; place-items: center; background: none; border: 1px solid var(--line-2); color: var(--text-lo); }
.edrawer__close .icon { width: .18rem; height: .18rem; }
.edrawer__body { overflow: auto; padding: .14rem .18rem .18rem; display: flex; flex-direction: column; gap: .12rem; }
/* 本局信息 / 敌方情报 on a landscape phone (the owner, 2026-11-29: its text, the banned-member counts and the banned
   operators' tier marks were out of proportion). At the phone's 40 px root the px floors below (readable text, the tier
   marks' 15–16 px) made those parts up to twice their neighbours — a tier mark covered most of its .54rem portrait — and
   the room left for the shop cut the drawer to ~236 px. Here the drawer keeps the desktop composition: inside it every
   size is the design's rem value again, and the whole drawer is drawn 1.4× (a transform, so taps and scrolling map),
   its layout box divided by the same factor so the drawn box ends .15rem above the screen's bottom. */
@keyframes drawer-in-phone { from { opacity: 0; transform: translate(-50%, -.2rem) scale(1.4); } }
@media (max-height: 600px) and (pointer: coarse), (max-height: 600px) and (any-pointer: coarse) {
  .edrawer {
    transform: translateX(-50%) scale(1.4); transform-origin: 50% 0;
    max-height: calc((100% - 1.23rem) / 1.4); width: min(7.4rem, calc((100% - .4rem) / 1.4));
    animation-name: drawer-in-phone;
  }
  .edrawer .uthumb .uthumb__tier { --tier-h: .26rem; }
  .edrawer .uthumb--sm .uthumb__tier { --tier-h: .24rem; }
  .edrawer .uthumb--xs .uthumb__tier { --tier-h: .18rem; }
  html[data-sp-slot~="chess_level_icon_1"] .edrawer .uthumb .uthumb__tier { --tier-h: .3rem; }
  html[data-sp-slot~="chess_level_icon_1"] .edrawer .uthumb--xs .uthumb__tier { --tier-h: .22rem; }
  html[data-sp-theme="ac_s_closur"][data-sp-slot~="chess_level_icon_1"] .edrawer .uthumb .uthumb__tier { --tier-h: .42rem; }
  html[data-sp-theme="ac_s_closur"][data-sp-slot~="chess_level_icon_1"] .edrawer .uthumb--xs .uthumb__tier { --tier-h: .3rem; }
  html[data-sp-theme="ac_n_iron"][data-sp-slot~="chess_level_icon_1"] .edrawer .uthumb .uthumb__tier { --tier-h: .2rem; }
  .edrawer .iband__desc { font-size: calc(.15 * var(--t)); }
  .edrawer .ihead { font-size: calc(.18 * var(--t)); }
  .edrawer .ihead small { font-size: calc(.14 * var(--t)); }
  .edrawer .ibond { min-height: .32rem; font-size: calc(.16 * var(--t)); }
  .edrawer .ibond__ban { font-size: calc(.12 * var(--t)); }
  .edrawer .ibond--disc { width: 1.05rem; min-height: .44rem; }
  .edrawer .ibond--disc .bglyph { width: .62rem; height: .62rem; }
  .edrawer .sw-sec__name { font-size: calc(.25 * var(--t)); }
  .edrawer .edrawer__sum { font-size: calc(.16 * var(--t)); }
  .edrawer .erow__name { font-size: calc(.18 * var(--t)); }
}
.edrawer__sum { display: flex; align-items: center; justify-content: space-between; gap: .12rem; flex-wrap: wrap; font-size: max(calc(.16 * var(--t)), 12px); color: var(--text-md); }
.edrawer__sum b { font-size: calc(.19 * var(--t)); }
.edrawer__empty { display: flex; align-items: center; gap: .08rem; justify-content: center; padding: .3rem; color: var(--text-dim); font-size: max(calc(.16 * var(--t)), 12px); }
.edrawer__empty .icon { width: .24rem; height: .24rem; }
.fchips { display: flex; gap: .06rem; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: .04rem; padding: 0 .1rem 0 .02rem; font-size: calc(.13 * var(--t)); color: var(--amber); border: 1px solid rgba(246, 163, 41, .45); background: rgba(246, 163, 41, .06); }
.fchip__icon { width: .26rem; height: .26rem; object-fit: contain; }
.elist { display: grid; grid-template-columns: 1fr 1fr; gap: .08rem; }
.erow { display: flex; align-items: center; gap: .1rem; padding: .06rem .12rem .06rem .06rem; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); text-align: left; color: inherit; transition: border-color var(--t-fast), background var(--t-fast); }
.erow:hover { border-color: var(--line-3); background: rgba(255, 255, 255, .05); }
.erow--boss { border-color: rgba(255, 110, 40, .6); background: rgba(232, 90, 26, .1); }
.erow--bounty { border-color: rgba(255, 198, 0, .45); }
.erow__text { display: flex; flex-direction: column; gap: .03rem; min-width: 0; flex: 1; }
.erow__name { font-size: max(calc(.18 * var(--t)), 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erow__tags { display: flex; gap: .04rem; flex-wrap: wrap; }
.erow__count { font-size: calc(.26 * var(--t)); color: #fff; }
.etag { font-size: calc(.11 * var(--t)); line-height: 1.5; padding: 0 .05rem; font-weight: 700; }
.etag--boss { background: var(--orange); color: #fff; }
.etag--bounty { background: var(--gold); color: #1d1400; }
.etag--escort { background: var(--bg-4); color: var(--text-md); }
.etag--elite { background: var(--gold-2); color: #1d1400; }
.etag--fly { background: #2c4a63; color: #cfe8ff; }
.etag--faction { border: 1px solid rgba(246, 163, 41, .5); color: var(--amber); font-weight: 500; }
.eboss { display: flex; gap: .12rem; align-items: center; padding: .1rem .12rem; border: 1px solid rgba(255, 110, 40, .45); background: linear-gradient(90deg, rgba(232, 90, 26, .14), transparent); }
.eboss > div { display: flex; flex-direction: column; gap: .02rem; }
.eboss b { font-size: calc(.19 * var(--t)); }
.eboss .t-lo { font-size: calc(.13 * var(--t)); }
.iband { display: flex; gap: .12rem; align-items: flex-start; padding: .1rem; background: rgba(78, 216, 175, .05); border: 1px solid var(--mint-800); }
.iband > div { display: flex; flex-direction: column; gap: .03rem; min-width: 0; }
.iband b { font-size: calc(.19 * var(--t)); }
.iband b small { font-size: calc(.14 * var(--t)); font-weight: 400; margin-left: .06rem; }
.iband__desc { font-size: max(calc(.15 * var(--t)), 12px); line-height: 1.6; color: var(--text-md); }
.istage { display: flex; align-items: center; gap: .06rem; font-size: calc(.15 * var(--t)); color: var(--text-lo); }
.istage .icon { width: .18rem; height: .18rem; color: var(--mint-500); }
.istage b { color: var(--text-hi); }
.ihead { font-size: max(calc(.18 * var(--t)), 13px); color: var(--mint-400); display: flex; gap: .08rem; align-items: baseline; flex-wrap: wrap; }
.ihead small { color: var(--text-lo); font-size: max(calc(.14 * var(--t)), 12px); }
.ibonds { display: flex; flex-wrap: wrap; gap: .06rem; }
.ibond { display: inline-flex; align-items: center; gap: .05rem; min-height: max(.32rem, 28px); padding: .03rem .08rem .03rem .04rem; font-size: max(calc(.16 * var(--t)), 12px); border: 1px solid var(--line-2); background: transparent; color: var(--text-md); text-align: left; }
.ibond:hover, .ibond:focus-visible { border-color: var(--mint-400); background: rgba(23, 249, 183, .06); }
.ibond.is-off { color: var(--text-dim); background: rgba(255, 255, 255, .02); text-decoration: line-through; text-decoration-color: rgba(255, 84, 84, .6); }
.ibond.is-off .bglyph img { filter: grayscale(1) brightness(.5); }
.ibond__ban { display: inline-flex; align-items: center; gap: .02rem; font-size: max(calc(.12 * var(--t)), 11px); padding: 0 .05rem; background: var(--red); color: #fff; text-decoration: none; }
.ibond__ban .icon { width: .12rem; height: .12rem; }
/* [ASSUMED] 规程 本局信息 draws the same chips as the briefing discs (lit first, grey when off, a red ring when
   some members are banned). The name span and .ibond__ban stay so the match-info checks still read them. */
.ibonds--disc { gap: .12rem .1rem; }
.ibond--disc {
  position: relative; flex-direction: column; justify-content: flex-start; align-items: center;
  width: max(1.05rem, calc(52px * var(--sp-ui, 1)), 32px); min-height: max(.44rem, calc(44px * var(--sp-ui, 1)), 32px); padding: .02rem .04rem 0; border: 0; background: none;
  text-align: center; gap: .04rem;
}
.ibond--disc .bglyph {
  width: max(.62rem, calc(36px * var(--sp-ui, 1)), 32px); height: max(.62rem, calc(36px * var(--sp-ui, 1)), 32px); border-radius: 50%;
  background: radial-gradient(circle, #f6faf9 0 42%, #d3dddb 64%, #9fb1ae 100%);
  box-shadow: 0 0 .12rem rgba(220, 240, 236, .35);
}
.ibond--disc .bglyph img { filter: brightness(0); opacity: .82; }
.ibond--disc > span:not([class]) { max-width: 100%; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.ibond--disc:hover, .ibond--disc:focus-visible { background: none; border-color: transparent; }
.ibond--disc:hover .bglyph, .ibond--disc:focus-visible .bglyph { box-shadow: 0 0 0 2px var(--mint-400); }
.ibond--disc.is-off { text-decoration: none; background: none; color: var(--text-dim); }
.ibond--disc.is-off .bglyph { background: #3a403e; box-shadow: none; }
.ibond--disc.is-off .bglyph img { filter: grayscale(1) brightness(.55); opacity: .7; }
.ibond--disc .ibond__ban { position: absolute; top: 0; right: 0; }
.ibanned { display: flex; flex-wrap: wrap; gap: .06rem; }
.ibanned__one { padding: 0; background: none; border: 0; }
/* 0.2.0: the player's own 自选 pieces out of the shop this match (ui/matchInfo.js DiyBannedLine) */
.idiybanned { margin: .08rem 0 0; font-size: calc(.13 * var(--t)); line-height: 1.5; }
.idiybanned .diybanned__tag { display: inline-block; margin-right: .05rem; padding: 0 .05rem; font-size: calc(.11 * var(--t)); font-weight: 700;
  background: var(--mint-500); color: var(--text-on-mint); }

/* ---- 机变 overlay ---- */
.spov { position: absolute; inset: 0 0 0 2.8rem; z-index: 20; }
/* the corner's buttons stay left of the veil (§35.51: in one row at 1280–1920 px 「玩法说明」 sat half and 「全屏」 wholly under it
   — the HUD is below the overlay): they wrap upwards within the 2.8rem column, as a phone's always do (devices.css) */
@media (min-width: 768px) {
  .gm.has-sp .gm__corner { flex-wrap: wrap-reverse; align-content: flex-start; max-width: calc(2.8rem - .24rem - .1rem); }}
.gm.has-sp .gm__bonds, .gm.has-sp .gm__effects { opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
.spov__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 10, .58) 0, rgba(8, 10, 10, .8) .5rem, rgba(8, 10, 10, .82)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); border-left: 1px solid var(--line); }
.spov__inner { position: absolute; left: .3rem; right: .5rem; top: 1.14rem; bottom: .5rem; display: flex; flex-direction: column; gap: .16rem; animation: screen-in var(--t-slow) var(--ease-out); }
/* 收起 at the overlay's right edge (official 机密商店) and the collapsed draft's 展开 button in its place */
/* its width is set from its parts (2 × .12rem padding, the border, 「收起」 at .15 × --t ≈ .3 × --t) so the grid can keep clear of
   it (spov__grid--collapse): it covered the third column's edge, more with a larger 文字大小 (the owner's 悬赏决策, 2026-11-15) */
.spov__collapse { position: absolute; right: -.42rem; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center;
  box-sizing: border-box; width: calc(.32 * var(--t) + .24rem + 2px);
  gap: .05rem; padding: .14rem .12rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: .03rem; font: inherit; font-size: calc(.15 * var(--t));
  font-weight: 700; color: var(--text-hi, #fff); background: rgba(20, 24, 24, .88); cursor: var(--sp-cursor-pointer, pointer); }
.spov__collapse .icon { width: calc(.26 * var(--t)); height: calc(.26 * var(--t)); }
.spov__collapse:hover { border-color: var(--mint-400); }
.spov-pill { position: absolute; right: .12rem; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; align-items: center;
  gap: .05rem; max-width: 1rem; padding: .14rem .12rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: .03rem; font: inherit;
  font-size: calc(.15 * var(--t)); color: var(--text-hi, #fff); background: rgba(20, 24, 24, .9); cursor: var(--sp-cursor-pointer, pointer); }
.spov-pill .icon { width: calc(.26 * var(--t)); height: calc(.26 * var(--t)); }
.spov-pill__name { font-size: calc(.12 * var(--t)); color: var(--text-md); text-align: center; }
.spov-pill.is-turn { border-color: var(--mint-400); box-shadow: 0 0 .12rem rgba(23, 249, 183, .45); }
.spov__head { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
/* 「悬赏决策 |」 then the description over the timing line, beside the bar; a faint bracket behind the title */
.spov__titles { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .16rem; row-gap: .02rem;
  align-items: center; padding: .08rem 0 .08rem .3rem; }
.spov__deco { position: absolute; left: 0; top: -.06rem; bottom: -.06rem; width: .7rem; border: 2px solid rgba(23, 249, 183, .16); border-right: 0; pointer-events: none; }
.spov__deco::after { content: ''; position: absolute; left: .14rem; top: 50%; width: .9rem; height: .9rem; margin-top: -.45rem; border-radius: 50%; border: 1px solid rgba(23, 249, 183, .1); }
.spov__title { display: contents; font-size: calc(.56 * var(--t)); font-weight: 900; letter-spacing: .08em; color: var(--mint-400); text-shadow: 0 0 .2rem rgba(23, 249, 183, .3); }
.spov__title.is-special { color: var(--gold-2); text-shadow: 0 0 .2rem rgba(242, 189, 62, .35); }
.spov__name { grid-row: 1 / 3; grid-column: 1; line-height: 1.1; }
/* the bar keeps its "|" for the text of the heading, drawn as a 3px rule */
.spov__bar { grid-row: 1 / 3; grid-column: 2; align-self: stretch; width: 3px; margin: .08rem 0; overflow: hidden; color: transparent; background: var(--mint-400); font-size: 0; }
.spov__title.is-special .spov__bar { background: var(--gold-2); }
.spov__desc { grid-row: 1; grid-column: 3; align-self: end; font-size: calc(.26 * var(--t)); font-weight: 700; color: #d6fbef; letter-spacing: .04em; text-shadow: none; }
.spov__sub { grid-row: 2; grid-column: 3; align-self: start; font-size: calc(.15 * var(--t)); color: #a2aaa8; }
.spov__turn { display: flex; align-items: center; gap: .24rem; }
/* the header's text keeps each language's breaking rules, as the room and the hub do (§35.51 review: on phones the
   narrower column moved Korean 「처|치」 and Japanese 「カ|ード」 breaks around) */
.spov__head:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
.spov__head:lang(ja) { line-break: strict; }
/* … and so do the cards' texts (§35.56: Korean 「이 존재|할 경우」, 「오퍼레이터|일 경우」 broke inside words on every phone
   size); a word longer than its line still breaks */
.spov .rt:lang(ko), .spov .rt-note:lang(ko), .spov .rt-vup:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
.spov .rt:lang(ja), .spov .rt-note:lang(ja), .spov .rt-vup:lang(ja) { line-break: strict; }
/* short landscape phones (≤ 520 px tall): the timing line goes under the title, across the whole title block, and the
   title is capped, so neither runs under 「当前轮到你决策」 (§35.56: English 「If no choice is made before…」 over 「Your turn to
   decide」 at 中 – 特大 on phones up to 844×390, both variants; at 特大 「Equipment Supply」 left the description one word a
   line). Each cap grows a pixel or two a step above 中 (--t-step). [ASSUMED] the caps */
@media (max-height: 520px) {
  .spov__titles { flex: 1 1 auto; min-width: 0; }
  .spov__sub { grid-row: 3; grid-column: 1 / -1; margin-top: .04rem; }
  .spov__title { font-size: min(calc(.56 * var(--t)), calc(26px + 2 * var(--t-step))); }
  .spov__desc { font-size: min(calc(.26 * var(--t)), calc(15px + var(--t-step))); }
  .spov__sub { font-size: min(calc(.15 * var(--t)), calc(10px + var(--t-step) / 2)); }
  /* at 大 / 特大 the description goes under the name too (beside it, English 「Obtain equipment…」 took one word a line
     and ran under 「Your turn to decide」) */
  :root[data-text="lg"] .spov__bar, :root[data-text="xl"] .spov__bar { display: none; }
  :root[data-text="lg"] .spov__name, :root[data-text="xl"] .spov__name { grid-row: 1; }
  :root[data-text="lg"] .spov__desc, :root[data-text="xl"] .spov__desc { grid-row: 2; grid-column: 1 / -1; align-self: start; }}
.spov__turntxt { display: flex; align-items: center; gap: .08rem; font-size: calc(.24 * var(--t)); font-weight: 700; color: var(--text-md); }
.spov__turntxt .icon { width: .26rem; height: .26rem; }
.spov__turntxt.is-mine { color: var(--mint-400); text-shadow: 0 0 .16rem rgba(23, 249, 183, .45); animation: blink 1.2s ease-in-out infinite; }
.spov__turntxt.is-done { color: var(--mint-400); }
/* someone else deciding: the name over 正在决策…, right-aligned, an hourglass beside them */
.spov__turntxt.is-other { gap: .12rem; color: #eef1f0; }
.spov__turntxt.is-other .icon { width: .34rem; height: .34rem; }
.spov__tw { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.spov__tw b { max-width: 2.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(.22 * var(--t)); font-weight: 700; color: #f2f5f4; }
.spov__tw small { font-size: calc(.17 * var(--t)); font-weight: 400; color: #c2c8c6; }
.spov__turn .countdown { padding-left: .22rem; border-left: 1px solid rgba(220, 228, 225, .22); }
.spov__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: .2rem; }
/* the part of 收起 that is not in the .42rem it hangs out, plus a gap */
.spov__grid.spov__grid--collapse { margin-right: max(0px, calc(.32 * var(--t) + .24rem + 2px - .42rem + .06rem)); }
/* the shared draft (the official 悬赏决策, the event's video 9:59): the grid keeps clear of the right-hand HUD; the top bar
   stays (the round, the funds and the timer stay readable while the others pick) */
@media (min-height: 432px) {
  .gm.has-spdraft .spov__inner { right: 1.5rem; bottom: .62rem; }
  .gm.has-spdraft .spov__grid { gap: .46rem .6rem; padding: .14rem .1rem 0 .06rem; }}
.spov__grid--3 { grid-template-columns: repeat(3, minmax(0, 4.3rem)); grid-template-rows: minmax(0, 4.6rem); justify-content: center; align-content: start; gap: .36rem; margin-top: .3rem; }
.spov__grid--3 .spcard__icon { width: 1.3rem; height: 1.3rem; }
/* The official card (research 06 §11.5; the official 悬赏 / 机密商店 / 战术 screenshots): a framed icon at the top-left
   with the bold name beside it, the effect text under both across the card, left-aligned; the tier chip on the icon's
   corner, the taker's round avatar at the top-right (user playtest #6 item 6: the centred icon + name used to push the
   text out of a phone-sized card). --sp-px: the card's side padding; --tk / --tk-at: the taker avatar's size / inset. */
/* The event's look (video 9:59 and its screenshot): a charcoal card in a light 2px frame with a second card peeking out
   behind it (--sp-back: two offset shadows — the dark face and its light edge — only visible outside the card), the
   picture square and unframed; the taker's avatar sits on the top-right corner. */
.spcard {
  --sp-px: .2rem; --tk: .5rem; --tk-at: -.14rem;
  --sp-back: .07rem -.08rem 0 -2px rgba(44, 46, 46, .94), .07rem -.08rem 0 0 rgba(206, 210, 208, .42);
  position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .16rem; padding: .18rem var(--sp-px); text-align: left;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .014) 0 2px, transparent 2px 5px), radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .04), transparent 60%), rgba(35, 36, 36, .96);
  border: 2px solid rgba(226, 229, 228, .86); color: var(--text-hi); box-shadow: var(--sp-back);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), background var(--t-fast), opacity var(--t-med);
}
.spcard__glow { display: none; }
.spcard.is-pickable { cursor: var(--sp-cursor-pointer, pointer); }
.spcard.is-pickable:hover { transform: translateY(-.06rem); border-color: #fff; box-shadow: var(--sp-back), 0 .1rem .3rem rgba(0, 0, 0, .5), 0 0 .2rem rgba(255, 255, 255, .12); }
.spcard:disabled { cursor: var(--sp-cursor-default, default); }
/* a taken card turns flat grey, its text still legible (the event's video 10:01) */
.spcard.is-taken { background: rgba(178, 182, 180, .58); border-color: rgba(232, 235, 234, .62); }
.spcard.is-taken > :not(.spcard__taker) { opacity: .62; filter: grayscale(.6); }
.spcard.is-mine { border-color: var(--mint-400); box-shadow: inset 0 0 0 1px var(--mint-400); }
.spcard.is-mine > :not(.spcard__taker) { opacity: 1; filter: none; }
.spcard__tier { position: absolute; left: .08rem; top: .08rem; z-index: 1; }
.spcard__head { flex: none; display: flex; align-items: center; gap: .18rem; min-width: 0; }
.spcard__icon { width: 1rem; height: 1rem; display: grid; place-items: center; flex: none; padding: .04rem;
  border: 2px solid rgba(214, 228, 222, .7); background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .1), rgba(0, 0, 0, .32)); }
.spcard__icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .06rem .12rem rgba(0, 0, 0, .6)); }
.spcard__icon .icon { width: 60%; height: 60%; color: var(--mint-500); }
.spcard--bounty .spcard__icon { padding: 0; border: 1px solid rgba(255, 255, 255, .2); background: #4b4d4d; }
.spcard--bounty .spcard__icon img { object-fit: cover; filter: none; }
/* the official bounty card names its tier in the name (悬赏·频次II) and its pay in the text: no chip, no coin tag */
.spcard--bounty .spcard__tier, .spcard--bounty .spcard__tag--coin { display: none; }
.spcard__title { display: flex; flex-direction: column; align-items: flex-start; gap: .06rem; min-width: 0; }
.spcard__name { font-size: .27rem; font-weight: 700; letter-spacing: .04em; line-height: 1.25; color: #f4f6f5; }
/* the effect text: the official rich text (highlighted numbers, set bonuses, line breaks), clamped by lines — 7 fit a 3×2
   card (the longest item, 信标, takes 7 at 16:9 and on phones narrower than ≈ 740 px); it never shrinks below them
   (flex: none) */
/* line-height 1.3 / 8 lines (as on phones): the longest supply text, 海沟实验体, takes 8 lines in the web font at 16:9 and
   the card's room is about 8.3 of them — playtest #6 item 6 wants every card's whole text inside the card; the bottom
   padding holds the last line's highlighted words, whose glyphs are a little taller than a 1.3 line */
.spcard__desc { flex: none; font-size: .2rem; line-height: 1.3; color: #c3c7c6; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: .12em; }
.spov__grid--3 .spcard__desc { -webkit-line-clamp: 10; }
.spcard__tags { display: flex; flex-wrap: wrap; gap: .06rem; }
.spcard__tag { font-size: .13rem; font-weight: 700; padding: .01rem .08rem; }
.spcard__tag--team { background: var(--mint-500); color: var(--text-on-mint); }
.spcard__tag--coin { background: var(--gold); color: #1d1400; }
/* the taker's badge: the round avatar alone at the card's top-right corner, as in the official screenshots (the player's
   name is its tooltip and part of the card's accessible name); a taken card's head keeps clear of it, so a long name
   wraps before the badge instead of running under it (the avatar + name pill of v2.4.1 covered long names once the name
   moved into the top row) */
.spcard__taker { position: absolute; right: var(--tk-at); top: var(--tk-at); z-index: 1; display: block; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(8, 11, 10, .9), 0 .04rem .12rem rgba(0, 0, 0, .6); }
.spcard__taker .pavatar { --pa: var(--tk); border-radius: 50%; overflow: hidden; border: 2px solid var(--mint-400); }
.spcard.is-taken .spcard__taker { filter: none; }
.spcard.is-taken .spcard__head { padding-right: calc(var(--tk) + var(--tk-at) - var(--sp-px) + .08rem); }
/* the card being picked (g.choice in flight): mint frame + a 选择中 strip with the sweeping busy bar of the buttons
   (components.css btn-busy) — no spinner over the card's text (user playtest #3 item 9) */
.spcard.is-busy { border-color: var(--mint-400); box-shadow: inset 0 0 0 1px var(--mint-400); }
.spcard__busy {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .05rem 0 .08rem; overflow: hidden; pointer-events: none;
  font-size: .14rem; font-weight: 700; letter-spacing: .2em; color: var(--mint-400); background: rgba(8, 11, 10, .85);
}
.spcard__busy::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40%; height: 2px; background: var(--mint-400); animation: btn-busy 1.1s var(--ease-in-out) infinite; }
/* two-tap pick (user playtest #4 item 2 — the shop's confirm language, game-shop.css .scard.is-armed): the selected card
   lifts in a white frame with a white ☑ 确认选择 · 再次点击 strip along its foot (the event's video 10:16); the others
   dim; the header shows 确认选择 */
.spcard.is-armed, .spcard.is-armed:hover {
  z-index: 2; transform: translateY(-.1rem) scale(1.03); border-color: #f2f5f4;
  background: linear-gradient(180deg, rgba(30, 33, 33, .96), rgba(22, 24, 24, .96));
  box-shadow: 0 0 0 2px #f2f5f4, var(--sp-back), 0 .14rem .32rem rgba(0, 0, 0, .6), 0 0 .3rem rgba(255, 255, 255, .22);
}
.spov.has-armed .spcard.is-pickable:not(.is-armed) { filter: brightness(.7); }
.spov.has-armed .spcard.is-pickable:not(.is-armed):hover { filter: none; }
.spcard__confirm {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: .1rem;
  padding: .06rem 0 .07rem; background: linear-gradient(0deg, #e4e8e7, #f7f9f8); color: #1b1e1e; pointer-events: none;
  animation: confirm-in var(--t-fast) var(--ease-out);
}
.spcard__cbox { flex: none; display: grid; place-items: center; width: .2rem; height: .2rem; border: 2px solid currentColor; border-radius: 2px; }
.spcard__cbox .icon { width: .16rem; height: .16rem; }
.spcard__confirm b { font-size: .2rem; font-weight: 900; letter-spacing: .22em; padding-left: .22em; }
.spcard__confirm small { font-size: .12rem; letter-spacing: .1em; opacity: .6; }
.spov__confirm { animation: pulse-gold 1.2s var(--ease-in-out) infinite; }
/* Short landscape phones (height < 10.8rem: the root size is clamped at 40 px, theme.css, so the page is only ≈ 9rem
   tall): a tighter header (smaller margins) gives the grid ≈ .65rem more, and a smaller icon
   and tighter spacing leave a 3×2 card room for 7 lines of text (≈ 4 – 5.4 × 2.9rem: 162 × 116 px at 640×360, the
   smallest supported phone; 201 × 119 at 756×366, the user's Android) — every shop item, bounty and tactic text fits in
   full, taken or not (test/ui/playtest6-ui.e2e.test.js). */
@media (max-height: 431.98px) {
  .spov__inner { top: .84rem; bottom: .22rem; gap: .1rem; }
  .spov__grid { gap: .12rem; }
  .spcard { --sp-px: .12rem; --tk: .4rem; --tk-at: .04rem; gap: .06rem; padding: .08rem var(--sp-px); }
  .spcard__tier { left: .03rem; top: .03rem; }
  .spcard__head { gap: .12rem; }
  .spcard__icon { width: .72rem; height: .72rem; padding: .02rem; }
  .spov__grid--3 .spcard__icon { width: 1rem; height: 1rem; }
  .spcard__name { font-size: .23rem; }
  .spcard__desc { font-size: .19rem; }
  .spov__grid--3 .spcard__desc { -webkit-line-clamp: 10; }}
/* 「轮到你选」 (ui/turnPopup.js): the official effectChoose/* sprites around the middle of the screen, in design px of the
   1920×1080 footage (--px, fitted to the viewport; offsets from the centre). Pops in, holds, fades: 1.2 s. */
.sptp {
  --px: min(.01rem, calc(100vw / 1920), calc(100vh / 1080));
  position: fixed; left: 50%; top: 50%; z-index: var(--z-banner); width: 0; height: 0; pointer-events: none;
  animation: sptp-out 1200ms linear both;
}
.sptp img { position: absolute; display: block; max-width: none; }
.sptp__disc { position: absolute; left: calc(-265 * var(--px)); top: calc(-295 * var(--px)); width: calc(540 * var(--px)); height: calc(500 * var(--px));
  animation: sptp-disc 220ms cubic-bezier(.2, .8, .3, 1) both; }
.sptp__bg { inset: 0; width: 100%; height: 100%; }
.sptp__ring { position: absolute; left: calc(43 * var(--px)); top: calc(23 * var(--px)); width: calc(454 * var(--px)); height: calc(454 * var(--px)); border-radius: 50%;
  background: radial-gradient(closest-side, transparent 63%, rgba(31, 230, 190, .3) 64%, rgba(31, 230, 190, .3) 70%, transparent 71%,
    transparent 83%, rgba(31, 230, 190, .26) 84%, rgba(31, 230, 190, .18) 99%, transparent 100%); }
.sptp__cube { left: calc(-62 * var(--px)); top: calc(-146 * var(--px)); width: calc(131 * var(--px)); height: calc(134 * var(--px));
  animation: sptp-pop 260ms ease-out both; }
.sptp__spark { left: calc(-111 * var(--px)); top: calc(-174 * var(--px)); width: calc(64 * var(--px)); height: calc(64 * var(--px));
  animation: sptp-pop 260ms 40ms ease-out both; }
.sptp__text { position: absolute; left: calc(-200 * var(--px)); top: calc(9 * var(--px)); width: calc(408 * var(--px)); text-align: center; white-space: nowrap;
  color: #2ee6c0; font-size: calc(72 * var(--px)); font-weight: 900; line-height: 1; letter-spacing: .02em;
  text-shadow: 0 0 calc(16 * var(--px)) rgba(31, 230, 190, .55); animation: sptp-pop 200ms 60ms ease-out both; }
.sptp__bar { left: calc(-134 * var(--px)); top: calc(99 * var(--px)); width: calc(279 * var(--px)); height: calc(17 * var(--px));
  animation: sptp-in 200ms 120ms ease-out both; }
.sptp__x { width: calc(30 * var(--px)); height: calc(31 * var(--px)); opacity: .8; animation: sptp-in 200ms 120ms ease-out both; }
.sptp__x--tl { left: calc(-195 * var(--px)); top: calc(-144 * var(--px)); }
.sptp__x--tr { left: calc(176 * var(--px)); top: calc(-144 * var(--px)); }
.sptp__x--bl { left: calc(-195 * var(--px)); top: calc(84 * var(--px)); }
.sptp__x--br { left: calc(176 * var(--px)); top: calc(84 * var(--px)); }
@keyframes sptp-out { 0%, 87.5% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sptp-disc { from { opacity: 0; transform: scale(.72); } }
@keyframes sptp-pop { from { opacity: 0; transform: scale(1.25); filter: brightness(1.8); } }
@keyframes sptp-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sptp { display: none; }}
/* The narrowest of them (640×360): with Noto Sans SC — the page's web font and Android's CJK font — the longest text
   (海沟实验体) wraps to 8 lines in a 162 px card, one more than the clamp; a slightly tighter line height gives the 8th
   line room (QA, playtest #6). */
@media (max-height: 431.98px) and (max-width: 699.98px) {
  .spcard__desc { line-height: 1.3; -webkit-line-clamp: 8; }}

/* Grid image boxes: definite 100% tracks so `height: 100%` images resolve against the box (an auto track would
   let non-square art overflow its frame). */
.uthumb__art, .bandicon, .dhead__icon, .spcard__icon, .effect, .pavatar__img, .brief-faction__icon, .scard__itemart, .bglyph {
  grid-template-rows: 100%;
  grid-template-columns: 100%;
}
.spcard__icon img, .dhead__icon img, .scard__itemart img, .effect img { max-width: 100%; max-height: 100%; }

/* ---- direction wheel (ui/facingWheel.js, research 09 §1.2): white diamond, 4 chevrons, "✕ 点击取消", orange range ---- */
.fwheel { position: fixed; inset: 0; z-index: 6; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
/* the wheel takes the keyboard focus when it opens (Enter confirms there, GitHub #394): no ring around the whole screen */
.fwheel:focus-visible { outline: none; }
.fwheel__stripes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fwheel__dia { position: absolute; transform: translate(-50%, -50%); pointer-events: none; animation: fwheel-in 160ms var(--ease-out); }
@keyframes fwheel-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.82); } }
.fwheel__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 .05rem rgba(0, 0, 0, .75)); }
.fwheel__outer { fill: rgba(8, 12, 10, .1); stroke: #fff; stroke-width: 2.4px; vector-effect: non-scaling-stroke; }
.fwheel__quad { fill: transparent; transition: fill var(--t-fast); }
/* only the chevron lights (research 09 §1.2): a tinted quadrant would wash out the units standing under the diamond */
.fwheel__quad.is-on { fill: transparent; }
.fwheel__inner { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .9); stroke-width: 1.6px; vector-effect: non-scaling-stroke; }
.fwheel.is-pressed .fwheel__inner { fill: rgba(255, 255, 255, .1); }
.fwheel__chev path { fill: rgba(255, 255, 255, .92); transform-box: fill-box; transform-origin: center; transition: transform var(--t-fast), fill var(--t-fast); }
.fwheel__chev.is-on path { fill: #ffae3d; transform: scale(1.4); filter: drop-shadow(0 0 3px rgba(255, 156, 51, .9)); }
.fwheel__cancel {
  position: absolute; left: 25%; top: 25%; transform: translate(-92%, -118%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: .05rem; padding: .03rem .1rem .03rem .05rem; white-space: nowrap;
  background: var(--red); border: 0; color: #fff; font-size: .15rem; font-weight: 700; letter-spacing: .06em; cursor: var(--sp-cursor-pointer, pointer);
  clip-path: polygon(0 0, 100% 0, 100% 70%, calc(100% - .08rem) 100%, 0 100%); box-shadow: 0 .03rem .1rem rgba(0, 0, 0, .5);
}
.fwheel__cancel:hover { background: #ff4a2b; }
.fwheel__x { width: .18rem; height: .18rem; filter: brightness(0) invert(1); }
.fwheel__x--txt { display: grid; place-items: center; filter: none; font-size: .14rem; }
.fwheel__tip {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, .08rem); white-space: nowrap; pointer-events: none;
  padding: .04rem .16rem; background: rgba(8, 11, 10, .9); border: 1px solid rgba(255, 156, 51, .6); color: #ffc27a; font-size: .15rem; letter-spacing: .08em;
}
.fwheel__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the temp overflow row's notice (ui/underframe.js TempRowNotice, user playtest #3 item 3): a dashed red frame
   around 临时整备区 and a label at its end. Over the field, under every HUD panel (.gm__hud z 3), never takes the
   pointer (the pieces under it stay draggable). ---- */
.tempnote { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.tempnote * { pointer-events: none; }
.tempnote__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tempnote__frame polygon {
  fill: rgba(255, 60, 40, .1); stroke: #ff5a47; stroke-width: 2.2px; stroke-dasharray: 9 5; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 .05rem rgba(255, 60, 40, .7)); animation: tempnote-pulse 1.6s ease-in-out infinite;
}
@keyframes tempnote-pulse { 50% { opacity: .55; } }
.tempnote__label {
  position: absolute; transform: translate(-100%, -50%); display: flex; flex-direction: column; gap: .02rem; max-width: 2.9rem;
  padding: .06rem .12rem .07rem .1rem; background: rgba(40, 6, 6, .9); border: 1px solid rgba(255, 90, 71, .75); border-left: 3px solid #ff5a47;
  box-shadow: 0 .04rem .16rem rgba(0, 0, 0, .6); color: #ffdcd6; animation: tempnote-in var(--t-med) var(--ease-out);
}
@keyframes tempnote-in { from { opacity: 0; } }
.tempnote__label.is-right { transform: translate(0, -50%); border-left-width: 1px; border-right: 3px solid #ff5a47; }
.tempnote__title { display: flex; align-items: center; gap: .05rem; font-size: .15rem; font-weight: 700; color: #fff; white-space: nowrap; }
.tempnote__title .icon { width: .17rem; height: .17rem; color: #ff6a55; flex: none; }
.tempnote__title .num { color: #ff8a78; font-size: .17rem; }
.tempnote__rule { font-size: .12rem; line-height: 1.45; color: rgba(255, 220, 214, .88); }
@media (prefers-reduced-motion: reduce) { .tempnote__frame polygon, .tempnote__label { animation: none; }}
.sp-reduced-motion .tempnote__frame polygon, .sp-reduced-motion .tempnote__label { animation: none; }
.tempnote--equipment .tempnote__label { border-color: #a7cabd; color: #dceee8; background: rgba(18, 33, 30, .92); }
.tempnote--equipment .tempnote__rule { color: #dceee8; }
/* 0.2.0 补位: 「替补：X」 under the player's own prep pieces of a chess they do not own (screens/game/standInTags.js) */
.sitags { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.sitag { position: absolute; transform: translate(-50%, .02rem); pointer-events: none; white-space: nowrap; font-size: max(.12rem, 9px); font-weight: 700;
  line-height: 1.35; padding: 0 .05rem; letter-spacing: .03em; background: var(--ice); color: var(--ice-900); box-shadow: 0 1px 3px rgba(0, 0, 0, .7); opacity: .92; }
.sitag--board { background: #c2e3ff; }
.sitag--diy { background: var(--mint-500); color: var(--text-on-mint); }
.gm.is-dragging .sitags { display: none; }

/* ---- underframe: the selection diamond of a tapped own piece (ui/underframe.js): 撤退 / 出售 +N / 销毁 ----
   It sits above every HUD panel (detail card z 9, bond popup, drawer, shop bar): only its buttons take pointer events,
   so they are never covered (user playtest #2 item 8); overlays that must win (机变, modals, the drag ghost) are higher. */
/* tileScreen returns viewport coordinates, including screen-fit offsets (#889). */
.gm__hud > .uframe { position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 12; }
.uframe__dia { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: uframe-in 180ms var(--ease-out); }
@keyframes uframe-in { from { opacity: 0; transform: scale(.85); } }
.uframe__outer { fill: rgba(78, 216, 175, .05); stroke: rgba(255, 255, 255, .88); stroke-width: 1.6px; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; }
.uframe__corner { fill: none; stroke: var(--mint-400); stroke-width: 2.4px; vector-effect: non-scaling-stroke; }
.uframe__btn {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: .02rem;
  padding: 0; background: none; border: 0; color: #fff; cursor: var(--sp-cursor-pointer, pointer); filter: drop-shadow(0 .03rem .06rem rgba(0, 0, 0, .8));
  animation: uframe-in 200ms var(--ease-out);
}
.uframe__btn:disabled { opacity: .5; cursor: var(--sp-cursor-default, default); }
.uframe__btn--retreat { left: 25%; top: 25%; transform: translate(-80%, -90%); }
.uframe__btn--sell, .uframe__btn--destroy { left: 75%; top: 25%; transform: translate(-20%, -90%); }
/* the octagon plate every button stands on (the official util_btn plates are octagons) */
.uframe__glyph, .uframe__plate {
  width: .56rem; height: .56rem; padding: .08rem; box-sizing: border-box;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.uframe__glyph { background: var(--red); fill: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
/* coloured plates: tone colour through the official sprite's shape (mask), dark backing through its glyph cut-out */
.uframe__plate { --uf-tone: linear-gradient(180deg, #ffd06a 0%, #f6a329 55%, #d9820c 100%); --uf-ink: #1d1400;
  position: relative; display: grid; place-items: center; padding: 0; background: var(--uf-ink); }
.uframe__plate--destroy { --uf-tone: linear-gradient(180deg, #ff6a4f 0%, #e73118 60%, #b8200d 100%); --uf-ink: #230703; }
.uframe__plate.has-mask::after {
  content: ''; position: absolute; inset: 0; background: var(--uf-tone);
  -webkit-mask: var(--uf-mask) center / 100% 100% no-repeat; mask: var(--uf-mask) center / 100% 100% no-repeat;
}
.uframe__plate.is-glyph { background: var(--uf-tone); }
.uframe__pglyph { width: 64%; height: 64%; color: var(--uf-ink); }
.uframe__btn:hover:not(:disabled) .uframe__glyph { background: #ff4a2b; }
.uframe__btn:hover:not(:disabled) .uframe__plate { filter: brightness(1.12) drop-shadow(0 0 .08rem rgba(255, 198, 90, .7)); }
.uframe__btn--destroy:hover:not(:disabled) .uframe__plate { filter: brightness(1.12) drop-shadow(0 0 .08rem rgba(255, 90, 60, .7)); }
.uframe__label { font-size: .14rem; font-weight: 700; letter-spacing: .12em; white-space: nowrap; padding: 0 .06rem; background: rgba(8, 11, 10, .82); text-shadow: 0 1px 2px #000; }
.uframe__btn--sell .uframe__label { color: #ffd98a; }
.uframe__price { position: absolute; right: -.12rem; top: -.06rem; --hex-h: .24rem; }

/* ---- equip-replace dialog (js/ui/equipReplace.js; official equip_replace_* sprites via --eqr-* when installed) ---- */
.eqr-host { display: contents; }
.modal__box.eqr {
  --bk-c: var(--red-premium);
  background: rgba(14, 14, 18, .98);
  background: var(--eqr-bg, none) center / cover no-repeat, repeating-linear-gradient(0deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 3px), linear-gradient(180deg, #17171c, #0d0d11);
  border-color: rgba(255, 84, 84, .35);
}
.eqr .modal__body { display: flex; flex-direction: column; align-items: stretch; gap: .1rem; padding-bottom: .16rem; }
.eqr__lead { font-size: calc(.17 * var(--t)); line-height: 1.6; color: var(--text-md); }
.eqr__lead b { color: var(--text-hi); }
.eqr__lead .t-red { color: var(--red-premium); }
.eqr__top { display: flex; align-items: center; justify-content: center; gap: .22rem; margin-top: .06rem; }
.eqr__op { display: flex; flex-direction: column; align-items: center; gap: .05rem; flex: none; width: 1.1rem; }
.eqr__ava {
  position: relative; display: grid; place-items: center; width: .96rem; height: .96rem;
  background: var(--eqr-ava, linear-gradient(160deg, #26262c, #111114)) center / 100% 100% no-repeat;
}
.eqr__ava::after { content: ''; position: absolute; inset: .1rem; background: var(--eqr-avaf, none) center / 100% 100% no-repeat; pointer-events: none; }
.eqr__ava .uthumb { --ut: .72rem; }
.eqr__opname { font-size: calc(.15 * var(--t)); font-weight: 700; color: var(--text-hi); max-width: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eqr__swap { display: grid; place-items: center; width: .4rem; height: .32rem; color: var(--mint-400); flex: none; }
.eqr__swap img, .eqr__swap .icon { width: 100%; height: 100%; object-fit: contain; }
.eqr__incoming { display: flex; flex-direction: column; gap: .04rem; min-width: 0; flex: 0 1 4.2rem; }
.eqr__card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .12rem; row-gap: .04rem; align-items: center; text-align: left; }
.eqr__card--new {
  padding: .1rem .14rem; border: 1px solid rgba(89, 244, 202, .45);
  background: linear-gradient(90deg, rgba(78, 216, 175, .14), rgba(78, 216, 175, .03));
}
.eqr__icon { grid-row: 1; grid-column: 1; position: relative; display: grid; place-items: center; }
.eqr__card--new .eqr__icon { width: .74rem; height: .74rem; background: var(--eqr-round, none) center / 100% 100% no-repeat; }
.eqr__card--new .eqr__icon .uthumb { --ut: .56rem; }
.eqr__meta { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; gap: .03rem; min-width: 0; }
.eqr__chips { display: flex; align-items: center; gap: .06rem; min-height: .2rem; }
.eqr__elite { font-size: calc(.12 * var(--t)); padding: 0 .06rem; background: var(--gold); color: #1b1300; font-weight: 700; }
.eqr__name { font-size: calc(.19 * var(--t)); color: var(--text-hi); line-height: 1.2; }
.eqr__desc { grid-row: 2; grid-column: 1 / -1; margin: 0; font-size: calc(.145 * var(--t)); line-height: 1.55; color: var(--text-md); max-height: 1.12rem; overflow: auto; }
.eqr__arrow { position: relative; height: .5rem; margin: 0 auto; width: 50%; }
.eqr__aline { position: absolute; left: 0; right: 0; top: .2rem; height: .2rem; border: .045rem solid rgba(242, 242, 242, .82); border-bottom: 0; }
.eqr__aline::before { content: ''; position: absolute; left: 50%; top: -.25rem; width: .045rem; height: .21rem; margin-left: -.0225rem; background: rgba(242, 242, 242, .82); }
.eqr__ahead { position: absolute; top: .34rem; width: .3rem; height: .2rem; margin-left: -.15rem; background: var(--eqr-ahead, none) center / 100% 100% no-repeat; }
.eqr__ahead--l { left: calc(0% + .0225rem); } .eqr__ahead--r { left: calc(100% - .0225rem); }
.eqr-host:not([style*="--eqr-ahead"]) .eqr__ahead { width: .16rem; height: .16rem; margin-left: -.08rem; top: .3rem; border-right: .045rem solid rgba(242, 242, 242, .82); border-bottom: .045rem solid rgba(242, 242, 242, .82); transform: rotate(45deg); background: none; }
.eqr__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
.eqr__opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .08rem; min-height: 2.5rem; padding: .18rem .16rem .5rem;
  text-align: center; color: inherit; cursor: var(--sp-cursor-pointer, pointer); overflow: hidden;
  background: var(--eqr-opt, none) center / 100% 100% no-repeat, linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 2px solid rgba(255, 255, 255, .16);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.eqr__opt .eqr__icon { width: .86rem; height: .86rem; }
.eqr__opt .eqr__icon .uthumb { --ut: .8rem; }
.eqr__opt .eqr__meta { align-items: center; }
.eqr__opt .eqr__desc { text-align: left; max-height: 1rem; }
.eqr__opt:hover { border-color: rgba(255, 255, 255, .42); }
.eqr__opt:focus-visible { outline: 2px solid var(--mint-400); outline-offset: 2px; }
.eqr__opt.is-sel { border-color: #e2262a; box-shadow: 0 0 .2rem rgba(226, 38, 42, .45); }
.eqr__opt.is-sel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--eqr-sel, linear-gradient(225deg, rgba(226, 38, 42, .55), transparent 38%)) center / 100% 100% no-repeat;
}
.eqr__flag {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: .44rem; display: flex; align-items: center; justify-content: center; gap: .08rem;
  font-size: calc(.17 * var(--t)); font-weight: 700; letter-spacing: .12em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: var(--eqr-selbar, linear-gradient(90deg, #a3141a, #d42a2a)) center / 100% 100% no-repeat;
  opacity: 0; transform: translateY(100%); transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out);
}
.eqr__flag-icon { width: .2rem; height: .2rem; }
.eqr__opt.is-sel .eqr__flag { opacity: 1; transform: none; }
.eqr__hint { margin: .04rem 0 0; text-align: center; font-size: calc(.15 * var(--t)); color: var(--text-lo); min-height: .24rem; }
.eqr__hint b { color: var(--text-hi); }
.eqr__ok-icon { width: .2rem; height: .2rem; margin-right: .06rem; vertical-align: -.03rem; filter: brightness(0) invert(1); }

/* Plugin offers share choice cards; text and controls remain reachable at large text scale. */
.offerov { inset: 0; z-index: 24; }
.offerov__dock { position: absolute; top: .8rem; right: .16rem; z-index: 24; display: flex; flex-wrap: wrap; gap: .08rem; max-width: 80%; max-height: 25%; overflow: auto; }
.offerov__dock button { min-height: .44rem; }
.offerov .spov__inner { top: .3rem; overflow: auto; padding: .2rem; }
.offerov .spov__head { flex-wrap: wrap; font-size: calc(.18 * var(--t)); }
.offerov .spov__grid { flex: none; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; overflow: visible; }
.offerov__tabs { display: flex; flex-wrap: wrap; gap: .08rem; }
.offerov__slot { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.offerov .spcard { flex: 1; min-height: 1.7rem; height: auto; }
.offerov .spcard__name { font-size: calc(.27 * var(--t)); white-space: normal; overflow-wrap: anywhere; }
.offerov .spcard__desc { font-size: calc(.2 * var(--t)); display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
.offerov button { min-height: .44rem; }
@media (max-width: 640px) {
  .offerov .spov__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }}
.offerov .spcard__icon { width: .6rem; height: .6rem; }

.square-op-thumb__tier {
  position: absolute; left: -.04rem; bottom: -.04rem; width: 30%; height: auto;
  object-fit: contain; pointer-events: none;
}

.square-op-thumb {
  position: relative; display: inline-block; flex: none;
  width: .54rem; max-width: 100%; aspect-ratio: 1;
}
.square-op-thumb__art {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: #111513; border: 1px solid var(--square-op-tier-color, var(--line-2));
}
.square-op-thumb__art img { width: 100%; height: 100%; object-fit: cover; }
.square-op-thumb__glyph { font-size: calc(.24 * var(--t)); font-weight: 900; color: var(--text-lo); }
.square-op-thumb.is-dim .square-op-thumb__art img { filter: grayscale(.85) brightness(.55); }
.square-op-thumb.is-golden .square-op-thumb__art { border-color: var(--gold); }
.square-op-thumb__standin {
  position: absolute; right: 0; bottom: 0; padding: 0 .03rem;
  font-size: calc(.1 * var(--t)); line-height: 1.2; color: var(--ice-900); background: var(--ice);
}

.square-op-thumb__tier--text {
  display: grid; place-items: center; color: var(--square-op-tier-color); background: #101713;
  font-size: calc(.12 * var(--t)); font-weight: 900; line-height: 1.2; text-shadow: 0 1px 2px #000;
}
