:root{color-scheme:dark;font-family:system-ui,-apple-system,'Noto Sans TC',sans-serif;color:#e9f5f0;background:#0c1b23;--muted:#a9c1c9;--mint:#98f0ca;--gold:#f2d59b}*{box-sizing:border-box}body{margin:0}button,a{font:inherit}button{min-height:46px;border:1px solid #57717b;border-radius:12px;padding:10px 16px;color:inherit;background:#213843;cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #ffe6a0;outline-offset:3px}button.primary{background:var(--mint);color:#10372e;border-color:var(--mint);font-weight:750}button.quiet{background:transparent}small,.muted{color:var(--muted)}#app{max-width:1050px;margin:auto;min-height:100dvh;padding:18px 24px;background:radial-gradient(ellipse at 50% 40%,#2d53504a,transparent 60%)}header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}header h1{font-size:20px;letter-spacing:2px;margin:0}header small{font-size:14px}.top-buttons{display:flex;gap:7px}.top-buttons button{font-size:14px;padding:7px 12px}.turn-banner{border:1px solid #5f8d89;background:#1f403f;border-radius:12px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.turn-banner b{font-size:17px}.energy{white-space:nowrap;color:var(--gold);font-size:14px}.arena{display:grid;grid-template-columns:1fr 170px 1fr;align-items:center;gap:24px;padding:24px 10px}.team{min-width:0}.team-label{display:flex;justify-content:space-between;margin-bottom:8px;font-size:14px;color:var(--muted)}.fighter{width:100%;position:relative;padding:17px;border-radius:18px;border:1px solid #668e90;background:linear-gradient(145deg,#2e5557,#152c35);text-align:left;min-height:180px;display:flex;flex-direction:column;justify-content:space-between}.fighter.gold{background:linear-gradient(145deg,#61523b,#293137);border-color:#aa9769}.fighter.blue{background:linear-gradient(145deg,#405673,#1b2e40);border-color:#698db0}.fighter h2{font-size:24px;margin:0}.fighter .formula{font-size:48px;font-weight:850;color:#d9fff0;line-height:1.1}.fighter .stats{font-size:14px;color:#cee0e4;min-height:20px}.hp-line{display:flex;justify-content:space-between;font-size:14px;margin:8px 0 5px}.hp{height:7px;border-radius:10px;background:#081b23;overflow:hidden}.hp i{display:block;height:100%;background:var(--mint);transition:width .25s}.bench{display:flex;gap:8px;margin-top:8px}.bench button{flex:1;text-align:left;font-size:14px;padding:8px;min-width:0}.bench small{display:block;font-size:14px;margin-top:3px}.bench .out{opacity:.45}.versus{text-align:center;color:#b0d1d0}.versus strong{display:block;font-size:30px;letter-spacing:7px;color:#608d90}.versus p{font-size:14px;line-height:1.7}.combo-line{display:flex;justify-content:center;align-items:center;gap:8px;background:#102b35;border:1px solid #42636b;border-radius:12px;padding:12px;margin-bottom:12px;font-size:14px}.combo-line span{border:1px solid #53767c;border-radius:8px;padding:7px 11px}.combo-line .lit{border-color:var(--mint);color:var(--mint)}.hand-title{display:flex;justify-content:space-between;align-items:center;margin:8px 0}.hand-title h2{font-size:16px;margin:0}.hand-title small{font-size:14px}.hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.support{text-align:left;display:flex;flex-direction:column;gap:6px;min-height:154px;padding:14px;background:#192e3a;position:relative}.support.available{border:2px solid var(--mint);background:#1d3e3d;box-shadow:0 0 18px #8fffc510}.support strong{font-size:22px}.support b{font-size:15px}.support small{font-size:14px;line-height:1.5}.support .tag{font-size:14px;color:var(--mint);font-weight:700}.support .reason{color:#d4c7ad}.action-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 8px}.action-bar p{font-size:14px;color:var(--muted);margin:0;line-height:1.6}.action-bar button{font-size:18px;min-width:210px;min-height:56px}.last-event{font-size:14px;min-height:38px;color:#bfd8df;border-top:1px solid #36505d;padding:10px 0;line-height:1.5}.footnote{font-size:14px;color:#8fa8b4;display:flex;justify-content:space-between;gap:12px}.footnote a{color:#b9d2d7}dialog{width:min(92vw,530px);max-height:85dvh;overflow:auto;border:1px solid #668f90;border-radius:20px;padding:26px;background:#142d37;color:#e9f5f0;box-shadow:0 25px 120px #0009}dialog::backdrop{background:#07131dbb;backdrop-filter:blur(5px)}dialog h2{font-size:25px;margin:0 0 14px}dialog p,dialog li{font-size:16px;line-height:1.7}dialog small{line-height:1.6}dialog .controls{display:flex;gap:10px;margin-top:22px}dialog .controls button{flex:1}.effect{background:#23463f;border:1px solid #72ae97;padding:16px;border-radius:12px;line-height:1.7;margin:14px 0}.effect b{font-size:22px}details{margin-top:16px;border-top:1px solid #49646c;padding-top:14px}summary{cursor:pointer;color:#bfe2de;min-height:40px}details p{white-space:pre-line;color:#c3d9e1;font-size:14px}dialog .log{font-size:14px;border-bottom:1px solid #3f5862;padding:9px 0;margin:0}.intro{max-width:650px;margin:5vh auto;text-align:center}.intro h2{font-size:42px;line-height:1.2;margin:16px 0}.intro p{font-size:17px;line-height:1.8;color:#bed2d7}.intro .primary{width:100%;font-size:20px;min-height:60px;margin-top:16px}.intro .steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.steps div{background:#193640;border:1px solid #42636b;border-radius:15px;padding:18px 10px;line-height:1.8}.steps b{display:block;color:var(--mint);font-size:22px}.intro a{color:#bfd7dc}.result{text-align:center;padding:30px}.result h2{font-size:32px}.result button{margin:10px}.thinking{color:var(--gold)}@media(max-width:650px){#app{padding:12px}.arena{grid-template-columns:1fr 1fr;gap:14px;padding:15px 0}.team.enemy{order:0}.team.own{order:1}.versus{display:none}.fighter{min-height:150px;padding:12px}.fighter .formula{font-size:37px}.fighter h2{font-size:20px}.fighter .stats{font-size:14px}.bench button{font-size:14px;padding:7px 5px}.hand{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.support{min-height:120px;padding:11px}.support strong{font-size:20px}.support small{font-size:14px}.action-bar{position:sticky;bottom:0;background:#0d222df5;z-index:2;padding:10px 0}.action-bar button{min-width:175px;font-size:16px}.action-bar p{font-size:14px;max-width:135px}.combo-line{gap:4px;font-size:14px;padding:8px}.combo-line span{padding:6px}.turn-banner{padding:10px}.turn-banner b{font-size:14px}.energy{font-size:14px}.footnote{font-size:14px}.intro h2{font-size:32px}.intro .steps{gap:7px}.steps div{font-size:14px;padding:13px 6px}.top-buttons button{padding:6px 9px}header h1{font-size:16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* PTCG-style board: opponent bench / active / centre / own active / bench. */
.arena{display:flex;flex-direction:column;gap:8px;padding:14px 0;position:relative;background:radial-gradient(ellipse at center,#35605c40,transparent 70%);border-radius:18px;border:1px solid #42636b55;margin:12px 0}
.arena .team{width:100%;display:flex;flex-direction:column;align-items:center;gap:7px;position:relative;padding:0 12px}
.arena .team.enemy{order:0}.arena .versus{order:1;display:flex;align-items:center;justify-content:center;gap:12px;width:90%;border-top:1px solid #62847c55;border-bottom:1px solid #62847c55;padding:4px 0}
.arena .team.own{order:2}.arena .versus strong{font-size:14px;letter-spacing:4px}.arena .versus p{font-size:14px;line-height:1.2;margin:0}.arena .versus br{display:none}
.arena .team-label{position:absolute;left:20px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:6px;align-items:flex-start;font-size:14px;margin:0;max-width:24%}
.arena .fighter{width:190px;min-height:116px;padding:10px 14px;border-radius:13px}.arena .fighter h2{font-size:18px}.arena .fighter .formula{font-size:30px;position:absolute;right:12px;top:10px}.arena .fighter .stats{font-size:14px;margin-top:10px}.arena .hp-line{margin-top:6px;font-size:14px}
.arena .bench{width:280px;max-width:65%;margin:0;gap:10px;justify-content:center}.arena .bench button{min-height:48px;padding:6px 12px;font-size:14px}.arena .bench small{font-size:14px;margin-top:2px}
.arena .enemy .bench{order:0}.arena .enemy .fighter{order:1}.arena .own .fighter{order:0}.arena .own .bench{order:1}
.hand{display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;padding:3px 2px 8px;scrollbar-width:thin;scrollbar-color:#719f96 transparent}.hand .support{flex:1 0 150px;min-height:136px;max-width:260px}.hand-title small{font-size:14px}.combo-line{margin-bottom:8px;padding:8px}.action-bar{padding-top:8px}.last-event{min-height:30px;padding:8px 0}
@media(max-width:650px){.arena{padding:9px 0;gap:6px;margin:9px 0}.arena .fighter{width:158px;min-height:106px;padding:9px 11px}.arena .fighter h2{font-size:17px}.arena .fighter .formula{font-size:27px}.arena .fighter .stats{font-size:14px}.arena .team-label{left:10px;font-size:14px;max-width:22%;gap:4px}.arena .bench{width:240px;max-width:74%;gap:7px}.arena .bench button{font-size:14px;padding:6px 9px;min-height:46px}.arena .bench small{font-size:14px}.hand .support{flex:0 0 144px;min-height:130px}.arena .versus p{font-size:14px}.arena .team{padding:0 8px}}
