/* Seasonal selection extends the existing loadout cards and motion tokens. */
.rs { min-width: 0; min-height: 0; color: var(--text-hi); }
.rs-selection { display: flex; flex-direction: column; gap: max(.12rem, 7px); width: 100%; height: 100%; padding: max(.18rem, 10px) max(.28rem, 12px); }
.regimen-selection-screen { display: flex; flex-direction: column; overflow: hidden; }
.regimen-selection-screen > .rs-selection { flex: 1 1 auto; height: auto; position: relative; z-index: 1; }
.rs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.rs-head h2 { margin: .04rem 0; font-size: max(.3rem, 19px); line-height: 1.2; }
.rs-head p { margin: 0; color: var(--text-lo); font-size: max(.15rem, 11px); }
.rs-head__right { display: flex; align-items: center; gap: 12px; }
.rs-head__progress { font-size: max(.18rem, 12px); white-space: nowrap; color: var(--mint-400); }
.rs-rows { flex: 1 1 auto; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 0; container-type: size; }
.rs-row { --rs-tier: var(--tier-5); align-self: center; justify-self: center; width: min(100%, calc(var(--opw) * 6 + 76px)); min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 6px; padding: 2px; background: rgba(7, 10, 9, .28); border-top: 1px solid var(--line); border-bottom: 1px solid rgba(255,255,255,.04); animation: rs-enter 220ms var(--ease-out) backwards; }
.rs-row--t6 { --rs-tier: var(--tier-6); animation-delay: 40ms; }
.rs-row__cards { display: grid; grid-template-rows: var(--op-h); grid-template-columns: repeat(6, var(--opw)); grid-auto-flow: column; grid-auto-columns: var(--opw); gap: 6px; min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; padding: 1px; scroll-padding-inline: 1px; }
.rs-row__tier { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: max(.1rem, 5px); position: relative; border-left: 1px solid color-mix(in srgb, var(--rs-tier) 45%, transparent); color: var(--rs-tier); background: linear-gradient(180deg, rgba(255,255,255,.025), transparent); }
.rs-row__no { font: max(.1rem, 8px) var(--font-display); letter-spacing: .08em; color: var(--text-lo); }
.rs-row__roman { font-size: clamp(24px, 4.8vw, 68px); line-height: 1; font-weight: 900; }
.rs-row__count { display: flex; align-items: baseline; gap: 1px; padding: 3px 5px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: max(.15rem, 11px); color: var(--text-lo); }
.rs-row__count b { color: var(--mint-400); font-size: 1.45em; }
.rs-row__count.is-full { box-shadow: inset 0 0 0 1px var(--mint-800); }
.rs-choice { position: relative; min-width: 0; min-height: 0; display: flex; transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out); }
.rs .lo-op, .rs .lo-op__card { min-width: 0; }
.rs .lo-op__rail { gap: max(.05rem, 3px); }
.rs .lo-op__tier.tier { min-width: 0; }
.rs .lo-op__pick { touch-action: manipulation; }
.rs .lo-op__pick:disabled { cursor: default; }
.rs .lo-op__pick:focus-visible, .rs-choice__empty:focus-visible { outline: 2px solid var(--mint-400); outline-offset: 2px; }
.rs-choice .lo-op__bonds { align-items: center; justify-content: center; }
.rs-choice .lo-op__bonds:empty { display: none; }
.rs-choice .lo-op__bond { flex: 0 0 auto; }
.rs-choice .lo-op__bond img { width: 80%; height: 80%; }
.rs .lo-op.is-sel .lo-op__card { box-shadow: inset 0 0 0 1px var(--mint-400), 0 0 .1rem rgba(78,216,175,.14); }
.rs-choice__check, .rs-choice__edit { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: max(.28rem, 20px); height: max(.28rem, 20px); color: var(--text-on-mint); background: var(--mint-400); pointer-events: none; }
.rs-choice__check .icon, .rs-choice__edit .icon { width: 80%; height: 80%; }
.rs-choice__edit { color: var(--text-hi); background: rgba(5,12,9,.8); border: 1px solid var(--line-3); }
.rs-choice.is-banned .lo-op { opacity: .25; filter: saturate(.35); }
.rs-choice__ban { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 9px 2px 10px; background: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.34)); pointer-events: none; text-align: center; }
.rs-choice__ban .icon { width: max(.42rem, 24px); height: max(.42rem, 24px); padding: 4px; color: #252b28; background: #c3cbc7; clip-path: polygon(15% 0,85% 0,100% 15%,100% 85%,85% 100%,15% 100%,0 85%,0 15%); }
.rs-choice__ban b { font-size: max(.16rem, 11px); color: #d8dedb; }
.rs-choice__ban small { max-width: 100%; font-size: max(.12rem, 10px); color: var(--text-lo); overflow-wrap: anywhere; }
.rs-choice__reserve { position: absolute; top: 5px; right: 5px; padding: 2px 4px; font-size: max(.11rem, 9px); color: var(--ice-900); background: var(--ice); pointer-events: none; }
.rs-choice.is-selected .rs-choice__reserve { top: auto; bottom: 5px; }
.rs-choice__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: max(.12rem, 7px); width: 100%; height: 100%; min-height: 100px; padding: 8px; background: linear-gradient(180deg, var(--bg-3), var(--bg-1)); color: var(--text-md); border: 1px dashed var(--line-3); cursor: pointer; font: inherit; }
.rs-choice__empty > .icon { width: max(.42rem, 26px); height: max(.42rem, 26px); color: var(--mint-500); }
.rs-choice__empty b { font-size: max(.17rem, 12px); text-align: center; }
.rs-choice__empty small { font-size: max(.12rem, 10px); color: var(--text-lo); }
.rs-loading { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px; font-size: max(.18rem, 12px); color: var(--text-lo); }
.rs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; min-height: 42px; }
.rs-foot__note { min-width: 0; font-size: max(.16rem, 11px); color: var(--text-lo); line-height: 1.35; }
.rs-foot__note b { color: var(--mint-400); font-size: 1.4em; }
.rs-foot__note small { display: block; margin-top: 2px; font-size: max(.13rem, 10px); }
.rs-error, .rs-confirmed { display: inline-flex; align-items: center; gap: 5px; }
.rs-error { color: var(--amber); }
.rs-confirmed { color: var(--mint-400); }
.rs-confirm { min-width: max(2.1rem, 130px); flex: none; }
.rs-confirm:active:not(:disabled) { transform: scale(.98); transition: transform 120ms var(--ease-out); }
.rs-setup { gap: 0; }
.rs-setup__head { flex: none; }
.rs-setup__note { flex: none; display: flex; align-items: center; gap: 9px; margin: 0; padding: max(.12rem, 8px) max(.3rem, 12px); font-size: max(.16rem, 12px); color: var(--text-md); border-bottom: 1px solid var(--line); }
.rs-setup__note > .icon { flex: none; color: var(--mint-400); }
.rs-setup__note span { min-width: 0; }
.rs-setup__note small { display: block; margin-top: 3px; color: var(--text-lo); font-size: max(.13rem, 10px); }
.rs-setup__note > b { margin-left: auto; color: var(--mint-400); white-space: nowrap; font-size: max(.24rem, 16px); }
.rs-setup__main { flex: 1 1 auto; min-height: 0; display: flex; overflow-y: auto; padding: 4px max(.3rem, 12px); }
.rs-setup__foot { padding: max(.1rem, 7px) max(.3rem, 12px); border-top: 1px solid var(--line); }
/* The slot picker deliberately keeps the native deck's card widths and drawer. */
.rs-roster-picker { gap: 0; }
.rs-roster__filters { position: relative; z-index: 1; display: flex; align-items: center; gap: max(.2rem, 10px); flex: none;
  min-width: 0; padding: max(.1rem, 5px) max(.36rem, 12px); border-bottom: 1px solid var(--line); background: rgba(8, 11, 10, .72); }
