/* 観戦（最強AI生中継）。たいせん画面の上部にタイトル帯、下部に実況。 */
.spec-title { position: absolute; top: 5px; left: 7px; right: 7px; height: 27px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 9px; background: #3a2208ee; border: 2px solid #ffd767; border-radius: 7px; pointer-events: none; }
.spec-title[hidden], .spec-live[hidden] { display: none; }
.spec-title b { font-size: 14px; font-weight: normal; color: #ffe27a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spec-title small { font-size: 10px; color: #ffd0a0; white-space: nowrap; flex: none; }
.spec-live { position: absolute; left: 7px; right: 7px; bottom: 10px; height: 76px; z-index: 6; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 6px 9px; box-sizing: border-box; overflow: hidden; background: #0c1630ee; border: 2px solid #eee4cd; border-radius: 7px; pointer-events: none; }
.spec-live p { margin: 0; font-size: 12px; line-height: 1.45; color: #aeb9cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-live p.now { font-size: 14px; color: #fff4c4; }
.versus.spectate .vs-hud { inset: 36px 7px auto; }
.versus.spectate .hud-r, .versus.spectate .quit { top: 94px; }
.spectate #strip, .spectate #b-wave, .spectate #b-peek, .spectate #b-reroll, .spectate #sell-zone, .spectate #b-stats, .spectate .battle-notice .battle-guide, .spectate #vs-note { display: none !important; }
.spectate .battle-notice { pointer-events: none; }
.spectate #banner { display: none !important; }
.spec-verdict { line-height: 1.7; font-size: 15px; }
/* たいせんメニューの対戦カード */
.spec-card { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 14px; text-align: center; }
.spec-card h2 { margin: 2px 0 0; font-size: 20px; color: #ffda78; font-weight: normal; }
.spec-card .spec-sub { margin: 0; font-size: 12px; color: #b8d6ef; }
.spec-side { padding: 8px 6px; border-radius: 8px; border: 2px solid #617292; background: #192239; }
.spec-side.blue { border-color: #4a8fe7; }
.spec-side.red { border-color: #e7604a; }
.spec-side b { display: block; font-size: 15px; margin-bottom: 4px; }
.spec-side.blue b { color: #8fcaff; }
.spec-side.red b { color: #ffa395; }
.spec-faces { display: flex; gap: 2px; }
.spec-faces img { flex: 1 1 0; min-width: 0; height: 46px; object-fit: contain; }
.spec-side small { display: block; margin-top: 4px; font-size: 11px; color: #b8d6ef; line-height: 1.5; }
.spec-vs { font-size: 18px; color: #ffd767; }
/* 判断理由の字幕（青軍・赤軍それぞれ1行。実況の箱のすぐ上。盤面をじゃましないよう小さく半透明） */
.spec-why { position: absolute; left: 7px; right: 7px; bottom: 92px; z-index: 6; display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; box-sizing: border-box; background: #0c1630cc; border-radius: 7px; pointer-events: none; }
.spec-why[hidden] { display: none; }
.spec-why p { margin: 0; font-size: 12px; line-height: 1.4; color: #e8eefc; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.spec-why p small { margin-left: 6px; font-size: 11px; color: #9fb3d8; white-space: normal; }
.spec-why p b { display: inline-block; width: 1.5em; margin-right: 4px; text-align: center; font-weight: normal; border-radius: 4px; color: #0c1630; }
.spec-why p.blue b { background: #8fcaff; }
.spec-why p.red b { background: #ffa395; }
/* 観戦メニュー */
.spec-menu { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 14px; }
.spec-menu > * { flex-shrink: 0; }
.spec-menu .spec-h { margin: 6px 0 0; font-size: 18px; font-weight: normal; color: #ffda78; text-align: center; }
.spec-menu .spec-sub { margin: 0; font-size: 12px; line-height: 1.5; color: #b8d6ef; text-align: center; }
#vs-levels .spec-test-open { display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 10px 8px; }
.spec-test-open b { font-size: 17px; font-weight: normal; }
.spec-test-open small { white-space: normal; font-size: 11px; line-height: 1.4; opacity: .85; }
.spec-list { display: flex; flex-direction: column; gap: 8px; }
#vs-levels .spec-match { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 8px 8px; text-align: left; }
.spec-match b, .spec-match small { white-space: normal; }
.spec-match b { font-size: 13px; font-weight: normal; line-height: 1.4; }
.spec-match small { font-size: 11px; opacity: .85; }
.spec-mf { display: flex; align-items: center; gap: 4px; }
.spec-mf > span { display: flex; flex: 1 1 0; min-width: 0; gap: 1px; }
.spec-mf img { flex: 1 1 0; min-width: 0; height: 34px; object-fit: contain; }
.spec-mf i { flex: none; font-style: normal; font-size: 12px; color: #ffd767; }
.spec-back { align-self: flex-start; }
/* デッキえらび */
.spec-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.spec-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; height: 66px; padding: 3px 1px; border: 2px dashed #617292; border-radius: 8px; background: #141c30; color: #b8d6ef; font: inherit; }
.spec-slot.full { border-style: solid; border-color: #ffd767; background: #2a2412; color: #fff4c4; cursor: pointer; }
.spec-slot img { height: 38px; max-width: 100%; object-fit: contain; }
.spec-slot small { display: block; max-width: 100%; font-size: 10px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-pool { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#vs-levels .spec-pool .btn { padding: 8px 4px; font-size: 13px; }
.spec-hint { margin: 0; font-size: 11px; text-align: center; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 84px; gap: 4px; max-height: 232px; overflow-y: auto; padding: 3px; border-radius: 8px; background: #0f1628; -webkit-overflow-scrolling: touch; }
.spec-unit { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 84px; overflow: hidden; gap: 1px; min-width: 0; padding: 4px 1px 3px; border: 2px solid #3d4a69; border-radius: 7px; background: #192239; color: #dfe8ff; font: inherit; cursor: pointer; }
.spec-unit img { height: 40px; max-width: 100%; object-fit: contain; }
.spec-unit small { display: block; max-width: 100%; font-size: 10px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-unit i { font-style: normal; font-size: 10px; color: #ffd767; }
.spec-unit.on { border-color: #ffd767; background: #3a2d10; }
.spec-unit:disabled { opacity: .4; cursor: default; }
.spec-oppl { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #b8d6ef; }
.spec-opp { width: 100%; box-sizing: border-box; padding: 8px 6px; font: inherit; font-size: 13px; color: #fff; background: #192239; border: 2px solid #617292; border-radius: 8px; }
.spec-go { padding: 12px 8px; font-size: 16px; }
.spec-go:disabled { opacity: .55; }
/* 考え中・結果 */
.spec-run { display: flex; flex-direction: column; gap: 8px; }
.spec-run[hidden] { display: none; }
.spec-bar { height: 10px; border-radius: 6px; background: #0f1628; border: 1px solid #617292; overflow: hidden; }
.spec-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ffe27a); transition: width .3s; }
.spec-think { margin: 0; font-size: 13px; text-align: center; color: #fff4c4; }
.spec-rows { display: flex; flex-direction: column; gap: 5px; }
.spec-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; border: 2px solid #3d4a69; background: #192239; }
.spec-row.win { border-color: #4aa36b; }
.spec-row.lose { border-color: #c4584a; }
.spec-res { flex: none; width: 3.6em; text-align: center; font-size: 13px; color: #fff4c4; }
.spec-row .spec-vs { flex: 1 1 0; min-width: 0; font-size: 12px; color: #dfe8ff; line-height: 1.4; }
.spec-row .spec-vs small { display: block; font-size: 10px; color: #b8d6ef; }
#vs-levels .spec-row .btn { flex: none; width: 4.4em; min-width: 0; padding: 6px 0; font-size: 12px; letter-spacing: 0; }
.spec-eval { padding: 9px 10px; border: 2px solid #ffd767; border-radius: 8px; background: #2a2412; }
.spec-eval h3 { margin: 0 0 4px; font-size: 14px; font-weight: normal; color: #ffda78; }
.spec-eval p { margin: 0 0 5px; font-size: 13px; line-height: 1.55; color: #fff4d8; }
.spec-eval p:last-child { margin-bottom: 0; }
/* デッキえらびの間は、ランクの札と案内の文を畳んで、えらぶ枠に高さを回す（390 幅・縦が短い端末でも枠が潰れない） */
#s-versus.spec-deep #ranked-card, #s-versus.spec-deep .vs-guide { display: none; }
.spec-grid { min-height: 176px; max-height: max(176px, min(232px, 30dvh)); }
/* 最強の系譜 */
.lin-box { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid #7a6320; border-radius: 10px; background: linear-gradient(#2a2412, #1b1a12); }
.lin-box > * { flex-shrink: 0; }
.lin-box .spec-h { margin-top: 0; }
.lin-item { display: flex; flex-direction: column; gap: 4px; padding: 6px 7px; border: 2px solid #3d4a69; border-radius: 8px; background: #192239; }
.lin-item.cur { border-color: #ffd767; background: #2f2812; }
.lin-item.fresh { animation: lin-fresh 1.4s ease-out 2; }
.lin-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lin-top b { flex: 1 1 0; min-width: 0; font-size: 14px; font-weight: normal; color: #fff4c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lin-gen { flex: none; font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #ffd767; color: #3a2208; }
.lin-top em { flex: none; font-style: normal; font-size: 10px; color: #ffb347; }
.lin-top span { flex: none; font-size: 10px; color: #b8d6ef; }
.lin-faces { display: flex; gap: 2px; }
.lin-faces img { flex: 1 1 0; min-width: 0; height: 30px; object-fit: contain; }
.lin-item small { display: block; font-size: 10.5px; line-height: 1.45; color: #b8d6ef; white-space: normal; }
#vs-levels .lin-more { padding: 6px 4px; font-size: 12px; }
.lin-name { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b8d6ef; }
.lin-name input, .setname input { flex: 1 1 0; min-width: 0; box-sizing: border-box; padding: 7px 8px; font: inherit; font-size: 13px; color: #fff; background: #192239; border: 2px solid #617292; border-radius: 8px; }
.setname { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.setname input { width: 100%; }
@keyframes lin-fresh { 0%, 100% { box-shadow: 0 0 0 0 #ffd76700; } 40% { box-shadow: 0 0 14px 4px #ffd767cc; } }
/* 最強に挑む */
.spec-chal { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid #b0503f; border-radius: 10px; background: #2a1614; }
.spec-chal > * { flex-shrink: 0; }
.spec-chal h3 { margin: 0; font-size: 15px; font-weight: normal; color: #ffb0a0; }
.spec-chal p { margin: 0; font-size: 11.5px; line-height: 1.55; color: #f1d3cc; }
.spec-challenge { padding: 11px 8px; font-size: 15px; }
.spec-challenge:disabled { opacity: .55; }
.spec-eval.renewed { border-color: #ffb300; box-shadow: 0 0 12px #ffb30088; }
/* 最強、更新！の演出（光・文字・音）。メニューが見えている時だけ #phone の上に重ねる */
.lin-fx { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, #5a3d00f0, #0a0618f7 72%); animation: lin-in .35s ease-out; }
.lin-rays { position: absolute; left: 50%; top: 40%; width: 230%; aspect-ratio: 1; transform: translate(-50%, -50%); background: repeating-conic-gradient(#ffe27a55 0 6deg, #0000 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, #0000 60%); mask: radial-gradient(circle, #000 0, #0000 60%); animation: lin-spin 16s linear infinite; }
.lin-glow { position: absolute; left: 50%; top: 40%; width: 96%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, #fff8c8cc, #ffd76744 45%, #0000 70%); animation: lin-pulse 1.8s ease-in-out infinite; }
.lin-star { position: absolute; bottom: -24px; left: var(--x); font-style: normal; font-size: var(--s); color: #ffe27a; text-shadow: 0 0 6px #fff; opacity: 0; animation: lin-rise 2.8s ease-out var(--d) infinite; }
.lin-body { position: relative; z-index: 1; width: 88%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lin-gen2 { font-size: 14px; letter-spacing: .2em; color: #ffd767; animation: lin-slide .6s .3s both; }
.lin-body h2 { margin: 0; font-size: 40px; font-weight: normal; line-height: 1.15; color: #fff6c8; text-shadow: 0 0 12px #ffb300, 0 0 28px #ff8a00, 0 3px 0 #8a4b00; animation: lin-pop .8s cubic-bezier(.2, 1.6, .4, 1) .15s both; }
.lin-line { margin: 0; font-size: 16px; line-height: 1.5; color: #fff; text-shadow: 0 2px 6px #000; animation: lin-slide .6s .9s both; }
.lin-faces2 { display: flex; gap: 3px; width: 100%; animation: lin-slide .6s 1.2s both; }
.lin-faces2 img { flex: 1 1 0; min-width: 0; height: 56px; object-fit: contain; filter: drop-shadow(0 0 6px #ffd767); }
.lin-learn { margin: 0; font-size: 12px; line-height: 1.55; color: #ffe9a8; animation: lin-slide .6s 1.5s both; }
.lin-fx .lin-ok { width: 70%; margin-top: 4px; animation: lin-slide .5s 1.5s both; }
.lin-fx .lin-ok:disabled { opacity: .5; }
@keyframes lin-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lin-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes lin-pulse { 0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes lin-pop { 0% { opacity: 0; transform: scale(.3) rotate(-6deg); } 60% { opacity: 1; transform: scale(1.18) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes lin-slide { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lin-rise { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-110vh) scale(1.1) rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .lin-fx, .lin-fx * { animation: none !important; } .lin-star { display: none; } }

/* ランクの結果: 最強に挑むボタンは1行を使う（スタンプなどと横並びにすると文字が切れる） */
#vs-challenge { display: block; width: 100%; margin-top: 8px; padding: 8px 6px; font-size: 14px; }
/* 直接踏破（AI戦の「最強」の段で勝った）: 系譜の印と、結果の上の光の幕に最強側のひと言 */
.lin-direct { align-self: flex-start; font-size: 11px; padding: 1px 8px; border-radius: 9px; background: #b0503f; color: #fff4e8; }
.lin-direct-sum { margin: 0; font-size: 11.5px; line-height: 1.5; color: #ffc9b8; }
.direct-say { margin: 0; padding: 8px 12px; border-radius: 12px; background: #1a0f0ccc; border: 2px solid #ff8a6a; font-size: 14px; line-height: 1.55; color: #fff; animation: lin-slide .6s 1.35s both; }
.direct-say b { display: block; font-weight: normal; font-size: 11px; color: #ffb39c; letter-spacing: .1em; }
.vs-direct { color: #ffb39c; font-weight: 900; }
