[hidden] {
  display: none !important;
}
body {
  background: radial-gradient(ellipse at top, #284940, #10292d 65%);
}
main {
  max-width: 1280px;
  width: 100%;
  padding: 20px;
}
button {
  border-radius: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
select {
  font: inherit;
  max-width: 100%;
  padding: 9px;
  border: 2px solid #52716d;
  border-radius: 3px;
  background: #f5f5df;
  color: #253d3c;
}
#auth {
  width: min(1120px, 94vw);
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid #50736b;
  box-shadow: 0 30px 100px #0006;
  border-radius: 16px;
  overflow: hidden;
  margin: 32px auto;
}
.auth-art {
  padding: 70px 48px;
  background:
    linear-gradient(#14383155, #173929dd),
    var(--asset-login-hoenn, url('/assets/login-hoenn.png')) center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: #f0d48a;
}
.auth-art h1 {
  font-size: 42px;
  line-height: 1.25;
  letter-spacing: -2px;
  text-shadow: 0 3px #18372b;
}
.auth-art p {
  line-height: 1.8;
  color: #e1ecd2;
}
.auth-card {
  background: #f2f2da;
  color: #253d3c;
  padding: 60px 42px;
  position: relative;
}
.auth-card .eyebrow {
  color: #65885c;
}
.auth-card h2 {
  font-size: 27px;
  margin: 15px 0 32px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 12px;
}
.auth-card form > button {
  background: #28654d;
  color: #fff;
  width: 100%;
  text-align: center;
  padding: 15px;
  margin-top: 8px;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  justify-content: center;
  margin-top: 20px;
}
.auth-foot {
  font-size: 11px;
  line-height: 1.7;
  color: #6b7c65;
  text-align: center;
}
.starters {
  display: flex;
  gap: 12px;
  margin-top: 35px;
  overflow: hidden;
  height: 82px;
}
.starters img {
  image-rendering: pixelated;
  width: 128px;
  height: 128px;
  object-fit: none;
  object-position: 0 0;
  transform: scale(1.1);
}
#auth-message {
  color: #9c3535;
  font-size: 12px;
}
#recovery-result {
  position: absolute;
  inset: 10px;
  background: #f2f2da;
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 16px;
  border: 4px double #46765d;
}
#recovery-result code {
  display: block;
  word-break: break-all;
  font-size: 15px;
  background: #dde6cc;
  padding: 14px;
}
.toolbar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin: 4px auto 15px;
  width: min(100%, 960px);
}
.toolbar button {
  background: #335f56;
  padding: 7px 14px;
}
.chat {
  width: min(720px, 100%);
  margin: 16px auto;
  border: 1px solid #476a60;
  background: #183934;
  padding: 12px;
}
#chat-log {
  height: 70px;
  overflow: auto;
  font-size: 12px;
}
#chat-form {
  display: flex;
  gap: 8px;
}
#chat-form input {
  flex: 1;
  min-width: 0;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #faf3d7;
  color: #234b43;
  padding: 15px;
  border: 3px double #52716d;
  z-index: 20;
  max-width: 90vw;
}
#overlay {
  z-index: 3;
}
#detail {
  width: 65%;
  max-width: 65%;
  font-size: 11px;
}
#detail h2 {
  margin-top: 0;
}
#detail p {
  line-height: 1.5;
}
#menu {
  min-width: 125px;
  padding: 5px;
  font-size: 12px;
  max-height: 96%;
  overflow: auto;
}
#menu button {
  padding: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
}
td,
th {
  padding: 5px;
  border-bottom: 1px solid #8ca992;
  text-align: left;
}
.party-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #8ca992;
}
.party-row button {
  font-size: 11px;
  padding: 5px;
}
.pokemon-sprite {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  display: inline-block;
  background: transparent;
}
.pokemon-sprite.icon {
  width: 32px;
  height: 32px;
}
.item-row {
  border-bottom: 1px solid #8ca992;
  padding: 10px 0;
}
.item-row p {
  margin: 5px 0;
}
.dex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.dex-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
}
.dex-grid .pokemon-sprite {
  width: 64px;
  height: 64px;
}
.item-row select {
  font-size: 10px;
  padding: 4px;
}
#battle {
  position: absolute;
  inset: 0;
  background: #e4eed0;
  color: #203f38;
  z-index: 5;
  border: 5px double #486080;
  overflow: auto;
  padding: 10px;
}
.battle-field {
  position: relative;
  height: 60%;
  min-height: 145px;
  background:
    radial-gradient(ellipse at 72% 36%, #aec884 0 18%, transparent 19%),
    radial-gradient(ellipse at 25% 88%, #aec884 0 22%, transparent 23%),
    linear-gradient(#b6dba7, #e1edc9);
}
.battle-field > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  font-size: 11px;
}
.enemy {
  right: 8%;
  top: 4%;
}
.ally {
  left: 8%;
  bottom: 0;
}
.battle-field canvas {
  width: 128px;
  height: 128px;
}
.battle-field progress {
  width: 120px;
  accent-color: #39a879;
  height: 9px;
}
.battle-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.battle-actions button {
  background: #c3d9bf;
  font-size: 11px;
  padding: 7px;
}
#battle > p {
  white-space: pre-line;
  font-size: 12px;
  margin: 8px;
  min-height: 35px;
}
#dialog {
  z-index: 6;
}
@media (max-width: 800px) {
  #auth {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-art {
    padding: 26px;
  }
  .auth-art h1 {
    font-size: 28px;
  }
  .auth-art p,
  .starters {
    display: none;
  }
  .auth-card {
    padding: 30px;
  }
  .battle-field canvas {
    width: 64px;
    height: 64px;
  }
  #detail {
    font-size: 9px;
  }
  #menu {
    min-width: 80px;
    font-size: 9px;
  }
  #menu button {
    padding: 4px;
  }
  .dex-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.starters img {
  width: 64px;
  height: 64px;
  transform: scale(1.15);
  object-fit: none;
  object-position: 0 0;
}
.starters {
  gap: 40px;
  padding: 6px;
}

