/* ==========================================================================================
   screens/draft.css — BAND_DRAFT strategy pick (js/screens/bandDraft.js). Research 06 §4.2: draft order on the left,
   a 4-wide wall of strategy portraits, the detail pane with 初始生命值, the 自选预设 row, 跳过 and 确认选择; the 本局信息
   entry under the order list and its dialog (js/ui/matchInfo.js MatchInfoDialog, GitHub issue #8 item 1).
   The layout and look are the upstream event screen's (upstream PR #643, its css/screens/draft.css; ported by hand,
   maintainer decision 2026-11-07), with the detail pane always open: name-card rows, the wall's SELECTED brackets, the
   bracketed art. Sizes scale with --t as there (no text-size setting here: 1rem).
   ========================================================================================== */

.draft { --t: 1rem; --t-step: calc((1rem - 64px) / 12); --pg-ease: cubic-bezier(.16, .84, .3, 1); }
/* the entry motions (upstream css/screens/briefing.css pg-*) */
@keyframes pg-fade { from { opacity: 0; } }
@keyframes pg-right { from { opacity: 0; transform: translateX(.36rem); } }
@keyframes pg-left { from { opacity: 0; transform: translateX(-.36rem); } }
@keyframes pg-card { from { opacity: 0; transform: translateY(.16rem) scale(1.03); } }

/* ---- layout: order | wall | detail ---- */
.draft__main {
  position: relative; z-index: 1; flex: 1; min-height: 0;
  display: grid; grid-template-columns: 4.7rem minmax(0, 1fr) 4.6rem; grid-template-rows: minmax(0, 1fr); gap: .2rem;
  padding: .04rem .5rem .3rem .46rem;
}

/* ---- the order: name-card rows, then 本局信息 / 干员调配 / the co-op tip ---- */
.draft-order {
  --dstart: .28rem; position: relative; display: flex; flex-direction: column; gap: .16rem; min-width: 0; min-height: 0;
  padding: .3rem 0 0 .3rem;
  background: linear-gradient(180deg, rgba(48, 118, 100, .26), rgba(20, 46, 40, .16) 70%, rgba(14, 24, 22, .06));
  clip-path: polygon(0 0, calc(100% - .5rem) 0, 100% .5rem, 100% 100%, 0 100%);
  animation: pg-left 460ms var(--pg-ease) 100ms backwards;
}
/* one left start line (maintainer decision 2026-11-08): the deco, the name cards, the buttons and the tip all start where the
   cards do, .28rem into the panel (the rows' padding; the ▶ / the self arrow lie in it) */
.draft-order__deco { flex: none; display: flex; align-items: center; gap: .05rem; height: .34rem; padding-left: var(--dstart); overflow: hidden; }
.draft-order__deco i { width: .5rem; height: .18rem; background: rgba(63, 230, 180, .4); }
.draft-order__deco i + i { width: .18rem; }
.draft-order__deco span { margin-left: .08rem; font-family: var(--font-num); font-size: calc(.1 * var(--t)); line-height: 1.15; letter-spacing: .08em; color: rgba(120, 240, 205, .55); white-space: nowrap; }
.draft-order__rows { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .24rem; overflow: auto; padding: .08rem .12rem .1rem var(--dstart); scrollbar-width: none; }
/* the buttons and the tip: clear of the floating 聊天 button (chat.css .gchat-float, bottom-left) */
.draft-order__side { flex: none; display: flex; flex-direction: column; gap: .1rem; padding: 0 .3rem 0 var(--dstart); }
.draft-order__tip { margin: 0; padding-left: 0; min-height: .5rem; font-size: calc(.14 * var(--t)); line-height: 1.5; color: var(--text-dim); }
.draft-order__tip:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

/* the state box is a square as tall as the name card (maintainer decision 2026-11-08) */
.dorder { --dh: 1.26rem; position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) var(--dh) .36rem; align-items: center; gap: .06rem; height: var(--dh);
  animation: pg-left 420ms var(--pg-ease) backwards; animation-delay: calc(180ms + var(--i, 0) * 70ms); }
