/* ==========================================================================================
   screens/briefing.css — INFO_CHECK briefing (js/screens/briefing.js) + the pre-game step header
   shared with the band draft (js/ui/matchChrome.js StepHeader). Research 06 §4.1 / §11.6.
   The bond rows, the legend and the banned operators (.brief-bonds / .brief-legend / .brief-banned) are
   js/ui/matchInfo.js MatchInfo — also shown by the band draft's 本局信息 dialog (css/screens/draft.css .minfo-dlg).
   ========================================================================================== */

/* ---- shared pre-game backdrop + header ---- */
.brief__bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px),
    radial-gradient(90% 70% at 20% 30%, rgba(232, 90, 26, .07), transparent 60%),
    radial-gradient(80% 70% at 85% 60%, rgba(78, 216, 175, .07), transparent 60%);
}
.stephead {
  position: relative; z-index: 2; flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .24rem;
  height: 1.16rem; padding: 0 .36rem 0 .26rem;
  background: linear-gradient(180deg, rgba(8, 10, 9, .94), rgba(10, 13, 12, .6)); border-bottom: 1px solid var(--line);
}
.stephead::after { content: ''; position: absolute; left: .3rem; right: .3rem; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--mint-700), transparent 26%, transparent 74%, var(--mint-700)); }
.stephead__left { display: flex; align-items: center; gap: .16rem; }
.stephead__meta { display: flex; flex-direction: column; gap: .06rem; align-items: flex-start; }
.stephead__center { display: flex; flex-direction: column; align-items: center; gap: .04rem; }
.stephead__title { display: flex; align-items: baseline; gap: .02rem; font-size: .34rem; font-weight: 900; letter-spacing: .12em; }
.stephead__title b { font-size: .56rem; line-height: 1; color: var(--mint-400); text-shadow: 0 0 .2rem rgba(23, 249, 183, .4); }
.stephead__of { font-size: .26rem; color: var(--text-dim); margin-right: .18rem; }
.stephead__right { justify-self: end; display: flex; align-items: center; gap: .24rem; }
.stephead__right .countdown { --cd-h: .64rem; }

.brief-h { display: flex; align-items: baseline; gap: .12rem; font-size: .21rem; font-weight: 700; letter-spacing: .1em; margin-bottom: .12rem; }
.brief-h::before { content: ''; width: .06rem; height: .2rem; background: var(--mint-500); align-self: center; }

/* ---- briefing layout ---- */
.brief__main { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: 6.2rem 1fr; gap: .36rem; padding: .3rem .5rem .1rem; }
/* Both columns scroll independently: the left one holds the leader's abilities, and a long description used to push
   战场 / 特训敌人 out of the clipped bottom of the row (min-height: 0 alone only shrinks the box). */
.brief__left { display: flex; flex-direction: column; gap: .2rem; min-height: 0; overflow: auto; padding-right: .06rem; overscroll-behavior: contain; }
.brief__right { display: flex; flex-direction: column; gap: .2rem; min-height: 0; overflow: auto; padding-right: .06rem; }

.brief-boss {
  --bk-c: var(--orange-hi);
  position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .2rem; padding: .22rem .24rem;
  background: linear-gradient(135deg, rgba(60, 18, 8, .55), rgba(12, 14, 13, .85) 60%); border: 1px solid rgba(255, 110, 40, .3);
}
.brief-boss > .micro { position: absolute; left: .24rem; top: .1rem; }
.brief-boss__art { position: relative; width: 2rem; height: 2rem; display: grid; place-items: center; margin-top: .12rem; }
.brief-boss__ring { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 110, 40, .5);
  background: radial-gradient(circle, rgba(255, 60, 20, .25), transparent 65%); box-shadow: 0 0 .4rem rgba(255, 80, 30, .25), inset 0 0 .3rem rgba(255, 80, 30, .3); }
.brief-boss__ring::after { content: ''; position: absolute; top: .14rem; left: .14rem; right: .14rem; bottom: .14rem; inset: .14rem; border-radius: 50%; border: 1px dashed rgba(255, 110, 40, .45); animation: spin 18s linear infinite; }
.brief-boss__sil { position: relative; width: 74%; height: 74%; object-fit: cover; border-radius: 50%;
  filter: grayscale(1) sepia(1) hue-rotate(-28deg) saturate(3.2) brightness(.62) contrast(1.35);
  box-shadow: 0 0 0 2px rgba(255, 110, 40, .7), 0 0 .3rem rgba(255, 80, 30, .5); }
.brief-boss__art::after { content: ''; position: absolute; top: 13%; left: 13%; right: 13%; bottom: 13%; inset: 13%; border-radius: 50%; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 4px), radial-gradient(circle, transparent 45%, rgba(40, 8, 2, .75) 100%); }
.brief-boss__q { font-size: 1rem; font-weight: 900; color: rgba(255, 110, 40, .6); }
.brief-boss__text { display: flex; flex-direction: column; gap: .08rem; padding-top: .2rem; min-width: 0; }
.brief-boss__name { font-size: .34rem; font-weight: 900; letter-spacing: .04em; line-height: 1.25; }
.brief-boss__when { font-size: .15rem; color: var(--orange-hi); }
.brief-boss__abil { margin: .04rem 0 0; padding-left: .18rem; display: flex; flex-direction: column; gap: .04rem; font-size: .14rem; line-height: 1.6; color: var(--text-md); }

