@font-face {
  font-family: 'Comarca Pixel';
  src: url('/assets/fonts/VT323-Regular.ttf') format('truetype');
  font-display: swap;
}
:root {
  font-family: 'Comarca Pixel', monospace;
  color: #303b52;
  background: #ccdcde;
  --ink: #303b52;
  --green: #d8e8b0;
  --cream: #fffbea;
  --muted: #4f6174;
  --line: #556980;
  --yellow: #d57b30;
}
body {
  background: repeating-linear-gradient(0deg, #d3e1df 0 4px, #cfdddc 4px 8px);
}
button,
input,
select {
  font-size: 21px;
  font-weight: 400;
}
button {
  border-radius: 2px;
  border: 2px solid #64758a;
  color: var(--ink);
  background: #fffbea;
  padding: 8px 13px;
  transition: none;
}
button:hover,
button.primary:hover {
  background: #f8edb9;
}
button:disabled {
  opacity: 0.48;
}
button.primary {
  background: #fbefc3;
  border-color: #64758a;
  color: var(--ink);
}
h1,
h2,
h3,
dialog h2 {
  letter-spacing: 0;
  font-weight: 400;
}
h1 {
  font-size: 42px;
}
h2,
dialog h2 {
  font-size: 32px;
}
.eyebrow {
  font-size: 15px;
  letter-spacing: 1px;
}
.topbar {
  background: #bc493b;
  border-bottom: 6px solid #80382f;
  color: #fff4d9;
}
.brand,
.brand:hover {
  color: #fff4d9;
}
.brand > span {
  letter-spacing: 2px;
}
.brand b {
  color: #ffdda7;
}
.brand-ball {
  background: #fff7e3;
  color: #bc493b;
}
.server-label {
  color: #ffeed1;
  font-size: 17px;
}
.menu-toggle {
  background: #fffbea;
  color: #303b52;
  box-shadow: 3px 3px #80382f;
}
.menu-toggle kbd {
  font-family: inherit;
  background: transparent;
  border: 0;
  font-size: 15px;
}
.world-heading .eyebrow,
.world-badges,
.weather,
.world-footer,
.text-button,
.quiet {
  color: #3e5369;
}
.world-badges {
  font-size: 18px;
}
.weather,
.controls-help,
.text-button,
.quiet {
  font-size: 17px;
}
.game-frame {
  border: 6px solid #566e79;
  border-radius: 3px;
  box-shadow:
    0 0 0 3px #f4f4da,
    0 0 0 6px #a6b4af;
}
.location-hint,
.interaction button,
.toast {
  font-family: 'Comarca Pixel', monospace;
  color: #303b52;
  background: #fffbea;
  border: 3px solid #586b83;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 2px #f7fbff,
    inset 0 0 0 4px #aab6c9,
    3px 3px #526378;
  font-size: 20px;
}
.location-hint {
  padding: 7px 12px;
  font-size: 18px;
}
.trainer-strip {
  border-color: #7e929d;
  color: #303b52;
}
.trainer-strip .eyebrow {
  color: #4f6174;
  font-size: 13px;
}
.trainer-strip strong {
  font-size: 22px;
}
.mode-control,
.mode-control small {
  color: #42546a;
  font-size: 17px;
}
.gym-card,
.panel,
dialog {
  background: #fffbea;
  color: #303b52;
  border: 4px solid #596b85;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 4px #a9b7ca,
    4px 4px #52637855;
}
.gym-card {
  padding: 23px;
}
.gym-card .eyebrow,
.status-tag,
.leader-display span,
.leader-display strong,
.gym-card p,
.crown {
  color: #455b72;
}
.gym-card .primary {
  color: #fffbea;
  background: #546c87;
}
.gym-card p,
.leader-display strong {
  font-size: 20px;
}
.gym-card h2 {
  font-size: 31px;
}
.status-tag {
  font-size: 14px;
}
.leader-display span {
  font-size: 16px;
}
.gym-progress span,
.team-note {
  font-size: 16px;
  color: #54677c;
}
.panel h2 {
  font-size: 26px;
  color: #303b52;
}
.team-slot {
  background: #e7ead9;
  color: #303b52;
  border-radius: 2px;
  border: 1px solid #c1c8b7;
}
.team-slot strong {
  font-size: 16px;
  font-weight: 400;
}
.team-slot small {
  font-size: 15px;
  color: #586b70;
}
.empty-slot {
  justify-content: center;
  background: #eeefdf;
}
.empty-slot > span {
  font-family: monospace;
  font-size: 33px;
  color: #a7b29d;
}
.empty,
.player-row small,
.count {
  font-size: 18px;
  color: #536578;
}
.player-row strong,
.player-row button {
  font-size: 19px;
}
.page-footer {
  color: #4d6277;
  font-size: 14px;
}
dialog {
  padding: 28px;
}
dialog::backdrop {
  background: #17293875;
  backdrop-filter: none;
}
dialog p,
.rules-grid p,
.gym-modes p {
  color: #4a5b70;
  font-size: 21px;
  line-height: 1.25;
}
dialog label,
legend,
input:not([type='checkbox']):not([type='radio']),
select {
  font-size: 20px;
  font-weight: 400;
}
input:not([type='checkbox']):not([type='radio']),
select {
  border-radius: 1px;
  border: 2px solid #8090a3;
}
dialog .eyebrow {
  font-size: 16px;
  color: #667c91;
}
.starter-choices label {
  font-size: 20px;
  border-radius: 2px;
}
.starter-choices label:has(input:checked) {
  border: 2px solid #ac493b;
  background: #f4deb8;
}
.starter-choices img {
  width: 80px;
  height: 80px;
}
#welcome-form > small {
  font-size: 17px;
  color: #66778a;
}
.classic-menu {
  width: 270px;
  padding: 22px 16px;
}
.classic-menu > button {
  display: block;
  width: 100%;
  border: 0;
  text-align: left;
  padding: 9px 20px;
  background: transparent;
  font-size: 26px;
  position: relative;
}
.classic-menu > button:hover,
.classic-menu > button:focus-visible {
  background: #e9eddf;
}
.classic-menu > button:hover::before,
.classic-menu > button:focus-visible::before {
  content: '▶';
  font-size: 16px;
  position: absolute;
  left: 1px;
  top: 16px;
}
.classic-menu .eyebrow {
  display: block;
  border-bottom: 2px solid #bac3c9;
  padding: 0 20px 12px;
  margin-bottom: 8px;
}
.bag-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 8px;
  margin-bottom: 20px;
  border-block: 2px solid #b4bec5;
  font-size: 26px;
}
.bag-item strong {
  flex: 1;
  font-weight: 400;
}
.bag-item.gear-item {
  display: block;
}
.gear-item strong,
.gear-item span {
  display: block;
}
.gear-item span {
  margin-top: 6px;
  font-size: 18px;
  color: #47654e;
}
.pokeball-icon {
  display: inline-block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 3px solid #344158;
  border-radius: 50%;
  background: linear-gradient(#d95340 0 44%, #344158 44% 56%, #fffbea 56%);
  position: relative;
}
.pokeball-icon::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fffbea;
  border: 2px solid #344158;
  border-radius: 50%;
  top: 8px;
  left: 8px;
}
#saved-trainers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.edit-mon {
  border-radius: 2px;
  border: 2px solid #a5b4c3;
  background: #f3f1dd;
}
.edit-mon select {
  font-size: 18px;
}
.edit-moves label {
  font-size: 17px;
}
.empty-mon p {
  grid-column: 1/-1;
  font-size: 18px;
}
.empty-marker {
  font-size: 44px;
  color: #adb9a3;
}
.error {
  font-size: 18px;
  color: #a33528;
}
.gym-modes h3 {
  font-size: 25px;
}
.gym-modes small,
.defense-team figure {
  font-size: 17px;
}
.gym-modes button,
#gym-history,
#gym-history p {
  font-size: 19px;
}
.pilot-note {
  font-size: 17px !important;
}
.battle-dialog {
  padding: 0;
  border: 5px solid #465675;
}
.battle-top {
  background: #4b5d7c;
  color: #fffbea;
  font-size: 16px;
  letter-spacing: 0;
}
.battle-top button {
  font-size: 16px;
}
.battle-console {
  background: #fffbea;
  border-top: 5px solid #657896;
}

