/* 初見監査 第2回の修正で足したスタイル。最後に読み込む。 */
.nb { white-space: nowrap; }
.deck-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wiki-link { flex: none; display: inline-grid; place-items: center; min-height: 40px; padding: 0 10px; font-size: 12px; color: #ffe36b; text-decoration: underline; }
.credit-link { font-size: 15px; opacity: .85; }
#b-gacha.beckon::after { top: -9px; }

/* ★5 の星は役割バッジの左で止める */
.card .st { max-width: calc(100% - 26px); white-space: nowrap; overflow: hidden; font-size: 9px; letter-spacing: -.5px; }
.card .nm { font-size: 9px; letter-spacing: -.3px; }
.reroll-btn { min-width: 64px; }
.reroll-label small { font-size: 10px; }

/* デッキの空き枠 */
.card.empty.can-fill { cursor: pointer; border-color: #ffe36b; animation: a2pulse 1.8s ease-in-out infinite; }
.slot-hint { display: block; font-size: 10px; line-height: 1.2; color: #ffe36b; text-align: center; padding-top: 18px; }
#deck-hint.free { color: #ffe36b; opacity: 1; }

/* 未入手の子はたたむ */
.card.folded { display: none; }
.coll-more { grid-column: 1 / -1; min-height: 40px; border: 1px dashed #fff6; border-radius: 8px; background: #0003; color: #fff; font-size: 12px; }

/* ガチャ結果 */
.rates .rates-line, .rates .rates-first { display: block; }
.rates .rates-first { margin-top: 2px; color: #ffe36b; }
.g-auto { min-height: 40px; margin-top: 6px; }
.g-fanfare { grid-column: 1 / -1; text-align: center; padding: 10px 6px; animation: a2pop .5s ease-out both; }
.g-fanfare .gf-star { display: block; font-size: 22px; color: #ffe36b; text-shadow: 0 0 12px #ffb300, 0 2px 0 #000; }
.g-fanfare b { display: block; font-size: 20px; text-shadow: 0 2px 0 #000; }
.g-fanfare small { display: block; font-size: 12px; opacity: .85; }
.g-omen { color: #ffe36b; text-shadow: 0 0 16px #ffb300; animation: a2pop .5s ease-out both; }
.glow.big { transform: scale(1.8); opacity: 1; }
.g-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(circle at 50% 40%, #fff, #ffe36b88 40%, #0000 70%); animation: a2flash .9s ease-out forwards; }
.g-spark { position: absolute; left: 50%; top: 40%; width: 6px; height: 6px; border-radius: 50%; background: #ffe36b; z-index: 4; pointer-events: none; animation: a2spark 1.1s ease-out forwards; }
.g-spark:nth-child(3n) { background: #fff; }
.g-spark:nth-child(3n+1) { --dx: 90px; --dy: -80px; }
.g-spark:nth-child(3n+2) { --dx: -90px; --dy: -60px; }
.g-spark:nth-child(3n) { --dx: 10px; --dy: -120px; }
.g-results.has-top { align-content: start; }
.card.top { animation: a2pulse 1.6s ease-in-out infinite; }
@keyframes a2pulse { 50% { box-shadow: 0 0 12px 2px #ffe36b; } }
@keyframes a2pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes a2flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes a2spark { to { transform: translate(var(--dx, 60px), var(--dy, -90px)) scale(.3); opacity: 0; } }

/* 戦闘中にソウルが余ったまま数秒たつと、呼べるカードとソウル数がそっと光る（文字・音は出さない） */
.strip .card.call { animation: a2call 1.5s ease-in-out infinite; }
.soul.surplus { animation: a2soul 1.5s ease-in-out infinite; }
@keyframes a2call { 50% { box-shadow: 0 0 0 2px #ffe36b, 0 0 14px 3px #ffe36b99; transform: translateY(-3px); } }
@keyframes a2soul { 50% { box-shadow: 0 0 0 2px #ffe36b, 0 0 16px 4px #ffe36bcc; } }

/* 戦闘: Wave クリアは濃い金の帯に白字で。報酬の行も読める濃さにする */
.battle-notice:has(.banner.clear.go) { background: linear-gradient(#7a4d06, #3b2503); border-bottom-color: #ffd84a; }
.battle-notice .banner.clear { color: #fff; font-weight: 900; -webkit-text-stroke: 0; text-shadow: 0 0 10px #ffb300, 0 2px 0 #000, 0 0 2px #000; }
.battle-notice .banner.clear small { color: #ffeaa0; font-size: 12px; font-weight: 700; text-shadow: 0 1px 0 #000; }
.battle-notice .banner.clear.go { animation-duration: 2.6s; }

/* 負けた画面の攻略リンク */
.res-wiki { display: block; margin-top: 8px; min-height: 40px; line-height: 40px; text-align: center; font-size: 13px; }

/* 拠点の説明パネル: なかまをタップしても高さが変わらない（下の一覧がずれて誤タップしない）。長い説明は3行で切り、長押しで全文 */
.info .idesc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 12px; }
.info .ihead { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info { height: 152px; min-height: 152px; box-sizing: border-box; overflow: hidden; }
/* デッキの見出し行: ヒントの文が2行に折り返しても行の高さを変えない（下の一覧がずれない） */
.deck-label { height: 44px; }
.deck-label .deck-title { line-height: 1.25; }
/* 320幅でガチャ結果の「おまかせで入れる」が切れない */
.g-auto { font-size: clamp(12px, 3.7vw, 16px); letter-spacing: 0; padding: 4px 10px; white-space: normal; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; height: auto; }
.g-auto b { font-size: 1.05em; }
/* ガチャ結果は5列のカードの格子。ボタンも1枚ぶんの升に入ってしまい、文字が1〜2字ずつ折れていた → 案内と同じく横いっぱいの行に置く */
.g-results .g-auto { grid-column: 1 / -1; justify-self: center; width: min(100%, 280px); }
.g-auto small { font-size: .75em; }
/* ガチャの結果: 低い画面では10枚＋案内＋おまかせのボタンが宝箱の場所に入りきらず、下が切れていた → 場所の中でたてに送れる */
.g-results { overflow-y: auto; align-content: safe center; overscroll-behavior: contain; }
/* 入れた子・入れかえの案内は長いので、角の丸い札にして折り返す（丸い帯のままだと文字が帯からはみ出した） */
.g-results .g-done { border-radius: 10px; max-width: min(100%, 520px); line-height: 1.5; text-align: center; animation: none; }
