/* Jessie & James English Edition - retro GBA-style site.
   Pixelify Sans and Silkscreen are open-licensed Google Fonts. */
:root {
  color-scheme: dark;
  --black: #080808;
  --panel: #171717;
  --white: #f2f2f2;
  --red: #d41d32;
  --muted: #bcbcbc;
  --width: 780px;
  --r-icon: url("https://upload.wikimedia.org/wikipedia/commons/7/71/Team_Rocket_Logo.svg");
  --body-font: "Pixelify Sans", Verdana, Arial, sans-serif;
  --pixel-font: "Silkscreen", "Pixelify Sans", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 500 18px/1.55 var(--body-font);
}
a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #ff6b7b; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.page { width: min(calc(100% - 32px), var(--width)); margin: auto; }
.skip { position: absolute; top: -100px; left: 12px; padding: 8px; background: white; color: black; }
.skip:focus { top: 12px; }

/* Header */
.masthead { padding: 27px 0 14px; text-align: center; }
.rocket-r { width: 105px; height: 105px; object-fit: contain; margin: 0 auto 22px; }
.game-title {
  border: 3px solid var(--white);
  background: var(--panel);
  padding: 0 16px 20px;
  box-shadow: inset 0 0 0 3px var(--black);
}
.title-strip {
  display: inline-block;
  max-width: calc(100% - 12px);
  margin: -3px auto 18px;
  padding: 10px 12px;
  background: var(--red);
  color: var(--white);
  font: 400 clamp(11px, 2.25vw, 15px)/1.45 var(--pixel-font);
  overflow-wrap: normal;
}
.game-title h1 {
  margin: 0;
  font: 400 clamp(17px, 3.5vw, 26px)/1.65 var(--pixel-font);
  text-transform: uppercase;
}
.game-title h1 span { color: #ff5366; }
.game-title p {
  margin: 11px 0 0;
  font: 600 18px/1.4 var(--body-font);
}
.version {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1px 15px;
  margin: 12px 0 0;
  color: var(--muted);
  font: 500 15px/1.3 var(--body-font);
}

/* Title music and menu */
.music-strip { display: flex; justify-content: center; margin: 10px 0 15px; }
.music-strip button {
  cursor: pointer;
  border: 2px solid var(--white);
  padding: 9px 16px;
  background: var(--black);
  color: var(--white);
  font: 500 18px/1.3 var(--body-font);
}
.music-strip button:hover, .music-strip button[aria-pressed="true"] { background: var(--red); }
.music-strip button:disabled { opacity: .55; cursor: wait; }
.main-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 0 0 26px;
}
.main-menu a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 48px;
  border: 2px solid var(--white);
  padding: 9px 6px;
  text-align: center;
  text-decoration: none;
  font: 400 13px/1.5 var(--pixel-font);
  background: var(--black);
}
.main-menu a:hover, .main-menu a:focus-visible { background: var(--red); color: var(--white); }
.arrow {
  flex: 0 0 15px;
  display: inline-block;
  width: 15px;
  height: 16px;
  background: var(--r-icon) center / contain no-repeat;
}