.brief-stage { display: flex; align-items: center; justify-content: space-between; gap: .1rem .18rem; padding: .12rem .18rem; background: rgba(12, 15, 14, .8); border: 1px solid var(--line); flex-wrap: wrap; }
.brief-stage__k { display: flex; align-items: baseline; gap: .12rem; min-width: 0; }
.brief-stage__pool { font-size: max(.14rem, 10px); color: var(--text-lo); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brief-stage__name { display: flex; align-items: center; gap: .08rem; font-size: max(.19rem, 13px); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-stage__name .icon { width: max(.2rem, 14px); height: max(.2rem, 14px); flex: none; color: var(--mint-500); }

.brief-factions { display: flex; flex-direction: column; gap: .1rem; min-height: 0; }
.brief-faction { display: flex; gap: .14rem; align-items: center; padding: .12rem .16rem; background: rgba(12, 15, 14, .8); border: 1px solid var(--line); border-left: 3px solid var(--amber); }
.brief-faction__icon { width: .72rem; height: .72rem; flex: none; display: grid; place-items: center; background: radial-gradient(circle, rgba(246, 163, 41, .16), transparent 70%); }
.brief-faction__icon img { width: 100%; height: 100%; object-fit: contain; }
.brief-faction__text { display: flex; flex-direction: column; gap: .03rem; }
.brief-faction__text b { font-size: .2rem; color: var(--amber); }
.brief-faction__text span { font-size: .15rem; color: var(--text-lo); }

.brief-bonds { padding: .16rem .2rem .2rem; background: rgba(12, 15, 14, .8); border: 1px solid var(--line); }
.brief-bonds__row { display: flex; flex-wrap: wrap; gap: max(.16rem, 5px) max(.1rem, 6px); }
/* The official bond emblems are 96-110 px of dense detail; at .66rem (22 px on a phone) the 66 % icon lands on ~14 px
   and the marks stop being distinguishable — they read as "the wrong emblem". The floors below keep the disc, its icon
   and the name legible on a phone's ~33 px rem. As in the in-game strip, the cell is sized by its label so a 4-glyph
   name never spills onto its neighbour. */
.brief-bond { --brief-disc: max(.66rem, 30px); position: relative; min-width: max(1rem, 40px); display: flex; justify-content: center; }
.brief-bond .bond { --disc: var(--brief-disc); }
.brief-bond .bond__name { font-size: max(.16rem, 11px); }
/* The banned-operator count sits on its disc's top-right corner. The disc is centred in the cell, so the corner is
   half a disc right of the centre — anchoring by the cell's right edge would drift once a long name widens the cell.
   Anything more negative than -.12rem lifts the badge out of the row and onto the 核心盟约 / CORE BONDS heading above
   it. The 10px / 18px floors are the phone legibility rule (test/ui/overlap.e2e.test.js) — the pill is shrunk by
   position and by a smaller icon, not by the type size. */
.brief-bond__ban { position: absolute; top: max(-.12rem, -5px); right: calc(50% - var(--brief-disc) / 2 - 2px); z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: .01rem; font-size: max(.12rem, 10px); min-width: max(.24rem, 18px); font-weight: 700; padding: 0 max(.03rem, 2px); background: var(--red); color: #fff; line-height: 1.3; box-shadow: 0 0 0 1px #000; }
.brief-bond__ban .icon { width: max(.10rem, 8px); height: max(.10rem, 8px); flex: none; }
.brief-bond.is-partial .bond__core { box-shadow: 0 0 0 2px rgba(255, 84, 84, .5); }
.brief-legend { display: flex; align-items: center; gap: .08rem; flex-wrap: wrap; font-size: .14rem; color: var(--text-dim); margin-top: -.06rem; }
.brief-legend__off { width: .16rem; height: .16rem; border-radius: 50%; background: #3a403d; border: 2px solid #555; }
.brief-legend__ban { display: inline-grid; place-items: center; width: .2rem; height: .18rem; background: var(--red); color: #fff; }
.brief-legend__ban .icon { width: .12rem; height: .12rem; }

.brief-banned { padding: .16rem .2rem .2rem; background: rgba(12, 15, 14, .8); border: 1px solid var(--line); }
.brief-banned__n { margin-left: auto; font-size: .22rem; color: var(--red-premium); }
.brief-banned__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(.6rem, 1fr)); gap: .08rem; }
.brief-banned__grid .uthumb { --ut: .6rem; }

.brief__foot { position: relative; z-index: 2; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: .4rem; padding: .18rem .5rem .3rem; }
.brief-ready { display: flex; align-items: center; gap: .16rem; }
.brief-ready__txt { font-size: .2rem; color: var(--text-lo); }
.brief-ready__txt b { font-size: .4rem; color: var(--mint-400); margin: 0 .02rem; }
.brief-ready__txt span { font-size: .24rem; color: var(--text-dim); }
.brief-ready__pips { display: flex; gap: .06rem; }
.brief-ready__pips i { width: .3rem; height: .3rem; display: grid; place-items: center; color: var(--text-dim); }
.brief-ready__pips i .icon { width: 100%; height: 100%; }
.brief-ready__pips i.on { color: var(--mint-400); filter: drop-shadow(0 0 .06rem rgba(23, 249, 183, .6)); }
.brief-ready__pips i.me { border-bottom: 2px solid var(--mint-700); }