.dorder__card { position: relative; height: 100%; display: flex; align-items: center; gap: .1rem; min-width: 0; padding: 0 .1rem 0 .14rem; overflow: hidden;
  background: linear-gradient(90deg, #1d2223, #262b2c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
/* the 名片干员 art behind the text (ui/seatArt.js); [ASSUMED·화면] upstream's framing: 40% keeps the face of the vertical portrait in this short row */
.dorder__art { position: absolute; inset: 0 0 0 28%; width: 72%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .62; pointer-events: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%); mask: linear-gradient(90deg, transparent, #000 45%); }
.dorder__face, .dorder__text { position: relative; }
.dorder__face { position: relative; flex: none; }
.dorder .pavatar { --pa: .74rem; box-shadow: 0 0 0 .03rem #e6e9e9; border: 0; }
.dorder__me { position: absolute; left: -.14rem; top: -.14rem; width: .32rem; height: .32rem; display: grid; place-items: center; background: var(--mint-500); color: #062019; box-shadow: 0 0 0 .02rem #062019; }
.dorder__me .icon { width: 72%; height: 72%; }
.dorder__text { position: relative; display: flex; flex-direction: column; gap: .05rem; min-width: 0; text-shadow: 0 1px 3px #000, 0 0 .1rem #000; }
.dorder__name { display: flex; align-items: center; gap: .04rem; min-width: 0; font-size: calc(.21 * var(--t)); font-weight: 700; line-height: 1.2; color: #f2f4f4; white-space: nowrap; }
.dorder__name > span:not(.dorder__ai) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dorder__ai { flex: none; font-family: var(--font-num); letter-spacing: -.06em; font-size: calc(.11 * var(--t)); padding: 0 .04rem; background: #a9c3d8; color: #0b1520; }
.dorder__state { font-size: calc(.15 * var(--t)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dorder__ready { margin-left: .06rem; padding: 0 .04rem; font-size: max(.11rem, 8px); color: var(--text-on-mint); background: var(--mint-500); }
.dorder__box { position: relative; width: var(--dh); height: var(--dh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .04rem; padding: 0;
  background: #2b2f30; color: #767c7e; font-size: calc(.2 * var(--t)); font-weight: 700; }
.dorder__box span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dorder__box.is-wait .icon { width: .52rem; height: .52rem; }
.dorder__box.is-cur { background: linear-gradient(180deg, #f2f4f4, #cdd1d1); color: #15191a; box-shadow: 0 0 0 .03rem #fff, 0 .04rem .14rem rgba(0, 0, 0, .55); }
.dorder__box.is-cur .icon { width: .46rem; height: .46rem; }
/* 决策中: the official selecting hourglass (player_card_item selecting/shallow_main), for every doctor deciding */
.dorder__glass { width: .34rem; height: .45rem; object-fit: contain; }
.dorder__box.is-band { overflow: hidden; background: radial-gradient(circle at 50% 40%, #1f4a40, #0c1513 75%); box-shadow: inset 0 0 0 1px rgba(120, 240, 205, .25); }
.dorder__box.is-band .bandicon { --bi: 100%; width: 100%; height: 100%; background: transparent; }
.dorder__check { width: .36rem; height: .36rem; display: grid; place-items: center; }
.dorder.is-checked .dorder__check { border: .03rem solid var(--mint-400); border-radius: .06rem; background: rgba(23, 249, 183, .12); color: var(--mint-400); box-shadow: 0 0 .14rem rgba(23, 249, 183, .45); }
.dorder__check .icon { width: 80%; height: 80%; }
/* the doctor deciding: a mint frame around the card, ▶ on the left */
.dorder.is-cur .dorder__card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 .03rem var(--mint-400), 0 0 .22rem rgba(23, 249, 183, .3); }
.dorder.is-cur::before { content: ''; position: absolute; left: -.26rem; top: 50%; transform: translateY(-50%); border: .09rem solid transparent; border-left: .13rem solid var(--mint-400); border-right: 0;
  animation: dorder-mark 1.2s ease-in-out infinite; }
@keyframes dorder-mark { 50% { transform: translate(-.05rem, -50%); } }
/* the 8-player mode (more than four in the order): compact rows so eight fit above the buttons; the rows scroll on a short screen */
.draft-order.is-8 .draft-order__rows { gap: .06rem; }
.draft-order.is-8 .dorder { --dh: .62rem; }
.draft-order.is-8 .dorder .pavatar { --pa: .42rem; }
.draft-order.is-8 .dorder__name { font-size: calc(.17 * var(--t)); }
.draft-order.is-8 .dorder__state { font-size: calc(.12 * var(--t)); }
.draft-order.is-8 .dorder__box { font-size: calc(.12 * var(--t)); }
.draft-order.is-8 .dorder__box .icon { width: .26rem; height: .26rem; }
.draft-order.is-8 .dorder__glass { width: .19rem; height: .25rem; }
/* the compact box has no room for 决策中: the hourglass alone (the row's state line says it) */
.draft-order.is-8 .dorder__box.is-cur > span { display: none; }
.draft-order.is-8.has-art .dorder__glass { width: calc(var(--ou) * 36); height: calc(var(--ou) * 48); }
.draft-order.is-8 .dorder__me { width: .22rem; height: .22rem; left: -.1rem; top: -.1rem; }
.draft-order.is-8 .dorder { grid-template-columns: minmax(0, 1fr) var(--dh) .3rem; }
.draft-order.is-8 .dorder__check { width: .3rem; height: .3rem; }

/* ---- the wall of strategies ---- */
.draft-grid {
  min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1.9rem)); justify-content: center; align-content: start; gap: .3rem .26rem;
  padding: .24rem .3rem .4rem; background: linear-gradient(180deg, rgba(18, 22, 22, .6), rgba(10, 12, 12, .3)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
/* 规程's section headers (泛用型策略 / 盟约型策略, bandDraft.js BAND_SECTIONS): the icon in a small box, then the caption in
   brackets across the four columns, as the official draft (maintainer's pick of the mockups 2026-11-15) */
.draft-grid__sec { grid-column: 1 / -1; display: flex; align-items: center; gap: .1rem; margin-top: .06rem; padding: .03rem .04rem;
  font-size: .17rem; font-weight: 700; color: rgba(225, 240, 236, .92); white-space: nowrap;
  background: linear-gradient(90deg, rgba(255, 255, 255, .07), transparent 75%); }
.draft-grid__sec:first-child { margin-top: 0; }
.draft-grid__sec .icon { box-sizing: content-box; width: .15rem; height: .15rem; padding: .04rem; flex: none;
  color: rgba(225, 240, 236, .92); background: rgba(255, 255, 255, .12); border-radius: .03rem; }
.draft-grid__sec span { position: relative; padding: 0 .1rem; }
.draft-grid__sec span::before, .draft-grid__sec span::after { content: ''; position: absolute; top: -.02rem; bottom: -.02rem; width: .05rem;
  border: .02rem solid rgba(225, 240, 236, .7); }
.draft-grid__sec span::before { left: 0; border-right: 0; }
.draft-grid__sec span::after { right: 0; border-left: 0; }
.dband {
  position: relative; aspect-ratio: 1; padding: 0; border: 0; font: inherit; color: var(--text-md); background: #0e1212;
  box-shadow: 0 0 0 .03rem #30373a, inset 0 0 0 .02rem #000; transition: box-shadow var(--t-fast), transform var(--t-fast), filter var(--t-fast);
  animation: pg-card 420ms var(--pg-ease) backwards; animation-delay: calc(220ms + var(--n, 0) * 28ms);
}
.dband__frame { position: absolute; inset: .07rem; overflow: hidden; background: radial-gradient(circle at 50% 42%, #1e3f37, #0b1211 72%); }
.dband__frame .bandicon { --bi: 100%; width: 100%; height: 100%; background: transparent; border: 0; }
.dband__frame img { filter: saturate(.75) contrast(1.05); }
.dband__frame::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px), radial-gradient(circle at 50% 46%, transparent 48%, rgba(4, 10, 9, .78) 74%),
    linear-gradient(180deg, rgba(60, 230, 185, .1), rgba(60, 230, 185, .2)); }
.dband__name { position: absolute; left: .07rem; right: .07rem; bottom: .07rem; padding: .14rem .04rem .04rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: calc(.15 * var(--t)); font-weight: 700; color: rgba(225, 240, 236, .82); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.dband:hover { box-shadow: 0 0 0 .03rem rgba(120, 240, 205, .7), inset 0 0 0 .02rem #000; filter: brightness(1.12); }
.dband:active { transform: scale(.97); }
.dband:focus-visible { outline: none; box-shadow: 0 0 0 .04rem var(--mint-400); }
/* SELECTED: mint corner brackets, the word above, a notch below */
.dband.is-sel { box-shadow: 0 0 0 .03rem rgba(120, 240, 205, .5); filter: brightness(1.15); }
.dband.is-sel::before { content: ''; position: absolute; inset: -.07rem; pointer-events: none; --c: var(--mint-400); --l: .34rem; --w: .05rem;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w) no-repeat, linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w) no-repeat, linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w) no-repeat, linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w) no-repeat, linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l) no-repeat;
  filter: drop-shadow(0 0 .06rem rgba(23, 249, 183, .7)); animation: dband-sel 220ms var(--pg-ease) backwards; }
@keyframes dband-sel { from { opacity: 0; transform: scale(1.12); } }
.dband.is-sel::after { content: ''; position: absolute; left: 50%; bottom: -.2rem; transform: translateX(-50%); border: .08rem solid transparent; border-bottom: .1rem solid var(--mint-400); border-top: 0; }
.dband__selmark { position: absolute; left: 0; right: 0; top: .08rem; text-align: center; font-family: var(--font-num); font-size: calc(.12 * var(--t)); letter-spacing: .1em; color: var(--mint-400); text-shadow: 0 0 3px #000; pointer-events: none; }
.dband.is-mine { box-shadow: 0 0 0 .04rem var(--mint-400), 0 0 .2rem rgba(23, 249, 183, .35); }
/* 队友已选 (research 09 §5): dimmed, a red band across the lower third, the picker's avatar top-right; it cannot be chosen again */
.dband.is-taken { cursor: not-allowed; }
.dband.is-taken .dband__frame { filter: grayscale(.7) brightness(.55); }
.dband.is-taken:hover { filter: none; box-shadow: 0 0 0 .03rem #5a2a26, inset 0 0 0 .02rem #000; }
.dband.is-taken:active { transform: none; }
.dband.is-taken .dband__name { display: none; }
.dband__taken { position: absolute; left: .07rem; right: .07rem; bottom: .07rem; height: 36%; display: grid; place-items: center; pointer-events: none; white-space: nowrap;
  font-size: calc(.21 * var(--t)); font-weight: 700; letter-spacing: .08em; color: #ff9d90;
  background: linear-gradient(180deg, rgba(140, 20, 16, .35), rgba(176, 26, 20, .88)); box-shadow: inset 0 -.03rem 0 #ff4a3a, 0 0 .16rem rgba(255, 60, 40, .25);
  animation: dband-taken 420ms var(--pg-ease) backwards; }
@keyframes dband-taken { from { opacity: 0; transform: scaleY(.2); filter: brightness(2); } }
.dband__who { position: absolute; right: .1rem; top: .1rem; display: flex; flex-direction: column; gap: .02rem; }
.dband__who .pavatar { --pa: .3rem; border-radius: 50%; overflow: hidden; border: 2px solid var(--mint-400); }
/* short landscape phones: 队友已选 on one line, a Korean name on one line with its ellipsis (upstream §35.51) */
@media (max-height: 520px) {
  .dband__taken { letter-spacing: 0; font-size: min(calc(.21 * var(--t)), 12px); }
  .dband__name { font-size: min(calc(.15 * var(--t)), 11px); }
}
/* a strategy built around a bond the mode switches off (bandDraft.js BandOffTag / BandOffNote, DESIGN §21.26 — the
   §21.7 本局禁用 look: dim, dashed, the bond struck through): information only, it stays selectable. Px floors keep it
   readable on phones (1rem = 40 px). */
.dband__off { position: absolute; left: .1rem; top: .1rem; font-size: max(calc(.12 * var(--t)), 8px); line-height: 1.5; padding: 0 .05rem; color: var(--text-lo); background: rgba(0, 0, 0, .6);
  border: 1px dashed rgba(255, 255, 255, .32); white-space: nowrap; pointer-events: none; }
.draft-detail__off { display: flex; align-items: flex-start; gap: .06rem; margin: .04rem 0 .06rem; padding: .06rem .1rem;
  font-size: max(calc(.15 * var(--t)), 9px); line-height: 1.5; color: var(--text-lo); background: rgba(0, 0, 0, .25); border-left: 2px solid rgba(255, 255, 255, .28); }
.draft-detail__off .icon { width: max(.16rem, 10px); height: max(.16rem, 10px); flex: none; margin-top: .02rem; }
.draft-detail__offname { color: var(--text-dim); text-decoration: line-through; text-decoration-color: rgba(255, 84, 84, .6); }

/* ---- the detail pane: only the description scrolls (the client's panel_team_detail viewport, maintainer decision
   2026-11-08); the art, the name and the 自选预设 row stay, the actions stay at the bottom ---- */
.draft-detail {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  padding: .26rem .26rem .1rem; background: linear-gradient(180deg, rgba(30, 84, 72, .5), rgba(14, 32, 28, .4) 55%, rgba(8, 12, 12, .2));
  animation: pg-right 280ms var(--pg-ease) backwards;
}
.draft-detail__body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; animation: pg-fade 200ms ease-out backwards; }
.draft-tag { align-self: flex-start; display: inline-block; height: .13rem; margin: .08rem 0 .05rem; padding: 0 .06rem; font-family: var(--font-num); font-size: calc(.09 * var(--t)); line-height: .13rem;
  letter-spacing: .12em; color: #082a20; background: rgba(63, 230, 180, .62); }
.draft-detail__art { position: relative; align-self: center; display: grid; place-items: center; width: 2.6rem; height: 2.3rem; margin: .18rem 0 .14rem; flex: none; }
.draft-detail__art::before { content: ''; position: absolute; inset: 0 .14rem; pointer-events: none;
  border: .03rem solid rgba(220, 240, 236, .5); clip-path: polygon(0 0, .26rem 0, .26rem 100%, 0 100%, 0 0, 100% 0, 100% 100%, calc(100% - .26rem) 100%, calc(100% - .26rem) 0, 100% 0); }
.draft-detail__art::after { content: '+   +'; position: absolute; inset: -.18rem -.1rem auto; text-align: justify; text-align-last: justify; font-size: calc(.3 * var(--t)); line-height: 1; color: rgba(220, 240, 236, .25); pointer-events: none; }
.draft-detail__art .bandicon { --bi: 2.1rem; background: transparent; border: 0; }
.draft-detail__art img { filter: saturate(.8) drop-shadow(0 0 .14rem rgba(63, 230, 180, .35)); }
.draft-detail__hp { align-self: center; display: flex; align-items: center; gap: .1rem; font-size: calc(.24 * var(--t)); color: #e8ecec; white-space: nowrap; }
.draft-detail__hp b { padding: 0 .08rem; font-size: calc(.22 * var(--t)); line-height: 1.35; color: #062019; background: var(--mint-500); }
.draft-detail__name { margin: 0 0 .04rem; font-size: calc(.36 * var(--t)); font-weight: 900; letter-spacing: .04em; color: #f4f6f6; }
.draft-detail__eff { flex: 1 1 auto; min-height: .6rem; overflow-y: auto; overscroll-behavior: contain; padding: 0 .08rem .2rem 0; margin-right: -.08rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
  /* the end fades out under the 自选预设 row; the bottom padding lets the last line scroll clear of the fade */
  -webkit-mask-image: linear-gradient(#000 calc(100% - .2rem), transparent); mask-image: linear-gradient(#000 calc(100% - .2rem), transparent); }
.draft-detail__desc { margin: 0; font-size: calc(.2 * var(--t)); line-height: 1.55; color: #eef2f2; }
.draft-detail .draft-preset { margin-top: .14rem; }
.draft-detail__actions { flex: none; display: flex; flex-direction: column; gap: .08rem; padding: .12rem 0 .1rem; }
.draft-detail__status { display: flex; align-items: center; gap: .06rem; margin: 0; font-size: calc(.16 * var(--t)); color: var(--text-lo); }
.draft-detail__status .icon { width: .2rem; height: .2rem; flex: none; }
.draft-detail__status--taken { color: #ff8f80; }
.draft-detail__btns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .1rem; }
.draft-detail__btns .btn--lg { height: .92rem; font-size: calc(.3 * var(--t)); }
/* 跳过 beside 确认选择, the same width (maintainer decision 2026-11-08); 跳过's icon is the client's own arrow, cut out of
   bandChoose/btn_skip (bandDraft.js cutSkipArrow) and tinted like the label */
.draft-skip.btn { min-width: 0; padding: 0 .14rem; white-space: nowrap; }
.draft-skip .btn__label { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 .1em; min-width: 0; }
/* （已用） under the label, small: the half-width cell has no room for it beside */
.draft-skip__used { flex-basis: 100%; font-size: .5em; line-height: 1.1; letter-spacing: 0; }
.draft-skip__ico { flex: none; width: 1.3em; height: .9em; background: currentColor;
  -webkit-mask: var(--skip-ico) center / contain no-repeat; mask: var(--skip-ico) center / contain no-repeat; }
.draft-pick.btn { min-width: 0; }
/* 队友已选 is longer than 确认选择 (「팀원 선택 완료」, "Taken by a Teammate"): no ✓, a smaller face, and the label may wrap
   between words — nowrap ran it past the box over 跳过 */
.draft-pick--taken.btn { padding: 0 .12rem; font-size: calc(.22 * var(--t)); letter-spacing: .02em; }
.draft-pick--taken .btn__label { white-space: normal; overflow-wrap: normal; text-align: center; line-height: 1.15; min-width: 0; }
.draft-pick.btn--primary { --btn-bg: #d8dbdb; --btn-bg-hover: #f2f4f4; --btn-fg: #111415; --btn-bd: #fff; --btn-bd-hover: #fff; --btn-glow: rgba(255, 255, 255, .35); --bk-c: #fff;
  background-image: none; box-shadow: 0 0 0 .03rem rgba(255, 255, 255, .85), 0 .06rem .2rem rgba(0, 0, 0, .5); letter-spacing: .08em; }
.draft-pick .btn__icon { width: .4rem; height: .4rem; padding: .03rem; border: .03rem solid currentColor; border-radius: .04rem; }
.draft-pick.btn--primary:disabled { --btn-bg: #34393a; --btn-fg: #8c9293; --btn-bd: #4a5051; box-shadow: none; opacity: 1; }
/* touch screens: the buttons' invisible --tap-min hit area (devices.css ::before) is taller than a phone's button and
   reached past the pane's bottom — a 1–2 px scroll; the bar's bottom padding holds it */
.sp-coarse .draft-detail__actions { padding-bottom: max(.1rem, calc((var(--tap-min) - .92rem) / 2 + 1px)); }
/* a phone's short pane (upstream mockup of 2026-11-07): the art shrinks, the 自选预设 row is its dropdown only */
@media (max-height: 500px) {
  .draft-detail__art { width: 1.9rem; height: 1.7rem; margin: .1rem 0 .08rem; }
  .draft-detail__art .bandicon { --bi: 1.55rem; }
  .draft-detail .draft-preset { padding: 0; border: 0; background: none; }
  .draft-detail .draft-preset__head, .draft-detail .draft-preset__slots, .draft-detail .draft-preset__foot { display: none; }
  .draft-detail .draft-preset__lbl { display: inline; }
}

/* ---- the official sprites (bandDraft.js draftArt: data/assets.json ui bandChoose/*, maintainer decision 2026-11-08) ----
   Without every sprite of a part it keeps the look above. Sizes of the order rows are in the client's units: a row
   (prefab_auto_chess_band_choose_player_card_item, 100 tall) is --dh, so --ou = one unit. */
.dorder__tag, .dorder__arrow { display: none; }
/* the order list: panel_player's back (player_list_back, Sliced) with its dec and the composer behind the rows */
.draft-order.has-art { --dstart: .38rem; background: none; clip-path: none; }
.draft-order.has-art .draft-order__rows { padding-right: .06rem; }
.draft-order__back { position: absolute; inset: 0 .1rem .1rem .1rem; z-index: 0; overflow: hidden; pointer-events: none;
  border: 0 solid transparent; border-image: var(--do-back) 40 30 fill / .5rem .38rem stretch; }
.draft-order__back::after { content: ''; position: absolute; left: 50%; top: 44%; width: 120%; aspect-ratio: 474 / 451; transform: translate(-50%, -50%);
  background: var(--do-comp) center / contain no-repeat; opacity: .9; }
.draft-order.has-art > :not(.draft-order__back) { position: relative; z-index: 1; }
.draft-order.has-art .draft-order__deco { height: .35rem; background: var(--do-dec) left center / auto 100% no-repeat; background-origin: content-box; }
.draft-order.has-art .draft-order__deco > * { display: none; }
/* a row: item_back #373737 at 32 %, the card (81 of 100 tall) and the state box (81 square), ✓ beside it */
.draft-order.has-art .dorder { --ou: calc(var(--dh) / 100); padding: calc(var(--ou) * 9.5) 0 calc(var(--ou) * 9.5) calc(var(--ou) * 11);
  grid-template-columns: minmax(0, 1fr) calc(var(--ou) * 81) calc(var(--ou) * 40); background: rgba(55, 55, 55, .32); }
.draft-order.has-art .dorder.is-cur::before { display: none; }
.draft-order.has-art .dorder__card, .draft-order.has-art .dorder.is-cur .dorder__card { box-shadow: none;
  background: linear-gradient(90deg, rgba(30, 34, 35, .9), rgba(30, 34, 35, .2)); }
.draft-order.has-art .dorder__box { width: calc(var(--ou) * 81); height: calc(var(--ou) * 81); background: none; box-shadow: none; color: #fff; }
/* waiting: the dots on #505050 at 40 % */
.draft-order.has-art .dorder__box.is-wait { background: rgba(80, 80, 80, .4); }
.draft-order.has-art .dorder__box.is-wait > * { display: none; }
.draft-order.has-art .dorder__box.is-wait::before { content: ''; width: calc(var(--ou) * 35); height: calc(var(--ou) * 8); background: var(--do-wait) center / contain no-repeat; }
/* selecting: the plate (111 on the 81 box) with the hourglass and 决策中 */
.draft-order.has-art .dorder__box.is-cur { gap: calc(var(--ou) * 3); background: var(--do-sel) center / 137% 137% no-repeat; }
.draft-order.has-art .dorder__glass { width: calc(var(--ou) * 27); height: calc(var(--ou) * 36); }
.draft-order.has-art .dorder__box.is-cur > span { font-size: calc(var(--ou) * 16); font-weight: 400; color: #fff; }
/* selected: the strategy in player_card_team_frame, player_card_ready beside it (is-checked: the pick, or 3/3's ready) */
.draft-order.has-art .dorder__box.is-band { padding: var(--ou); background: var(--do-team) center / 100% 100% no-repeat; box-shadow: none; }
.draft-order.has-art .dorder__check, .draft-order.has-art .dorder.is-checked .dorder__check { width: calc(var(--ou) * 34); height: calc(var(--ou) * 34);
  border: 0; border-radius: 0; background: none; box-shadow: none; }
.draft-order.has-art .dorder.is-checked .dorder__check { background: var(--do-ready) center / contain no-repeat; }
.draft-order.has-art .dorder__check > * { display: none; }
/* one's own row: myself_highlight — the frame over the row (Sliced), the 我 tag on the card's corner, the arrow left of it */
.draft-order.has-art .dorder.is-self::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border: 0 solid transparent; border-image: var(--do-self) 20 fill / calc(var(--ou) * 20) stretch; }
.draft-order.has-art .dorder__me { display: none; }
.draft-order.has-art .dorder__tag { display: block; position: absolute; z-index: 3; left: calc(var(--ou) * -2.5); top: calc(var(--ou) * -1.5);
  width: calc(var(--ou) * 41); height: calc(var(--ou) * 41); background: var(--do-tag) center / contain no-repeat; }
.draft-order.has-art .dorder__arrow { display: block; position: absolute; left: calc(var(--ou) * -31.5); top: calc(50% - var(--ou) * 17.5);
  width: calc(var(--ou) * 40); height: calc(var(--ou) * 35); background: var(--do-arrow) center / contain no-repeat; transform: rotate(90deg);
  animation: dorder-arrow 1.2s ease-in-out infinite; }
@keyframes dorder-arrow { 50% { transform: translateX(calc(var(--ou) * -5)) rotate(90deg); } }
/* the detail pane: team_info_back behind it, team_icon_frame (Sliced) around the art, team_hp_back under the HP number,
   the TEAM ID / INTRO title plates in place of the text tags */
.draft-detail.has-art { background: var(--dd-back) center / 100% 100% no-repeat; }
.draft-detail.has-art .draft-detail__art::before, .draft-detail.has-art .draft-detail__art::after { display: none; }
.draft-detail.has-art .draft-detail__art { border: 0 solid transparent; border-image: var(--dd-frame) 26 30 / .26rem .3rem stretch; }
.draft-detail.has-art .draft-detail__hp b { padding: 0 .06rem; color: #000; background: var(--dd-hp) center / 100% 100% no-repeat; }
.draft-detail.has-art .draft-tag { width: .88rem; height: .32rem; margin: .06rem 0; padding: 0; font-size: 0; line-height: 0; color: transparent;
  background: var(--dd-id) left center / contain no-repeat; }
.draft-detail.has-art .draft-tag--intro { height: .31rem; background-image: var(--dd-intro); }

@media (prefers-reduced-motion: reduce) {
  .draft-order, .dorder, .dorder.is-cur::before, .dorder__arrow, .dband, .dband.is-sel::before, .dband__taken, .draft-detail, .draft-detail__body { animation: none; }
}

/* ---- 本局信息 (GitHub issue #8 item 1, DESIGN §21.28): the entry under the order list and the read-only dialog -------
   The dialog shows the briefing's own blocks (.brief-bonds / .brief-legend / .brief-banned, css/screens/briefing.css)
   at the briefing's size on desktop; every size is max(design rem, px floor), so on a phone (1rem = 40 px) the text
   stays at ≥ 9–15 px and the dialog's body scrolls inside the screen (756×366, 844×390) while the header and the
   footer (the turn's countdown, 关闭) stay in view. */
.draft-order__info {
  justify-content: flex-start; padding: 0 .16rem;
  height: max(.5rem, 28px); font-size: max(.18rem, 10px);
  --btn-bd: var(--mint-800); --btn-bg: rgba(78, 216, 175, .06); --btn-bg-hover: rgba(78, 216, 175, .14);
}
.draft-order__info .btn__icon { color: var(--mint-400); }
/* a client title icon on the button (--art): a mask in the icon colour, the size of .btn__icon */
.draft-order__info.has-art::before { content: ''; flex: none; width: 1.15em; height: 1.15em; background: var(--mint-400);
  -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
/* 敌方情报 | 盟约信息 in one row (maintainer decision 2026-11-18): half each, side padding cut so 「맹약 정보」 fits on a phone */
.draft-order__infos { display: flex; gap: .08rem; }
.draft-order__infos > .draft-order__info { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 max(.08rem, 6px); gap: max(.05rem, 4px); }
/* line-height 1.4: the ellipsis' overflow clips at the line box, and at the button's line-height 1 that cut the Hangul's bottom */
.draft-order__infos > .draft-order__info .btn__label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
/* 干员调配 from the draft (screens/loadout.js LoadoutButton, maintainer request 2026-10-13): under the two info buttons,
   the same height; icon and label centred as the briefing's (maintainer decision 2026-11-18) */
.draft-order__loadout.btn { justify-content: center; width: 100%; padding: 0 .16rem; height: max(.5rem, 28px); font-size: max(.18rem, 10px); }
.modal__box.minfo-dlg {
  width: min(max(12rem, 600px), calc(100vw - .6rem - var(--sa-l, 0px) - var(--sa-r, 0px)));
  max-height: calc(100vh - .6rem);
  max-height: calc(100svh - .6rem);
}
.minfo-dlg .modal__head { padding: .16rem .3rem .02rem; }
.minfo-dlg .modal__head .micro { font-size: max(.11rem, 8px); }
.minfo-dlg .modal__title { font-size: max(.26rem, 15px); }
.minfo-dlg .modal__body { display: flex; flex-direction: column; gap: max(.16rem, 6px); padding: .1rem .3rem .2rem; }
.minfo-dlg .modal__actions { align-items: center; padding: .12rem .3rem; }
.minfo-dlg .modal__actions .btn { height: max(.5rem, 30px); font-size: max(.18rem, 12px); }
.minfo-dlg__status { margin-right: auto; min-width: 0; }
.minfo-dlg__turn { display: inline-flex; align-items: center; gap: .06rem; font-size: max(.17rem, 11px); font-weight: 700; color: var(--gold); white-space: nowrap; }
.minfo-dlg__turn .icon { width: max(.18rem, 12px); height: max(.18rem, 12px); }
.minfo-dlg__turn b { margin-left: .04rem; font-size: max(.22rem, 14px); }
.minfo-dlg__turn.is-warn { color: var(--orange-hi); }
.minfo-dlg__turn.is-mint { color: var(--mint-400); }
.minfo-dlg__turn.is-dim { color: var(--text-lo); }
/* the stage-info items (css/screens/briefing.css, one prefab unit = --ou) at least ~50 px wide on a small screen */
.minfo-dlg .brief-bonds, .minfo-dlg .brief-banned { --ou: max(.0095rem, .46px); }
.minfo-dlg .brief-h { font-size: max(.21rem, 12px); }
.minfo-dlg .brief-h::before { width: max(.06rem, 3px); height: max(.2rem, 11px); }
.minfo-dlg .brief-legend { margin-top: 0; font-size: max(.14rem, 10px); }
.minfo-dlg .brief-legend__off { width: max(.16rem, 9px); height: max(.16rem, 9px); }
.minfo-dlg .brief-banned__n { font-size: max(.22rem, 13px); }
.minfo-dlg .brief-banned__diy { font-size: max(.14rem, 12px); }
.minfo-dlg .t-dim { font-size: max(.16rem, 10px); }

/* Enemy intel above 本局信息: the same modal chrome, with the briefing's shared blocks stacked vertically. */
.modal__box.intel-dlg { width: min(max(8.5rem, 640px), calc(100vw - .6rem - var(--sa-l, 0px) - var(--sa-r, 0px))); }
.intel-dlg .brief-enemy { --ou: max(.0085rem, .58px); }
.intel-dlg .brief-h--art { background: var(--bar, none) left center / auto 100% repeat-x, rgba(255,255,255,.16); }
.intel-dlg .brief-stage { flex: none; padding: 0 max(.14rem, 10px) max(.14rem, 10px); gap: max(.1rem, 8px); }
.intel-dlg .intel-stage-title { margin: 0 calc(-1 * max(.14rem, 10px)); padding: max(.1rem, 8px) max(.14rem, 10px); background: var(--bar, none) center / 100% 100% no-repeat, rgba(255,255,255,.16); }
.intel-dlg .intel-stage-title > .icon { width: max(.2rem, 16px); height: max(.2rem, 16px); align-self: center; color: var(--text-hi); }
.intel-dlg .intel-stage-title::before { display: none; }
.intel-dlg .brief-stage__head { flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.intel-dlg .brief-stage__k { flex-wrap: wrap; }
.intel-dlg .brief-stage__pool { font-size: max(.14rem, 11px); }
.intel-dlg .brief-stage__name { font-size: max(.19rem, 13px); }
.intel-dlg .brief-stage__map { flex: none; width: 100%; height: auto; min-height: 0; object-fit: contain; }
.intel-dlg .brief-stage__unknown, .intel-stage-missing { min-height: max(1.6rem, 110px); }
.intel-stage-missing { display: grid; place-items: center; color: var(--text-lo); font-size: max(.16rem, 12px); }
.intel-dlg .brief-stage__unknown em { font-size: max(.15rem, 12px); }
.intel-dlg .minfo-dlg__turn { white-space: normal; flex-wrap: wrap; }
/* Keep the entire intel stack visible on a phone, including the uncropped battlefield. */
@media (max-height: 520px) and (orientation: landscape) {
  .modal__box.intel-dlg { width: min(960px, calc(100vw - 24px - var(--sa-l, 0px) - var(--sa-r, 0px))); height: calc(100svh - 16px); max-height: calc(100svh - 16px); }
  .intel-dlg .modal__head { padding: 5px 12px 2px; }
  .intel-dlg .modal__head > .micro { display: none; }
  .intel-dlg .modal__title { font-size: 15px; }
  .intel-dlg .modal__body { flex: 1 1 auto; min-height: 0; padding: 3px 12px 5px; gap: 5px; }
  .intel-dlg .brief-enemy { --ou: .35px; }
  .intel-dlg .brief-h { font-size: 11px; line-height: 1; min-height: 0; padding: 3px 7px; gap: 5px; }
  .intel-dlg .brief-h .micro { font-size: 7px; }
  .intel-dlg .brief-eboss__name { font-size: 14px; }
  .intel-dlg .brief-eboss__desc { font-size: 10px; line-height: 1.2; }
  .intel-dlg .brief-eboss__tag { font-size: 8px; left: 7px; width: 72px; }
  .intel-dlg .brief-etypes { gap: 3px; padding: 3px 5px 4px; }
  .intel-dlg .brief-etypes__k { display: none; }
  .intel-dlg .brief-etypes__row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .intel-dlg .brief-etype { grid-template-columns: 20px minmax(0, 1fr); padding: 3px; gap: 2px 5px; }
  .intel-dlg .brief-etype__name { font-size: 11px; }
  .intel-dlg .brief-etype__desc { grid-column: 1 / -1; font-size: 9px; }
  .intel-dlg .brief-stage { flex: 1 1 0; min-height: 70px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding: 3px 6px 4px; gap: 3px; }
  .intel-dlg .intel-stage-title { margin: 0; padding: 2px 3px; background: none; }
  .intel-dlg .intel-stage-title > .icon { width: 12px; height: 12px; }
  .intel-dlg .brief-stage__head { padding: 0; gap: 3px 8px; justify-content: flex-end; }
  .intel-dlg .brief-stage__pool { font-size: 9px; }
  .intel-dlg .brief-stage__name { font-size: 10px; }
  .intel-dlg .brief-stage__map { grid-column: 1 / -1; height: 100%; min-height: 0; object-fit: contain; }
  .intel-dlg .brief-stage__unknown, .intel-dlg .intel-stage-missing { grid-column: 1 / -1; min-height: 0; }
  .intel-dlg .brief-stage__unknown span { font-size: 28px; }
  .intel-dlg .brief-stage__unknown em { font-size: 10px; }
  .intel-dlg .modal__actions { padding: 3px 12px; }
  .intel-dlg .modal__actions .btn { height: 26px; font-size: 11px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .intel-dlg .brief-enemy { --ou: .36px; }
  .intel-dlg .brief-eboss__name { font-size: 15px; }
  .intel-dlg .brief-eboss__desc { font-size: 11px; }
  .intel-dlg .brief-eboss__tag { font-size: 8px; left: 7px; width: 72px; }
  .intel-dlg .brief-stage__map { max-height: 26svh; }
  .intel-dlg .brief-etypes__row { grid-auto-flow: row; grid-auto-columns: auto; }
  .intel-dlg .brief-etype { grid-template-columns: 34px 64px minmax(0, 1fr); }
  .intel-dlg .brief-etype__desc { grid-column: auto; font-size: 11px; }
  .intel-dlg .brief-etype__name { font-size: 12px; }
  .intel-dlg .brief-etypes__k { font-size: 12px; }
}

/* ---- 전략별 선발 프리셋 (screens/bandDraft.js DraftPresetRow, maintainer 2026-10-12) ------------------------------------
   The detail pane's 自选预设 row: the roster the strategy applies when the pick lands, its tags, the four slots it would
   field and 记住此策略的预设; a linked strategy's card carries the faction's badge; 编队确认 after the last pick. Px floors
   keep the row readable on phones (1rem = 40 px). Since the upstream layout (2026-11-07) the pane's body scrolls under
   the pinned buttons. */
.draft-preset { align-self: stretch; flex: none; display: flex; flex-direction: column; gap: .06rem; padding: .08rem .12rem;
  background: rgba(78, 216, 175, .06); border: 1px solid var(--mint-800); }
.draft-preset__head { display: flex; flex-wrap: wrap; align-items: center; gap: .06rem; font-size: max(.15rem, 10px); color: var(--text-hi); font-weight: 700; }
.draft-preset__tag { font-size: max(.12rem, 9px); font-weight: 400; line-height: 1.4; padding: 0 .05rem; border: 1px solid; white-space: nowrap; }
.draft-preset__tag.is-link { color: var(--mint-400); border-color: var(--mint-700); }
.draft-preset__tag.is-rec { color: var(--ice); border-color: rgba(159, 212, 255, .45); }
.draft-preset__tag.is-off { color: var(--text-dim); border-style: dashed; border-color: rgba(255, 255, 255, .28); }
/* the dropdown (bandDraft.js PresetPicker): the faction's icon before each name; the list floats (fixed, placed by the
   script under or above the button) so opening it never grows the pane */
.draft-preset__pick { display: flex; flex-direction: column; gap: .03rem; min-width: 0; }
.draft-preset__sel, .draft-preset__opt { display: flex; align-items: center; gap: .06rem; width: 100%; min-width: 0; text-align: left;
  font-size: max(.15rem, 10px); color: var(--text-hi); background: var(--bg-1); border: 1px solid var(--line-2); }
.draft-preset__sel { height: max(.4rem, 26px); padding: 0 .08rem; }
.draft-preset__sel:hover:not(:disabled), .draft-preset__sel[aria-expanded="true"] { border-color: var(--mint-700); }
.draft-preset__sel:disabled { opacity: .6; }
/* the row's name inside the button: only on a phone, where the row is its dropdown alone */
.draft-preset__lbl { display: none; flex: none; color: var(--mint-400); white-space: nowrap; }
.draft-preset__optname { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the icon's states (no words): no preset = the icon left uncoloured, grey (maintainer 2026-10-13); off this match = the
   briefing's img_bond_banned mark on its corner (local art; without it the dimmed name below) */
.draft-preset__icw { position: relative; flex: none; display: inline-grid; place-items: center; margin-right: .04rem; }
.is-empty .draft-preset__ico.chat__facico { background: var(--text-dim); }
.is-empty > .draft-preset__optname { color: var(--text-lo); }
/* the briefing's place for it: top-right of the icon (client: img_bond_banned at (29, 32) from the disc's middle) */
.draft-preset__ban { position: absolute; right: -.07rem; top: -.07rem; width: max(.18rem, 13px); height: max(.18rem, 13px); pointer-events: none;
  filter: drop-shadow(0 0 1px #000); }
.draft-preset__ico.chat__facico { width: max(.22rem, 17px); height: max(.22rem, 17px); }
.draft-preset__ico.is-glyph { flex: none; width: max(.2rem, 15px); height: max(.2rem, 15px); color: var(--mint-400); }
.draft-preset__caret { flex: none; margin-left: auto; width: 0; height: 0; border-left: .05rem solid transparent; border-right: .05rem solid transparent;
  border-top: .06rem solid var(--text-lo); }
.draft-preset__sel[aria-expanded="true"] .draft-preset__caret { transform: rotate(180deg); }
.draft-preset__list { position: fixed; z-index: 30; visibility: hidden; overflow-y: auto; list-style: none; margin: 0; padding: .03rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .03rem;
  background: rgba(8, 11, 10, .98); border: 1px solid var(--mint-700); box-shadow: 0 .08rem .24rem rgba(0, 0, 0, .6); }
.draft-preset__opt { height: max(.34rem, 24px); padding: 0 .06rem; background: rgba(255, 255, 255, .04); border-color: transparent; }
.draft-preset__opt:hover { background: rgba(255, 255, 255, .1); border-color: var(--fac, var(--line-3)); }
.draft-preset__opt.is-on { border-color: var(--fac, var(--mint-400)); box-shadow: inset 0 0 0 1px var(--fac, var(--mint-400)); }
.draft-preset__sel.is-off .draft-preset__optname, .draft-preset__opt.is-off .draft-preset__optname { color: var(--text-lo); }
/* the slots by tier (maintainer decision 2026-10-13): a plate per tier — the stage info's group bar
   (prefab_auto_chess_stage_info_chess_banned_group img_bkg = img_content_bkg, a flat rgb(31, 31, 31) at 40 %) over the dark
   list panel it lies on in the client (the briefing's .brief-banned), so it reads as a box on this lighter pane — with a
   line of the tier's colour under it; the tier's badge once, at the icons' bottom edge where each icon carries it elsewhere */
.draft-preset__slots { display: flex; gap: .06rem; }
.draft-preset__grp { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; gap: .08rem; padding: .06rem .1rem .07rem .07rem;
  background: linear-gradient(rgba(31, 31, 31, .4), rgba(31, 31, 31, .4)), rgba(12, 15, 14, .8); box-shadow: inset 0 -2px 0 var(--gc, var(--line-2)); }
.draft-preset__tier { flex: none; display: flex; }
.draft-preset__tier .tier { --tier-h: max(.3rem, 20px); }
/* a slot: the operator's icon as the stage info draws it (matchInfo.js ChessIcon, a banned operator under the red corner —
   maintainer request 2026-10-13) on its official white card; room on the right and below for the card's shadow */
.draft-preset__slot { position: relative; flex: none; display: flex; padding: 0 .02rem .02rem 0; }
.draft-preset__ava.chessico { --ci: max(.56rem, 30px); }
.draft-preset__slot.is-empty .chessico__art { place-items: center; border: 1px dashed rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.draft-preset__slot.is-empty .chessico__art::after { content: '+'; font-size: calc(var(--ci) * .45); line-height: 1; color: rgba(255, 255, 255, .45); }
/* a slot that opens its picker in the 自选编队 tab (bandDraft.js): empty = the + card, filled = the swap icon over the
   icon on hover / focus (maintainer requests 2026-10-13) */
.draft-preset__slot.is-edit { margin: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.draft-preset__slot.is-edit:focus-visible { outline: none; }
.draft-preset__slot.is-empty.is-edit:hover .chessico__art, .draft-preset__slot.is-empty.is-edit:focus-visible .chessico__art { border-color: var(--mint-400); background: rgba(78, 216, 175, .12); }
.draft-preset__slot.is-empty.is-edit:hover .chessico__art::after, .draft-preset__slot.is-empty.is-edit:focus-visible .chessico__art::after { color: var(--mint-400); }
/* the swap frame covers the whole white card, not only the portrait: the card (img_chess_bkg without its shadow, the
   is-css 96 × 95 of briefing.css .chessico__bkg) starts 2.5 units above-left of the 90-unit portrait */
.draft-preset__swap { --ci: max(.56rem, 30px); --cu: calc(var(--ci) / 90); position: absolute; z-index: 3; left: calc(var(--cu) * -2.5);
  top: calc(var(--cu) * -2.5); width: calc(var(--cu) * 96); height: calc(var(--cu) * 95);
  display: grid; place-items: center; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px var(--mint-400);
  opacity: 0; transition: opacity .12s; pointer-events: none; }
.draft-preset__swap .icon { width: 46%; height: 46%; color: var(--mint-400); filter: drop-shadow(0 0 2px #000); }
.draft-preset__slot.is-edit:hover .draft-preset__swap, .draft-preset__slot.is-edit:focus-visible .draft-preset__swap,
.draft-preset__hit:focus-visible .draft-preset__swap { opacity: 1; }
/* a filled slot: the swap button over the icon, and a × that empties it — a square chip inside the card's top right
   corner, drawn like the game's other close buttons (.dpanel__close: dark fill, --line-2 hairline, no rounding) and sized
   from the icon (--ci); shown with the swap frame on hover / focus; red when aimed at */
.draft-preset__hit { position: relative; display: flex; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.draft-preset__hit:focus-visible { outline: none; }
.draft-preset__rm { --ci: max(.56rem, 30px); --cu: calc(var(--ci) / 90); --rm: max(calc(var(--ci) * .28), 12px); position: absolute; z-index: 4;
  left: calc(var(--cu) * 93.5 - var(--rm)); top: calc(var(--cu) * -2.5);
  width: var(--rm); height: var(--rm); display: grid; place-items: center; margin: 0; padding: 0;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .72); color: var(--text-lo);
  cursor: pointer; opacity: 0; transition: opacity .12s, color .12s, background-color .12s, border-color .12s; }
.draft-preset__rm .icon { width: 70%; height: 70%; }
.draft-preset__slot.is-edit:hover .draft-preset__rm, .draft-preset__slot.is-edit:focus-within .draft-preset__rm { opacity: 1; border-color: var(--mint-400); }
.draft-preset__slot.is-edit .draft-preset__rm:hover, .draft-preset__slot.is-edit .draft-preset__rm:focus-visible { outline: none; color: #fff; background: var(--red); border-color: var(--red); }
/* a touch screen: no × — a 12 px chip on a 26 px icon is no finger target and a near miss opens the picker; there a slot
   empties through its picker's 清空 (maintainer decision 2026-10-13) */
@media (hover: none) { .draft-preset__rm { display: none; } }
/* a narrow window: the px floors would overflow the pane — smaller icons, and on a phone (~200 px pane) smaller gaps too */
@media (max-width: 1000px) {
  .draft-preset__ava.chessico, .draft-preset__swap, .draft-preset__rm { --ci: 30px; }
  .draft-preset__tier .tier { --tier-h: 18px; }
}
@media (max-width: 900px) {
  .draft-preset__slots { gap: 4px; }
  .draft-preset__grp { gap: 3px; padding: 4px 3px 5px; }
  .draft-preset__ava.chessico, .draft-preset__swap, .draft-preset__rm { --ci: 26px; }
  .draft-preset__tier .tier { --tier-h: 15px; }
}
.draft-preset__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .04rem .08rem; }
.draft-preset__edit.btn { flex: none; height: max(.32rem, 22px); padding: 0 .08rem; font-size: max(.13rem, 9px); }
.draft-preset__edit .btn__icon { color: var(--mint-400); }
.draft-preset__keep { display: flex; align-items: center; gap: .06rem; font-size: max(.13rem, 9px); color: var(--text-md); }
.draft-preset__keep input { width: max(.16rem, 12px); height: max(.16rem, 12px); margin: 0; accent-color: var(--mint-500); }
.dband__link { position: absolute; right: .1rem; top: .1rem; display: grid; place-items: center; width: max(.24rem, 14px); height: max(.24rem, 14px);
  background: rgba(0, 0, 0, .55); border: 1px solid var(--fac); }
.dband__link .chat__facico { width: 80%; height: 80%; }
.draft-confirm { display: flex; flex-direction: column; gap: .06rem; padding: .1rem .12rem; border: 1px solid var(--mint-700);
  background: linear-gradient(90deg, rgba(78, 216, 175, .18), rgba(78, 216, 175, .04)); }
.draft-confirm b { font-size: max(.17rem, 11px); color: var(--mint-400); }
.draft-confirm p { margin: 0; font-size: max(.13rem, 9px); line-height: 1.5; color: var(--text-md); }
/* a phone's short pane: the title and the button only (the pinned box would cover the preset row) */
@media (max-height: 500px) { .draft-confirm p { display: none; } }