.battle-field .enemy canvas {
  animation: enemy-in 0.35s ease-out;
}
.battle-field .ally canvas {
  animation: ally-in 0.35s ease-out;
}
@keyframes enemy-in {
  from {
    transform: translateX(25px);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes ally-in {
  from {
    transform: translateX(-25px);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
progress {
  transition: all 0.25s;
}
#battle .battle-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

#characters {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 5vh 5vw;
  color: #edf5cf;
  background:
    linear-gradient(135deg, #123f35e8, #08352bdf),
    var(--asset-login-hoenn, url('/assets/login-hoenn.png')) center/cover;
}
#characters h1 {
  font-size: clamp(26px, 4vw, 48px);
  margin: 20px 0 10px;
}
.character-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 36px auto;
}
.character-card {
  padding: 22px;
  background: #f3f1d8;
  color: #25483f;
  border: 5px solid #75a983;
  box-shadow: 0 7px 0 #092f2b;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.character-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.character-card input,
.character-card select {
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
  padding: 9px;
}
.character-card button {
  padding: 12px;
  background: #237e62;
  color: #fff5d3;
  border: 2px solid #143e38;
  cursor: pointer;
}
.character-preview {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  align-self: center;
}
.skin-preview {
  height: 64px;
  width: 32px;
  background-repeat: no-repeat;
  background-size: auto 64px;
  margin: 25px auto;
  image-rendering: pixelated;
  transform: scale(2);
}
.guild-emblem {
  display: grid;
  grid-template-columns: repeat(8, 20px);
  width: 160px;
  margin: 12px 0;
  border: 3px solid #25483f;
}
.guild-emblem button {
  padding: 0 !important;
  min-height: 20px !important;
  width: 20px;
  height: 20px;
  border: 1px solid #ffffff25 !important;
  margin: 0 !important;
}
.trade-offer {
  padding: 10px;
  margin: 10px 0;
  background: #e0ead5;
  border: 2px solid #7b997d;
}
.mmo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #a5b9a3;
}
#detail input,
#detail select {
  max-width: 100%;
  box-sizing: border-box;
  margin: 4px;
  padding: 5px;
}
#detail label {
  display: block;
}
.chat form {
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .character-slots {
    grid-template-columns: 1fr;
  }
  .character-card {
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    margin: auto;
  }
}

