/* Call of Blades: original card artwork, a focused tabletop interface. */
:root{--cob-bg-1:#101516;--cob-bg-2:#172323;--cob-bg-3:#111a1e;--cob-accent:#edcb82;--cob-border:#d8c49a28;--cob-glass:#ffffff05;--cob-accent-2:#88cec1}
body{font-family:Arial,sans-serif;background:radial-gradient(ellipse at 45% 20%,#314b4438,transparent 65%),radial-gradient(ellipse at 90% 70%,#64432b25,transparent 50%),#101617;color:#ecebe2}
body:before{content:'';position:fixed;inset:0;pointer-events:none;opacity:.12;background-image:url('/web/static/Dark_Knight_Altar.png');background-size:cover;background-position:center;filter:blur(35px);z-index:-1}
.game-container{display:flex!important;flex-direction:column;max-width:1600px;margin:auto;padding:22px 28px;gap:16px;min-height:100dvh}.header{display:flex;align-items:center;justify-content:space-between;padding:0 0 18px;background:none;border:0;border-bottom:1px solid #d5c49d25;border-radius:0;backdrop-filter:none;gap:20px}.game-title{font-family:Cinzel,Georgia,serif;font-size:25px;letter-spacing:.04em;line-height:1.3;white-space:nowrap}.game-title small{font-family:Arial,sans-serif;font-size:9px;letter-spacing:3px;color:#b5b4a0;display:block;margin-top:5px}.nav-buttons{display:flex;gap:7px;flex-wrap:wrap}.btn{background:#ffffff08;border:1px solid #d5c49d33;border-radius:10px;color:#e8e7d9;padding:10px 15px;font:600 12px Arial,sans-serif;box-shadow:none;min-height:40px;transition:background .18s,transform .18s}.btn:hover{background:#d4c2931a;transform:translateY(-1px)}.btn.primary,#end-turn-btn{background:linear-gradient(120deg,#f1d496,#d4ac60);color:#28251d;border-color:#eed79f;box-shadow:0 4px 20px #d7b56725}.btn:disabled{opacity:.4;cursor:default;transform:none}.btn:focus-visible,.card:focus-visible{outline:3px solid #f6dd9c;outline-offset:4px}.ai-top-zone{display:flex;align-items:center;gap:20px;min-height:92px;padding:12px 20px;background:#ffffff04;border:1px solid #d5c49d20;border-radius:18px}.ai-stats-column{min-width:190px;gap:3px}.stat{background:none!important;border:0!important;padding:3px!important}.stat-label{color:#939e97;font:11px Arial,sans-serif!important}.stat-value{font:700 15px Arial,sans-serif!important;color:#d9e6d4!important;background:none!important;box-shadow:none!important}#ai-hp,#player-hp{font-size:28px!important;color:#b9dbc2!important}.ai-attire-zone{max-width:170px}.ai-hand-zone{flex:1;justify-content:center;min-width:0}.ai-hand-zone>.hand{justify-content:center}.ai-hand-zone .hand{padding:0;background:none;border:0;gap:5px;min-height:0}.card-back-mini{width:39px!important;height:55px!important;border-radius:5px!important;filter:brightness(.75);border:1px solid #b5a16e50!important}.ai-hand-toggle-btn{display:none}.ai-hand-zone>div:last-child:not(.hand){display:none}.effect-stats{font-family:Arial,sans-serif}.ai-top-zone .no-items{font-size:10px;padding:12px;color:#74877b}.new-game-layout{display:flex!important;flex-direction:column;gap:16px;min-width:0}.top-row-section{display:grid!important;grid-template-columns:minmax(0,1fr) 330px;gap:16px}.market-section,.monsters-section{background:linear-gradient(145deg,#25363090,#172424bf)!important;border:1px solid #b5a16e32!important;border-radius:18px!important;padding:16px!important;min-width:0}.section-title{font:600 11px Arial,sans-serif!important;letter-spacing:1.8px;text-transform:uppercase;color:#b5bbaa!important}.trash-trade-row-section{font-size:10px!important;color:#8e9b90}.card-back-button{width:20px!important;height:28px!important;opacity:.6}.market,#market.market{display:flex!important;gap:10px!important;padding:12px 3px!important;min-height:0!important;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#b09b69 #13201d}.market .card{width:113px!important;height:160px!important;min-width:113px!important;flex:0 0 113px!important}.card{background:#151d1b!important;border:1px solid #cbb06c88!important;border-radius:10px!important;box-shadow:0 7px 15px #0008,0 1px 0 #ffffff20!important;overflow:hidden;transition:transform .18s,box-shadow .18s,border-color .18s;cursor:pointer}.card:hover{transform:translateY(-6px) rotate(-1deg)!important;box-shadow:0 13px 20px #0009,0 0 14px #cfb26835!important;border-color:#f0d899!important;z-index:10}.card-image,.card-image-sprite{border-radius:8px}.card-clean-space{display:none!important}.card-type-icon{font-size:11px!important;top:5px!important;left:5px!important}.card.affordable{box-shadow:0 0 0 1px #97cab5,0 6px 17px #0006!important}.card.unaffordable{filter:saturate(.65)}.monster-altar-row{display:flex!important;gap:10px;align-items:center;justify-content:center;flex-wrap:nowrap!important}.monster-altar-cell{min-width:0;flex:1}.monster-area{background:none!important;border:0!important;padding:0!important;min-height:0!important}#current-monster .card{width:123px!important;height:174px!important;min-width:0!important}.altar-card-horizontal{width:144px!important;height:174px!important;max-width:100%;border:1px solid #ccb16c66!important;border-radius:10px!important;overflow:hidden;box-shadow:0 8px 15px #0006!important}.monster-controls{margin-top:8px!important}.monster-controls .btn{font-size:10px;padding:6px 10px;min-height:30px}#change-monster-btn{display:none!important}.monster-label{display:block;font-size:9px;color:#aeb7a9;margin-bottom:10px;text-transform:uppercase;letter-spacing:2px}.played-cards-section{display:flex!important;align-items:stretch;gap:14px;padding:14px!important;border-radius:18px!important;border:1px solid #b5a16e25!important;background:#0e181880!important;min-height:160px!important}.player-equipment-left{width:120px!important;min-width:100px;background:none!important;padding:0!important}.attire-area{padding:0!important;background:none!important;min-height:0!important}.no-items,.no-played-cards,.no-monster{color:#85968b!important;font:italic 12px Arial,sans-serif!important;background:none!important;padding:15px!important}.played-center{flex:1;min-width:0}.played-header{border:0!important;margin:0 0 10px!important;display:flex;gap:15px;align-items:center;justify-content:space-between}.play-area-info{display:flex;gap:12px;align-items:center}.resource-stat{font:600 12px Arial,sans-serif!important;background:#fff1!important;border:1px solid #d5c49d20!important;border-radius:8px!important;padding:7px 10px!important}.played-area{display:flex;gap:8px;background:none!important;border:0!important;min-height:100px!important;padding:0!important;overflow-x:auto}.played-area .card{width:80px!important;height:114px!important;flex:0 0 80px!important}.main-layout{display:none!important}.player-bottom-zone{display:grid!important;grid-template-columns:185px minmax(0,1fr) 165px;align-items:center;gap:20px;padding:18px 20px!important;background:linear-gradient(130deg,#29372ca6,#162220)!important;border:1px solid #cbb06c40!important;border-radius:18px!important;margin:0!important;box-shadow:0 -4px 35px #9eaa7410}.player-stats-compact{width:auto!important;padding:0!important;background:none!important}.player-stats-compact>.stat{margin:4px 0!important}.player-tag-mini{font-size:11px;color:#b3c7b6}.player-hand-horizontal{min-width:0}.player-hand-horizontal .hand,.hand{display:flex!important;justify-content:center!important;gap:12px!important;background:none!important;border:0!important;padding:7px 4px!important;min-height:0!important;overflow-x:auto}.player-hand-horizontal .card{width:139px!important;height:197px!important;flex:0 0 139px!important}.controls-right{width:auto!important;display:flex!important;flex-direction:column!important;gap:8px!important;padding:0!important;background:none!important;border:0!important}.controls-right #end-turn-btn{font-size:13px!important;padding:12px!important}.controls-right #undo-btn{font-size:11px!important;padding:8px!important;min-height:34px}.turn-info{font:11px Arial,sans-serif;line-height:1.8;color:#aab7aa;text-align:center;background:none!important;border:0!important;padding:5px!important}.turn-info div:last-child{display:none}.table-guide{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:11px;color:#a1af9e;padding:0 4px}.table-guide strong{color:#f2d794;font-weight:500}.table-guide .live{color:#99d0b7}.game-log-toggle{position:fixed;right:16px;bottom:16px;border-radius:10px;padding:10px;font:11px Arial,sans-serif;background:#253329;border:1px solid #9caa6e50}.game-log-drawer{font:12px Arial,sans-serif;background:#13201e}.modal-content,.card-preview-content{background:#182522!important;border:1px solid #b09b6966!important;border-radius:18px!important}.card-preview-content .card{width:300px!important;height:425px!important}.modal,.card-preview-modal{backdrop-filter:blur(8px)}.inspector-help{font-size:10px;color:#a6b49e;text-align:center;margin-top:8px}.duel-panel{position:fixed;inset:0;background:#081313d9;backdrop-filter:blur(12px);z-index:10000;display:grid;place-items:center;padding:20px}.duel-panel[hidden]{display:none}.duel-box{width:460px;max-width:100%;background:linear-gradient(140deg,#26392f,#132320);border:1px solid #d8bf7955;border-radius:24px;padding:32px;box-shadow:0 30px 100px #0009}.duel-box h2{font:26px Cinzel,Georgia,serif;margin:10px 0 16px}.duel-box p{font-size:13px;line-height:1.7;color:#b2bfae;margin:12px 0}.duel-box input{width:100%;background:#091a18;border:1px solid #a7aa7655;border-radius:10px;padding:13px;color:#f2ecd4;font-size:14px;margin:8px 0}.duel-box button{margin-top:9px}.duel-status{min-height:25px;color:#dfca8f!important}.invite-link{font-size:11px!important}.duel-mode{display:flex;gap:9px}.duel-mode button{flex:1}.connection-banner{border:1px solid #be9367;background:#533822;color:#ffe3b9;padding:14px;position:sticky;top:0;z-index:300;text-align:center;font-size:13px}.connection-banner[hidden]{display:none}
@media(max-width:1100px){.game-container{padding:16px}.top-row-section{grid-template-columns:minmax(0,1fr) 280px}.market .card{width:103px!important;min-width:103px!important;height:146px!important}.altar-card-horizontal{width:120px!important;height:160px!important}#current-monster .card{width:112px!important;height:160px!important}.nav-buttons .secondary-nav{display:none}.player-bottom-zone{grid-template-columns:150px minmax(0,1fr) 140px;gap:12px}.player-hand-horizontal .card{width:123px!important;height:175px!important;flex-basis:123px!important}}
@media(max-width:700px){.game-container{padding:12px;gap:12px}.header{align-items:flex-start;gap:10px;padding-bottom:14px}.game-title{font-size:19px}.game-title small{font-size:8px;letter-spacing:2px}.nav-buttons{max-width:130px;gap:5px}.nav-buttons .btn{padding:8px;font-size:10px;min-height:32px}.nav-buttons .secondary-nav,.nav-buttons .rules-nav{display:none}.ai-top-zone{gap:8px;padding:10px;min-height:74px}.ai-stats-column{min-width:128px}.ai-attire-zone{display:none}.ai-hand-zone .card-back-mini{width:26px!important;height:38px!important}.ai-hand-zone .hand{gap:2px!important}.ai-top-zone #ai-effects{display:none}.top-row-section{display:flex!important;flex-direction:column;gap:12px}.market-section,.monsters-section{padding:12px!important}.market .card{width:105px!important;min-width:105px!important;height:149px!important}.monsters-section{display:flex;align-items:center;gap:12px}.monster-altar-row{flex:1}.monster-label{width:52px;line-height:1.6;margin:0}.altar-card-horizontal{width:140px!important;height:120px!important}#current-monster .card{width:84px!important;height:120px!important}.monster-controls{display:none!important}.played-cards-section{padding:12px!important;min-height:125px!important;gap:8px}.player-equipment-left{width:60px!important;min-width:60px!important}.no-items{font-size:9px!important;padding:8px!important}.played-area .card{width:60px!important;height:85px!important;flex-basis:60px!important}.played-area{min-height:85px!important}.played-header{gap:8px}.play-area-info{gap:5px}.effect-stats{font-size:9px!important}.resource-stat{padding:4px 6px!important;font-size:10px!important}.section-title{font-size:9px!important;letter-spacing:1px}.player-bottom-zone{grid-template-columns:1fr 130px;gap:8px;padding:12px!important;position:relative}.player-stats-compact{grid-column:1;grid-row:1}.player-hand-horizontal{grid-column:1/-1;grid-row:2}.controls-right{grid-column:2;grid-row:1}.player-hand-horizontal .hand{justify-content:flex-start!important;gap:10px!important}.player-hand-horizontal .card{width:125px!important;height:178px!important;flex-basis:125px!important}.player-stats-compact .stat-label{font-size:10px!important}.turn-info{display:none}.table-guide{font-size:10px;line-height:1.5;align-items:flex-start}.table-guide span:last-child{max-width:130px;text-align:right}.game-log-toggle{bottom:8px;right:8px}.duel-box{padding:23px}.card-preview-content .card{width:260px!important;height:369px!important}}
.market-slot{width:113px!important;min-width:113px!important;height:160px!important}.market-slot .card{min-height:0!important;max-height:160px!important}.monsters-section{min-width:0!important}.played-header{flex-wrap:wrap}.play-area-info{min-width:0;flex-wrap:wrap}.played-center .played-area{overflow-x:auto!important;overflow-y:hidden!important}.played-area .card{min-height:0!important;max-height:114px!important}.game-log-toggle{width:auto!important;height:auto!important;writing-mode:horizontal-tb!important;top:auto!important;transform:none!important}.altar-select-row{display:none!important}.altar-adjust-controls{display:none!important}.player-bottom-zone{align-items:center!important}.player-stats-compact .hp-row{flex-direction:row!important;align-items:center!important}.header{flex-direction:row!important}.market{min-width:0}.player-bottom-zone>.controls-right{min-width:0}
#player-hand .card{min-height:0!important;max-height:197px!important}.played-header{padding:0!important}.played-cards-section{min-height:145px!important}.card.red{border-color:#d7896b!important;box-shadow:0 5px 17px #0008,0 0 14px #e0503920!important}.card.blue{border-color:#779ac4!important;box-shadow:0 5px 17px #0008,0 0 14px #5294c92a!important}.card.green{border-color:#9ec688!important;box-shadow:0 5px 17px #0008,0 0 14px #83c38320!important}.card.white{border-color:#d4c6a0!important}.card-inspect{position:absolute;right:4px;bottom:4px;border-radius:50%;border:1px solid #b9b88a90;background:#14221ee6;color:#fff4ce;width:27px;height:27px;font-size:13px;display:grid;place-items:center;z-index:25;cursor:pointer}.card-inspect:focus-visible{outline:2px solid white}.altar-buttons-row .btn{padding:4px 14px;min-height:28px;font-size:15px}.altar-buttons-row{margin-top:5px!important}.ai-top-zone{min-height:80px}.card-preview-close{min-width:40px;min-height:40px}.card-tooltip{display:none!important}.player-hand-horizontal .hand{scrollbar-width:thin;scrollbar-color:#b09b69 #13201d}.modal-content{max-height:90dvh;overflow-y:auto}.player-stats-compact .stat-value{line-height:1.4}
@media(max-width:700px){.market-slot{width:105px!important;min-width:105px!important;height:149px!important}.market-slot .card{max-height:149px!important}.played-area .card{max-height:85px!important}.player-bottom-zone{grid-template-columns:1fr 130px!important}.play-area-info .effect-stats{display:none}.monsters-section{flex:none!important}.market-section{flex:none!important}.header .nav-buttons{width:auto}.card-preview-content .card{max-height:369px!important}#player-hand .card{max-height:178px!important}.card-inspect{width:30px;height:30px}.played-cards-section{min-height:125px!important}.ai-top-zone{min-height:74px}.altar-buttons-row{display:none!important}}
@media(prefers-reduced-motion:reduce){.card,.btn{transition:none}.card:hover{transform:none!important}}
#game-log-drawer{display:none;position:fixed!important;inset:0 0 0 auto!important;width:min(360px,90vw)!important;max-width:90vw;transform:none!important;z-index:5000}#game-log-drawer.open{display:flex;flex-direction:column}.game-log-content{min-height:0;overflow-y:auto}.top-row-section>*{max-width:100%;min-width:0!important;width:auto!important}.resource-stat.primary{padding:6px 10px!important}.play-area-resources{gap:8px}.played-header .effect-stats{margin:0!important}.ai-top-zone .attack-target{font-size:12px!important}.monster-area{max-width:100%}
@media(max-width:700px){.top-row-section{width:100%}.top-row-section .market-section{width:100%!important;flex-basis:auto!important}.monsters-section{width:100%!important;flex-basis:auto!important;min-height:0!important}.monster-altar-row{flex-basis:auto!important}.game-title{white-space:normal}.header .nav-buttons{flex-shrink:0;max-width:125px}.market-slot{flex-basis:105px!important}.played-cards-section{max-width:100%}.table-guide{max-width:100%}.resource-stat.primary{padding:4px 6px!important}.monster-label{flex:0 0 52px}.header{gap:8px!important}.game-log-toggle{writing-mode:horizontal-tb!important}}
#market .market-slot .card{width:100%!important;height:100%!important;min-width:0!important;flex-basis:auto!important}.card-image-sprite{height:100%!important;min-height:0!important}.game-title{color:#f5e5b8}.played-area:empty:after{content:'Your cards will appear here';color:#798c7b;font-size:12px}.game-log-toggle{font-size:10px}.duel-box label{font-size:12px;color:#dbdfc7}
.game-container>.header{flex-direction:row!important;flex-wrap:nowrap!important}.monsters-section{flex-direction:row!important}.monster-altar-row{min-height:0!important}.duel-box .monster-label{width:auto}.ai-top-zone{background:linear-gradient(110deg,#28383480,#111c1e80)}.player-bottom-zone{background:linear-gradient(115deg,#35402ed9,#172e27)!important}
@media(max-width:700px){.player-bottom-zone{position:sticky;bottom:8px;z-index:40;box-shadow:0 -8px 30px #0006}.table-guide{font-size:9px}.game-container>.header .game-title{flex:1;min-width:0}.game-container>.header .nav-buttons{width:110px;max-width:110px;flex-shrink:0;justify-content:flex-end}.monsters-section{flex-direction:row!important;align-items:center;gap:9px!important}.monster-altar-row{flex-wrap:nowrap!important;flex:1!important}.monster-label{width:52px!important;flex:0 0 52px!important;font-size:8px;letter-spacing:1px}.altar-buttons-row{display:flex!important}.altar-buttons-row .btn{min-height:28px}.game-log-toggle{z-index:45}}
@media(max-width:700px){.ai-hand-zone .card-back-mini{width:22px!important;height:31px!important}.ai-hand-zone .hand{overflow:hidden!important}.table-guide span:last-child{max-width:135px}}