/* Dialogue windows */
.window {
  margin: 0 0 25px;
  border: 3px solid var(--white);
  background: var(--panel);
  box-shadow: inset 0 0 0 3px var(--black);
  scroll-margin-top: 14px;
}
.window h2 {
  margin: 0;
  padding: 11px 16px 12px;
  border-bottom: 3px solid var(--white);
  background: var(--red);
  font: 400 16px/1.65 var(--pixel-font);
}
.window-body { padding: 19px 22px 22px; }
.window-body h3 {
  margin: 22px 0 11px;
  padding-left: 12px;
  border-left: 4px solid var(--red);
  font: 400 15px/1.6 var(--pixel-font);
}
p { margin: 0 0 13px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--white); font-weight: 700; }
.plain-list { list-style: none; padding: 0; margin: 12px 0 17px; }
.plain-list li { position: relative; padding: 0 0 10px 28px; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .37em;
  width: 15px;
  height: 15px;
  background: var(--r-icon) center / contain no-repeat;
}
.link-line { margin-top: 17px; font-weight: 600; }
.link-line a { color: #ff6779; }
.link-line a::before, .menu-button::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  background: var(--r-icon) center / contain no-repeat;
}
.screenshot { margin: 18px 0; }
.screenshot a { display: block; background: #0b0b0b; border: 2px solid #777; padding: 6px; }
.screenshot a:hover { border-color: var(--red); }
.screenshot img { display: block; width: 100%; height: auto; object-fit: contain; }
.screenshot figcaption { padding-top: 7px; font-size: 16px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.menu-button {
  display: inline-block;
  padding: 10px 13px;
  border: 2px solid var(--white);
  background: var(--red);
  color: var(--white);
  font: 600 17px/1.4 var(--body-font);
  text-decoration: none;
}
.menu-button:hover { color: var(--white); background: #aa1428; }

/* Credits */
.footer { border-top: 3px solid var(--red); margin: 12px 0 45px; padding: 20px 7px 0; font-size: 16px; }
.footer h2 { margin: 0 0 12px; font: 400 17px/1.5 var(--pixel-font); }
.end-mark {
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid #555;
  text-align: center;
  font: 400 14px/1.5 var(--pixel-font);
}
.end-mark span { color: var(--red); font-size: 24px; }
@media (max-width: 620px) {
  body { font-size: 17px; line-height: 1.55; }
  .masthead { padding-top: 26px; }
  .rocket-r { width: 97px; height: 97px; margin-bottom: 20px; }
  .game-title { padding: 0 10px 17px; }
  .title-strip { margin-bottom: 15px; padding: 8px 7px; font-size: clamp(10px, 2.6vw, 12px); }
  .game-title h1 { font-size: clamp(14px, 3.45vw, 18px); line-height: 1.7; }
  .game-title p { font-size: 17px; }
  .version { font-size: 14px; gap: 2px 11px; }
  .main-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-menu a { padding: 8px 5px; font-size: 12px; gap: 5px; min-height: 47px; }
  .window h2 { font-size: 14px; line-height: 1.7; padding: 11px 12px; }
  .window-body { padding: 17px 16px; }
  .window-body h3 { font-size: 13px; }
  .plain-list li { padding-left: 26px; }
}
@media (max-width: 350px) {
  .main-menu a { font-size: 11px; }
  .game-title p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Local ROM patcher */
.patch-input{display:block;max-width:100%;width:100%;padding:.65rem;margin:.5rem 0;background:#fff;color:#111;border:2px solid #111;font:inherit;box-sizing:border-box}.patch-log{white-space:pre-wrap;overflow-wrap:anywhere;max-height:16rem;overflow:auto;padding:.7rem;border:2px solid #111;background:#f4f4f4;color:#111;font:inherit;font-size:.85rem}.patch-log:empty{display:none}.menu-button:disabled{opacity:.45;cursor:not-allowed}#patch-status{font-weight:bold}#releases details{margin:.75rem 0}#releases button{margin:.25rem 0;max-width:100%;white-space:normal}


#es-patch-status { font-weight: bold; }
#spanish details { margin: .75rem 0; }
#spanish button { margin: .25rem 0; max-width: 100%; white-space: normal; }

/* The featured English gameplay GIF retains its original aspect ratio. */
.featured-gameplay { margin-top: 14px; }
.featured-gameplay a { border-color: var(--red); }

/* Compare the same overworld scene at different times of day. */
.time-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.time-gallery .screenshot { margin: 0 0 12px; min-width: 0; }
.time-gallery figcaption { text-align: center; }
@media (max-width: 620px) { .time-gallery { grid-template-columns: minmax(0, 1fr); } }

.battle-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.battle-gallery .screenshot { margin: 0 0 12px; min-width: 0; }
@media (max-width: 620px) { .battle-gallery { grid-template-columns: minmax(0, 1fr); } }
