/* Desktop-only opt-in playtest; legacy layouts stay untouched. */
.phase-one #phase1DrawPrompt[hidden], .phase-one .phase1-upgrades[hidden], .phase-one .phase1-skills[hidden] { display: none; }
.phase-one #phase1DrawPrompt {
  position: fixed; z-index: 80; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 320px; padding: 18px 22px; color: #f2e9d8; background: #10271ff5;
  border: 1px solid #a08b61; border-radius: 6px; box-shadow: 0 16px 60px #0009;
}
.phase-one #phase1DrawPrompt header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.phase-one #phase1DrawPrompt time { color: #b9d7cf; font-size: 12px; }
.phase-one .phase1-draw-options { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.phase-one .phase1-draw-options button { display: grid; gap: 8px; justify-items: center; padding: 0 0 8px; background: transparent; border: 0; color: #f6e7c8; cursor: pointer; font-size: 13px; }
.phase-one .phase1-draw-options img { width: 80px; height: 120px; object-fit: cover; border-radius: 4px; box-shadow: 0 5px 15px #0007; }
.phase-one .phase1-draw-options button:hover:not(:disabled) img { outline: 2px solid #bfe1d2; outline-offset: 3px; }
.phase-one .phase1-draw-options button:disabled { opacity: .35; cursor: not-allowed; }
.phase-one .phase1-setup { width: 560px; max-width: calc(100vw - 48px); padding: 24px; border: 1px solid #a68e5f; border-radius: 6px; background: #10231c; color: #f1e5cc; }
.phase-one .phase1-setup::backdrop { background: #000a; }
.phase-one .phase1-setup header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.phase-one .phase1-setup h2 { font-size: 22px; margin: 0; }
.phase-one .phase1-setup-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.phase-one .phase1-setup fieldset { display: grid; gap: 18px; padding: 0; margin: 0; border: 0; min-width: 0; }
.phase-one .phase1-setup legend { color: #b9d7cf; margin-bottom: 18px; }
.phase-one .phase1-setup label { display: grid; gap: 7px; font-size: 13px; }
.phase-one .phase1-setup select { width: 100%; min-height: 36px; padding: 6px; color: #f1e5cc; background: #20372d; border: 1px solid #867651; border-radius: 4px; }
.phase-one .phase1-setup .phase1-field-choice { display: flex; align-items: center; justify-content: space-between; }
.phase-one .phase1-setup input { accent-color: #acc9aa; width: 18px; height: 18px; }
.phase-one .phase1-setup p { color: #b9c6bd; font-size: 12px; margin: 24px 0; }
.phase-one .phase1-setup footer { display: flex; justify-content: flex-end; }
.phase-one #phase1Receipt { font-size: 12px; color: #bedbd1; }
.phase-one #phase1Receipt.has-overflow { color: #ffd494; }
.phase-one .battle-layout .hero.has-deck-leader .mana { display: none; }
.phase-one .battle-layout .hero.has-deck-leader .evo { bottom: 75px; left: 0; }
.phase-one .battle-layout .hero .battle-leader-art { bottom: 68px; height: calc(100% - 68px); }
.phase-one .phase1-level { position: absolute; top: 9px; left: 0; font-size: 13px; font-weight: 700; color: #fff0ca; padding: 3px 6px; background: #19342be6; border-bottom: 1px solid #b7a173; }
.phase-one .phase1-economy { position: absolute; bottom: 24px; left: 0; right: 0; display: grid; gap: 3px; padding: 5px 0; text-align: center; background: #0b1d17e6; border-top: 1px solid #b5a07555; }
.phase-one .phase1-balance { font-size: 16px; line-height: 1.2; color: #f3dfac; }
.phase-one .phase1-next { font-size: 11px; line-height: 1.2; color: #b9dfce; white-space: nowrap; }
.phase-one .phase1-upgrades { position: absolute; bottom: 76px; right: 0; display: flex; align-items: flex-end; gap: 3px; padding: 0; border: 0; color: #f5e6bf; background: transparent; cursor: pointer; }
.phase-one .phase1-upgrades img { width: 24px; height: 36px; object-fit: cover; border-radius: 2px; }
.phase-one .phase1-upgrades span { font-size: 12px; }
.phase-one .battle-layout .deck-dock { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; justify-items: center; align-content: center; }
.phase-one .battle-layout .deck-dock #endTurnButton { grid-column: 1 / -1; }
.phase-one .battle-layout .deck-dock .deck-pack, .phase-one #phase1SpecialPileButton { width: 66px; height: 99px; margin: 0; }
.phase-one #phase1SpecialPileButton { position: relative; padding: 0; border: 0; border-radius: 4px; overflow: hidden; }
.phase-one #phase1SpecialPileButton img { width: 100%; height: 100%; object-fit: cover; }
.phase-one #phase1SpecialCount { position: absolute; inset: auto 0 5px; padding: 4px 0; color: #f7e8bc; background: #152d26ee; font-size: 11px; }
.phase-one #phase1DiscardButton { grid-column: 1 / -1; padding: 4px 14px; min-height: 28px; font-size: 11px; }
.phase-one .battle-layout .deck-pack strong { font-size: 12px; }
.phase-one .battle-layout .deck-pack #remainingDeckCount { font-size: 10px; }
.phase-one .leader-upgrade-card .card-art { object-fit: contain; background: #132b23; }
.phase-one #phase1PileCards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phase-one #phase1PileCards .remaining-card-art { aspect-ratio: 2 / 3; background: #173026; }
.phase-one #phase1PileCards img { width: 100%; height: 100%; object-fit: contain; }
.phase-one :is(#phase1DrawPrompt, .phase1-setup, .phase1-upgrades) button:focus-visible,
.phase-one .phase1-upgrades:focus-visible { outline: 2px solid #bee3d6; outline-offset: 3px; }

.phase-one .hero .phase1-max-health { font-size: 11px; line-height: 1; color: #ebdbc4; }
.phase-one .hero .ping-badge { display: none; }
.phase-one .hero .phase1-skills { position: absolute; bottom: 73px; left: 0; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.phase-one .phase1-skills button { display: grid; align-content: center; gap: 2px; height: 37px; padding: 3px; min-width: 0; border: 1px solid #ac9266; border-radius: 4px; background: #203a30f5; color: #fff0d1; cursor: pointer; font-size: 12px; line-height: 1.2; }
.phase-one .phase1-skills button small { font-size: 10px; color: #b9dfce; }
.phase-one .phase1-skills button:disabled { color: #aaaca4; border-color: #646456; background: #1d2827ef; cursor: not-allowed; }
.phase-one .phase1-skills button:disabled small { color: #969f97; }
.phase-one .phase1-skills button:hover:not(:disabled) { background: #385847; border-color: #e5ca8b; }
.phase-one .phase1-skills button:focus-visible { outline: 2px solid #bee3d6; outline-offset: 2px; }
.phase-one .battle-layout .hero:has(.phase1-skills:not([hidden])) .battle-leader-art { bottom: 113px; height: calc(100% - 113px); }
.phase-one .battle-layout .hero.has-deck-leader:has(.phase1-skills:not([hidden])) .evo { bottom: 116px; }
.phase-one .hero:has(.phase1-skills:not([hidden])) .phase1-upgrades { bottom: 116px; }
.phase-one #phase1RewardDialog { width: 460px; max-width: calc(100vw - 48px); padding: 26px; border: 1px solid #a08b61; border-radius: 6px; background: #11271f; color: #f2e9d8; }
.phase-one #phase1RewardDialog::backdrop { background: #050b0dcc; }
.phase-one #phase1RewardDialog h2 { margin: 0; font-size: 22px; }
.phase-one #phase1RewardDialog p { margin: 8px 0 22px; color: #b9c6bd; font-size: 13px; }
.phase-one #phase1RewardDialog section { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phase-one #phase1RewardDialog button { display: grid; gap: 10px; padding: 22px 8px; border: 1px solid #7f987e; border-radius: 4px; background: #1c3b30; color: #f5e6c9; cursor: pointer; }
.phase-one #phase1RewardDialog button strong { font-size: 17px; }
.phase-one #phase1RewardDialog button span { font-size: 12px; color: #b9dfce; }
.phase-one #phase1RewardDialog button:hover { background: #2d5140; }
.phase-one #phase1RewardDialog button:focus-visible { outline: 2px solid #e6cb90; outline-offset: 3px; }

@media (min-width: 1000px) and (max-height: 760px) {
  .phase-one .hero .phase1-skills { bottom: 0; }
  .phase-one .hero .phase1-economy { bottom: 40px; padding: 2px 0; }
  .phase-one .hero .phase1-balance { font-size: 14px; }
  .phase-one .hero .phase1-next { font-size: 10px; }
  .phase-one .battle-layout .hero:has(.phase1-skills:not([hidden])) .battle-leader-art { bottom: 78px; height: calc(100% - 78px); }
  .phase-one .battle-layout .hero.has-deck-leader .battle-leader-name { display: none; }
  .phase-one .battle-layout .hero.has-deck-leader > div { top: 4px; padding: 3px; }
  .phase-one .battle-layout .hero.has-deck-leader .role { display: none; }
  .phase-one .battle-layout .hero.has-deck-leader .health-line { flex-direction: row; gap: 4px; }
  .phase-one .battle-layout .hero.has-deck-leader strong { font-size: 20px; }
  .phase-one .battle-layout .hero.has-deck-leader:has(.phase1-skills:not([hidden])) .evo { top: 36px; bottom: auto; }
  .phase-one .hero:has(.phase1-skills:not([hidden])) .phase1-upgrades { top: 60px; bottom: auto; }
}