#characters {
  width: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
#menu {
  max-height: 100%;
  overflow: auto;
}

.pvp-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: linear-gradient(#b9dbc5, #e4ecd4);
  padding: 12px;
  border: 3px solid #4b7465;
}
.pvp-side {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  flex-wrap: wrap;
}
.pvp-mon {
  text-align: center;
  min-width: 100px;
  flex: 1;
}
.pvp-mon canvas {
  width: 64px !important;
  height: 64px !important;
  margin: auto;
  animation: send-out var(--animation-time, 240ms) steps(4);
}
.pvp-mon p {
  font-size: 11px;
  margin: 4px 0;
}
.pvp-mon span {
  display: block;
  font-size: 10px;
}
.pvp-mon progress {
  max-width: 100%;
  width: 100px;
}
@keyframes send-out {
  from {
    transform: translateY(6px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
#fast-forward[aria-pressed='true'] {
  background: #d4c774;
  color: #173f37;
}

/* Trainer registration uses original pixel sprites at integer scales. */
#characters {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 32px 22px;
  background:
    radial-gradient(ellipse at 12% 0%, #407c68 0%, transparent 48%),
    linear-gradient(140deg, #163f3b, #0d272b);
  color: #edf2d4;
  font-family: system-ui, sans-serif;
}
.trainer-station {
  max-width: 1100px;
  margin: auto;
}
.station-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.station-header h1 {
  font-size: clamp(26px, 4vw, 40px) !important;
  margin: 10px 0;
  letter-spacing: -1.5px;
}
.station-header p {
  color: #b8d5c7;
  margin: 0;
}
.station-eyebrow {
  font: 700 11px/1.5 monospace;
  letter-spacing: 2px;
  color: #dfc47d;
}
#characters button {
  font-family: inherit;
  cursor: pointer;
}
#characters button:focus-visible,
#characters input:focus-visible {
  outline: 3px solid #e6bf64;
  outline-offset: 3px;
}
.station-secondary {
  background: transparent;
  color: #dce9d5;
  border: 1px solid #638d7b;
  border-radius: 8px;
  padding: 10px 16px;
}
.journey-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.journey-slot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  min-height: 105px;
  text-align: left;
  color: #e6ebd5;
  border: 1px solid #507c6b;
  border-radius: 12px;
  background: #ffffff08;
}
.journey-slot[aria-pressed='true'] {
  border: 2px solid #ddbb71;
  background: #ffffff14;
}
.journey-slot small,
.journey-slot strong {
  display: block;
  margin: 4px 0;
}
.journey-slot small {
  font-size: 11px;
  color: #a7c8b6;
}
.journey-slot strong {
  font-size: 17px;
}
.empty-slot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px dashed #6f9c84;
  border-radius: 50%;
  font-size: 24px;
  color: #dbbe79;
}
.trainer-sprite {
  display: inline-block;
  flex-shrink: 0;
  image-rendering: pixelated;
  background-repeat: no-repeat;
}
.trainer-editor {
  display: grid;
  grid-template-columns: 290px 1fr;
  margin-top: 24px;
  background: #f3f0d8;
  color: #29453c;
  border: 6px solid #739987;
  border-radius: 16px;
  box-shadow: 0 12px 0 #082722;
  overflow: hidden;
}
.trainer-showcase {
  padding: 28px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(#dbe6c3, #adc9ad);
  border-right: 2px solid #9cb997;
}
.trainer-showcase .station-eyebrow {
  color: #496956;
}
.trainer-podium {
  margin-top: 22px;
  width: 224px;
  height: 210px;
  background: radial-gradient(ellipse 75px 18px at 50% 80%, #659578 90%, transparent);
  border-radius: 50%;
}
.trainer-podium canvas {
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
}
.trainer-showcase h2 {
  margin: 8px 0 0;
  font-size: 26px;
}
.trainer-showcase p {
  font-size: 12px;
}
.starter-note {
  font-size: 12px;
  line-height: 1.7;
  margin-top: auto;
  padding: 18px 8px 0;
}
.trainer-options {
  padding: 26px;
}
.trainer-options label,
.trainer-options h3 {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 12px;
  display: block;
}
.trainer-options input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  background: #fffef0;
  border: 2px solid #9aaa8a;
  border-radius: 7px;
  font-size: 16px;
  margin-bottom: 22px;
  color: #29453c;
}
.trainer-roster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-bottom: 22px;
}
.trainer-choice {
  min-height: 63px;
  background: #e3e7ce;
  border: 2px solid transparent;
  border-radius: 6px;
  color: #365347;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
}
.trainer-choice:hover {
  background: #cadbb8;
}
.trainer-choice[aria-pressed='true'] {
  border-color: #2a785d;
  background: #c2d8ac;
  box-shadow: inset 0 -3px #94b68b;
}
.trainer-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.trainer-colors button {
  width: 25px;
  height: 25px;
  border: 3px solid #eff1d9;
  border-radius: 50%;
  outline: 1px solid #aab59b;
  padding: 0;
}
.trainer-colors button[aria-pressed='true'] {
  outline: 3px solid #294f41;
}
.trainer-footer {
  border-top: 1px solid #b7c3a8;
  padding-top: 18px;
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.starter-parade {
  display: flex;
}
.starter-parade span {
  width: 32px;
  height: 32px;
  display: block;
  image-rendering: pixelated;
  animation: starter-icon 650ms steps(1) infinite;
}
@keyframes starter-icon {
  50% {
    background-position: 0 -32px;
  }
}
.station-primary {
  padding: 13px 20px;
  border: 2px solid #1c4d3b;
  border-radius: 8px;
  background: #287758;
  box-shadow: 0 4px #194433;
  color: #fff4c7;
  font-weight: 700;
}
.station-primary:disabled {
  opacity: 0.6;
}
.station-error {
  color: #ffc4aa;
}
@media (max-width: 760px) {
  .trainer-editor {
    grid-template-columns: 1fr;
  }
  .trainer-showcase {
    padding: 16px;
    border-right: 0;
  }
  .trainer-podium {
    margin-top: 0;
    height: 130px;
    width: 150px;
  }
  .trainer-podium canvas {
    width: 144px;
    height: 144px;
  }
  .starter-note {
    max-width: 400px;
  }
  .trainer-options {
    padding: 18px;
  }
  .journey-slots {
    gap: 6px;
  }
  .journey-slot {
    padding: 9px;
    flex-direction: column;
    text-align: center;
  }
  .station-header {
    align-items: flex-start;
  }
}

#campaign-scene {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 7;
  max-height: 70%;
  overflow: auto;
  background: #f6f3da;
  color: #29473f;
  border: 5px double #38695b;
  border-radius: 9px;
  box-shadow: 0 4px #153a32;
  padding: 12px;
}
#campaign-scene h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #357257;
}
#campaign-scene p {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0;
}
#campaign-scene button {
  padding: 8px 12px;
  color: #224839;
  background: #d0e1b7;
  border: 2px solid #7a9c71;
  margin: 4px;
}
#campaign-scene.campaign-large {
  top: 8px;
  max-height: none;
}
#campaign-scene label {
  font-size: 12px;
}
.campaign-starters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.campaign-starters button {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.campaign-starters button[aria-pressed='true'] {
  outline: 3px solid #296e53;
  background: #b5d59d !important;
}
.campaign-starters canvas {
  width: 64px !important;
  height: 64px !important;
}
.campaign-starters small {
  font-size: 10px;
  padding: 4px;
}
.campaign-actions {
  display: flex;
  flex-wrap: wrap;
}
#campaign-objective {
  color: #e5db9c;
  font-size: 12px;
  margin: 12px 0;
}