#battle-question {
  color: #374158;
  font-size: 23px;
}
.battle-commands,
.move-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.battle-commands button {
  font-size: 27px;
  text-align: left;
  border: 0;
  background: #fffbea;
  padding: 9px;
}
.battle-commands button:hover,
.move-buttons button:hover {
  background: #e6e9d9;
}
.battle-commands button:focus-visible {
  outline: 2px solid #a55a36;
}
.move-buttons button {
  font-size: 23px;
  background: #fffbea;
  border: 2px solid #bac2c6;
  color: #303b52;
  padding: 7px;
}
.move-buttons small {
  font-size: 16px;
  color: #68727d;
}
#battle-back {
  margin-top: 8px;
  font-size: 18px;
}
#battle-bag p {
  font-size: 18px;
  margin: 12px 0 0;
}
#capture-button {
  font-size: 24px;
  width: 100%;
}
.monster-info {
  border-color: #65734f;
  border-radius: 2px;
}
.monster-info strong {
  font-size: 24px;
  font-weight: 400;
}
.monster-info span,
.monster-info small {
  font-size: 18px;
}
#switch-options button {
  color: #303b52;
  font-size: 18px;
  background: #f0edcf;
}
.pending-info,
.pending-info small {
  font-size: 18px;
}
.touch-controls button {
  background: #e9eddd;
  color: #303b52;
}
@media (max-width: 540px) {
  .server-label {
    font-size: 15px;
  }
  .brand {
    font-size: 24px;
  }
  .menu-toggle {
    font-size: 19px;
    padding: 7px;
  }
  .menu-toggle kbd {
    display: none;
  }
  .world-heading h1 {
    font-size: 33px;
  }
  .world-badges {
    font-size: 17px;
  }
  .location-hint {
    font-size: 15px;
  }
  .trainer-strip strong {
    font-size: 21px;
  }
  .team-slot strong {
    font-size: 14px;
  }
  .team-slot small {
    font-size: 14px;
  }
  .empty-slot > span {
    font-size: 27px;
  }
  .battle-top {
    padding: 10px;
    font-size: 13px;
    gap: 8px;
  }
  .monster-info strong {
    font-size: 21px;
  }
  .monster-info span,
  .monster-info small {
    font-size: 16px;
  }

  dialog {
    padding: 22px;
  }
  dialog h2 {
    font-size: 29px;
  }
  .starter-choices label {
    font-size: 17px;
  }
  .starter-choices img {
    width: 64px;
    height: 64px;
  }
  .classic-menu {
    padding: 20px 14px;
  }
}
/* Keep the older layout's light-on-dark rules from bleeding into the new windows. */
.world-heading h1 {
  color: #354a62;
}
.panel .text-button {
  color: #425872;
  font-size: 18px;
}
.empty-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.controls-help kbd,
.menu-toggle kbd {
  color: #425872;
  font-family: monospace;
  font-size: 11px;
}

