/* One landscape cabinet: boss left, tall reels, fixed controls right. */
:root {
  --game-scale: 1;
  --game-width: 1280px;
  --game-height: 720px;
  --game-left: 0px;
  --game-top: 0px;
}

html,body,#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: radial-gradient(ellipse at 50% 45%,#294531,#091714 80%);
}

.safe-area-probe {
  position: fixed;
  pointer-events: none;
  visibility: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.shell {
  position: absolute;
  left: var(--game-left);
  top: var(--game-top);
  width: var(--game-width);
  height: var(--game-height);
  max-width: none;
  margin: 0;
  transform-origin: top left;
  transform: scale(var(--game-scale));
  display: grid;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 8%,#69844732,transparent 60%),radial-gradient(ellipse at 4% 55%,#37533870,transparent 45%),linear-gradient(120deg,#152c23,#1c3529 55%,#102820);
  box-shadow: inset 0 0 0 2px #899e5955,inset 0 0 90px #03120e80;
}

.shell:before {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: .2;
  background: repeating-linear-gradient(110deg,transparent 0 150px,#92a67c13 151px 154px,transparent 156px 250px);
}

.shell:after {
  content: '';
  position: absolute;
  border-top: 1px solid #c5b67c55;
  pointer-events: none;
}

.topbar {
  border-bottom: 1px solid #b6bd7640;
  background: linear-gradient(180deg,#163123e8,#112a22b3);
  position: relative;
  z-index: 4;
}

.brand {
  letter-spacing: .12em;
}

.brand-mark {
  border-color: #d1c58866;
  color: #e7d698;
  background: #74824b22;
}

.brand small {
  letter-spacing: .18em;
}

.energy strong small {
  font-size: 13px;
}

.energy>span,.coins small {
  font-size: 11px;
}

.coins svg,.energy svg {
  width: 22px;
  height: 22px;
}

.fullscreen-button {
  border: 1px solid #a8b98240;
  border-radius: 11px;
  background: #314a3355;
  color: #c8d5b5;
  display: grid;
  place-items: center;
}

main {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #87976144 transparent;
}

.shell[data-page='expedition'] main {
  position: static;
  overflow: visible;
}

.run-heading {
  position: absolute;
  justify-content: center;
  z-index: 4;
}

.run-heading h1 {
  line-height: 1.1;
  margin: 0;
  color: #e7e9c7;
  white-space: nowrap;
}

.run-heading .eyebrow {
  display: none;
}

.run-heading .text-button {
  padding: 5px;
  white-space: nowrap;
}

.play-layout {
  height: 100%;
  display: grid;
  align-items: stretch;
  margin: 0;
  max-width: none;
}

.encounter-column {
  display: contents;
}

.enemy-scene {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  height: auto;
  border-radius: 18px;
  border: 1px solid #abb77355;
  background: radial-gradient(ellipse at 50% 42%,#62774780,transparent 70%),linear-gradient(#30473180,#1a332970);
  box-shadow: inset 0 1px #c4d99b20,0 10px 24px #00140d30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.enemy-scene.flame {
  background: radial-gradient(ellipse at 50% 42%,#99703f80,transparent 70%),linear-gradient(#483b2c99,#27332a80);
}

.enemy-scene.tide {
  background: radial-gradient(ellipse at 50% 42%,#58939a66,transparent 70%),linear-gradient(#24464788,#203c3370);
}

.scene-heading {
  position: absolute;
  font-size: 12px;
  color: #c1cfb0;
}

.scene-heading>span:first-child {
  font-size: 10px;
}

.enemy-model {
  position: absolute;
  width: 100%;
  height: calc(100% - 120px);
  max-height: none;
  min-height: 100px;
  left: 0;
  top: 24px;
  transform: none;
}

.scene-ring {
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  border-color: #b4ce7c20;
}

.ground-shadow {
  width: 100px;
  top: auto;
  bottom: 109px;
  left: 50%;
  transform: translateX(-50%);
}

.enemy-scene .enemy-title {
  position: relative;
  margin: 0 0 12px;
  justify-content: center;
  gap: 9px;
}

.enemy-title .element {
  font-size: 17px;
}

.enemy-health {
  margin: 0;
  height: 8px;
}

.enemy-scene .health-label {
  font-size: 13px;
  margin: 8px 0 27px;
}

.enemy-scene .health-label strong {
  font-size: 14px;
}

.intent {
  position: absolute;
  bottom: 15px;
  left: 12px;
  right: 12px;
  width: auto;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
}

.intent span {
  display: none;
}

.intent svg {
  width: 14px;
}

.party-health {
  grid-column: 1;
  align-self: center;
  margin: 0;
  padding: 0 3px;
}

.party-health .health-label {
  font-size: 14px;
}

.party-health .health {
  height: 8px;
  margin-top: 9px;
}

.party {
  grid-column: 1;
  gap: 6px;
}

.party-member {
  padding: 2px 3px 6px;
  flex-direction: column;
  text-align: center;
  gap: 0;
  border-radius: 10px;
}

.party-member .model {
  height: 43px;
  width: 49px;
}

.party-member strong {
  font-size: 12px;
}

.party-member small {
  font-size: 10px;
  white-space: nowrap;
}

.route {
  position: absolute;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  border-radius: 16px;
}

.route>span {
  flex: none;
  color: #91a587;
}

.route>span:not(:last-child):after {
  display: none;
}

.route b {
  flex: none;
}

.route>span.done {
  color: #cad8b6;
}

.route .current b {
  box-shadow: 0 0 16px #f0c56f30;
}

.feature {
  margin: 0;
  background: #30462a50;
  border: 1px solid #b9bc6845;
  border-radius: 14px;
}

.feature strong {
  line-height: 1.3;
}

.feature>svg {
  flex: none;
}

.run-ledger {
  display: flex;
  justify-content: center;
  margin: 0;
  border-top: 1px solid #b3c08e30;
  color: #b6c4a4;
}

.board-column {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  justify-self: stretch;
  container-type: size;
  align-items: start;
}

.board-heading {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px;
  color: #d2d7ae;
}

.board-heading>span:first-child {
  letter-spacing: .12em;
}

.board {
  grid-row: 2;
  place-self: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 2px solid #a5a96f;
  border-radius: 16px;
  background: linear-gradient(135deg,#2a442d,#12271f);
  box-shadow: 0 0 0 4px #243e2b,0 0 0 5px #b7b57255,0 14px 28px #02191080,inset 0 1px 5px #e5d39355;
  overflow: hidden;
}

.cell {
  border-radius: 9px;
  border-color: #bbd39744;
  background: linear-gradient(145deg,#47613f,#2d452f);
  box-shadow: inset 0 1px #e5efca16;
}

.cell.flame {
  background: linear-gradient(145deg,#66503a,#443629);
  border-color: #d1a87860;
}

.cell.tide {
  background: linear-gradient(145deg,#426271,#284149);
  border-color: #a9d7d145;
}

.size-label {
  font-size: 11px;
  bottom: 8px;
  left: 10px;
}

.navigation {
  position: absolute;
  z-index: 5;
  top: auto;
  transform: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  margin: 0;
  border-radius: 14px;
  border: 1px solid #95a67544;
  background: #10271b80;
  box-shadow: inset 0 1px #b8c18f20;
  backdrop-filter: none;
}

.navigation button {
  position: relative;
  flex: 1;
  min-width: 0;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 9px;
}

.navigation button.active {
  background: linear-gradient(#50623b,#354c30);
  color: #efe9bd;
}

.navigation b {
  position: absolute;
  top: 0;
  right: 4px;
}

.spin-controls {
  position: absolute;
  z-index: 5;
  display: flex;
  margin: 0!important;
  padding: 0;
}

.spin {
  min-height: 0;
  text-shadow: 0 1px #ffefa860;
  border: 1px solid #f8dd9c;
  background: linear-gradient(#ffe0a2,#d7b66d);
  box-shadow: inset 0 2px #fff0c5,0 4px 0 #806740,0 7px 20px #0004;
}

.spin small {
  letter-spacing: .1em;
  margin-top: 5px;
}

.auto {
  background: #354c32;
  border-color: #b5bf7750;
}

.auto svg {
  height: 23px;
  width: 23px;
}

.result {
  position: absolute;
  z-index: 4;
  margin: 0;
  background: #102a2066;
  border: 1px solid #afba7935;
  border-radius: 13px;
  line-height: 1.4;
}

.result strong {
  white-space: nowrap;
}

.payout-panel {
  position: absolute;
  z-index: 4;
  margin: 0;
  border: 1px solid #d3bb7555;
  border-radius: 12px;
  background: linear-gradient(110deg,#695a2b55,#273d2666);
  box-shadow: none;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: 1fr 14px;
}

.payout-heading {
  grid-column: 1;
  grid-row: 1;
  align-items: center;
}

.payout-heading .eyebrow {
  letter-spacing: .08em;
  margin-bottom: 4px;
}

.payout-heading strong small {
  display: block;
  margin-top: 2px;
}

.payout-damage>span {
  margin-top: 2px;
}

.win-breakdown {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.win-breakdown button {
  white-space: nowrap;
}

.win-breakdown>span {
  font-size: 11px;
}

.payout-note {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  gap: 0;
}



.decision {
  position: absolute;
  z-index: 4;
  margin: 0;
  overflow: auto;
  background: linear-gradient(135deg,#344d32,#182f23);
  border: 1px solid #d1c08a88;
  box-shadow: 0 10px 40px #0006;
  border-radius: 16px;
}

.decision .choices {
  flex-direction: column;
}

.decision .choices button {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  align-items: center;
  gap: 3px 9px;
}

.decision .choices button svg {
  grid-row: 1 / 3;
  margin: 0;
}

.decision .choices span {
  margin: 0;
}


.run-heading .text-button {
  color: #b8c8a5;
}

.page-title {
  margin: 4px 0 24px;
}

.page-title h1 {
  font-size: 38px;
  margin: 8px 0;
}

.page-title p {
  font-size: 15px;
}

.area-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
}

.area-card {
  display: block;
}

.area-art {
  height: 180px;
  min-height: 0;
}

.map-monster {
  height: 180px;
  width: 180px;
  margin: 4px auto;
}

.area-copy {
  padding: 20px;
}

.area-copy h2 {
  font-size: 28px;
}

.area-copy>p {
  font-size: 13px;
}

.area-tag {
  top: 20px;
  bottom: auto;
  right: 18px;
  width: auto;
  font-size: 9px;
}

.area-copy .eyebrow {
  font-size: 11px;
}

.area-copy .primary {
  min-height: 48px;
  font-size: 14px;
}

.map-footer {
  font-size: 13px;
}

.collection-layout {
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.roster {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

.roster-card .model {
  height: 115px;
}

.monster-detail h2 {
  font-size: 34px;
}

.monster-detail p {
  font-size: 14px;
}

.camp-grid {
  grid-template-columns: 1fr 1fr;
}

.panel h2 {
  font-size: 29px;
}

.panel p {
  font-size: 15px;
}

.empty {
  padding: 65px 0;
  max-width: 560px;
}

.empty .party {
  display: grid;
  height: 85px;
}

.empty h1 {
  font-size: 40px;
}

.toast {
  z-index: 10;
  bottom: calc(20px + env(safe-area-inset-bottom));
  font-size: 14px;
  max-width: 90vw;
  padding: 14px 20px;
}

.render-warning {
  position: absolute;
  z-index: 6;
  font-size: 9px!important;
  padding: 0!important;
  text-align: center;
}

.shell {
  grid-template-rows: 52px minmax(0,1fr);
  padding: 0;
}

.shell:before {
  inset: 52px 0 0;
}

.shell:after {
  top: 66px;
  bottom: 14px;
  left: auto;
  right: 14px;
  width: 262px;
  height: auto;
  border: 1px solid #bdba7c40;
  border-radius: 20px;
  background: linear-gradient(160deg,#344831aa,#14291fe6);
  box-shadow: inset 0 1px #c7c69020;
  z-index: 0;
}

.topbar {
  height: 52px;
  padding: 0 20px;
}

.brand {
  font-size: 16px;
  gap: 9px;
}

.brand-mark {
  width: 33px;
  height: 33px;
}

.brand small {
  font-size: 8px;
  margin-top: 3px;
}

.wallet {
  gap: 16px;
}

.energy strong,.coins strong {
  font-size: 18px;
}

.fullscreen-button {
  width: 35px;
  height: 35px;
}

main {
  padding: 12px 296px 16px 20px;
  grid-row: 2;
}

.shell[data-page='expedition'] main {
  padding: 12px 20px 16px;
}

.run-heading {
  top: 10px;
  height: 32px;
  left: 270px;
  right: 420px;
  gap: 16px;
}

.run-heading h1 {
  font-size: 25px;
}

.run-heading .text-button {
  font-size: 10px;
}

.play-layout {
  grid-template-columns: 230px minmax(0,1fr) 250px;
  grid-template-rows: minmax(0,1fr) 46px 74px 88px 24px;
  gap: 12px 18px;
}

.board-column {
  grid-column: 2;
  grid-row: 1 / -1;
  grid-template-rows: 22px minmax(0,1fr);
}

.board {
  width: min(100cqw,calc(100cqh - 22px));
  height: min(100cqw,calc(100cqh - 22px));
  padding: 8px;
  gap: 5px;
}

.board-heading {
  height: 20px;
  font-size: 10px;
}

.board-heading>span:first-child {
  font-size: 11px;
}

.enemy-scene {
  padding: 15px 16px 19px;
  background-color: #142c21;
}

.enemy-title h2 {
  font-size: 28px;
}

.enemy-scene .health-label {
  margin-bottom: 27px;
}

.scene-heading {
  left: 16px;
  right: 16px;
  top: 15px;
}

.scene-ring {
  width: 190px;
  height: 190px;
}

.party-health {
  grid-row: 2;
}

.party {
  grid-row: 3;
}

.feature {
  grid-column: 1;
  grid-row: 4;
  align-self: stretch;
  min-height: 0;
  padding: 10px 12px;
  gap: 8px;
}

.feature strong {
  font-size: 13px;
}

.feature span {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.feature>svg {
  width: 18px;
}

.run-ledger {
  grid-column: 1;
  grid-row: 5;
  flex-direction: row;
  gap: 12px;
  padding: 0;
  border: 0;
  font-size: 10px;
  white-space: nowrap;
}

.route {
  top: 88px;
  right: 30px;
  width: 230px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 8px;
  padding: 0;
  border: 0;
  background: none;
}

.route>span {
  font-size: 11px;
  gap: 6px;
  min-height: 30px;
}

.route b {
  width: 29px;
  height: 29px;
  font-size: 11px;
}

.navigation {
  left: auto;
  right: 30px;
  bottom: 28px;
  width: 230px;
  height: 104px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
}

.navigation button {
  flex-direction: row;
  gap: 7px;
  font-size: 11px;
}

.navigation button svg {
  width: 18px;
  height: 18px;
}

.spin-controls {
  right: 30px;
  bottom: 156px;
  width: 230px;
  height: 94px;
  gap: 8px;
}

.spin {
  height: 94px;
  padding: 10px;
  gap: 8px;
  font-size: 29px;
  border-radius: 20px;
}

.spin svg {
  width: 29px;
  height: 29px;
}

.auto {
  min-width: 52px;
  width: 52px;
  border-radius: 15px;
  font-size: 10px;
}

.spin small {
  font-size: 9px;
}

.result {
  left: auto;
  right: 30px;
  bottom: 276px;
  width: 230px;
  min-height: 136px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.result>span {
  white-space: normal;
}

.result strong {
  font-size: 29px;
}

.payout-panel {
  left: auto;
  right: 30px;
  bottom: 276px;
  width: 230px;
  height: 230px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payout-heading {
  gap: 12px;
  justify-content: space-between;
  min-height: 68px;
}

.payout-heading>div>strong {
  font-size: 39px;
}

.payout-heading .eyebrow {
  font-size: 9px;
}

.payout-heading .payout-damage>strong {
  font-size: 25px;
}

.payout-heading strong small {
  font-size: 10px;
}

.payout-damage>span {
  font-size: 11px;
}

.win-breakdown {
  flex: 1;
  flex-wrap: wrap;
  align-content: start;
  overflow-y: auto;
  margin: 0;
  gap: 5px;
}

.win-breakdown button {
  padding: 6px 8px;
  font-size: 10px;
}

.payout-note {
  font-size: 10px;
  line-height: 1.4;
}




.decision {
  right: 30px;
  top: 194px;
  bottom: 156px;
  width: 230px;
  padding: 15px;
}

.decision h2 {
  font-size: 24px;
}

.decision p {
  font-size: 12px;
}

.decision .choices {
  margin: 12px 0;
  gap: 7px;
}

.decision .choices button {
  padding: 10px;
  grid-template-columns: 24px 1fr;
}

.decision .choices strong {
  font-size: 13px;
}

.decision .choices span {
  font-size: 11px;
}

.shell:has(.decision) .result {
  display: none;
}

.render-warning {
  left: 270px;
  right: 296px;
  bottom: 1px;
}

/* Data changes stay inside reserved HUD regions. */
.wallet { flex: 0 0 364px; justify-content: flex-end; gap: 12px; }
.wallet .energy { width: 135px; flex: none; }
.wallet .coins { width: 158px; flex: none; }
.wallet .fullscreen-button { flex: none; }
.numeric-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.run-heading { right: 410px; min-width: 0; }
.run-heading>div { min-width: 0; }
.run-heading h1 { overflow: hidden; text-overflow: ellipsis; }
.run-heading .text-button { flex: none; }
.enemy-title { height: 36px; min-height: 36px; }
.enemy-title h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-label { white-space: nowrap; font-variant-numeric: tabular-nums; }
.health-label strong { flex: none; }
.party { min-height: 0; }
.party-member { min-width: 0; overflow: hidden; }
.party-member>span { max-width: 100%; }
.party-member strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature { overflow: auto; scrollbar-gutter: stable; }
.feature>div { min-width: 0; }
.run-ledger { min-width: 0; overflow-x: auto; }
.result, .payout-panel, .decision {
  top: 194px;
  bottom: 276px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 15px;
  box-sizing: border-box;
}
.result { overflow: auto; }
.payout-panel { gap: 8px; overflow: hidden; }
.payout-heading { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); height: 94px; min-height: 94px; flex: none; gap: 8px; align-items: end; }
.payout-heading>div { min-width: 0; }
.payout-heading .eyebrow { height: 28px; margin: 0 0 4px; overflow: hidden; line-height: 13px; }
.payout-heading>div>strong, .payout-heading .payout-damage>strong { font-size: 24px; line-height: 28px; }
.payout-heading strong small, .payout-damage>span { height: 14px; line-height: 14px; margin-top: 2px; }
.win-breakdown { min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; align-items: start; }
.win-breakdown button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.payout-note { height: 42px; min-height: 42px; overflow: auto; }
.decision { scrollbar-gutter: stable; overflow-x: hidden; overflow-y: auto; }
.decision .choices button { min-width: 0; }
.decision .choices strong, .decision .choices span { overflow-wrap: anywhere; }
.total-payout { animation: none; }

.party-member .model { height: 34px; }
.party-member strong { line-height: 14px; }
.party-member small { display: block; line-height: 12px; }

.payout-heading .numeric-value[data-wide='true'] { font-size: 19px; }

/* World trail and bounded collection pages use the existing landscape content pane. */
.world-title { margin-bottom: 14px; }
.world-title h1 { font-size: 32px; }
.world-title p { max-width: none; font-size: 13px; }
.world-toolbar, .codex-toolbar { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 18px; flex-wrap: wrap; }
.world-toolbar button, .codex-toolbar button, .codex-toolbar select, .codex-toolbar input { border: 1px solid #a5bd7555; background: #263f2f; border-radius: 8px; padding: 10px 12px; color: #d4dfbf; font: inherit; font-size: 12px; }
.world-toolbar .active, .codex-toolbar [aria-pressed='true'] { background: #637046; color: #fff2c1; border-color: #d3c38a; }
.world-toolbar>span { margin-left: auto; color: #b1c39e; font-size: 12px; font-variant-numeric: tabular-nums; }
.myth-invitation { margin-bottom: 20px; padding: 20px; border: 1px solid #c7b1df88; background: linear-gradient(115deg,#473950,#243c3a); border-radius: 14px; }
.myth-invitation h2 { margin: 8px 0; font-size: 29px; }
.myth-invitation p { font-size: 13px; margin-bottom: 15px; }
.world-notice { padding: 16px; margin-bottom: 16px; border: 1px solid #b7a8d444; border-radius: 10px; color: #d0bfd9; font-size: 13px; }
.champion-name { min-height: 32px; margin-top: 12px; font-size: 12px; color: #e6d79d; line-height: 1.5; }
.area-grid { align-items: start; }
.area-copy h2 { font-size: 25px; min-height: 58px; }
.area-copy .reward-note { min-height: 44px; }
.area-copy details { max-height: 130px; overflow: auto; }
.codex-toolbar { position: sticky; top: -12px; z-index: 3; background: #182f25; padding: 10px 0; }
.codex-toolbar input { width: 240px; }
.codex-toolbar span { min-width: 46px; text-align: center; font-size: 12px; }
.collection-layout { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.roster { grid-template-columns: repeat(3,minmax(0,1fr)); align-content: start; }
.roster-card { min-width: 0; height: 158px; }
.roster-card .model { height: 108px; }
.roster-card strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.roster-card small { font-size: 9px; }
.codex-origin { color: #d3c484; margin: 12px 0; }
.codex-empty { grid-column: 1 / -1; padding: 30px 0; }

/* Static UI sprites scroll and clip with their DOM cards. Battle models stay live. */
.monster-sprite { object-fit: contain; flex-shrink: 0; user-select: none; }

.shell:not([data-page='expedition']) .render-warning { display: none; }

/* Landscape art is decorative; foreground game surfaces keep their contrast. */
.shell[data-page='expedition']::before {
  inset: 0;
  z-index: -1;
  opacity: 1;
  background-image: linear-gradient(180deg, #071b1499, #061710c2), var(--expedition-art);
  background-size: cover;
  background-position: center;
  filter: saturate(.55);
}
.shell[data-page='expedition'] .enemy-scene { background-color: #122b22b8; }
.region-landscape { display: block; width: 100%; height: 100%; object-fit: cover; }
.area-art { height: 158px; background: #20352b; }
.area-art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#041a1e45,transparent 45%,#041a1e30); }
.area-number,.area-tag { z-index: 1; top: 12px; color: #fff4d6; padding: 5px 8px; background: #102b23b8; border-radius: 7px; }
.area-number { left: 12px; font-size: 12px; }
.area-tag { right: 12px; }
.area-copy { padding: 13px 16px 15px; }
.region-name { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.area-copy h2 { margin: 0; min-height: 0; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.region-footer>span { font-size: 13px; color: #b8cba9; }
.region-footer .primary { min-height: 38px; padding: 8px 17px; font-size: 13px; }
.icon-button { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 4px; color: #c8d8b1; background: transparent; border-radius: 8px; }
.world-title { margin: 0 0 10px; }.world-title h1 { font-size: 32px; margin: 0; }
.world-toolbar { margin-bottom: 15px; }.counter-gap { margin-left: 16px; }
.myth-invitation { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.myth-invitation h2 { font-size: 26px; margin: 0; }
.resume-banner { padding: 12px 16px; margin-bottom: 16px; }.resume-banner strong { font-size: 15px; }
.brand small,.coins small { display: none; }
.board-heading .icon-button { width: 25px; height: 22px; }
.collection-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.collection-title h1 { font-size: 32px; margin: 0; }.collection-title>span { color: #c1d3ac; font-size: 15px; }
.win-breakdown button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 7px; min-height: 35px; }
.win-breakdown .win-portrait { width: 30px; height: 30px; }.win-breakdown button strong { margin-left: auto; font-size: 12px; }
.win-breakdown button>span { font-size: 11px; }.payout-note { font-size: 10px; }
.info-dialog { width: min(540px,90vw); max-height: 85dvh; padding: 22px; border: 1px solid #a9b77b; border-radius: 18px; background: #1b3227; color: #e2e8d5; overflow: auto; box-shadow: 0 20px 70px #0008; }
.info-dialog::backdrop { background: #03100cd4; }.info-dialog form { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
.info-dialog h2 { font-size: 28px; }.info-dialog h3 { font-size: 15px; margin: 18px 0 8px; }.info-dialog p { font-size: 14px; line-height: 1.6; margin: 12px 0; }
.info-landscape { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.intent .sr-only { display: block; }

/* Keep symbol surfaces still while payout focus changes. */
.board.spinning > .cell { visibility: hidden; }
.paying .cell.winning,
.paying .cell[data-size='2'].winning,
.paying .cell[data-size='3'].winning { animation: none; transform: none; }

/* Required upgrades interrupt play in the native top layer, above the 3D canvas. */
.decision.upgrade-choice {
  position: fixed; inset: 0; margin: auto; transform: none;
  width: min(720px, 94vw); height: fit-content; max-height: 90dvh;
  padding: 24px; overflow: auto; text-align: center; color: #e6eddd;
  border: 1px solid #d8c58a; border-radius: 20px;
  background: linear-gradient(135deg, #314c32, #142e23);
  box-shadow: 0 24px 80px #000a; scrollbar-gutter: auto;
}
.upgrade-choice::backdrop { background: #03130fbd; }
.decision.upgrade-choice h2 { margin: 5px 0 8px; font-size: 32px; }
.decision.upgrade-choice p { margin: auto; font-size: 14px; }
.decision.upgrade-choice .choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0 0; }
.decision.upgrade-choice .choices button { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 14px 10px; text-align: center; gap: 8px; min-width: 0; border-color: #bcd58b66; }
.decision.upgrade-choice .upgrade-portrait { width: 72px; height: 72px; }
.decision.upgrade-choice .choices strong { font-size: 18px; }
.decision.upgrade-choice .choices span { font-size: 14px; line-height: 1.4; }
.decision.upgrade-choice .choices button svg { display: inline; margin: 0; }

/* Keep navigation off the play surface; the drawer occupies the native top layer. */
.topbar { gap: 10px; justify-content: flex-start; }
.topbar .wallet { margin-left: auto; }
.menu-button { flex-shrink: 0; width: 34px; height: 34px; }
.shell[data-page='expedition'] .run-heading { display: none; }
.route { position: absolute; z-index: 5; top: 8px; left: 300px; right: 480px; width: auto; height: 36px; display: flex; flex-direction: row; justify-content: space-between; gap: 12px; margin: 0; }
.route progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: #ffffff20; }
.route progress::-webkit-progress-bar { background: #ffffff20; }
.route progress::-webkit-progress-value { background: var(--gold); }
.route progress::-moz-progress-bar { background: var(--gold); }
.route>span { min-height: 26px; font-size: 13px; gap: 5px; }
.route b { width: 20px; height: 20px; font-size: 10px; }
.route>span:not(:last-child):after { display: none; }
.navigation-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(320px,85vw); height: 100dvh; max-height: none; padding: 24px; color: #e6eddd; background: #183027; border: 0; border-left: 1px solid #b9ce8a44; box-shadow: -15px 0 60px #0008; }
.navigation-drawer[open] { animation: drawer-enter .2s ease-out; }
.navigation-drawer::backdrop { background: #03130faa; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; font-size: 24px; }
.navigation-drawer .navigation { position: static; transform: none; width: 100%; height: auto; display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; box-shadow: none; }
.navigation-drawer .navigation button { width: 100%; min-height: 56px; font-size: 16px; justify-content: flex-start; padding: 16px; }
@keyframes drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
main { padding-right: 20px; }
.shell:not([data-page='expedition']):after { display: none; }
.spin-controls { bottom: 40px; }
.result,.payout-panel,.decision:not(.upgrade-choice) { top: 98px; bottom: auto; height: 420px; max-height: 420px; }
.win-spotlight { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; flex: 1; min-height: 0; }
.win-spotlight .win-portrait { width: 100px; height: 100px; flex-shrink: 0; }
.win-spotlight>strong { font-size: 21px; max-width: 100%; overflow-wrap: anywhere; }
.win-spotlight>span:last-child { font-size: 12px; color: var(--muted); }
.payout-heading { flex-shrink: 0; text-align: center; justify-content: space-around; }
.payout-heading small { font-size: 11px; color: var(--muted); }
.payout-note { justify-content: center; min-height: 26px; flex-shrink: 0; }
.payout-note button { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .navigation-drawer[open] { animation: none; } }

/* Monster Atlas: a persistent formation strip, browsable index, and inspect panel. */
.dex-heading { display:flex; align-items:center; justify-content:space-between; margin:2px 0 12px; }
.dex-heading h1 { margin:4px 0 0; font-size:30px; }
.dex-heading>span { font-size:12px; color:var(--muted); }
.formation-bar { display:flex; align-items:center; gap:18px; padding:12px 16px; background:#263e2e; border:1px solid #b6c98440; border-radius:14px; margin-bottom:12px; }
.formation-summary { display:flex; flex-direction:column; gap:5px; min-width:160px; }
.formation-summary strong { font-size:16px; }.formation-summary span { color:var(--gold); font-size:14px; }.formation-summary small { font-size:10px; color:#b4c4a9; }
.formation-slots { display:grid; grid-template-columns:repeat(8,1fr); gap:7px; flex:1; }
.formation-slots button,.empty-slot { position:relative; background:#102b2266; border:1px solid #9bb17444; border-radius:10px; height:65px; min-width:0; display:grid; place-items:center; }
.formation-slots button.selected { border-color:var(--gold); background:#5e653c66; }
.formation-slots img { width:52px; height:52px; object-fit:contain; }.formation-slots button>span { position:absolute; bottom:2px; right:4px; font-size:10px; background:#14291fbb; border-radius:4px; padding:1px 3px; }
.empty-slot { color:#8fa888; font-size:22px; border-style:dashed; }
.formation-bar>p { max-width:150px; font-size:11px; }
.codex-toolbar { top:-12px; margin-bottom:12px; gap:8px; }.codex-toolbar select { max-width:145px; }
.dex-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(350px,1fr); gap:18px; align-items:start; }
.dex-roster { grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.dex-roster .roster-card { position:relative; height:155px; padding:5px 8px 10px; }
.dex-roster .roster-card img { width:100%; height:100px; object-fit:contain; }.dex-roster .roster-card strong { font-size:13px; }
.dex-roster .roster-card small { font-size:9px; }.catalog-number { position:absolute; top:9px; left:9px; font-size:9px; color:#c4d3b5; }
.dex-detail { padding:18px; border:1px solid #b5c78750; border-radius:18px; background:linear-gradient(145deg,#324933,#172d25); position:sticky; top:60px; }
.dex-detail.flame { background:linear-gradient(145deg,#514031,#232e24); }.dex-detail.tide { background:linear-gradient(145deg,#2f4b50,#172d25); }
.dex-identity { display:flex; align-items:center; gap:12px; }.dex-portrait { width:115px; height:115px; object-fit:contain; }.dex-identity h2 { font-size:30px; margin:6px 0; }.dex-identity small { color:var(--muted); font-size:10px; }
.dex-stats { display:flex; justify-content:space-around; padding:10px; margin:8px 0; border-block:1px solid #b5c78730; }.dex-stats span { font-size:11px; color:var(--muted); }.dex-stats b { color:#ebedda; margin-left:6px; font-size:16px; }
.dex-action { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0; }.dex-action>.primary { min-height:38px; font-size:12px; }.dex-action>small { font-size:10px; color:var(--muted); flex:1; min-width:100px; }.dex-action details { width:100%; font-size:11px; color:#d1dcb9; }.dex-action summary { cursor:pointer; padding:4px 0; }
.dex-tabs { display:flex; gap:4px; border-bottom:1px solid #a5bb7930; }.dex-tabs button { flex:1; background:none; padding:10px; font-size:12px; color:var(--muted); border-bottom:2px solid transparent; }.dex-tabs button[aria-selected='true'] { color:var(--gold); border-color:var(--gold); }
.dex-tab-body { min-height:212px; padding-top:10px; }.ability-card { padding:10px 12px; background:#10291f55; border-radius:9px; margin-bottom:8px; }.ability-card p { font-size:12px; line-height:1.5; margin-top:7px; color:#cbd7bf; }.ability-card .eyebrow { font-size:9px; }.synergy-note { display:block; margin-top:7px; color:var(--gold); font-size:10px; }
.gear-slot { display:flex; flex-direction:column; gap:9px; margin:12px 0 18px; font-size:13px; }.gear-slot select { width:100%; padding:10px; border:1px solid #b5c78750; border-radius:8px; color:#e4ecd7; background:#183127; font:inherit; font-size:12px; }
.shell[data-page='expedition'] .party { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:66px; gap:4px; overflow:auto; height:136px; }
.shell[data-page='expedition'] .party-member { display:flex; flex-direction:column; justify-content:center; padding:2px; }
.shell[data-page='expedition'] .party-member .model { width:34px; height:34px; }.shell[data-page='expedition'] .party-member strong { font-size:8px; max-width:46px; }.shell[data-page='expedition'] .party-member small { font-size:7px; }.party-health { position:relative; }.shield-value { color:#9fd4df; }
.enemy-cycle { display:flex; flex-direction:column; gap:3px; bottom:8px; }.enemy-cycle>span { font-size:9px; color:#a7bba0; }.enemy-cycle>span.next { color:var(--gold); font-size:11px; }.enemy-cycle b { font-variant-numeric:tabular-nums; }.enemy-scene .health-label { margin-bottom:60px; }
.player-damage { position:absolute; left:0; top:-22px; z-index:6; background:#472624; color:#ffccc0; padding:6px 10px; font-size:13px; border-radius:8px; animation:damage-rise 1.5s ease-out both; white-space:nowrap; }
.combat-feedback { display:flex; flex-direction:column; gap:4px; max-height:78px; overflow:auto; font-size:10px; color:var(--gold); }.combat-feedback .healing { color:#b6e79b; }
.cell[data-size='4'] { border:2px solid #e5bdff; box-shadow:inset 0 0 20px #b691d333; }.cell[data-size='5'] { border:2px solid #ffd27a; box-shadow:inset 0 0 28px #ffc45a44; }.cell[data-size='5'] .size-label { color:#fff0c0; }.cell[data-size='4'] .size-label { color:#ebd5ff; }
@media(prefers-reduced-motion:reduce) { .player-damage { animation:none; } }
/* Reserve two party rows and the complete enemy telegraph; no overlap as teams grow. */
.play-layout { grid-template-rows:minmax(0,1fr) 46px 108px 54px 24px; }
.shell[data-page='expedition'] .party { grid-auto-rows:52px; height:108px; }
.shell[data-page='expedition'] .party-member .model { width:28px; height:28px; }
.enemy-model { height:calc(100% - 178px); min-height:70px; }
.enemy-cycle>span { display:flex; align-items:center; justify-content:center; gap:4px; }
.player-damage { animation:player-hit 1.5s ease-out both; }
@keyframes player-hit { 0%,65% { opacity:1; transform:translateY(0); } 100% {opacity:0;transform:translateY(-14px);} }
@media(prefers-reduced-motion:reduce) { .player-damage { animation:none; } }
/* Inspection is an overlay; the settled board never navigates away. */
.board>.cell { padding:0; font:inherit; cursor:pointer; }
.board>.cell:disabled { opacity:1; cursor:default; }
.board>.cell:hover { filter:none; }
.board>.cell:focus-visible { outline:2px solid var(--gold); outline-offset:-3px; }
.battle-inspect { display:flex; align-items:center; gap:18px; }.battle-inspect img { object-fit:contain; }
.battle-inspect p { margin-top:8px; }
.play-layout { grid-template-rows:minmax(0,1fr) 46px 108px 24px; }
.run-ledger { grid-row:4; }
.board-column { grid-template-rows:minmax(0,1fr); }
.board { width:min(100cqw,100cqh); height:min(100cqw,100cqh); }
.help-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.help-grid .panel { padding:22px; }.help-grid h2 { font-size:23px; margin:0 0 12px; }.help-grid p { margin:0; }
.shell[data-page='expedition'] .party-member>span:last-child { font-size:8px; line-height:1.2; }
.shell[data-page='expedition'] .party-member small { display:block; line-height:1.2; }
.shell[data-page='expedition'] .party-member strong { line-height:1.1; }

/* Expedition totals stay beside the action they summarize. */
.run-ledger {
  position:absolute; z-index:4; right:30px; bottom:150px; width:230px; height:38px;
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px;
  margin:0; padding:0; overflow:hidden; color:#c5d3b7;
}
.run-ledger>span { display:grid; grid-template-columns:14px minmax(0,1fr); align-content:center; align-items:center; gap:3px 5px; min-width:0; font-size:12px; }
.run-ledger small { grid-column:1 / -1; font-size:9px; color:var(--muted); }
.evolution-path { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.evolution-path>div { display:flex; flex-direction:column; align-items:center; padding:6px; border:1px solid #a5b87c30; border-radius:9px; background:#10291f40; }
.evolution-path .current { border-color:var(--gold); background:#7f79432a; }
.evolution-path img { object-fit:contain; }.evolution-path strong {font-size:11px;}.evolution-path small {font-size:9px;color:var(--muted);margin-top:4px;}
/* Treasure is a deliberate reveal; rewards were rolled once at victory. */
.treasure-dialog { position:fixed; inset:0; margin:auto; width:min(650px,94vw); max-height:92dvh; padding:28px; border:1px solid var(--treasure-color); border-radius:24px; color:#eaf0df; background:radial-gradient(ellipse at 50% 38%,#385345,#11281f 70%); text-align:center; overflow:auto; box-shadow:0 0 70px #000a; }
.treasure-dialog::backdrop {background:#02100ed9;}.treasure-dialog h2 {font-size:32px;margin:8px 0;}.treasure-dialog>p {margin:10px auto;}.chest-close {position:absolute;right:14px;top:14px;}
.chest-stage {height:190px;position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate;}
.treasure-chest {position:relative;width:150px;height:110px;filter:drop-shadow(0 10px 14px #0009);transform:rotate(-4deg);animation:chest-breathe 2s ease-in-out infinite;}
.chest-box {position:absolute;bottom:0;width:150px;height:76px;border:6px solid var(--treasure-color);border-radius:8px;background:repeating-linear-gradient(0deg,#563c28 0 20px,#34291e 21px 24px);box-shadow:inset 0 0 0 3px #0005;}
.chest-box:after {content:'';position:absolute;inset:0 24px;border-inline:8px solid var(--treasure-color);}
.chest-lid {position:absolute;z-index:2;top:0;width:150px;height:48px;border:6px solid var(--treasure-color);border-radius:28px 28px 5px 5px;background:linear-gradient(#846847,#493120);transform-origin:50% 0;}
.chest-lock {position:absolute;z-index:3;left:59px;top:38px;width:33px;height:36px;background:var(--treasure-color);color:#31311e;font-size:25px;border-radius:5px;}
.treasure-rays {position:absolute;width:280px;height:280px;background:repeating-conic-gradient(from 0deg,transparent 0deg 22deg,var(--treasure-color) 24deg 30deg,transparent 33deg 45deg);opacity:.08;mask-image:radial-gradient(#000,transparent 70%);animation:rays-turn 18s linear infinite;}
.treasure-ring {position:absolute;width:160px;height:160px;border:1px solid var(--treasure-color);border-radius:50%;opacity:.3;}
.rare .treasure-ring {box-shadow:0 0 25px #73c8f04d;}.special .treasure-ring {box-shadow:0 0 40px #c594f580;}.ultimate .treasure-ring {box-shadow:0 0 65px #f6d27999;border-width:3px;}
.chest-open {margin:18px auto 0;min-width:200px;}.revealed .treasure-chest {animation:chest-open-pop .65s ease-out both;}.revealed .chest-lid {transform:translateY(-30px) rotate(-12deg);transition:transform .55s cubic-bezier(.2,.8,.2,1);}.revealed .chest-lock {opacity:0;}.revealed .treasure-rays {opacity:.35;}.revealed .treasure-ring {animation:treasure-wave .9s ease-out both;}
.treasure-spark {position:absolute;left:50%;top:50%;width:5px;height:5px;border-radius:50%;background:var(--treasure-color);opacity:0;}.revealed .treasure-spark {animation:treasure-spark 1s var(--delay) ease-out both;}
.chest-rewards {display:flex;justify-content:center;gap:10px;}.chest-rewards article {flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 10px;background:#091e1aaa;border:1px solid var(--treasure-color);border-radius:12px;animation:reward-rise .5s var(--delay) ease-out both;}.chest-rewards svg {color:var(--treasure-color);}.chest-rewards strong {font-size:15px;}.chest-rewards span {font-size:11px;color:#bdceb7;}.treasure-dialog .chest-saved {font-size:11px;}
.board {position:relative;}
/* Board badges that must sit above the WebGL model layer (z-index 2): the shell is transform-scaled and so one
   stacking context, so these live in #board-overlay at body level and are positioned from screen rects. */
#board-overlay {position:fixed;inset:0;z-index:3;pointer-events:none;}
.badges-floating .board > .cell > .size-label {visibility:hidden;}
.floating-badge {position:absolute;display:flex;align-items:center;justify-content:center;white-space:nowrap;box-sizing:border-box;line-height:1;}
.win-celebration {position:absolute;inset:0;z-index:7;pointer-events:none;display:grid;place-items:center;overflow:hidden;--burst:#efd28b;container-type:inline-size;}.win-celebration.mega {--burst:#ceabff;}.win-celebration.ultra {--burst:#ffedaf;}.win-celebration.colossus {--burst:#ffd27a;}.win-celebration strong {font-family:var(--serif);font-size:clamp(28px,5cqw,54px);color:var(--burst);text-shadow:0 3px 0 #483321,0 0 20px #151409;background:#14281bd9;padding:12px 26px;border:1px solid var(--burst);border-radius:50px;animation:win-title 1.7s ease-out both;}.win-celebration i {position:absolute;left:50%;top:50%;width:8px;height:8px;background:var(--burst);border-radius:2px;animation:win-particle 1.5s var(--delay) ease-out both;}
@keyframes chest-breathe {50%{transform:translateY(-5px) rotate(3deg)}}
@keyframes rays-turn {to{transform:rotate(360deg)}}
@keyframes chest-open-pop {40%{transform:scale(1.12) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
@keyframes treasure-wave {to{transform:scale(2.2);opacity:0}}
@keyframes treasure-spark {0%{opacity:1;transform:rotate(var(--angle)) translateX(30px)}100%{opacity:0;transform:rotate(var(--angle)) translateX(145px)}}
@keyframes reward-rise {from{opacity:0;transform:translateY(16px) scale(.9)}to{opacity:1;transform:none}}
@keyframes win-title {0%{opacity:0;transform:scale(.75)}15%,70%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.05)}}
@keyframes win-particle {0%{opacity:1;transform:rotate(var(--angle)) translateX(10px)}100%{opacity:0;transform:rotate(var(--angle)) translateX(var(--distance)) rotate(120deg)}}
@media(prefers-reduced-motion:reduce) {.treasure-dialog *,.win-celebration * {animation:none!important;transition:none!important;}.treasure-spark,.win-celebration {display:none;}}
@media(max-height:480px) {.treasure-dialog {padding:18px;}.treasure-dialog h2 {font-size:25px;}.chest-stage {height:125px;}.treasure-chest {scale:.8;}.chest-rewards article {padding:10px;}.chest-rewards svg {width:24px;height:24px;}}
.treasure-dialog {--charge:0s;}.treasure-dialog.rare {--charge:.2s;}.treasure-dialog.special {--charge:.45s;}.treasure-dialog.ultimate {--charge:.8s;}
.revealed .chest-lid {transition-delay:var(--charge);}
.revealed .chest-rewards article {animation-delay:calc(var(--charge) + .3s + var(--delay));}
.revealed .treasure-spark {animation-delay:calc(var(--charge) + var(--delay));}
.revealed .treasure-ring {animation-delay:var(--charge);}
.revealed .treasure-chest {animation:chest-build-up calc(var(--charge) + .65s) ease-in-out both;}
.treasure-dialog.ultimate.revealed {box-shadow:0 0 75px #f6d2794d,0 24px 80px #000a;}
@keyframes chest-build-up {0%{transform:scale(1) rotate(-4deg)}20%{transform:scale(.95) rotate(5deg)}40%{transform:scale(1.02) rotate(-5deg)}65%{transform:scale(1.16) rotate(2deg)}100%{transform:none}}
@media(prefers-reduced-motion:reduce) {.treasure-dialog.revealed * {animation:none!important;transition:none!important;}}

/* Champion lessons: one visible rule on the boss scene, plus a highlighted surge turn in the telegraph. */
.lesson-banner { position:absolute; left:6%; right:6%; bottom:52px; font-size:9px; line-height:1.3; letter-spacing:.02em; color:#fff1c5; background:#2a1f1ad9; border:1px solid #e3c57e88; border-radius:10px; padding:4px 8px; display:flex; gap:5px; align-items:center; justify-content:center; text-align:center; z-index:2; }
.lesson-banner svg { flex-shrink:0; }
.enemy-cycle .surge { color:#ffd3c0; font-weight:700; }
.enemy-cycle .surge b { background:#5a2a24; color:#ffe2d6; border-radius:6px; padding:0 4px; }

/* Active training budget and loadout presets */
.budget-line { font-size:11px; color:#c9d4b6; margin:0 0 8px; }
.rank-toggle { display:flex; gap:4px; align-items:center; margin-top:6px; }
.rank-toggle button { min-width:26px; height:24px; padding:0 6px; font-size:11px; border:1px solid #8eab6b40; background:#324832; border-radius:6px; }
.rank-toggle button[aria-pressed='true'] { background:var(--gold); color:#273828; border-color:var(--gold); }
.rank-toggle small { font-size:9px; color:var(--muted); margin-left:4px; }
.presets { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.presets > span { display:inline-flex; gap:2px; }
.presets button { font-size:10px; padding:4px 8px; border-radius:6px; border:1px solid #8eab6b40; background:#324832; }
.presets .icon-button.small { padding:4px 5px; }
.presets small { font-size:10px; color:var(--muted); margin-left:auto; }

.training > button { color:#f3ead6; }
.info-dialog .equip-options button { color:#f3ead6; }
.mastery-line { font-size:10px; color:#c9d4b6; margin:4px 0 6px; }

/* Trophies page */
.trophy-strip { display:flex; gap:18px; align-items:center; flex-wrap:wrap; padding:14px 18px; border:1px solid var(--line); border-radius:14px; background:var(--panel); margin-bottom:12px; font-size:12px; }
.trophy-strip strong { font-size:16px; }
.trophy-strip span b { color:var(--gold); }
.trophy-strip span small { color:var(--muted); margin-left:6px; }
.trophy-heading { font-size:14px; margin:18px 0 8px; color:#cfd9bf; }
.trophy-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.trophy-card { position:relative; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.trophy-card.nearest { border-color:var(--gold); }
.trophy-card.complete { opacity:.75; }
.trophy-card strong { display:block; font-size:13px; margin:6px 0 2px; }
.trophy-card p { font-size:11px; margin:0 0 6px; }
.trophy-card small { font-size:10px; color:var(--muted); display:block; margin-top:6px; }
.trophy-card progress { width:100%; height:6px; accent-color:var(--gold); }
.trophy-marks { display:flex; gap:4px; font-size:12px; color:#6f7a68; }
.trophy-marks .bronze { color:#c98a4b; } .trophy-marks .silver { color:#d6dbe0; } .trophy-marks .gold { color:var(--gold); }
.account-bonuses { font-size:11px; margin-top:6px; color:#c9d4b6; } .account-bonuses summary { cursor:pointer; }
.trophy-strip, .trophy-card { color:#ece6d3; }
.trophy-card p, .trophy-strip span { color:#d7d0bb; }
.trophy-heading { color:#2f2a22; }
.volume-setting input[type=range] { width:140px; accent-color:var(--gold); }
.mode-buttons { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.mode-buttons .secondary { font-size:11px; padding:8px 10px; min-height:0; }

/* Atlas: formation board left, roster right, species detail in a modal (9 October 2026) */
.atlas-layout { display:grid; grid-template-columns:356px minmax(0,1fr); gap:16px; align-items:start; }
.atlas-list { min-width:0; }
.formation-board { position:sticky; top:0; display:flex; flex-direction:column; gap:10px; padding:14px 16px 16px; border-radius:14px; background:#263e2e; border:1px solid #b6c98440; }
.formation-head { display:flex; justify-content:space-between; align-items:flex-end; gap:10px; }
.formation-head strong { display:block; font-size:18px; margin-top:2px; }
.formation-payout { color:var(--gold); font-weight:800; font-size:15px; white-space:nowrap; }
.formation-board .formation-slots { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.formation-board .formation-slots button, .formation-board .empty-slot { height:74px; }
.formation-board .formation-slots img { width:58px; height:58px; }
.formation-note { font-size:11px; color:#c9d4b6; margin:0; line-height:1.4; }
.formation-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0; }
.formation-stats div { background:#10291f55; border-radius:8px; padding:6px 8px; min-width:0; }
.formation-stats dt { font-size:9px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.formation-stats dd { margin:2px 0 0; font-size:14px; font-weight:800; white-space:nowrap; }
.formation-board .presets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:2px; }
.formation-board .presets > .eyebrow { grid-column:1/-1; font-size:9px; }
.formation-board .presets .preset { display:flex; gap:3px; min-width:0; }
.formation-board .presets .preset > button:first-child { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.formation-board .account-bonuses { margin-top:0; }
.dex-dialog { width:min(580px,92vw); max-height:88dvh; padding:14px 20px 20px; border:1px solid #a9b77b; border-radius:18px; background:#1b3227; color:#e2e8d5; overflow:auto; box-shadow:0 20px 70px #0008; }
.dex-dialog::backdrop { background:#03100cd4; }
.dex-dialog-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:2px; }
.dex-dialog .dex-detail { position:static; padding:0; border:0; background:none; box-shadow:none; }

/* Storage page loot list */
.storage-list { list-style:none; margin:0 0 16px; padding:0; display:flex; flex-direction:column; gap:8px; max-height:300px; overflow:auto; }
.storage-list li { display:flex; gap:12px; align-items:center; padding:10px 12px; border-radius:10px; background:#10291f55; }
.storage-list .storage-icon { color:var(--gold); flex:none; }
.storage-list strong { display:block; font-size:13px; }.storage-list strong small { color:var(--muted); font-size:11px; }
.storage-list li > div > span { display:block; font-size:11px; color:#c9d4b6; margin-top:2px; }
.storage-list li > div > small { display:block; font-size:10px; color:var(--muted); margin-top:3px; }

/* Equipment slot pick buttons and the picker modal */
.gear-pick { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:10px; border:1px solid #b5c78750; background:#183127; color:#e4ecd7; }
.gear-pick > svg:last-child { margin-left:auto; opacity:.7; }
.gear-pick-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.gear-pick-text strong { font-size:13px; }.gear-pick-text small { font-size:11px; color:var(--muted); }
.gear-dialog { width:min(460px,92vw); max-height:80dvh; padding:14px 18px 18px; border:1px solid #a9b77b; border-radius:18px; background:#1b3227; color:#e2e8d5; overflow:auto; box-shadow:0 20px 70px #0008; }
.gear-dialog::backdrop { background:#03100cb0; }
.gear-dialog h2 { font-size:20px; }
.gear-options { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.gear-option { display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:10px 12px; border-radius:10px; border:1px solid #b5c78750; background:#10291f55; color:#e4ecd7; }
.gear-option.current { border-color:var(--gold); }
.gear-option .gear-check { margin-left:auto; color:var(--gold); font-size:16px; }
.gear-option .storage-icon { color:var(--gold); flex:none; }