#campaign-scene {
  width: auto;
  max-width: none;
  margin: 0;
}

/* Emerald console and accessible game panels. Integer canvas zoom is unchanged. */
body {
  background: radial-gradient(ellipse at 50% 10%, #275e53, #0d202b 72%);
}
main > header {
  align-items: center;
  border-bottom: 1px solid #638a7355;
  margin-bottom: 18px;
  letter-spacing: 2px;
}
main > header strong {
  color: #edf7cf;
  text-shadow: 2px 2px #123d38;
}
.toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.toolbar button {
  background: #183c3b;
  border: 1px solid #739f81;
  color: #ebf0d8;
  border-radius: 7px;
}
#screen {
  box-shadow:
    0 0 0 5px #83aa87,
    0 0 0 10px #254a49,
    0 0 0 14px #0b232c,
    0 20px 60px #0008;
}
#map-curtain {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
}
#overlay {
  background: #09242cbf;
  z-index: 8;
  align-items: stretch;
  padding: 12px;
}
#menu {
  min-width: 126px;
  max-width: 35%;
  overflow-y: auto;
  background: linear-gradient(#f8fbde, #dce9c8);
  border: 3px solid #427d6c;
  box-shadow: 0 0 0 2px #bdd1a4;
}
#menu button {
  border-radius: 4px;
  border-bottom: 1px solid #8fae9240;
  padding: 7px 9px;
}
#menu button:hover,
#menu button:focus-visible {
  background: #316f61;
  color: #fffbd6;
}
#detail {
  flex: 1;
  max-width: 72%;
  max-height: 100%;
  border: 3px solid #52816e;
  background: #f5f5dc;
  box-shadow: 0 0 0 2px #bfd4ab;
}
#detail > h2 {
  color: #285a50;
  border-bottom: 2px solid #98b5a0;
  padding-bottom: 10px;
}
#detail button {
  border: 1px solid #98b9a0;
  border-radius: 5px;
  margin: 3px;
  background: #e5edd1;
}
#detail button:hover,
#detail button:focus-visible {
  background: #c0ddbe;
  outline: 2px solid #317665;
  outline-offset: 1px;
}
#detail input,
#detail select {
  padding: 8px;
  border: 2px solid #7a9a87;
  border-radius: 5px;
  max-width: 100%;
  background: #fffde8;
  color: #244b43;
}
#detail table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
#detail td,
#detail th {
  padding: 7px;
  border-bottom: 1px solid #b6cbb2;
  text-align: left;
}
#detail tr:nth-child(even) {
  background: #e4ebd2;
}
.summary-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 10px 0;
  gap: 2px;
}
#detail .summary-tabs button[aria-selected='true'] {
  background: #2f7560;
  color: #fffadd;
}
.dex-count {
  grid-column: 1/-1;
  padding: 8px;
  margin: 0;
  background: #245b50;
  color: #f8f7d7;
  border-radius: 5px;
}
#detail .dex-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  min-height: 48px;
}
#detail .dex-unknown {
  opacity: 0.55;
  cursor: default;
  background: #d4decd;
}
.caught-ball {
  display: inline-block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border: 2px solid #36534c;
  border-radius: 50%;
  background: linear-gradient(#df665d 0 43%, #36534c 43% 57%, #fffde5 57%);
}
button:focus-visible {
  outline: 2px solid #efce72;
  outline-offset: 2px;
}

#campaign-scene:not(.campaign-large) {
  max-height: 45%;
}
#campaign-scene:not(.campaign-large) p {
  min-height: 40px;
}
