/* Campaign experience: briefing, live intent, and earned mastery. */
.battle-hud {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.battle-hud .base-health {
  grid-column: 1 / -1;
}
.battle-hud .wave-display {
  justify-self: end;
}
.battle-clock {
  font:
    22px 'Lilita One',
    sans-serif;
  color: #fff3c1;
  background: #102f3e;
  border: 1px solid #567b80;
  border-radius: 10px;
  padding: 5px 10px;
  min-width: 65px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 0 #071c27;
}
.battle-clock.urgent {
  color: #fff1db;
  background: #a74737;
  border-color: #fb9874;
  animation: clock-beat 1s ease-in-out infinite;
}
.battle-directive {
  color: #a9d7d8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-align: center;
  min-height: 14px;
}
.overdrive .battle-directive {
  color: #ffdf7b;
}
.overdrive .map-container {
  border-color: #f1c672;
  box-shadow:
    0 0 0 2px #cba65733,
    0 12px 32px #02192350;
}
.battle-grid[data-biome='dusk'] .map-container {
  border-color: #79b4c0;
}
.battle-grid[data-biome='ember'] .map-container {
  border-color: #d2a070;
}
.start-overlay {
  width: min(490px, 91%);
  max-width: none;
  padding: 26px 24px 20px;
  border: 1px solid #d9dbaa70;
  border-radius: 22px;
  background:
    linear-gradient(90deg, #092e3ee8, #123e48a8 60%, #163d4533),
    url('art/frontier-command.webp') center / cover;
  box-shadow:
    0 8px 0 #0c253a55,
    0 24px 60px #071e4580;
  overflow: hidden;
  align-items: flex-start;
  text-align: left;
}
.start-overlay > strong {
  font-size: clamp(24px, 4vw, 39px);
  max-width: 72%;
  line-height: 1;
  margin: 6px 0 10px;
  text-shadow: 0 3px 0 #0b243b;
}
.start-overlay > span:not(.start-kicker) {
  max-width: 65%;
  font-size: 13px;
  line-height: 1.45;
  color: #e1f2ec;
}
.start-overlay .start-kicker {
  font-size: 13px;
  letter-spacing: 1.3px;
  color: #ffe097;
}
.start-overlay .primary {
  width: 100%;
  margin-top: 15px;
  min-height: 48px;
  font-size: 15px;
}
.brief-mastery {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
.brief-mastery > span:last-child {
  color: #ecddb3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.6px;
}
.mastery-stars {
  display: inline-flex;
  gap: 5px;
  color: #54716e;
  font-size: 22px;
  line-height: 1;
}
.mastery-stars .earned {
  color: #f5c65c;
  text-shadow: 0 2px 0 #936839;
}
.brief-intel {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.brief-intel > span:first-child {
  font-size: 13px;
  font-weight: 900;
  color: #a6d4d8;
  margin-right: 3px;
}
.intel-chip {
  display: inline-flex;
  align-items: center;
  padding-right: 6px;
  border: 1px solid #a7d5c43b;
  border-radius: 7px;
  background: #0b283db0;
  font-size: 13px;
  color: #f6edd5;
}
.intel-chip svg {
  width: 26px;
  height: 28px;
}
.campaign-banner {
  background:
    linear-gradient(90deg, #103c46, #144354d9 45%, #13495922),
    url('art/frontier-command.webp') 60% 40% / cover;
  border-color: #668e88;
  min-height: 140px;
  color: #f6f1d8;
}
.campaign-banner h2 {
  color: #fff0bf;
  max-width: 280px;
}
.campaign-banner p {
  color: #cde7df;
  max-width: 290px;
}
.campaign-banner .eyebrow {
  color: #8cd8d1;
  font-size: 13px;
  letter-spacing: 2px;
}
.campaign-banner > .tag {
  background: #f6d485;
  border: 0;
  color: #153f47;
  font-weight: 900;
}
.operation {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #faf2d6, #e1eacb);
  border-color: #a8c2a8;
}
.operation[data-biome='dunes'] {
  background: linear-gradient(145deg, #fff2cb, #e8d0a5);
}
.operation[data-biome='dusk'] {
  background: linear-gradient(145deg, #deefdf, #bedbd7);
}
.operation[data-biome='ember'] {
  background: linear-gradient(145deg, #f4e4cc, #ddc4ac);
}
.operation .mastery-stars {
  margin: 3px 0 7px;
}
.operation .level-theme {
  color: #537768;
  letter-spacing: 1.4px;
}
.operation-best {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #536e66;
  margin-top: 7px;
}
.operation:not(.locked):not(.completed) {
  border: 2px solid #539c92;
  box-shadow: 0 4px 0 #8daf9744;
}
.level-transition {
  overflow-y: auto;
  align-items: flex-start;
  padding: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.campaign-celebration {
  margin: auto;
  width: min(430px, 100%);
  padding: 20px 22px 16px;
  background: radial-gradient(ellipse at top, #fff7cf, #e7edce 65%, #d7e3ce);
  border: 1px solid #fff1be;
  box-shadow:
    0 7px 0 #082f3940,
    0 24px 60px #05263c60;
}
.campaign-celebration h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 6px 0 12px;
  color: #123f4a;
}
.campaign-celebration .eyebrow {
  font-size: 13px;
  letter-spacing: 1.4px;
}
.celebration-sparkles {
  pointer-events: none;
}
.result-stars {
  font-size: 47px;
  gap: 10px;
  margin-bottom: 13px;
  color: #b5c5ad;
}
.result-stars .earned {
  display: inline-block;
  animation: earn-star 0.65s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.result-stars .earned:nth-child(2) {
  animation-delay: 0.18s;
}
.result-stars .earned:nth-child(3) {
  animation-delay: 0.36s;
}
.mastery-checklist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  font-size: 13px;
  color: #637f75;
  font-weight: 800;
}
.mastery-checklist .achieved {
  color: #296d5c;
}
.mastery-checklist span {
  margin-right: 4px;
}
.battle-receipt {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #a7bda755;
  border-bottom: 1px solid #a7bda755;
  padding: 12px 0;
  margin: 13px 0 7px;
  gap: 6px;
}
.battle-receipt span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #69806c;
}
.battle-receipt b {
  font:
    23px 'Lilita One',
    sans-serif;
  color: #234d50;
  margin-bottom: 3px;
}
.battle-mvp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
  padding: 2px 0;
}
.battle-mvp svg {
  width: 37px;
  height: 38px;
}
.battle-mvp span {
  display: flex;
  flex-direction: column;
}
.battle-mvp small {
  color: #688374;
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: 900;
}
.battle-mvp b {
  font-size: 13px;
}
.battle-mvp > strong {
  font-size: 13px;
  color: #457365;
  margin-left: 4px;
}
.campaign-celebration .result-insight {
  font-size: 13px;
  margin: 7px 0 11px;
  line-height: 1.5;
}
.campaign-celebration .next-lesson {
  font-size: 13px;
  padding: 8px;
  margin-bottom: 10px;
}
.campaign-celebration .primary {
  min-height: 48px;
}
.result-secondary {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.result-secondary button {
  background: transparent;
  box-shadow: none;
  border: 0;
  min-height: 44px;
  color: #3d6a66;
  font-size: 13px;
  padding: 7px 5px;
  text-decoration: underline;
}
.card .troop-art {
  background: radial-gradient(ellipse at 50% 55%, #ffffdd55, transparent 66%);
}
.card .troop-art svg {
  filter: drop-shadow(0 4px 2px #193d3d30);
}
.card.selected {
  transform: translateY(-6px);
}
@keyframes earn-star {
  from {
    opacity: 0;
    transform: scale(0.25) rotate(-24deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
@keyframes clock-beat {
  50% {
    box-shadow: 0 0 0 3px #ffb08135;
  }
}
@media (max-width: 600px) {
  .battle-hud {
    gap: 4px 8px;
  }
  .battle-hud .level-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .battle-hud .wave-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }
  .battle-hud .level-badge strong {
    font-size: 13px;
  }
  .battle-hud .wave-display > span {
    font-size: 13px;
  }
  .battle-clock {
    font-size: 20px;
    padding: 4px 8px;
    min-width: 58px;
  }
  .battle-directive {
    font-size: 13px;
    letter-spacing: 0.35px;
    min-height: 11px;
  }
  .start-overlay {
    padding: 20px 18px 16px;
  }
  .start-overlay > strong {
    font-size: 29px;
  }
  .start-overlay > span:not(.start-kicker) {
    font-size: 13px;
  }
  .brief-intel {
    margin-top: 8px;
  }
  .campaign-celebration {
    padding: 17px 15px 10px;
  }
  .campaign-celebration h2 {
    font-size: 29px;
  }
  .campaign-banner {
    min-height: 154px;
  }
}
@media (max-height: 700px) and (orientation: portrait) {
  .start-overlay {
    padding: 12px 14px;
  }
  .start-overlay > strong {
    font-size: 25px;
    margin: 5px 0;
  }
  .brief-intel {
    display: none;
  }
  .brief-mastery {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
  }
  .start-overlay .primary {
    margin-top: 10px;
  }
  .level-transition {
    padding: 8px;
  }
  .campaign-celebration {
    padding: 12px;
  }
  .campaign-celebration h2 {
    font-size: 25px;
    margin-bottom: 7px;
  }
  .result-stars {
    font-size: 30px;
    margin-bottom: 8px;
  }
  .battle-receipt {
    padding: 8px 0;
    margin: 8px 0;
  }
  .battle-mvp {
    display: none;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .battle-hud {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .battle-clock {
    font-size: 17px;
    padding: 2px 8px;
  }
  .battle-directive {
    font-size: 13px;
  }
  .start-overlay {
    width: min(420px, 94%);
    padding: 12px 17px;
  }
  .start-overlay > strong {
    font-size: 25px;
    margin: 5px 0;
  }
  .start-overlay > span:not(.start-kicker) {
    font-size: 13px;
  }
  .brief-intel {
    display: none;
  }
  .brief-mastery {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 7px;
  }
  .start-overlay .primary {
    margin-top: 8px;
  }
  .campaign-celebration {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result-stars .earned,
  .battle-clock.urgent {
    animation: none;
  }
}
/* Results use the play area so rewards and the next action fit on a phone. */
.level-transition {
  position: fixed;
  inset: calc(env(safe-area-inset-top, 0px) + 49px) env(safe-area-inset-right, 0px)
    calc(env(safe-area-inset-bottom, 0px) + 63px) env(safe-area-inset-left, 0px);
  z-index: 35;
  border-radius: 0;
  padding: 20px 16px;
}
@media (orientation: landscape) and (max-height: 600px) {
  .campaign-celebration {
    max-width: 650px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 18px;
    text-align: left;
  }
  .campaign-celebration > .eyebrow,
  .campaign-celebration h2 {
    grid-column: 1;
  }
  .campaign-celebration h2 {
    font-size: 27px;
    margin: 0;
  }
  .result-stars {
    grid-column: 1;
    font-size: 34px;
    margin: 0;
  }
  .mastery-checklist {
    grid-column: 1;
    justify-content: flex-start;
  }
  .battle-receipt {
    grid-column: 2;
    grid-row: 1 / 4;
    margin: 0;
    align-content: center;
  }
  .battle-mvp {
    display: none;
  }
  .campaign-celebration .result-insight {
    grid-column: 1;
    margin: 0;
  }
  .campaign-celebration .next-lesson {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
  }
  .campaign-celebration .primary {
    grid-column: 2;
    grid-row: 5;
    margin: 0;
  }
  .result-secondary {
    grid-column: 1 / -1;
  }
  .level-transition {
    padding: 8px 18px;
  }
}
.start-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  height: auto;
  max-height: calc(var(--app-height, 100vh) - 155px);
  transform: translate(-50%, -50%);
  overflow-y: auto;
  z-index: 20;
  gap: 0;
}
.game-nav {
  padding-right: 65px;
}
.feedback-fab {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 9px);
  right: calc(env(safe-area-inset-right, 0px) + 10px);
  width: 48px;
  height: 48px;
  padding: 2px;
  background: none;
  border: 0;
  box-shadow: none;
  z-index: 60;
  filter: drop-shadow(0 3px 0 #071e2e);
}
.feedback-fab svg {
  width: 44px;
  height: 44px;
}
#feedback-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(var(--app-height, 100vh) - 28px);
  top: calc(var(--viewport-top, 0px) + 14px);
  bottom: auto;
  margin: auto;
  border: 2px solid #f0d28c;
  border-radius: 24px;
  padding: 0;
  color: #163e48;
  background: #edf1db;
  overflow-y: auto;
  z-index: 100;
}
#feedback-dialog::backdrop {
  background: #071e38b8;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.feedback-sheet {
  padding: 24px 20px 18px;
  position: relative;
}
.feedback-sheet h2 {
  font:
    29px 'Lilita One',
    sans-serif;
  margin: 5px 0 9px;
}
.feedback-sheet h3 {
  font-size: 13px;
  margin: 16px 0 8px;
}
.feedback-explainer {
  font-size: 13px;
  color: #648071;
  line-height: 1.5;
}
.feedback-close {
  position: absolute;
  right: 8px;
  top: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  width: 44px;
  height: 44px;
  font-size: 28px;
}
.feeling-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 16px 0;
}
.feeling-options button {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  background: #d6e4cf;
  border: 2px solid transparent;
  border-radius: 13px;
  padding: 10px 3px;
  color: #355e60;
  font-size: 13px;
  box-shadow: 0 3px 0 #b5cbb5;
}
.feeling-options button > span {
  font-size: 27px;
}
.feeling-options button[aria-pressed='true'],
.reason-options button[aria-pressed='true'] {
  background: #fff0ae;
  border-color: #bf914c;
  color: #4c4a33;
}
.reason-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.reason-options button {
  min-height: 44px;
  border: 1px solid #adc5b2;
  border-radius: 10px;
  background: #e2ebd6;
  color: #305851;
  box-shadow: none;
  font-size: 13px;
  padding: 8px;
}
.feedback-note {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-top: 16px;
}
.feedback-note small {
  font-weight: 500;
  color: #779080;
}
.feedback-note textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 70px;
  font:
    16px 'Nunito',
    sans-serif;
  padding: 10px;
  background: #fbfae9;
  border: 1px solid #b7c9b5;
  border-radius: 10px;
  margin-top: 7px;
}
.feedback-capture {
  margin: 12px 0;
  font-size: 13px;
  color: #597865;
}
.feedback-capture summary {
  cursor: pointer;
  padding: 7px 0;
}
.feedback-capture img {
  width: 100%;
  border-radius: 10px;
}
.feedback-send,
.feedback-export,
.feedback-done {
  width: 100%;
  min-height: 48px;
}
.feedback-history,
.feedback-back,
.feedback-inline {
  background: none;
  border: 0;
  box-shadow: none;
  color: #426d63;
  min-height: 44px;
  font-size: 13px;
  text-decoration: underline;
}
.feedback-inline {
  display: block;
  margin: 0 auto;
}
#feedback-error {
  color: #a74437;
  font-size: 13px;
}
.feedback-saved {
  text-align: center;
}
.feedback-saved code {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.feedback-check {
  display: inline-block;
  color: #39856d;
  font-size: 48px;
}
.feedback-report-list article {
  padding: 12px 0;
  border-bottom: 1px solid #bfd1be;
  font-size: 13px;
}
.feedback-report-list small {
  font-size: 13px;
  overflow-wrap: anywhere;
}
/* The arena and camp are the world. Only playable cards need card frames. */
.battle-mode .workspace {
  background: radial-gradient(ellipse at top, #285466, #102b42 85%);
}
.hand-dock {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 0 0;
}
.map-container {
  border: 0;
  border-radius: 20px;
  box-shadow:
    0 6px 0 #0b213a,
    0 12px 30px #071a2f55;
}
.game-nav {
  gap: 16px;
  border-top: 1px solid #aacbc43b;
  background: linear-gradient(#214e60, #102d44);
}
.game-nav .nav {
  min-width: 100px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #b4d1d1;
  flex-direction: column;
  gap: 1px;
  padding: 3px 10px;
}
.game-nav .nav > img {
  width: 37px;
  height: 37px;
  filter: drop-shadow(0 3px 0 #0b233899);
}
.game-nav .nav > span {
  font:
    13px 'Lilita One',
    sans-serif;
}
.game-nav .nav.active {
  color: #ffe4a2;
  background: radial-gradient(ellipse at bottom, #eabf5930, transparent 70%);
}
.game-nav .nav-battle img {
  transform: scale(1.18) translateY(-3px);
}
.game-nav .nav i {
  display: none;
}
.icon-button img {
  width: 28px;
  height: 28px;
}
.icon-button,
.battle-mode .icon-button {
  border: 0;
  box-shadow: none;
  background: transparent;
}
.training-camp {
  position: relative;
  margin: -10px -18px 18px;
  overflow: hidden;
}
.training-camp > img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: cover;
}
.camp-title {
  position: absolute;
  top: 8%;
  left: 5%;
  color: #234f5b;
}
.camp-title .eyebrow {
  color: #3f7f77;
  font-size: 13px;
  letter-spacing: 1.8px;
}
.camp-title h2 {
  font:
    clamp(23px, 3vw, 35px) 'Lilita One',
    sans-serif;
  margin: 4px 0;
}
.camp-title p {
  font-size: 13px;
  margin: 3px 0;
  font-weight: 800;
}
.camp-pin {
  position: absolute;
  top: 66%;
  transform: translate(-50%, -50%);
  background: linear-gradient(#fff1b5, #e6ba69);
  border: 1px solid #896c42;
  border-radius: 9px;
  color: #315250;
  padding: 8px 11px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 0 #605b3966;
}
.camp-forge {
  left: 29%;
}
.camp-map {
  left: 51%;
  top: 55%;
}
.camp-orders {
  left: 72%;
}
.training-roster-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 14px;
}
.training-roster-heading h2 {
  font:
    25px 'Lilita One',
    sans-serif;
  margin: 0;
  color: #28525b;
}
.troop-tile {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.troop-tile > .troop-art {
  background: radial-gradient(ellipse at center, #f9f3c7bb, transparent 70%);
}
.troop-tile .troop-body {
  background: none;
  border: 0;
  padding-left: 6px;
  padding-right: 6px;
}
.troop-tile .troop-body p {
  min-height: 30px;
}
.troop-body .train-upgrade {
  min-height: 44px;
  color: #fdf0c4;
  background: linear-gradient(#519a84, #2f725f);
  border: 1px solid #356f56;
  border-radius: 10px;
  box-shadow: 0 3px 0 #1e514b;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 900;
}
.troop-body .train-upgrade:disabled {
  background: #bfccb8;
  color: #637965;
  border-color: #acbda5;
  box-shadow: none;
}
.upgrade-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 12px 0;
}
.upgrade-stats span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.upgrade-stats b {
  font:
    24px 'Lilita One',
    sans-serif;
  color: #3b876a;
}
.training-unlock-art img {
  width: 100%;
  border-radius: 15px;
}
#training-later {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 0;
  box-shadow: none;
  min-height: 44px;
  color: #527968;
}
.settings-links {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}
.settings-links button {
  min-height: 44px;
  flex: 1;
  font-size: 13px;
}
@media (min-width: 1050px) and (min-height: 600px) {
  .battle-grid {
    flex-direction: row;
    align-items: stretch;
  }
  .arena-wrap {
    flex: 1;
    min-width: 0;
    height: 100%;
  }
  .hand-dock {
    flex: 0 0 290px;
    width: 290px;
    height: 100%;
    justify-content: center;
    gap: 15px;
  }
  .hand {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    flex: 0 1 420px;
  }
  .hand .card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .hand .card > .troop-art svg {
    max-height: 115px;
    width: 110px;
  }
  .deck-heading {
    flex-direction: column;
    gap: 12px;
  }
  .energy-summary {
    display: none;
  }
  .energy-track {
    flex-wrap: wrap;
  }
  .energy-pips {
    flex: 1 0 100%;
  }
  .start-overlay {
    left: calc(50% - 150px);
  }
}
@media (max-width: 600px) {
  .game-nav {
    gap: 3px;
    padding-left: 5px;
  }
  .game-nav .nav {
    min-width: 0;
    flex: 1;
    padding: 3px 4px;
  }
  .game-nav .nav > span {
    font-size: 13px;
  }
  .game-nav .nav > img {
    width: 32px;
    height: 32px;
  }
  .training-camp {
    margin: -5px -14px 14px;
  }
  .training-camp > img {
    height: 245px;
    width: 100%;
    object-fit: cover;
  }
  .camp-title {
    top: 5%;
    left: 5%;
  }
  .camp-title h2 {
    font-size: 25px;
  }
  .camp-title p {
    font-size: 13px;
  }
  .camp-pin {
    font-size: 13px;
    padding: 6px;
    top: 75%;
  }
  .camp-forge {
    left: 19%;
  }
  .camp-map {
    left: 51%;
    top: 64%;
  }
  .camp-orders {
    left: 82%;
  }
  .training-roster-heading h2 {
    font-size: 22px;
  }
  .troop-body .train-upgrade {
    font-size: 13px;
  }
}
.start-overlay {
  background-color: #164454;
}
@media (min-width: 1050px) and (min-height: 600px) {
  .deck-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
  }
  .dock-tools {
    justify-content: space-between;
    width: 100%;
  }
  .hand {
    min-height: 0;
  }
}
/* Sculpted icon assets replace text glyphs while labels stay readable. */
#pause {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#pause::before {
  content: '';
  width: 19px;
  height: 23px;
  background: url('art/icons/pause.svg') center / contain no-repeat;
}
#pause[aria-label='Resume battle']::before {
  background-image: url('art/icons/battle.svg');
}
#rally::before {
  content: '';
  width: 21px;
  height: 27px;
  background: url('art/icons/boost.svg') center / contain no-repeat;
}
#troops-view {
  display: block;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
#troops-view[hidden] {
  display: none;
}
#troops-view .troop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto;
  height: auto;
  min-height: 330px;
  overflow: visible;
  gap: 16px;
}
#troops-view .troop-tile {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 330px;
  overflow: visible;
  padding: 0 8px 12px;
}
#troops-view .troop-tile > .troop-art {
  height: 135px;
  min-height: 135px;
  width: 100%;
}
#troops-view .troop-tile > .troop-art svg {
  width: 140px;
  height: 130px;
  max-height: none;
}
#troops-view .troop-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: visible;
}
#troops-view .troop-body h3 {
  font-size: 17px;
}
#troops-view .troop-body p {
  display: block;
  margin: 6px 0;
  font-size: 13px;
}
#troops-view .troop-stats {
  margin-bottom: 10px;
}
#troops-view .troop-body button {
  flex-shrink: 0;
}
#troops-view .pagination {
  margin-top: 18px;
}
@media (max-width: 700px) {
  #troops-view .troop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 5px;
  }
  #troops-view .troop-body h3 {
    font-size: 15px;
  }
  #troops-view .troop-body p {
    min-height: 32px;
  }
  #troops-view .troop-tile {
    padding: 0 4px 10px;
  }
}
#feedback-dialog {
  transform: none;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .top-context,
  .wallet .trophy,
  #fullscreen {
    display: none;
  }
  .topbar {
    gap: 5px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .wallet {
    margin-left: auto;
  }
  .wallet .currency {
    font-size: 13px;
  }
  .wallet .icon-button {
    min-width: 28px;
    width: 28px;
    padding: 0;
  }
}
.training-camp {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0 0 30px 30px;
}
.training-camp > img {
  height: auto;
  max-height: none;
  object-fit: contain;
}
.camp-title {
  max-width: 38%;
  top: 6%;
  left: 3%;
}
.camp-title h2 {
  text-shadow: 0 1px 0 #f5fbdf80;
}
.camp-forge {
  left: 36%;
  top: 78%;
}
.camp-map {
  left: 57%;
  top: 48%;
}
.camp-orders {
  left: 80%;
  top: 78%;
}
@media (max-width: 600px) {
  .training-camp {
    margin: -5px -14px 14px;
    border-radius: 0;
  }
  .training-camp > img {
    width: 100%;
    height: auto;
  }
  .camp-title {
    max-width: 43%;
    top: 6%;
    left: 4%;
  }
  .camp-title .eyebrow {
    font-size: 13px;
    letter-spacing: 1px;
  }
  .camp-title h2 {
    font-size: 18px;
    line-height: 1.02;
  }
  .camp-title p {
    font-size: 13px;
    line-height: 1.2;
  }
  .camp-pin {
    min-height: 44px;
    padding: 4px 7px;
    font-size: 13px;
  }
}
@media (min-width: 1050px) and (min-height: 600px) {
  .deck-heading {
    flex-wrap: nowrap;
  }
  .deck-heading > strong {
    flex: 0 0 auto;
    width: 100%;
  }
  .energy-track {
    display: grid;
    grid-template-columns: 1fr auto;
    height: auto;
    flex: 0 0 auto;
    gap: 7px;
  }
  .energy-track .energy-pips {
    grid-column: 1 / -1;
    height: 10px;
  }
  .hand {
    flex: 1 1 340px;
    max-height: 420px;
  }
}

