#game:not(.shopMode) #workerDetails{display: none;}
[hidden],#game[hidden],#intro[hidden],#lobby[hidden],#combat[hidden],#result[hidden]{display: none !important;}
#game{position: relative; min-width: 0px;}
.shop{display: grid; grid-template-columns: repeat(var(--offers,3),minmax(0,1fr)); gap: 8px; margin-top: 8px;}
.shop .card .art{height: 80px;}
.shop .card .ability{display: none;}
.shop .card button.actionBuy{width: 100%; margin-top: auto;}
.army{display: flex; flex-direction: column;}
.formationLine{display: grid; grid-template-columns: repeat(var(--slots),minmax(0,1fr)); gap: 7px;}
.army .card .ability,.army .card small:first-child{display: none;}
.army .card .art{height: 65px;}
.army .card{height: 130px;}
.army .card.empty{height: 75px;}
.army .card .actions{margin-top: auto;}
.handRow{display: grid; grid-template-columns: minmax(0px, 1fr) 130px; gap: 12px;}
.handCards{display: grid; grid-template-columns: repeat(var(--hand-cards,8),minmax(0,1fr)); gap: 6px;}
.handCards .card .art{height: 42px;}
.handCards .card .ability,.handCards .card small:first-child{display: none;}
.handCards .card button.actionDeploy{margin-top: auto;}
.handCards .card{height: 116px;}
.handCards .card small{font-size: 8px;}
.handCards .card strong{font-size: 10px;}
.handCards .stats{font-size: 11px;}
.handCards .card .infoButton{width: 20px; height: 20px !important; min-height: 20px !important;}
.handCards .card .art{height: 37px;}
.handCards .card.empty{height: 75px;}
#gameSynergies{display: flex; flex-direction: column; gap: 12px; min-width: 0px;}
#lastCombatButton{font-size: 12px;}
#gameSidebar{min-width: 0px;}
@media (min-width: 1000px) {body:has(#game:not([hidden])){height: 100dvh; min-height: 0px; overflow: hidden;}
body:has(#game:not([hidden])) footer{display: none;}
body:has(#game:not([hidden])) .wrap{height: calc(100dvh - 58px); padding: 10px 18px; overflow: hidden;}
#game:not([hidden]){display: grid; grid-template: "players bar controls" 28px "players encounters controls" "players notice controls" 22px "players main controls" minmax(0px, 1fr) / 150px minmax(0px, 1fr) 180px; gap: 6px 14px; height: 100%; min-height: 0px;}
#gameSidebar{grid-area: players; min-height: 0px; overflow-y: auto;}
#players{height: 100%; gap: 6px;}
.player{flex: 1 1 0%; min-height: 50px; padding: 8px;}
#gameSynergies{grid-area: controls; min-height: 0px; overflow-y: auto; padding-top: 4px;}
#bar{grid-area: bar; margin: 0px;}
#encounters{grid-area: encounters; min-height: 18px;}
#notice{grid-area: notice;}
#combat,#result{grid-area: main; min-height: 0px; min-width: 0px;}
.shopPanel{display: flex; flex-direction: column; padding: 9px 12px; min-height: 0px;}
.shopPanel h2{font-size: 17px;}
.shopPanel h2 small{font: 11px system-ui; color: rgb(208, 192, 154);}
.shop{flex: 1 1 0%; min-height: 0px;}
.shop .card{height: 100%; padding: 4px; min-height: 0px;}
.shop .card .art{height: clamp(42px, 8vh, 90px); flex: 1 1 0%; min-height: 30px; max-height: 100px;}
.shop .card strong{font-size: 12px; min-height: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
.shop .card .stats{font-size: 12px; margin: 2px 0px;}
.shop .card small{font-size: 8px;}
.shop .card .actionBuy{min-height: 25px;}
.armyPanel{display: flex; flex-direction: column; min-height: 0px; padding: 8px 12px;}
.armyhint{display: none;}
.army{flex: 1 1 0%; min-height: 0px;}
.formationLine{flex: 1 1 0%; min-height: 0px;}
.formationSlot{min-height: 0px;}
.army .card{height: 100%; min-height: 0px; padding: 4px; display: grid; grid-template-columns: minmax(38px, 32%) minmax(0px, 1fr); grid-template-rows: auto auto auto auto; align-content: center; column-gap: 4px;}
.army .card .art{grid-area: 1 / 1 / 5; width: 100%; height: 74px; min-height: 0px; max-height: none;}
.army .card > small,.army .card > strong,.army .card > .stats,.army .card > .actions{grid-column: 2; width: 100%; min-width: 0px;}
.army .card > small:first-of-type{display: none;}
.army .card > .actions{flex-wrap: wrap; gap: 2px;}
.army .card > .ability{display: none;}
.army .card.empty{display: flex;}
.army .card strong{font-size: 11px; line-height: 1.05; max-height: 24px; overflow: hidden;}
.army .card .stats{font-size: 11px; margin: 1px;}
.army .card .actions button{font-size: 9px; padding: 2px 4px; min-height: 21px;}
.army .card small{font-size: 8px; margin: 0px;}
.army .card.empty{height: 100%; min-height: 30px;}
.lineTitle{margin: 4px 0px 2px; font-size: 9px;}
.battleFormation > .lineTitle{margin: 0px;}
.economyStrip{min-height: 0px; padding: 5px 12px;}
.wallet strong{font-size: 25px;}
.handZone{display: flex; flex-direction: column; min-height: 0px; padding: 7px 10px;}
.handZone h3{margin: 0px 0px 4px; font-size: 12px;}
.handRow{flex: 1 1 0%; min-height: 0px;}
.handCards{min-height: 0px;}
.handCards .card{height: 100%; padding: 3px; min-height: 0px;}
.handCards .card .art{flex: 1 1 0%; min-height: 12px; max-height: 50px;}
.handCards .card strong{font-size: 10px; line-height: 1.05; max-height: 21px; overflow: hidden;}
.handCards .card .stats{font-size: 10px; margin: 1px;}
.handCards .card small{font-size: 7px;}
.handCards .card .actionDeploy{min-height: 21px; font-size: 9px; padding: 2px 5px;}
.sellZone{font-size: 10px;}
.sellZone small{font-size: 9px;}
#game.combatMode #combat{grid-row: 2 / 5;}
#game.combatMode #encounters,#game.combatMode #notice{visibility: hidden;}
#combat{display: flex; flex-direction: column; overflow: auto; padding: 6px 8px; min-width: 0px;}
#combat h2{font-size: 16px;}
.fight{flex: 1 1 0px; display: grid; grid-template-rows: repeat(2, minmax(0px, 1fr)); gap: 7px; padding: 7px 12px; min-height: 0px; width: 100%;}
.fieldTeam{display: grid; grid-template-rows: 20px repeat(2, minmax(0px, 1fr)); min-height: 0px;}
.battleFormation.isEmpty{min-height: 0px;}
.battleFormation.isEmpty .battleLine{min-height: 0px;}
.battleLine{grid-template-rows: minmax(0px, 1fr);}
.spriteMover{height: auto; min-height: 0px; position: relative;}
.spriteFacing{position: absolute; inset: 0px;}
.spriteMover .fighter{position: absolute; inset: 0px; width: 100%; height: 100%;}
.battleUnit{height: 100%; display: grid; grid-template-rows: minmax(0px, 1fr) 18px 6px 18px;}
.battleLine{align-items: stretch;}
.battleUnit .unitHealth{margin: 1px auto;}
.battleUnit strong{padding: 1px 3px;}
.battleLine{min-height: 0px; min-width: 0px; padding-top: 3px; gap: 8px;}
.fieldTeam h2{font-size: 14px; margin: 0px;}
.battleUnit{max-width: 180px;}
.battleUnit strong{font-size: 12px;}
.battleUnit > span{font-size: 13px;}
#battleControls button{font-size: 11px; padding: 5px 8px;}
#battleCaption{margin: 3px 0px; font-size: 11px;}
.damageSummary{padding: 7px; margin: 7px 0px;}
.damageSummary h3{font-size: 13px;}
#next{align-self: center; padding: 6px 12px;}
.result{padding: 18px;}
.result h2{font-size: 31px;}
.result .historyArmy{justify-content: center;}
.result .historyCard{width: 125px;}
.result .historyCard > div{height: 80px;}}
@media (min-width: 1000px) and (max-height: 760px) {.shop .card strong{font-size: 11px; min-height: 23px;}
.shop .card .infoButton{width: 20px; height: 20px; min-height: 20px !important;}
.wallet strong{font-size: 22px;}
.wallet span{font-size: 10px;}
.wallet small{font-size: 9px;}
.army .card .art{height: 62px; max-height: none;}
.armyHeader h2{font-size: 14px;}
.actionExpand{padding: 5px 7px; font-size: 10px !important;}
.player strong{font-size: 11px;}
.player small{font-size: 9px;}
.fight{gap: 5px;}
.battleLine{min-height: 0px;}
.fieldTeam h2{margin-bottom: 0px;}
.battleUnit strong{font-size: 11px;}
.battleUnit > span{font-size: 12px;}}
@media (min-width: 1000px) and (max-width: 1250px) {#game:not([hidden]){grid-template-columns: 128px minmax(0px, 1fr) 150px; gap: 6px 9px;}
.shop{gap: 4px;}
.shop .card strong{font-size: 10px;}
.armyHeader{gap: 4px;}
.handRow{grid-template-columns: minmax(0px, 1fr) 90px; gap: 7px;}
.wallet span{display: none;}
.economyStrip{gap: 10px;}
.economyStrip #workerDetails{min-width: 140px;}
.handCards{gap: 3px;}
.handCards .card strong{font-size: 9px;}
header{padding: 7px 12px;}
.gamename{display: none;}
.headerTools button{font-size: 10px;}
.brandLogo{width: 115px;}
#gameSynergies button{font-size: 11px;}}
@media (min-width: 1000px) and (max-height: 650px) {.fight{min-height: 0px;}
.spriteMover{height: auto;}
.battleLine{min-height: 0px;}
.wrap{padding-top: 5px !important;}}
.mobileTabs,.mobileRosterToggle,.mobileActionsToggle{display: none;}
#upgradeControl{display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;}
.upgradePrice{font-size: 18px; line-height: 1.2; white-space: nowrap;}
@media (max-width: 999px) {body{font-size: 14px; overflow-x: hidden;}
header{padding: 6px 10px; gap: 6px; flex-wrap: wrap;}
.brandLogo{width: 100px; height: 34px;}
.gamename{display: none;}
.headerTools{flex: 1 1 0%; min-width: 0px; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 3px;}
.headerTools > *{flex-shrink: 0;}
.headerTools button,#languagePicker{min-height: 36px; font-size: 11px;}
.wrap{padding: 8px; max-width: 100%;}
#game:not([hidden]){display: grid; grid-template-columns: minmax(0px, 1fr); gap: 8px;}
#bar{grid-row: 1;}
#gameSidebar{grid-row: 2;}
.mobileRosterToggle{display: block; width: 100%; min-height: 42px; text-align: left;}
#players{display: none;}
#game.mobileRosterOpen #players{display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 6px; margin-top: 6px;}
.player{padding: 8px;}
.player strong{font-size: 13px;}
.player small,.player div{font-size: 11px;}
.scoutButton{min-height: 38px; width: 100%;}
#encounters{grid-row: 3; font-size: 11px; gap: 4px;}
#notice{grid-row: 4; white-space: normal; font-size: 12px;}
#gameSynergies{grid-row: 5; display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 6px;}
#launch{min-height: 44px; font-size: 12px; padding: 7px;}
#readyInfo{font-size: 10px;}
.mobileActionsToggle{display: block; grid-area: 2 / 2; min-height: 44px; font-size: 12px;}
#expansion button{flex: 1 1 0%; justify-content: center; min-height: 44px; padding: 6px; font-size: 12px !important;}
#workerDetails,#synergyPanel{padding: 8px; min-width: 0px;}
#workerDetails summary,#synergyPanel summary{font-size: 11px;}
#workerDetails[open],#synergyPanel[open]{grid-column: 1 / -1;}
#lastCombatButton{grid-column: 1 / -1; min-height: 40px; font-size: 12px;}
.mobileTabs{display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 5px; position: sticky; top: 0px; z-index: 5; background: rgba(17, 39, 62, 0.96); padding: 5px; border-radius: 8px;}
.mobileTabs button{min-height: 44px; padding: 7px 3px; font-size: 12px;}
.mobileTabs button[aria-pressed="true"]{background: linear-gradient(rgb(239, 204, 131), rgb(203, 153, 76)); color: rgb(23, 38, 55); border-color: rgb(245, 213, 148); font-weight: 750;}
.panel{padding: 10px;}
.shopPanel h2,.armyHeader h2{font-size: 17px;}
.shop{grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 8px;}
.shop .card{height: 210px; padding: 6px;}
.shop .card .art{height: 100px; flex: 1 1 0%; min-height: 45px;}
.shop .card strong{font-size: 14px; min-height: 30px;}
.shop .card small{font-size: 10px;}
.shop .card .stats{font-size: 15px;}
.shop .card .actionBuy{min-height: 44px; font-size: 13px;}
.card .infoButton{width: 30px; height: 30px; font-size: 16px; min-height: 30px !important;}
.offerBadge{font-size: 10px;}
.armyHeader{flex-wrap: wrap;}
.formationLine{grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 8px; overflow: visible;}
.lineTitle{font-size: 12px; margin: 10px 0px 5px;}
.army .card{height: 204px; padding: 6px;}
.army .card .art{height: 95px; flex: 1 1 0%;}
.army .card strong{font-size: 14px;}
.army .card .stats{font-size: 15px;}
.army .card .actions{display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%;}
.army .card .actions button{min-height: 42px; padding: 4px 2px; font-size: 11px;}
.army .card.empty{height: 86px;}
.positionLabel{display: block; font-size: 10px;}
.handRow{grid-template-columns: minmax(0px, 1fr); gap: 8px;}
.handCards{grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 8px;}
.handCards .card{height: 195px; padding: 6px;}
.handCards .card .art{height: 90px; flex: 1 1 0%;}
.handCards .card strong{font-size: 14px;}
.handCards .card .stats{font-size: 14px;}
.handCards .card .actionDeploy{min-height: 44px; width: 100%; font-size: 13px;}
.handCards .card .infoButton{width: 30px; height: 30px !important; min-height: 30px !important;}
.sellZone{min-height: 64px; font-size: 12px;}
.sellZone small{font-size: 11px;}
#combat,#result{grid-row: 6; min-width: 0px;}
.combatCommands{grid-column: 1 / -1; padding: 8px;}
.combatCommands #battleControls,.combatCommands .actions{flex-flow: wrap;}
.combatCommands button{min-height: 40px;}
.combatCommands #battleCaption{font-size: 11px; margin: 5px 0px;}
.fight{gap: 8px; padding: 8px; min-width: 0px; min-height: 520px;}
.fieldTeam{gap: 3px;}
.fieldTeam h2{font-size: 14px;}
.battleFormation{padding-top: 15px;}
.battleFormation > .lineTitle{font-size: 10px;}
.battleLine{grid-template-columns: repeat(var(--fighters,3),minmax(0,1fr)); min-height: 102px; gap: 3px; align-items: end;}
.battleUnit{min-width: 0px; max-width: 135px;}
.spriteMover{height: 85px;}
.battleUnit strong{font-size: 10px; min-height: 22px; white-space: normal; line-height: 1.1;}
.battleUnit > span{font-size: 11px; white-space: normal; display: block;}
.unitHealth{width: 85%;}
#next{min-height: 44px;}
.cardPopup{display: none !important;}
.catalog{padding: 12px; max-height: 90dvh;}
.catalog button{min-height: 40px;}
.catalogGrid{grid-template-columns: repeat(2, minmax(0px, 1fr));}
.targetGrid button{width: calc(50% - 5px);}}
.tavernHeader{display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0px; margin-bottom: 5px;}
.tavernHeader h2{flex-shrink: 0; margin: 0px;}
.tavernControls{display: flex; gap: 5px; justify-content: center; flex: 1 1 0%; min-width: 0px;}
.tavernControls button{min-height: 36px; padding: 4px 8px; font-size: 11px; line-height: 1.15; flex: 1 1 0%; max-width: 170px;}
.tavernControls #upgradeControl{flex-direction: row; gap: 5px;}
.tavernControls .upgradePrice{font-size: 14px;}
.tavernHeader .shopDetails{flex-shrink: 0; font-size: 10px;}
.armyHeader{display: grid; grid-template-columns: minmax(0px, 1fr) auto minmax(0px, 1fr); align-items: center; gap: 8px; min-height: 36px; flex-shrink: 0;}
.armyHeader h2{grid-area: 1 / 2; margin: 0px; text-align: center;}
.armyHeader #expansion{display: contents;}
.armyHeader .actionExpand{min-width: 0px; min-height: 34px; justify-content: center; padding: 4px 7px; grid-row: 1;}
.armyHeader .actionExpand:first-child{grid-column: 1; justify-self: start;}
.armyHeader .actionExpand:nth-child(2){grid-column: 3; justify-self: end;}
.armyHeader .expansionMax{grid-area: 1 / 3; text-align: right;}
.workerMining{width: 72px; height: 46px; display: block; float: left; margin-right: 5px; pointer-events: none;}
.minerPick{transform-origin: 33px 29px; animation-duration: 1.3s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: normal; animation-fill-mode: none; animation-play-state: running; animation-name: minePick; animation-timeline: auto; animation-range: normal; animation-delay: var(--mine-delay);}
.minerBody{animation-duration: 1.3s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: normal; animation-fill-mode: none; animation-play-state: running; animation-name: mineBody; animation-timeline: auto; animation-range: normal; animation-delay: var(--mine-delay);}
.mineSpark{opacity: 0; animation-duration: 1.3s; animation-timing-function: ease; animation-iteration-count: infinite; animation-direction: normal; animation-fill-mode: none; animation-play-state: running; animation-name: mineSpark; animation-timeline: auto; animation-range: normal; animation-delay: var(--mine-delay);}
.workerToken::after{content: ""; display: block; clear: both;}
.workerToken button{clear: both;}
#workerDetails:not([open]) .workerMining *{animation-play-state: paused;}
@keyframes minePick { 
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-35deg); }
  50%, 58% { transform: rotate(35deg); }
  75% { transform: rotate(0deg); }
}
@keyframes mineBody { 
  0%, 30%, 100% { transform: translateY(0px); }
  50%, 58% { transform: translateY(2px); }
}
@keyframes mineSpark { 
  0%, 46%, 64%, 100% { opacity: 0; }
  50%, 56% { opacity: 1; }
}
@media (max-width: 999px) {.mobileActionsToggle{display: none;}
.tavernHeader{flex-wrap: wrap;}
.tavernHeader .shopDetails{margin-left: auto;}
.tavernControls{order: 3; flex-basis: 100%;}
.tavernControls button{min-height: 44px; font-size: 12px; padding: 5px;}
.tavernControls #upgradeControl{flex-direction: column;}
.armyHeader{grid-template-columns: 1fr 1fr;}
.armyHeader h2{grid-area: 1 / 1 / auto / -1;}
.armyHeader .actionExpand{grid-row: 2; min-height: 44px; width: 100%;}
.armyHeader .actionExpand:first-child{grid-column: 1;}
.armyHeader .actionExpand:nth-child(2){grid-column: 2;}
.armyHeader .expansionMax{grid-area: 2 / 1 / auto / -1; text-align: center;}}
@media (min-width: 1000px) and (max-width: 1250px) {.tavernHeader{gap: 4px;}
.tavernHeader h2{font-size: 14px;}
.tavernControls button{font-size: 10px; padding: 3px;}
.tavernHeader .shopDetails summary{font-size: 9px;}
.armyHeader h2{font-size: 13px;}
.armyHeader h2 span{display: block;}
.armyHeader .actionExpand{gap: 3px; font-size: 10px !important;}
.tavernControls .upgradePrice{font-size: 12px;}}