.rs-roster__filters .lo-search { flex: 0 1 max(5.4rem, 280px); min-width: 200px; margin: 0; flex-direction: row; align-items: center; gap: 8px; }
.rs-roster__filters .field__label { flex: none; font-size: max(.15rem, 11px); white-space: nowrap; }
.rs-roster__filters .field__box { flex: 1 1 auto; min-width: 0; }
.rs-roster__filters > span { min-width: 0; color: var(--text-lo); font-size: max(.15rem, 11px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-roster__main { min-width: 0; }
.rs-roster__option { position: relative; display: flex; width: var(--opw); min-height: 0; }
.rs-roster__option .lo-op { width: 100%; }
.rs-roster__option.is-taken .lo-op { opacity: .32; filter: saturate(.4); }
.rs-roster__option.is-taken .lo-op__card { cursor: not-allowed; }
.rs-roster__taken { position: absolute; left: 0; right: 0; bottom: max(.38rem, 22px); display: flex; align-items: center; justify-content: center;
  gap: 4px; min-height: 25px; padding: 3px; color: #d8dedb; background: rgba(7, 11, 9, .88); font-size: max(.16rem, 11px); font-weight: 800; pointer-events: none; }
.rs-roster__taken .icon { width: 14px; height: 14px; }
.rs-roster__foot { justify-content: space-between; gap: 12px; }
.rs-roster__foot > .btn { flex: none; }
.rs-roster__note { min-width: 0; font-size: max(.15rem, 11px); line-height: 1.4; color: var(--text-lo); }
.rs-roster__note.rs-error { color: var(--amber); }
@keyframes rs-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) and (pointer: fine) {
  .rs-choice:not(.is-banned):has(button:not(:disabled)):hover { transform: translateY(-2px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .rs-selection { padding: 5px 10px; gap: 5px; }
  .rs-rows { gap: 5px; }
  .rs-row { padding: 2px; }
  .rs .lo-op__lv { gap: 1px; padding: 2px 0; }
  .rs .lo-op__lvrow b { font-size: 9px; }
  .rs .lo-op__meta { padding-top: 1px; }
  .rs .lo-op__pot { gap: 1px; }
  .rs .lo-op__pot i { width: 3px; height: 3px; }
  .rs-foot { min-height: 34px; }
  .rs-foot .btn { min-height: 34px; }
  .rs-foot__note small { display: none; }
  .rs-setup__note { padding-block: 4px; font-size: 11px; }
  .rs-setup__note small { display: none; }
  .rs-setup__main { padding-block: 4px; }
  .rs-setup__foot { padding-block: 4px; }
  .rs-setup__head { min-height: 42px; }
  .rs-setup__head .lo-top__title { font-size: 17px; }
  .rs-roster__filters { min-height: 32px; padding-block: 2px; }
  .rs-roster__filters > span { font-size: 10px; }
  .rs-roster__foot { height: auto; min-height: 40px; padding-block: 4px; }
  .rs-roster__foot .btn { min-height: 32px; }
  .rs-roster__note { font-size: 10px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .rs-selection { padding-inline: 8px; }
  .rs-setup__head { grid-template-columns: 1fr auto; }
  .rs-setup__head .lo-top__center { grid-column: 1 / -1; grid-row: 2; align-items: flex-start; text-align: left; }
  .rs-setup__head .lo-top__right { grid-column: 2; grid-row: 1; }
  .rs-setup__note { align-items: flex-start; padding-inline: 9px; }
  .rs-setup__main { padding-inline: 6px; }
  .rs-setup__foot .rs-foot__note { max-width: 50%; font-size: 10px; }
  .rs-roster__filters { flex-wrap: wrap; gap: 3px; padding-inline: 8px; }
  .rs-roster__filters .lo-search { flex-basis: 100%; }
  .rs-roster__filters > span { width: 100%; font-size: 10px; }
  .rs-roster__foot { padding-inline: 8px; gap: 8px; }
  .rs-roster__note { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-row { animation: none; }
  .rs-choice, .rs-confirm { transition: opacity 100ms ease; }
  .rs-choice:hover, .rs-confirm:active:not(:disabled) { transform: none; }
}

/* 确定自选编队 (CUSTOM_CHECK, js/screens/diyCheck.js) — after the official 3/3 (2026-11-21): the doctors on the left (the
   draft's .dorder rows, css/screens/draft.css), the bracket, then a panel with one row per tier — the 干员调配 deck cards
   (css/screens/loadout.css .lo-op) from the right edge, the tier's tall NO. mark and 已选 n/上限 — and the foot. Sits on the
   briefing chrome (briefing.css: header, backdrop, 已就绪, 准备就绪). The panel scrolls on a short screen, never the page. */

.diyc { --opw: 1.5rem; --rail: .42rem; --drh: 1.06rem; min-width: 0; overflow: hidden; }
.diyc__main {
  position: relative; z-index: 1; flex: 1; min-height: 0; min-width: 0;
  display: grid; grid-template-columns: minmax(3.6rem, 5.4rem) .42rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  padding: .04rem .3rem .2rem .3rem;
}

/* ---- the doctors ---- */
.diyc__side {
  grid-column: 1; position: relative; display: flex; flex-direction: column; gap: .14rem; min-width: 0; min-height: 0;
  padding: .24rem 0 .18rem .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;
}
/* centred in the column when they fit (the bracket points at the middle), scrolling from the top when not */
.diyc__players { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .14rem; overflow-y: auto; padding: .06rem .3rem .08rem .26rem; scrollbar-width: none; }
.diyc__players::before, .diyc__players::after { content: ''; flex: 1 1 0; }
.diyc__player .dorder__box.is-band { cursor: default; }
.diyc__link { grid-column: 2; }

/* ---- the panel: a row a tier ---- */
.diyc__panel {
  grid-column: 3; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: linear-gradient(180deg, rgba(24, 27, 28, .6), rgba(10, 12, 12, .4)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  animation: pg-right 460ms var(--pg-ease) 160ms backwards;
}
.diyc__lead { flex: none; margin: .14rem .3rem 0; font-size: calc(.18 * var(--t)); line-height: 1.4; color: var(--mint-400); }
.diyc__empty { margin: .4rem .3rem; font-size: calc(.22 * var(--t)); color: #8d9996; }
.diyc__rows {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; justify-content: space-around; gap: .14rem; padding: .1rem .26rem .1rem .3rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
.diyc__row { flex: none; display: flex; align-items: stretch; justify-content: flex-end; gap: .2rem; min-width: 0; }
.diyc__row + .diyc__row { padding-top: .14rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.diyc__cards { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; align-content: center; gap: .14rem .12rem; min-width: 0; }
.diyc__mark { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; width: 1.3rem; }
.diyc__mark .lo-tmark { height: 2.2rem; }
.diyc__mark .lo-tmark__art { width: 1.1rem; height: 2.2rem; max-height: none; object-fit: cover; object-position: 50% 0; }
.diyc__mark .lo-tmark__css { flex: none; height: 2.2rem; }
.diyc__mark .lo-tmark__cnt { display: none; }
.diyc__count {
  display: inline-flex; align-items: baseline; gap: .02rem; padding: .02rem .16rem; border-radius: .3rem;
  font-size: calc(.26 * var(--t)); color: #d6dada; background: rgba(0, 0, 0, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.diyc__count b { font-size: calc(.36 * var(--t)); color: var(--mint-400); }

/* ---- a card: the deck card (loadout.css .lo-op) at this screen's size, a button that toggles it ---- */
.diyc__card { flex: none; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: var(--sp-cursor-pointer, pointer); }
.diyc__card .lo-op__card { height: 2.8rem; }
.diyc__card:disabled { cursor: var(--sp-cursor-default, default); }
.diyc__card:disabled:not(.is-banned) .lo-op__card { border-color: rgba(255, 255, 255, .08); }
.diyc__card:focus-visible .lo-op__card { outline: 2px solid var(--mint-400); outline-offset: 2px; }
.diyc__card.is-sel .lo-op__card { background: linear-gradient(180deg, rgba(36, 92, 76, .95), rgba(18, 40, 34, .96)); }
.diyc__card.is-sel .lo-op__card::after {
  content: ''; position: absolute; right: -.04rem; top: -.04rem; width: .26rem; height: .26rem;
  background: var(--mint-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%23062019'/%3E%3C/svg%3E") center / 78% no-repeat;
  box-shadow: 0 0 .1rem rgba(23, 249, 183, .6);
}
/* banned this match: grey, 本局禁用 over the portrait, the deciding bonds struck */
.diyc__card.is-banned .lo-op__card { filter: grayscale(1); opacity: .62; }
.diyc__card.is-banned .lo-op__art img { filter: brightness(.55); }
.diyc__ban {
  position: absolute; left: 0; right: 0; top: 42%; display: flex; flex-direction: column; align-items: center; gap: .04rem;
  padding: .06rem 0; font-size: calc(.17 * var(--t)); color: #f2f4f4; background: rgba(10, 12, 12, .78);
}
.diyc__banmark { display: grid; place-items: center; width: .34rem; height: .22rem; border-radius: .04rem; background: #e9ecec; color: #1a1d1c; }
.diyc__banmark .icon { width: .22rem; height: .22rem; }
.lo-op__bond.is-off { border-color: #ff6b6b; box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .5); }
.lo-op__bond.is-off img { opacity: .45; }

/* ---- the foot: the timeout note, 已就绪, 不带入自选, 确认编队 ---- */
.diyc__foot {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: .3rem; flex-wrap: wrap;
  padding: .1rem .2rem .12rem .3rem; border-top: 1px solid rgba(255, 255, 255, .06);
}
.diyc__hint { flex: 1 1 4rem; display: inline-flex; align-items: center; gap: .06rem; min-width: 0; margin: 0 auto 0 0; font-size: calc(.16 * var(--t)); color: var(--text-dim); }
.diyc__hint .icon { flex: none; width: .2rem; height: .2rem; }
.diyc__foot .brief-ready__txt { font-size: calc(.18 * var(--t)); }
.diyc__foot .brief-ready__txt b { font-size: calc(.34 * var(--t)); }
.diyc__foot .brief-go.btn--xl { height: .8rem; min-width: 3.2rem; font-size: calc(.32 * var(--t)); }

@media (max-width: 900px) {
  .diyc__main { grid-template-columns: minmax(2.4rem, 3rem) .2rem minmax(0, 1fr); padding-left: .16rem; padding-right: .16rem; }
  .diyc__mark { width: .9rem; }
  .diyc__mark .lo-tmark, .diyc__mark .lo-tmark__art, .diyc__mark .lo-tmark__css { height: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .diyc__side, .diyc__panel { animation: none; } }

.diyc .diyc__panel > .rs-selection { display:flex; flex-direction:column; width:auto; flex:1; min-height:0; margin:0; padding:0; max-width:none; }
.diyc .rs-rows { flex:1; min-height:0; padding:.12rem .22rem; overflow:auto; }
.diyc .rs-row { justify-content:flex-end; }
.diyc .rs-foot { position:static; width:100%; padding:.1rem .16rem; margin:0; }
.diyc .rs-foot__note { flex:1; }
.diyc .diyc__none { white-space:nowrap; }
@media (max-width:640px) and (orientation:portrait) {
  .diyc__main { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
  .diyc__side { grid-column:1; grid-row:1; padding:.08rem 0; }
  .diyc__players { flex-direction:row; max-height:1.3rem; overflow:auto; padding:.06rem; }
  .diyc__players .dorder { min-width:max(1.5rem,96px); }
  .diyc__players::before, .diyc__players::after, .diyc__link { display:none; }
  .diyc__panel { grid-column:1; grid-row:2; }
}