/* An open landscape connects operations; each medallion is a real battle action. */
#campaign-view {
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 18px;
}
#campaign-view .campaign-banner {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 10px 14px 8px;
  min-height: auto;
  color: #214756;
}
#campaign-view .campaign-banner h2 {
  color: #214756;
  font-size: clamp(23px, 3vw, 34px);
}
#campaign-view .campaign-banner p {
  display: block;
  color: #60765e;
  font-size: 13px;
  line-height: 1.5;
}
#campaign-view .campaign-banner .eyebrow {
  color: #75894e;
}
#campaign-view .campaign-banner > .tag {
  color: #305963;
  background: #dce9ba;
}
.route-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 10px;
  padding: 0 14px;
}
#route-region {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #708055;
}
#route-next-battle {
  min-height: 44px;
  background: transparent;
  color: #245c70;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#campaign-grid {
  position: relative;
  display: block;
  width: 100%;
  max-width: 860px;
  height: 720px;
  min-height: 720px;
  flex: 0 0 auto;
  align-self: center;
  isolation: isolate;
  border: 0;
  background: radial-gradient(ellipse at 50% 50%, #b5d5ce 0%, #d7e6d6 55%, #edf0dc 75%);
}
.route-landscape,
.route-road,
.route-stops {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
.route-landscape {
  pointer-events: none;
  overflow: hidden;
}
.route-island {
  position: absolute;
  inset: 2% 3% 4%;
  background:
    radial-gradient(ellipse at 20% 10%, #e2ebaf, transparent 40%),
    linear-gradient(135deg, #bdd992, #91be79 65%, #acd18a);
  clip-path: polygon(
    16% 0,
    62% 3%,
    92% 12%,
    98% 36%,
    87% 54%,
    97% 78%,
    78% 96%,
    28% 100%,
    4% 88%,
    9% 67%,
    0 46%,
    8% 25%
  );
  box-shadow:
    inset 0 -25px 0 #7d9a70,
    inset 0 14px 0 #e5e9b6;
}
.route-river {
  position: absolute;
  left: 5%;
  top: 46%;
  width: 90%;
  height: 8%;
  transform: rotate(-20deg);
  background: repeating-linear-gradient(
    180deg,
    #75bebe 0 12px,
    #88ccc6 12px 15px,
    #75bebe 15px 24px
  );
  border-block: 6px solid #e4d8a1;
  border-radius: 45%;
  opacity: 0.85;
}
.route-tree {
  position: absolute;
  left: var(--tree-x);
  top: var(--tree-y);
  width: 25px;
  height: 37px;
  border-radius: 50% 50% 35% 35%;
  background: linear-gradient(120deg, #a5c867, #538756 65%);
  box-shadow:
    inset -5px -6px 0 #44784b,
    5px 9px 0 #32614925;
  transform: rotate(-8deg);
}
.route-tree::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 10px;
  background: #94734e;
  left: 10px;
  bottom: -6px;
}
.route-compass {
  position: absolute;
  right: 7%;
  top: 7%;
  display: grid;
  text-align: center;
  font:
    13px Georgia,
    serif;
  color: #416b656b;
}
.route-compass span {
  font-size: 48px;
  line-height: 1;
}
.route-road {
  pointer-events: none;
  overflow: visible;
}
.route-road path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.road-shadow {
  stroke: #71866580;
  stroke-width: 25;
}
.road-surface {
  stroke: #e5d39b;
  stroke-width: 19;
}
.road-marks {
  stroke: #fff0bc;
  stroke-width: 3;
  stroke-dasharray: 2 10;
}
.route-stop {
  list-style: none;
  position: absolute;
  left: var(--stop-x);
  top: var(--stop-y);
  transform: translate(-50%, -30px);
  width: 46%;
  max-width: 250px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.route-medallion {
  position: relative;
  min-height: 64px;
  height: 64px;
  width: 72px;
  padding: 0;
  border: 4px solid #fff4ba;
  border-radius: 46% 46% 42% 42%;
  background: linear-gradient(145deg, #72c3d5 5%, #3d879f 55%, #256779);
  box-shadow:
    inset 0 4px 0 #b5ebeb,
    0 6px 0 #315d67,
    0 11px 10px #284f5430;
  color: white;
}
.route-level {
  font:
    900 32px 'Lilita One',
    sans-serif;
  text-shadow: 0 3px #1c5363;
}
.route-medallion:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 4px 0 #b5ebeb,
    0 3px 0 #315d67;
}
.route-marker {
  position: absolute;
  right: -11px;
  bottom: -4px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #efc661;
  border: 2px solid #fff1b4;
  color: #425d54;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.route-status {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #416442;
  margin-top: 10px;
}
.route-stop h3 {
  font-family: 'Lilita One', sans-serif;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  color: #254b43;
  text-shadow: 0 1px #eaf5c6;
}
.route-stop .mastery-stars {
  font-size: 20px;
  line-height: 1.15;
  filter: drop-shadow(0 1px #53734a);
}
.route-stop .mastery-stars > span:not(.earned) {
  color: #698761;
}
.route-intel {
  font-size: 13px;
  color: #3d614d;
  line-height: 1.3;
  max-width: 175px;
}
.route-stop.locked .route-medallion {
  opacity: 1;
  background: linear-gradient(145deg, #b1b9a8, #818e7c);
  border-color: #dde4c9;
  box-shadow:
    inset 0 4px 0 #cfd4bd,
    0 6px 0 #6a7964;
}
.route-stop.locked .route-level {
  text-shadow: 0 2px #6a7964;
  color: #eef0d7;
}
.route-stop.locked .route-marker {
  background: #a6b698;
  color: #64745a;
  border-color: #dce3c5;
}
.route-stop.recommended .route-medallion {
  background: linear-gradient(145deg, #ffdf78, #e4ad43);
  border-color: #fff4bd;
  box-shadow:
    inset 0 4px 0 #fff3bb,
    0 6px 0 #a37d35,
    0 0 0 8px #fff7cb65,
    0 12px 15px #79724133;
}
.route-stop.recommended .route-level {
  color: #6c542c;
  text-shadow: 0 2px #ffe69b;
}
.route-stop.recommended .route-status {
  color: #634c1e;
}
#campaign-grid[data-region='1'] .route-island {
  background: linear-gradient(140deg, #e7d09a, #c8aa76 55%, #b4b4a8);
}
#campaign-grid[data-region='2'] .route-island {
  background: linear-gradient(140deg, #d7be9c, #b6aa9b 55%, #d8bca2);
}
#campaign-view .pagination {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 16px;
}
#campaign-view .pagination button {
  min-height: 44px;
}
@media (min-width: 900px) {
  #campaign-grid {
    height: 640px;
    min-height: 640px;
  }
}
@media (max-width: 400px) {
  .route-heading {
    padding-inline: 8px;
  }
  #route-region {
    letter-spacing: 0.4px;
    font-size: 13px;
  }
  #route-next-battle {
    font-size: 13px;
  }
  .route-intel {
    font-size: 13px;
    max-width: 135px;
  }
}

#campaign-view .campaign-banner h2,
#campaign-view .campaign-banner p {
  max-width: none;
}
.route-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef0dfed;
  min-height: 48px;
}
