/* Framed source illustrations remain intact; rarity colors are restrained UI cues. */
.chess-card { --chess-rarity:#ad7a55; }
.chess-card.rare { --chess-rarity:#b9cbdc; }
.chess-card.epic { --chess-rarity:#d8b35e; }
.chess-card.legendary { --chess-rarity:#c4a3ef; }
.phase-one .chess-card .rarity { color:var(--chess-rarity); }
.phase-one .game-shell.battle-layout[data-scene-background="六十四格·双庭棋苑"] .hero.has-deck-leader .phase1-economy { background:#101b28dc; padding:10px; border-radius:8px; }
.game-shell[data-scene-background="六十四格·双庭棋苑"] > #sceneBackdrop::after { background:linear-gradient(#060e2066, #06112614 40%,#0815294d); }
.phase-one .chess-token .card-name { display:block !important; position:absolute; top:8%; left:12%; right:12%; background:#1c2739f5; color:#fff2d3; z-index:3; font-size:11px; padding:3px; }
.chess-skills { position:absolute; bottom:12px; left:calc(100% + 24px); display:flex; gap:5px; z-index:6; white-space:nowrap; }
.chess-skills button { background:#182631ed; color:#f7e7c5; border:1px solid #baa576; border-radius:6px; padding:7px 9px; font-size:12px; }
.chess-skills button:disabled { opacity:.5; cursor:default; }
.chess-progress { color:#f0dec0; font-size:11px; }
.chess-preset-select small { display:block; line-height:1.6; color:#c0b6a3; max-width:340px; }
.chess-decks,.chess-choice { color:#eee4d4; background:#151c24; border:1px solid #aa9365; border-radius:12px; box-shadow:0 20px 80px #000b; }
.chess-decks::backdrop,.chess-choice::backdrop { background:#07101ccc; }
.chess-decks button,.chess-choice button { cursor:pointer; font:inherit; color:inherit; border:1px solid #5f6670; background:#24313e; border-radius:6px; padding:8px 12px; }
.chess-decks button:hover,.chess-choice button:hover { border-color:#e2c384; }
.chess-decks button:disabled,.chess-choice button:disabled { opacity:.45; cursor:not-allowed; }
.chess-decks { width:min(1080px,94vw); max-height:91vh; padding:20px; }
.chess-decks header,.chess-decks footer { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.chess-decks footer { position:sticky; bottom:-20px; background:#151c24; padding:12px 0; z-index:2; }
.phase1-skills[hidden] { display:none !important; }
.chess-decks h2,.chess-decks h3 { margin:4px 0 10px; }
.chess-presets { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 0; }
.chess-presets button { text-align:left; padding:15px; }
.chess-presets small { display:block; margin-top:8px; color:#bfc3c8; }
.chess-decks button[aria-pressed=true] { background:#3b3540; border-color:#e2c384; box-shadow:inset 0 -2px #e2c384; }
.chess-deck-intro { padding:12px 16px; border-left:3px solid #baa576; background:#1c2731; }
.chess-deck-intro p { line-height:1.6; margin:6px 0; font-size:13px; }
.chess-deck-toolbar { display:flex; align-items:center; gap:8px; padding:14px 0; flex-wrap:wrap; }
.chess-deck-toolbar input { flex:1; min-width:160px; padding:10px; border:1px solid #5f6670; color:inherit; background:#0e161f; border-radius:6px; }
#chessDeckCards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:42vh; overflow:auto; }
.chess-deck-card { display:grid; grid-template-columns:70px 1fr auto; gap:10px; border:1px solid #3e4854; padding:9px; border-radius:6px; }
.chess-deck-card.epic { border-color:#7e683f; }.chess-deck-card.legendary { border-color:#705b90; }
.chess-deck-card .chess-deck-art { padding:0; background:transparent; border:0; }
.chess-deck-art img { display:block; width:70px; aspect-ratio:2/3; object-fit:contain; }
.chess-deck-card strong { font-size:12px; line-height:1.6; }.chess-deck-card p { font-size:12px; color:#c6cbd1; line-height:1.5; margin:5px 0; }
.chess-deck-count { display:flex; flex-direction:column; align-items:center; gap:4px; }.chess-deck-count button { padding:3px 9px; }
#chessDeckErrors { color:#ffb5ad; font-size:12px; max-width:70%; }
.chess-choice { width:min(900px,92vw); padding:20px; max-height:88vh; }
.chess-choice h2 { margin:0; }.chess-choice p { color:#ded0b4; }
.chess-choice-options { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; max-height:60vh; overflow:auto; }
.chess-choice-options button { display:flex; flex-direction:column; align-items:center; gap:7px; width:150px; padding:9px; }
.chess-choice-options img { width:100%; height:180px; object-fit:contain; }.chess-choice-options small { font-size:11px; line-height:1.5; white-space:normal; }
.chess-choice footer { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
[hidden].chess-skills,[hidden].chess-progress,.chess-preset-select[hidden] { display:none; }
.phase-one .phase1-setup label[hidden] { display:none !important; }
@media(max-width:700px) { .chess-presets {grid-template-columns:1fr;} #chessDeckCards {grid-template-columns:1fr;} .chess-decks {padding:12px;} .chess-choice-options button {width:130px;} }