.journal-card {
  background: #fff4ce;
}
.journal-card p {
  font-size: 21px;
  margin: 6px 0 12px;
}
.journal-card > button {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.journal-card > small {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: #4f6174;
}
.journal-dialog {
  width: min(780px, calc(100% - 32px));
  background: #fff9df;
}
.journal-tabs,
.journal-progress-row,
.discovery-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.journal-tabs {
  margin: 20px 0;
  border-bottom: 2px solid #64758a;
  padding-bottom: 12px;
}
.journal-tabs button[aria-pressed='true'] {
  background: #425872;
  color: #fff9df;
}
.legend-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.legend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #eef2db;
  min-width: 0;
}
.legend-card img {
  width: 110px;
  height: 110px;
  image-rendering: pixelated;
  max-width: 100%;
}
.legend-card strong {
  font-size: 27px;
  font-weight: 400;
}
.legend-card span {
  font-size: 19px;
}
.legend-card small {
  font-size: 18px;
}
.legend-art {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}
@media (max-width: 600px) {
  .legend-cards {
    grid-template-columns: 1fr;
  }
  .legend-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    text-align: left;
    align-items: center;
    gap: 4px 12px;
  }
  .legend-card img {
    width: 80px;
    height: 80px;
    grid-row: span 3;
  }
  .legend-art {
    width: 150px;
    height: 150px;
  }
}
.journal-progress-row {
  justify-content: space-between;
  font-size: 22px;
}
#journal-meter {
  width: 160px;
  height: 12px;
  accent-color: #537d57;
}
.passport-stamps,
.journal-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.passport-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ecebd7;
  border-style: dashed;
  gap: 3px;
}
.passport-stamp img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
}
.passport-stamp span {
  font-size: 26px;
}
.passport-stamp strong {
  font-size: 19px;
  font-weight: 400;
}
.passport-stamp.stamped {
  background: #e2edc5;
  border: 3px double #527656;
}
.journal-goal {
  display: flex;
  gap: 10px;
  text-align: left;
  align-items: flex-start;
  min-width: 0;
  padding: 12px;
}
.journal-goal strong {
  display: block;
  font-size: 22px;
  font-weight: 400;
}
.journal-goal small {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  color: #4f6174;
  margin-top: 5px;
}
.goal-number {
  flex-shrink: 0;
  font-size: 24px;
  color: #a45238;
}
.journal-goal.complete {
  background: #eef2db;
}
.journal-goal.complete .goal-number {
  color: #386040;
}
.earned-title {
  background: #f5e4a6;
  border: 3px double #957335;
  padding: 14px;
  font-size: 24px;
  text-align: center;
}
.journal-footnote {
  font-size: 18px;
  color: #4f6174;
}
.habitat-card {
  border: 2px solid #778776;
  padding: 16px;
  margin: 16px 0;
  background: #edf2db;
}
.habitat-card h3 {
  margin: 0;
  font-size: 28px;
}
.habitat-card p {
  font-size: 20px;
}
.habitat-card .panel-heading {
  flex-wrap: wrap;
  gap: 8px;
  font-size: 20px;
}
.habitat-species {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.habitat-species > div {
  text-align: center;
  padding: 6px 2px;
  border: 1px dashed #8b9781;
  min-width: 0;
}
.habitat-species img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  max-width: 100%;
}
.habitat-species strong,
.habitat-species small {
  display: block;
  font-weight: 400;
}
.habitat-species strong {
  font-size: 19px;
}
.habitat-species small {
  font-size: 15px;
  line-height: 1.1;
}
.habitat-species .caught {
  background: #d3e4ad;
  border: 1px solid #6e8860;
}
.discovery-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}
.landmark-art {
  width: 200px;
  height: 230px;
  object-fit: contain;
  image-rendering: pixelated;
}
.discovery-content p {
  font-size: 23px;
  line-height: 1.2;
}
.discovery-content .discovery-reward {
  background: #e2edc5;
  border-left: 4px solid #6e8860;
  padding: 12px;
  font-size: 21px;
}
#discovery-hint,
#discovery-distance {
  color: #4f6174;
}
.trainer-roster {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.trainer-roster > div {
  display: flex;
  flex-direction: column;
  text-align: center;
  font-size: 22px;
}
.trainer-roster img {
  width: 88px;
  height: 88px;
  image-rendering: pixelated;
}
.trainer-roster strong {
  font-weight: 400;
}
.trainer-roster small {
  font-size: 19px;
}
#gym-landmark-button {
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .journal-goals {
    grid-template-columns: 1fr;
  }
  .passport-stamp {
    padding: 6px;
  }
  .passport-stamp img {
    width: 90px;
    height: 90px;
  }
  .passport-stamp span {
    font-size: 22px;
  }
  .passport-stamp strong {
    font-size: 16px;
  }
  .habitat-species {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .habitat-card {
    padding: 10px;
  }
  .discovery-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #discovery-art {
    text-align: center;
  }
  .landmark-art {
    height: 170px;
    width: 170px;
  }
  .discovery-content p {
    font-size: 21px;
  }
  .discovery-actions > button {
    width: 100%;
  }
  .journal-tabs {
    gap: 8px;
  }
  .journal-tabs button {
    font-size: 20px;
    padding: 8px;
  }
}
