@import url('./base.css');

/* Keep the primary action inside the hero at shorter desktop heights. */
.hero{height:clamp(420px,47vh,520px)}
.hero-copy{top:auto;bottom:40px}
.hero-copy h1{font-size:clamp(39px,3.8vw,62px);margin:14px 0}
.hero-copy .hero-description{line-height:1.7}
.hero-actions{margin-top:20px}
.hero-corner{background:#122126c9;border-color:#c7ad7255}
.play-layout{height:calc(100vh - 265px);min-height:430px;grid-template-rows:minmax(0,1fr)}
.play-decks{min-height:0}
.format-panel{min-height:0}
.play-deck-list{flex:1;min-height:0;max-height:none}
.play-start{flex-shrink:0;margin-top:17px}
.battle-hand{bottom:-78px}
.player-avatar.you{bottom:96px}
.board-row.your-creatures{top:51%}
.board-row.opponent-creatures{top:25%}
.permanent{aspect-ratio:488/470}
.board-row.your-lands{left:15%;bottom:20%}
.stack-cards{display:block;padding:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}
.stack-card{position:absolute;top:calc(16px + var(--stack-index,0) * 38px);right:10px;margin:0!important}
.stack-card .stack-number{right:-4px}
.battle-log{display:none}
.library-notice{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 15px;margin:0 0 20px;border:1px solid #bca47b44;border-radius:5px;background:#bca47b0a;color:#c9b68f;font-size:12px;line-height:1.6}
@media(min-width:1700px){.battle-hand{bottom:-100px}.player-avatar.you{bottom:140px}}
@media(max-width:1150px){.battle-hand{bottom:-65px}.player-avatar.you{bottom:88px}}
@media(max-width:800px){.hero{height:400px}.hero-copy{top:auto;bottom:35px}.hero-copy h1{font-size:44px}}
@media(max-width:800px){.play-layout{height:auto;min-height:0;grid-template-rows:auto auto}.format-panel{min-height:340px}.play-deck-list{max-height:330px;flex:auto}.battle-hand{bottom:-50px}.player-avatar.you{bottom:86px}}
@media(max-width:550px){.hero{height:390px}.hero-copy h1{font-size:37px}}
.opponent-select{display:flex;align-items:center;gap:10px;font-size:12px;color:#cfbd9c}
.opponent-select select{max-width:200px}
.can-act{box-shadow:0 0 15px #64bdeaa0!important;border-color:#9ce0ff!important}
.permanent.attacking{outline:2px solid #ed874b;outline-offset:4px}
.permanent.phased-out{opacity:.4}
.counter-badge,.damage-badge{position:absolute;left:3px;top:4px;max-width:95%;padding:3px 5px;border-radius:3px;background:#14242bec;color:#f2dfba;font-size:10px}
.damage-badge{top:auto;bottom:4px;background:#6a2727ef}
.mana-pool{display:flex;gap:12px;pointer-events:none}
.mana-pool>span{display:flex;align-items:center;gap:5px}
.engine-choice{position:absolute;z-index:35;left:24%;top:24%;width:min(490px,50vw);max-height:58vh;display:flex;flex-direction:column;gap:14px;padding:22px;border:1px solid #ad9165;border-radius:10px;background:linear-gradient(145deg,#242a2bf5,#10171cfb);box-shadow:0 15px 70px #000c}
.engine-choice h2{font-size:23px;margin:0}
.engine-choice p{font-size:13px;line-height:1.5;color:#ddd1ba;margin:0}
.engine-choice-options{overflow:auto;display:flex;flex-direction:column;gap:8px;min-height:0}
.engine-choice-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-top:1px solid #b49a6a33;padding-top:13px}
.engine-choice-actions>span{font-size:12px;color:#d1c1a5;margin-right:auto}
.engine-option{padding:10px 12px;text-align:left;color:#ede5d7;background:#b7b7a70d;border:1px solid #93826c66;border-radius:4px;font-size:13px}
.engine-option.selected{background:#80602e70;border-color:#ecc377}
.engine-assignment,.engine-color{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.engine-assignment select{max-width:60%;min-width:130px}
.engine-color input,.engine-assignment input,.engine-number{width:85px}
.engine-repeat,.engine-order{display:flex;align-items:center;gap:6px}
.engine-repeat .engine-option,.engine-order>span{flex:1}
.engine-order>span{font-size:13px}
.engine-order .btn{padding:6px 10px}
.engine-order select{max-width:135px}
.engine-status{padding:13px 0;font-size:13px;color:#ccb791}
.engine-priority-tools{display:flex;justify-content:space-between;gap:10px;margin-top:13px}
.engine-priority-tools .text-btn{font-size:11px}
.token-name{position:absolute;left:0;top:0;right:0;padding:6px;background:#1a202be8;color:#f0deb6;font-size:11px}
.player-status{position:absolute;left:110px;top:28px;min-width:115px;text-align:left;font-size:11px;line-height:1.7;color:#dfc99e}
.legality-badge{position:absolute;top:8px;left:8px;background:#422b17ed;color:#ffdb99;border:1px solid #ba8756;border-radius:4px;padding:3px 6px;font-size:10px;pointer-events:none;z-index:2}
.import-commander .import-legality{color:#ffd28d;font-size:11px;margin-top:5px}
.import-tabs{display:flex;gap:5px;border-bottom:1px solid #b8a57f44;margin-bottom:22px}
.import-tabs button{padding:9px 16px;color:#c9bda4;background:transparent;border:0;border-bottom:2px solid transparent;font-size:14px}
.import-tabs button.active{color:#f1d8a1;border-bottom-color:#ddb875}
.modal-content #import-name{margin-bottom:20px}
.modal-content #import-url{margin-bottom:5px}
.import-hint,.import-credit{font-size:11px;line-height:1.6;color:#b6b2a8;margin:10px 0 0}
.import-credit a{color:#d2bf98;text-decoration:underline}
.import-error{font-size:12px;line-height:1.6;color:#efb395;margin:16px 0 0;overflow-wrap:anywhere}
.import-status{font-size:12px;color:#ddc493;margin:10px 0 0;min-height:17px}
.import-summary{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.import-summary strong{color:#ecd39e;font-size:19px}
.import-summary span{color:#b8b6aa;font-size:12px}
.import-commander-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:18px;margin-top:20px;max-height:49vh;overflow:auto;padding:4px}
.import-commander{padding:0 0 9px;max-width:210px;border:2px solid #525852;border-radius:8px;background:#14252c;overflow:hidden;color:#e7dfca;text-align:center}
.import-commander[hidden]{display:none}
.import-commander img{display:block;width:100%;aspect-ratio:488/680;object-fit:cover}
.import-commander>span:not(.mana-row){display:block;font-size:13px;padding:8px}
.import-commander .mana-row{justify-content:center}
.import-commander.selected{border-color:#f0cb84;box-shadow:0 0 0 2px #a2804d,0 0 18px #e5b96544}
.engine-table-error{position:absolute;left:25%;top:10%;z-index:60;max-width:48%;background:#5a2727ed;border:1px solid #c06b65;padding:14px;border-radius:5px;font-size:13px}
.game-result{position:absolute;z-index:70;inset:0;background:#060e16b8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px}
.game-result h1{font-size:60px}
@media(max-width:800px){.engine-choice{left:10%;top:20%;width:70vw;max-height:60vh}.opponent-select{flex-direction:column;align-items:flex-start}}
