@font-face {
  font-family: DS Pixel;
  src: url('assets/mario-ds/nintendo-ds.ttf') format('truetype');
  font-weight: 400;
  font-display: block;
  size-adjust: 133.333%;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  color: #2d3337;
  background: #e7e7e7;
  font:
    17px/1.65 DS Pixel,
    monospace;
  background-image:
    linear-gradient(#c7c7c735 1px, transparent 1px),
    linear-gradient(90deg, #c7c7c735 1px, transparent 1px);
  background-size: 8px 8px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a,
button,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #317fac;
  outline-offset: 5px;
}
h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  border: 0;
}
p + p {
  margin-top: 15px;
}
[hidden] {
  display: none !important;
}
.theme-sun {
  display: none;
}
:root[data-theme='dark'] .theme-sun {
  display: block;
}
:root[data-theme='dark'] .theme-moon {
  display: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 30;
  background: #fff;
  padding: 12px 18px;
}
.skip-link:focus {
  top: 12px;
}
.reveal-pending {
  opacity: 0;
}
::selection {
  background: #61869e;
  color: #fff;
}
.ds-page {
  max-width: 1360px;
  margin: auto;
  background: #f7f7f7;
  box-shadow: 0 0 0 1px #c7c7c7;
}
.ds-file-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #c7c7c7;
  padding: 18px 5%;
  font:
    15px/1.5 DS Pixel,
    monospace;
  background: #f7f7f7;
}
.ds-file-nav > span {
  font-size: 13px;
  color: #5b6570;
}
.ds-file-nav a:hover {
  color: #33789e;
}
.ds-start {
  padding: 42px 5% 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  background:
    linear-gradient(#c7c7c735 1px, transparent 1px),
    linear-gradient(90deg, #c7c7c735 1px, transparent 1px), #eee;
  background-size: 8px 8px;
}
.ds-hero-lcd,
.ds-lcd {
  border: 1px solid #89959c;
  outline: 1px solid #fff;
  outline-offset: -3px;
  box-shadow: 2px 3px 0 #bec5c9;
  background-color: #fff;
  background-image: repeating-linear-gradient(transparent 0 3px, #aac0cd13 3px 4px);
}
.ds-window-bar {
  font:
    14px/1.35 DS Pixel,
    monospace;
  letter-spacing: 0.4px;
  padding: 9px 13px;
  background: #61869e;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #435f71;
}
.ds-window-bar > span:last-child {
  font-size: 12px;
}
.ds-hero-content {
  padding: 25px 24px 30px;
  text-align: center;
}
.pixel-label {
  font:
    16px/1.5 DS Pixel,
    monospace;
  letter-spacing: 0.8px;
  color: #557284;
}
.ds-hero-content h1 {
  margin: 12px auto 0;
  width: min(330px, 75%);
}
.ds-hero-content h1 img {
  width: 100%;
  image-rendering: auto;
}
.ds-group {
  margin: 2px auto 0;
  height: 310px;
  display: grid;
  place-items: center;
}
.ds-group img {
  max-height: 100%;
  width: 410px;
  object-fit: contain;
}
.ds-hero-caption {
  font-size: 18px;
  line-height: 1.65;
  margin-top: 15px;
}
.ds-hero-caption strong {
  font-weight: 800;
  color: #416580;
}
.ds-dual-menu {
  min-width: 0;
  align-self: center;
}
.ds-record-body {
  padding: 22px 26px;
}
.ds-record-body > .pixel-label {
  font-size: 17px;
}
.ds-record-content {
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 18px 0;
}
.ds-zero {
  padding-right: 28px;
  border-right: 1px solid #c7c7c7;
  white-space: nowrap;
}
.ds-zero strong {
  font:
    64px/0.9 DS Pixel,
    monospace;
  color: #61869e;
  display: block;
}
.ds-zero small {
  font-size: 25px;
  margin-left: 3px;
}
.ds-zero > span {
  font:
    10px/1.5 DS Pixel,
    monospace;
  display: block;
  margin-top: 12px;
}
.ds-record dl {
  font:
    15px/1.8 DS Pixel,
    monospace;
}
.ds-record dl div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 5px;
}
.ds-record dt {
  color: #66747d;
}
.ds-record dd {
  font-weight: 600;
}
.ds-save-meter {
  height: 11px;
  border: 1px solid #7f96a6;
  background: repeating-linear-gradient(90deg, #e2e8ec 0 14px, #fff 14px 16px);
  box-shadow: inset 0 1px 0 #b6c8d0;
}
.ds-save-meter span {
  display: block;
  height: 100%;
  background: #61869e;
}
.ds-system-message {
  font:
    15px/1.5 DS Pixel,
    monospace;
  text-align: center;
  margin-top: 15px;
  color: #58646e;
}
.ds-battery {
  display: inline-block;
  width: 16px;
  height: 8px;
  background: #b7d8a0;
  border: 1px solid #fff;
  position: relative;
  margin-left: 7px;
}
.ds-battery:after {
  content: '';
  position: absolute;
  right: -4px;
  top: 1px;
  width: 2px;
  height: 4px;
  background: #fff;
}
.ds-hinge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  font:
    11px/1 DS Pixel,
    monospace;
  color: #77828b;
  height: 30px;
}
.ds-hinge i {
  height: 9px;
  width: 44px;
  border: 1px solid #c6cacf;
  background: linear-gradient(#d6dadd, #eef1f3, #c3c8cc);
  border-radius: 2px;
}
.ds-hinge span {
  order: 1;
}
.ds-hinge i:last-child {
  order: 2;
}
.ds-touch {
  padding-bottom: 10px;
  background-color: #f7f7f7;
  background-image:
    linear-gradient(#c7c7c740 1px, transparent 1px),
    linear-gradient(90deg, #c7c7c740 1px, transparent 1px);
  background-size: 8px 8px;
}
.ds-touch a {
  transition: background 0.2s;
}
.ds-selected-file {
  display: flex;
  gap: 15px;
  align-items: center;
  position: relative;
  margin: 18px;
  padding: 15px 16px;
  border: 1px solid #6f7e88;
  background: #fff;
  box-shadow: inset 0 0 0 3px #eef1f3;
}
.ds-selected-file:before,
.ds-selected-file:after {
  content: '';
  position: absolute;
  inset: -5px;
  pointer-events: none;
  background:
    linear-gradient(#61869e, #61869e) left top/20px 3px no-repeat,
    linear-gradient(#61869e, #61869e) left top/3px 20px no-repeat,
    linear-gradient(#61869e, #61869e) right bottom/20px 3px no-repeat,
    linear-gradient(#61869e, #61869e) right bottom/3px 20px no-repeat;
}
.ds-selected-file:after {
  transform: scaleX(-1);
}
.ds-selected-file img {
  width: 42px;
  height: 45px;
  object-fit: contain;
  image-rendering: pixelated;
}
.ds-selected-file strong {
  font:
    21px/1.25 DS Pixel,
    monospace;
}
.ds-selected-file small {
  display: block;
  margin-top: 5px;
  font:
    14px/1.3 DS Pixel,
    monospace;
  color: #6b777f;
}
.ds-selected-file > b {
  margin-left: auto;
  color: #61869e;
  font-size: 13px;
}
.ds-touch-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 18px;
}
.ds-touch-pair > a {
  display: flex;
  gap: 11px;
  align-items: center;
  border: 1px solid #89959c;
  background: #fff;
  padding: 15px 10px;
  font:
    17px/1.4 DS Pixel,
    monospace;
  box-shadow: inset 0 0 0 2px #eef1f3;
}
.ds-touch-pair small {
  display: block;
  font-size: 9px;
  color: #6b777f;
  margin-top: 4px;
}
.ds-touch a:hover {
  background: #edf5fa;
}
.screens-symbol {
  display: block;
  width: 26px;
  height: 38px;
  position: relative;
  border: 2px solid #7c8b92;
  flex: none;
  background: linear-gradient(#61869e, #61869e) center 4px/16px 11px no-repeat;
}
.screens-symbol:after {
  content: '';
  height: 12px;
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px solid #8b9aa2;
}
.file-symbol {
  width: 27px;
  height: 31px;
  display: block;
  border: 2px solid #7c8b92;
  position: relative;
  flex: none;
  background: linear-gradient(#c3d1da, #c3d1da) center bottom 3px/16px 11px no-repeat;
}
.file-symbol:after {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  right: 5px;
  height: 8px;
  border: 1px solid #7c8b92;
  background: #e2e9ee;
}
.ds-empty-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 13px 18px 0;
  border: 1px solid #a3a9ae;
  background: #fff;
  padding: 9px 15px;
  font:
    15px/1.3 DS Pixel,
    monospace;
}
.ds-empty-slot > span:first-child {
  font-size: 26px;
  color: #99a7af;
}
.ds-empty-slot small {
  display: block;
  color: #79828a;
  font-size: 11px;
  margin-top: 3px;
}
.ds-touch-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 0;
  font:
    12px/1.3 DS Pixel,
    monospace;
  color: #5c6871;
}
.ds-touch-footer > .screens-symbol {
  width: 15px;
  height: 20px;
  border-width: 1px;
  background-size: 9px 5px;
  background-position: center 2px;
}
.ds-touch-footer > .screens-symbol:after {
  height: 5px;
  left: 2px;
  right: 2px;
  bottom: 2px;
}
.ds-system-foot {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font:
    11px/1.4 DS Pixel,
    monospace;
  color: #667681;
  padding: 5px 0 24px;
}
.ds-manual {
  position: relative;
  background: #76be49;
  background-image:
    linear-gradient(#76be49c9, #76be49c9), url('assets/mario-ds/grass-texture.webp');
  background-size:
    auto,
    640px 420px;
  color: #163518;
  padding: 42px 5%;
  border-top: 6px solid #558f36;
}
.ds-chapter-title {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  background: #2981b9;
  color: #fff;
  margin: 0 -2% 32px;
  padding: 15px 20px;
  box-shadow: 0 2px 0 #1b6897;
}
.ds-chapter-title h2 {
  font:
    700 clamp(24px, 2.5vw, 32px)/1.25 DS Pixel,
    monospace;
}
.gold-star {
  font:
    31px/1 Arial,
    sans-serif;
  color: #fff470;
  -webkit-text-stroke: 1px #986c26;
  text-shadow: 2px 2px #17688b;
  flex: none;
}
.manual-page {
  margin-left: auto;
  background: #a3d745;
  border: 1px solid #fff;
  border-radius: 0 0 80px 80px;
  padding: 6px 12px 12px;
  align-self: flex-start;
  color: #253a15;
  font:
    16px/1 DS Pixel,
    monospace;
}
.manual-kicker {
  font:
    700 13px/1.6 DS Pixel,
    monospace;
  letter-spacing: 1.4px;
  color: #306526;
}
.manual-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}
.manual-intro > p:last-child {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 430px;
}
.character-tabs {
  display: flex;
  gap: 9px;
  margin: 0 0 0 30px;
  position: relative;
  z-index: 2;
}
.character-tabs button {
  --char: #79ab34;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 23px;
  background: #e9f5c8;
  color: #274323;
  min-height: 65px;
  border: 1px solid #46792a;
  box-shadow: inset 0 -4px 0 #28431826;
  font:
    24px/1.2 DS Pixel,
    monospace;
}
.character-tabs button img {
  width: 37px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}
.character-tabs button:nth-child(2) {
  --char: #cf3c36;
}
.character-tabs button:nth-child(3) {
  --char: #3a962f;
}
.character-tabs button:nth-child(4) {
  --char: #894a99;
}
.character-tabs button[aria-selected='true'] {
  background: var(--char);
  color: #fff;
  border-color: #fff;
  box-shadow:
    0 4px 0 var(--char),
    inset 0 0 0 2px #ffffff60;
}
.character-stage {
  border: 1px solid #5e922f;
  background: #f4f5d8;
  box-shadow: 4px 5px 0 #32642240;
  position: relative;
}
.character-panel {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  padding: 42px 5% 25px;
  gap: 24px;
  background: radial-gradient(ellipse at 80% 75%, #e1ebbb, transparent 65%);
}
.character-copy {
  position: relative;
  z-index: 1;
}
.character-copy h3 {
  font:
    600 clamp(32px, 4vw, 50px)/1.1 DS Pixel,
    monospace;
  max-width: 490px;
  margin: 15px 0 23px;
  color: #335b26;
}
.character-copy > p:not(.manual-kicker) {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.65;
}
.character-art {
  min-width: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 22px;
}
.character-art img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  max-height: 405px;
}
.ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.ability-tags li {
  background: #deebbf;
  border: 1px solid #b2cf8a;
  padding: 4px 12px;
  font:
    16px/1.5 DS Pixel,
    monospace;
}
.original-note {
  font-size: 12px !important;
  color: #56694a;
  margin-top: 22px !important;
}
.ds-chapter-foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  font:
    12px/1.6 DS Pixel,
    monospace;
  letter-spacing: 0.6px;
}
.ds-chapter-foot a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ds-hardware-chapter {
  padding: 60px 5%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 55px;
  background: #fff;
  border-bottom: 1px solid #c7c7c7;
  align-items: center;
}
.blue-chapter-label {
  font:
    14px/1.5 DS Pixel,
    monospace;
  color: #61869e;
}
.ds-hardware-copy h2 {
  font:
    600 clamp(30px, 3.9vw, 49px)/1.15 DS Pixel,
    monospace;
  margin: 18px 0 23px;
}
.ds-hardware-copy h2 span {
  color: #61869e;
}
.ds-hardware-copy > p {
  max-width: 460px;
}
.screen-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 30px;
}
.screen-notes > div {
  border-top: 1px solid #aebdc7;
  padding-top: 20px;
}
.screen-notes .screens-symbol {
  margin-bottom: 12px;
}
.screen-notes strong {
  font:
    20px/1.5 DS Pixel,
    monospace;
  display: block;
}
.screen-notes p {
  font-size: 14px;
  line-height: 1.55;
  margin-top: 7px;
}
.bottom-symbol {
  background-position: center 21px;
}
.bottom-symbol:after {
  top: 3px;
  bottom: auto;
}
.ds-hardware {
  position: relative;
}
.ds-hardware img {
  width: 100%;
  filter: drop-shadow(0 15px 10px #31445a22);
}
.ds-hardware figcaption {
  font:
    12px/1.5 DS Pixel,
    monospace;
  color: #607986;
  text-align: center;
  padding-top: 25px;
}
.ds-adventure {
  padding-bottom: 55px;
}
.ds-adventure-layout {
  display: grid;
  grid-template-columns: 0.6fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 20px 3%;
}
.power-star-count {
  text-align: center;
  position: relative;
}
.power-star-count > span:first-child {
  display: block;
  font: 90px/0.9 Arial;
  color: #f9e045;
  text-shadow: 3px 3px #8f7e2470;
  -webkit-text-stroke: 2px #ae852b;
}
.power-star-count strong {
  font:
    700 84px/1 DS Pixel,
    monospace;
  display: block;
  color: #fff6cf;
  margin: 8px 0;
  text-shadow: 3px 3px #408429;
}
.power-star-count > span {
  font:
    20px/1.5 DS Pixel,
    monospace;
}
.power-star-count small {
  display: block;
  font:
    10px/1.5 DS Pixel,
    monospace;
  margin-top: 8px;
}
.ds-adventure h3 {
  font:
    700 37px/1.1 DS Pixel,
    monospace;
  margin: 15px 0 20px;
}
.ds-adventure p:not(.manual-kicker) {
  max-width: 530px;
}
.manual-link {
  display: inline-block;
  margin-top: 25px;
  font:
    16px/1.6 DS Pixel,
    monospace;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.ds-workshop {
  margin: 55px 5%;
  border: 1px solid #89959c;
  box-shadow: 3px 4px 0 #c7c7c7;
  background: #fff;
}
.ds-workshop-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  padding: 38px 4%;
}
.ds-workshop h2 {
  font:
    600 39px/1.15 DS Pixel,
    monospace;
  margin: 14px 0 20px;
}
.ds-workshop-layout > div > p {
  max-width: 470px;
}
.ds-save-file {
  background: #eef2f4;
  border: 1px solid #b9c8d0;
  padding: 26px 30px;
}
.ds-save-file .file-symbol {
  margin-bottom: 15px;
  width: 34px;
  height: 38px;
}
.ds-save-file h3 {
  font:
    26px/1.5 DS Pixel,
    monospace;
}
.ds-save-file > p {
  font-size: 14px;
}
.ds-save-file > p:first-of-type {
  font:
    15px/1.5 DS Pixel,
    monospace;
  color: #61869e;
  margin-top: 8px;
}
.ds-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font:
    17px/1.4 DS Pixel,
    monospace;
  border: 1px solid #61869e;
  box-shadow:
    inset 0 0 0 3px #f4f7f8,
    2px 3px 0 #c6d4dc;
  padding: 13px 19px;
  background: #fff;
  color: #426680;
  margin-top: 25px;
  transition: background 0.2s;
}
.ds-questions {
  padding: 10px 5% 50px;
}
.ds-questions h2 {
  font:
    600 35px/1.2 DS Pixel,
    monospace;
  margin: 14px 0 28px;
}
.ds-faq {
  border: 1px solid #a5b2ba;
  background: #fff;
}
.ds-faq details + details {
  border-top: 1px solid #c7c7c7;
}
.ds-faq summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 21px 24px;
  list-style: none;
  cursor: pointer;
  font:
    21px/1.4 DS Pixel,
    monospace;
}
.ds-faq summary::-webkit-details-marker {
  display: none;
}
.faq-slot {
  font-size: 13px;
  color: #61869e;
}
.ds-faq summary b {
  margin-left: auto;
  font-size: 24px;
  color: #61869e;
  font-weight: 400;
}
.ds-faq details[open] summary b {
  transform: rotate(45deg);
}
.ds-faq details[open] {
  background: #f4f8fa;
}
.ds-faq .answer {
  padding: 0 64px 24px;
  font-size: 16px;
  max-width: 980px;
}
.ds-community {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-top: 38px;
  padding: 28px;
  background: #eaf0f3;
  border: 1px solid #c1ced5;
}
.ds-community h3 {
  font:
    24px/1.5 DS Pixel,
    monospace;
}
.ds-community p {
  font-size: 14px;
  margin-top: 6px;
  max-width: 600px;
}
.ds-community > a {
  margin-top: 0;
  flex: none;
}
.community-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.ds-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 5% 25px;
  background: #61869e;
  color: #fff;
  font:
    15px/1.4 DS Pixel,
    monospace;
}
.ds-footer > span {
  font:
    18px/1.2 DS Pixel,
    monospace;
}
.ds-footer p {
  width: 100%;
  font:
    11px/1.5 DS Pixel,
    monospace;
  color: #e5eef5;
  text-align: center;
  margin-top: 6px;
}
@media (max-width: 1100px) {
  .ds-start {
    gap: 22px;
    grid-template-columns: 1fr 1fr;
  }
  .ds-record-body {
    padding: 20px;
  }
  .ds-record-content {
    gap: 15px;
  }
  .ds-zero {
    padding-right: 18px;
  }
  .ds-record dl div {
    grid-template-columns: 75px 1fr;
    font-size: 13px;
  }
  .ds-group {
    height: 290px;
  }
  .character-tabs button {
    padding-inline: 17px;
  }
  .ds-workshop-layout {
    gap: 25px;
  }
}
@media (max-width: 850px) {
  .ds-start {
    grid-template-columns: 1fr;
  }
  .ds-hero-content {
    padding-bottom: 32px;
  }
  .ds-group {
    height: 320px;
    max-width: 510px;
  }
  .ds-dual-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .ds-hinge {
    display: none;
  }
  .ds-record-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .ds-zero {
    border: 0;
    padding: 0;
  }
  .ds-zero strong {
    font-size: 55px;
  }
  .ds-record dl div {
    font-size: 14px;
  }
  .ds-selected-file {
    margin: 15px;
    font-size: 14px;
    gap: 10px;
    padding: 12px 10px;
  }
  .ds-selected-file strong {
    font-size: 19px;
  }
  .ds-touch-pair {
    margin-inline: 15px;
    gap: 10px;
  }
  .ds-touch-pair > a {
    display: block;
    padding: 12px;
    font-size: 15px;
  }
  .ds-touch-pair .screens-symbol,
  .ds-touch-pair .file-symbol {
    margin-bottom: 10px;
  }
  .ds-empty-slot {
    margin-inline: 15px;
  }
  .character-tabs {
    margin-left: 0;
  }
  .character-tabs button {
    flex: 1;
    justify-content: center;
    padding: 9px 12px;
    gap: 8px;
    font-size: 21px;
  }
  .character-tabs img {
    width: 32px !important;
  }
  .character-panel {
    min-height: 440px;
    padding: 30px 5%;
  }
  .character-copy h3 {
    font-size: 38px;
  }
  .ds-hardware-chapter {
    gap: 30px;
  }
  .ds-adventure-layout {
    gap: 40px;
  }
  .ds-workshop h2 {
    font-size: 31px;
  }
  .ds-community {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .ds-file-nav {
    padding: 14px 5%;
    font-size: 13px;
  }
  .ds-file-nav > span {
    display: none;
  }
  .ds-start {
    padding-top: 22px;
    gap: 24px;
  }
  .ds-hero-content {
    padding: 23px 14px;
  }
  .ds-hero-content > .pixel-label {
    font-size: 13px;
  }
  .ds-hero-content h1 {
    width: 74%;
    margin-top: 15px;
  }
  .ds-group {
    height: 245px;
    margin-top: 12px;
  }
  .ds-hero-caption {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 10px;
  }
  .ds-dual-menu {
    display: block;
  }
  .ds-hinge {
    display: flex;
  }
  .ds-record-content {
    flex-direction: row;
    gap: 20px;
    align-items: center;
  }
  .ds-zero {
    padding-right: 22px;
    border-right: 1px solid #c7c7c7;
  }
  .ds-zero strong {
    font-size: 55px;
  }
  .ds-zero > span {
    font-size: 8px;
  }
  .ds-record dl div {
    grid-template-columns: 80px 1fr;
    gap: 6px;
  }
  .ds-record-body {
    padding: 18px;
  }
  .ds-record dl {
    font-size: 14px;
  }
  .ds-touch-pair > a {
    display: flex;
    gap: 14px;
    padding: 15px;
    font-size: 17px;
  }
  .ds-touch-pair .screens-symbol,
  .ds-touch-pair .file-symbol {
    margin: 0;
  }
  .ds-selected-file strong {
    font-size: 22px;
  }
  .ds-system-foot {
    font-size: 9px;
    gap: 10px;
  }
  .ds-system-foot > span:first-child {
    max-width: 190px;
  }
  .ds-manual {
    padding-top: 28px;
    padding-bottom: 30px;
  }
  .ds-chapter-title {
    gap: 11px;
    margin-bottom: 25px;
    padding: 13px 14px;
  }
  .ds-chapter-title h2 {
    font-size: 24px;
  }
  .manual-page {
    font-size: 13px;
    padding: 5px 8px 10px;
  }
  .gold-star {
    font-size: 26px;
  }
  .manual-intro {
    display: block;
    margin-bottom: 24px;
  }
  .manual-intro > p:last-child {
    font-size: 15px;
    margin-top: 12px;
  }
  .manual-kicker {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .character-tabs {
    gap: 5px;
  }
  .character-tabs button {
    flex-direction: column;
    gap: 3px;
    padding: 8px 5px;
    font-size: 17px;
  }
  .character-tabs button img {
    height: 35px;
    width: 32px !important;
  }
  .character-panel {
    min-height: 620px;
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
    gap: 0;
    padding: 20px 7%;
  }
  .character-copy {
    order: 2;
    align-self: start;
  }
  .character-copy h3 {
    font-size: 30px;
    margin: 8px 0 12px;
  }
  .character-copy > p:not(.manual-kicker) {
    font-size: 15px;
    line-height: 1.55;
  }
  .character-art {
    order: 1;
    padding: 0 0 20px;
  }
  .character-art img {
    max-height: 280px;
  }
  .ability-tags {
    margin: 15px 0;
    gap: 6px;
  }
  .ability-tags li {
    font-size: 13px;
    padding: 3px 9px;
  }
  .original-note {
    font-size: 10px !important;
    margin-top: 15px !important;
  }
  .ds-chapter-foot {
    font-size: 10px;
    gap: 18px;
    align-items: center;
  }
  .ds-chapter-foot > span {
    max-width: 90px;
  }
  .ds-chapter-foot a {
    max-width: 170px;
    text-align: right;
  }
  .ds-hardware-chapter {
    padding-block: 38px;
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .ds-hardware-copy h2 {
    font-size: 37px;
  }
  .screen-notes {
    gap: 20px;
    margin-top: 22px;
  }
  .ds-hardware {
    max-width: 420px;
    margin: auto;
  }
  .ds-hardware figcaption {
    font-size: 10px;
    padding-top: 15px;
  }
  .ds-adventure-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 3px;
  }
  .power-star-count {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    column-gap: 15px;
    max-width: 310px;
    margin: auto;
    width: 100%;
  }
  .power-star-count > span:first-child {
    font-size: 75px;
    grid-row: 1/4;
  }
  .power-star-count strong {
    font-size: 64px;
    text-align: left;
    margin: 0;
  }
  .power-star-count > span:not(:first-child),
  .power-star-count small {
    text-align: left;
    font-size: 15px;
  }
  .power-star-count small {
    font-size: 8px;
    margin-top: 3px;
  }
  .ds-adventure h3 {
    font-size: 30px;
  }
  .ds-workshop {
    margin-block: 32px;
  }
  .ds-workshop-layout {
    grid-template-columns: 1fr;
    padding: 26px 6%;
    gap: 28px;
  }
  .ds-workshop h2 {
    font-size: 32px;
  }
  .ds-workshop .pixel-label {
    font-size: 13px;
  }
  .ds-save-file {
    padding: 22px;
  }
  .ds-questions h2 {
    font-size: 32px;
  }
  .ds-faq summary {
    font-size: 18px;
    gap: 13px;
    padding: 18px 16px;
  }
  .ds-faq .answer {
    padding: 0 20px 20px 43px;
    font-size: 14px;
  }
  .faq-slot {
    font-size: 11px;
  }
  .ds-community {
    padding: 24px 20px;
    gap: 23px;
  }
  .ds-community h3 {
    font-size: 23px;
    line-height: 1.25;
  }
  .ds-community > a {
    font-size: 16px;
  }
  .ds-footer {
    font-size: 12px;
    gap: 18px;
  }
  .ds-footer > span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-pending {
    opacity: 1;
  }
  * {
    transition: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Native DS menu textures: ordered dithering and LCD lines inside grid cells. */
:root {
  --ds-native-unit: 1px;
  --ds-grid-top-step: 16px;
  --ds-grid-bottom-step: 32px;
  --ds-top-grid: url('assets/mario-ds/ui/top-grid.png');
  --ds-bottom-grid: url('assets/mario-ds/ui/bottom-grid.png');
  --ds-clock-grid: url('assets/mario-ds/ui/clock-grid.png');
  --ds-background-grid: url('assets/mario-ds/ui/background-grid.png');
  --ds-menu-gradient: url('assets/mario-ds/ui/menu-gradient.png');
  --ds-status-gradient: url('assets/mario-ds/ui/status-gradient.png');
  --ds-file-lines: url('assets/mario-ds/ui/file-lines.png');
  --ds-console-icon: url('assets/mario-ds/ui/ds-console.png');
  --ds-notes-icon: url('assets/mario-ds/ui/notes.png');
  --ds-gba-cartridge-icon: url('assets/mario-ds/ui/gba-cartridge.png');
  --ds-game-card-icon: url('assets/mario-ds/ui/game-card.png');
  --ds-screen-top-icon: url('assets/mario-ds/ui/top-screen.png');
  --ds-screen-touch-icon: url('assets/mario-ds/ui/touch-screen.png');
  --ds-alarm-icon: url('assets/mario-ds/ui/alarm.png');
  --ds-discord-icon: url('assets/mario-ds/ui/discord.svg');
  --ds-menu-ink: #232323;
  --ds-menu-edge: #777;
  --ds-menu-inset: #fff;
}
body[data-game='sm64ds'] {
  font-synthesis: none;
}
.ds-start {
  align-items: center;
  position: relative;
  background-color: #fff;
  background-image: var(--ds-background-grid);
  background-size: var(--ds-grid-top-step) var(--ds-grid-top-step);
  image-rendering: pixelated;
  isolation: isolate;
  color: #2d3337;
  color-scheme: light;
}
.ds-start:before {
  content: none;
}
.ds-hero-lcd {
  box-shadow: none;
  border-color: #89959c;
  background-color: #fff;
  background-image: none;
  image-rendering: pixelated;
}
.ds-hero-content {
  background-image: var(--ds-top-grid);
  background-size: var(--ds-hero-step, 32px) var(--ds-hero-step, 32px);
  background-position: left top;
  image-rendering: pixelated;
}
.ds-start .ds-window-bar,
.ds-workshop .ds-window-bar {
  padding: 6px 10px;
  font:
    14px/1.25 DS Pixel,
    monospace;
  background-color: #61869e;
  background-image: var(--ds-status-gradient);
  background-size: 4px 100%;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  color: white;
  border-color: #4d727f;
  text-shadow: 1px 1px #42606c;
}
.ds-hero-content > .pixel-label {
  color: #3c505b;
  font-size: 14px;
}
.ds-hero-content h1 img {
  image-rendering: auto;
}
.ds-hero-caption {
  font:
    20px/1.45 DS Pixel,
    monospace;
}
.ds-hero-caption strong {
  color: #333;
}
.ds-group {
  grid-template-rows: minmax(0, 1fr);
}
.ds-group img {
  height: 100%;
  min-height: 0;
  object-fit: contain;
  image-rendering: auto;
}
.ds-authentic-menu {
  display: block !important;
  container-type: inline-size;
  align-self: center;
  justify-self: center;
  width: min(100%, 440px);
}
.ds-authentic-menu .ds-lcd {
  aspect-ratio: 4/3;
  position: relative;
  box-shadow: none;
  border: 1px solid #9d9d9d;
  outline: none;
  background-color: #fff;
  font-family:
    DS Pixel,
    monospace;
  color: var(--ds-menu-ink);
  image-rendering: pixelated;
}
.ds-authentic-menu .ds-system-top {
  background-image: var(--ds-top-grid);
  background-size: var(--ds-grid-top-step) var(--ds-grid-top-step);
  background-origin: border-box;
}
.ds-authentic-menu .ds-system-bottom {
  border-top: 0;
  background-image: var(--ds-bottom-grid);
  background-size: var(--ds-grid-bottom-step) var(--ds-grid-bottom-step);
  background-origin: border-box;
}
.ds-authentic-menu .ds-lcd:before {
  content: none;
}
.ds-system-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 8.33%;
  padding: 0 1.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #61869e;
  background-image: var(--ds-status-gradient);
  background-size: calc(var(--ds-native-unit) * 2) 100%;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  border-bottom: 1px solid #65838d;
  color: white;
  font-size: 2.75cqw;
  line-height: 1;
  z-index: 1;
}
.ds-system-bar > span:last-child {
  display: flex;
  align-items: center;
  gap: 1.3cqw;
}
.ds-system-bar time + time {
  padding-left: 1cqw;
  border-left: 1px solid #d1e2e7;
}
.ds-card-chip {
  width: 4.3cqw;
  height: 4.3cqw;
  display: inline-block;
  background: var(--ds-game-card-icon) center/contain no-repeat;
  image-rendering: pixelated;
}
.ds-small-screens {
  width: 2.6cqw;
  height: 2.7cqw;
  display: inline-block;
  border: 1px solid #111;
  background: linear-gradient(#eee 0 40%, #111 40% 60%, #eee 60%);
  box-shadow: inset 0 0 0 1px #ddd;
}
.ds-system-bar .ds-battery {
  width: 3.5cqw;
  height: 1.7cqw;
  margin-left: 0;
  border-color: #102229;
  background: #35de26;
  box-shadow: inset 0 0 0 1px #adf48d;
}
.ds-system-bar .ds-battery:after {
  height: 1cqw;
  right: -2px;
  top: 0;
  background: #13232d;
}
.ds-clock-calendar {
  position: absolute;
  top: 15%;
  left: 6%;
  right: 6%;
  display: grid;
  grid-template-columns: 1fr 1.16fr;
  gap: 6%;
  align-items: end;
}
.ds-analog-clock {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid #222;
  background: #fff var(--ds-clock-grid);
  background-size: var(--ds-grid-top-step) var(--ds-grid-top-step);
  image-rendering: pixelated;
}
.clock-number {
  position: absolute;
  display: block;
  height: 8.3cqw;
  width: 6.2cqw;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  font-size: 0;
  text-shadow: none;
}
.clock-number.n12 {
  width: 8.8cqw;
  background-image: url('assets/mario-ds/ui/clock-12.png');
}
.clock-number.n3 {
  background-image: url('assets/mario-ds/ui/clock-3.png');
}
.clock-number.n6 {
  background-image: url('assets/mario-ds/ui/clock-6.png');
}
.clock-number.n9 {
  background-image: url('assets/mario-ds/ui/clock-9.png');
}
.clock-number.n12 {
  left: 50%;
  top: 4%;
  transform: translateX(-50%);
}
.clock-number.n3 {
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
}
.clock-number.n6 {
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
}
.clock-number.n9 {
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
}
.clock-ticks {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#888, #888) 26% 9%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 73% 9%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 9% 25%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 89% 25%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 9% 73%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 89% 73%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 26% 90%/2.5% 3% no-repeat,
    linear-gradient(#888, #888) 73% 90%/2.5% 3% no-repeat;
}
.ds-analog-clock > i {
  position: absolute;
  left: calc(50% - 1px);
  bottom: 50%;
  width: 2px;
  transform-origin: 50% 100%;
  height: 30%;
  background: #696969;
}
.ds-analog-clock > .clock-minute {
  height: 40%;
  background: #5189ac;
}
.ds-analog-clock > .clock-second {
  height: 41%;
  width: 1px;
  background: #ad6b68;
}
.ds-analog-clock > b {
  position: absolute;
  left: calc(50% - 2px);
  top: calc(50% - 2px);
  width: 4px;
  height: 4px;
  background: #636363;
}
.ds-calendar {
  position: relative;
  align-self: end;
}
.ds-calendar > time {
  display: block;
  text-align: center;
  font-size: 3.5cqw;
  line-height: 1.3;
  margin-bottom: 0.6cqw;
  letter-spacing: 0.3cqw;
}
.ds-calendar table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 2.85cqw;
  line-height: 1.1;
}
.ds-calendar th,
.ds-calendar td {
  height: 5.1cqw;
  padding: 0;
  text-align: center;
  border: 1px solid #aaa;
  font-weight: 400;
}
.ds-calendar th {
  background: #737373;
  color: white;
  border-color: #444;
}
.ds-calendar td {
  background: #fff;
}
.ds-calendar th:first-child {
  background: #ef1737;
}
.ds-calendar th:last-child {
  background: #0035c1;
}
.ds-calendar td:first-child {
  background: #ffbaf1;
  color: #800034;
}
.ds-calendar td:last-child {
  background: #91baff;
  color: #05246a;
}
.ds-calendar td.today {
  box-shadow: inset 0 0 0 2px #7e969f;
  background: #dce4e7;
}
.ds-system-status {
  position: absolute;
  bottom: 5%;
  left: 12%;
  right: 12%;
  height: 22%;
  display: grid;
  grid-template-columns: 16% 1fr;
  gap: 3%;
  align-items: center;
  padding: 1.5% 2%;
  background: #ededed;
  border: 1px solid #aaa;
}
.ds-menu-card-icon {
  border: 2px solid #777;
  outline: 1px solid white;
  padding: 3%;
  background: #e7e7e7;
  height: 100%;
  display: grid;
  place-items: center;
}
.ds-menu-card-icon img {
  max-height: 100%;
  width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.ds-system-status > div {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ds-system-status strong {
  font-size: 2.75cqw;
  line-height: 1.2;
  font-weight: 400;
}
.ds-system-status p {
  font-size: 3cqw;
  line-height: 1.25;
  background: #242424;
  color: white;
  padding: 1cqw;
  margin-top: 0.5cqw;
}
.ds-system-status .ds-status-progress {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-size: 2.7cqw;
}
.ds-status-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ds-port-progress);
  background: #31596f;
  pointer-events: none;
}
.ds-status-copy {
  position: relative;
  z-index: 1;
}
.ds-authentic-menu .ds-selected-file {
  position: absolute;
  top: 12%;
  left: 12%;
  right: 12%;
  height: 24%;
  margin: 0;
  padding: 1.5% 2%;
  gap: 4%;
  border-color: #191919;
  box-shadow: inset 0 0 0 2px #eee;
  background: #fff var(--ds-file-lines);
  background-size: calc(var(--ds-native-unit) * 2) calc(var(--ds-native-unit) * 2);
  image-rendering: pixelated;
}
.ds-authentic-menu .ds-selected-file:before,
.ds-authentic-menu .ds-selected-file:after {
  inset: -5px;
  background:
    linear-gradient(#52718b, #52718b) left top/12px 2px no-repeat,
    linear-gradient(#52718b, #52718b) left top/2px 12px no-repeat,
    linear-gradient(#52718b, #52718b) right bottom/12px 2px no-repeat,
    linear-gradient(#52718b, #52718b) right bottom/2px 12px no-repeat;
}
.ds-authentic-menu .ds-selected-file img {
  width: 17%;
  height: auto;
  aspect-ratio: 1;
  max-height: 100%;
  padding: 1%;
  object-fit: contain;
  background: #f7e64a;
  border: 1px solid #333;
  image-rendering: pixelated;
}
.ds-authentic-menu .ds-selected-file > span {
  flex: 1;
  text-align: center;
}
.ds-authentic-menu .ds-selected-file strong {
  font-size: 3.5cqw;
  line-height: 1.2;
  font-weight: 400;
}
.ds-authentic-menu .ds-selected-file small {
  font-size: 3.3cqw;
  color: var(--ds-menu-ink);
  margin-top: 0.3cqw;
}
.ds-authentic-menu .ds-touch-pair {
  position: absolute;
  top: 38%;
  height: 24%;
  left: 12%;
  right: 12%;
  margin: 0;
  gap: 3%;
}
.ds-authentic-menu .ds-touch-pair > a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.2cqw;
  padding: 2cqw 0.5cqw 0.5cqw;
  border: 1px solid var(--ds-menu-edge);
  background-color: #fff;
  background-image: var(--ds-menu-gradient);
  background-size: calc(var(--ds-native-unit) * 96) calc(var(--ds-native-unit) * 42);
  background-position: left bottom;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px var(--ds-menu-inset);
  font-size: 3.2cqw;
  line-height: 1;
  color: var(--ds-menu-ink);
}
.ds-pixel-sprite {
  display: block;
  flex: none;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
.ds-console-icon {
  width: 42px;
  aspect-ratio: 1;
  background-image: var(--ds-console-icon);
}
.ds-system-bar .ds-wireless-icon {
  width: 3.3cqw;
  height: 2.5cqw;
  background-image: url('assets/mario-ds/ui/wireless.png');
}
.ds-system-bar .ds-battery-icon {
  width: 4.7cqw;
  height: 2.7cqw;
  background-image: url('assets/mario-ds/ui/battery.png');
}
.ds-system-endbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3%;
  min-height: 6.25cqw;
  padding: 1.2cqw 1.5%;
  background-color: #61869e;
  background-image: var(--ds-status-gradient);
  background-size: calc(var(--ds-native-unit) * 2) 100%;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  border: 1px solid #65838d;
  color: white;
  font:
    2.75cqw/1 DS Pixel,
    monospace;
}
.ds-notes-icon {
  width: 40px;
  aspect-ratio: 20/21;
  background-image: var(--ds-notes-icon);
}
.ds-game-card-icon {
  width: 33px;
  aspect-ratio: 1;
  background-image: var(--ds-game-card-icon);
}
.ds-gba-cartridge-icon {
  width: 64px;
  aspect-ratio: 32/21;
  background-image: var(--ds-gba-cartridge-icon);
}
.ds-screen-top-icon,
.ds-screen-touch-icon {
  width: 42px;
  aspect-ratio: 1;
}
.ds-screen-top-icon {
  background-image: var(--ds-screen-top-icon);
}
.ds-screen-touch-icon {
  background-image: var(--ds-screen-touch-icon);
}
.ds-brightness-icon {
  width: 22px;
  aspect-ratio: 1;
  background-image: url('assets/mario-ds/ui/brightness.png');
}
.ds-alarm-icon {
  width: 26px;
  aspect-ratio: 13/11;
  background-image: var(--ds-alarm-icon);
}
.ds-discord-icon {
  width: 32px;
  aspect-ratio: 4/3;
  image-rendering: auto;
  background-image: var(--ds-discord-icon);
}
.ds-touch-pair .ds-console-icon {
  width: 8.2cqw;
}
.ds-touch-pair .ds-game-card-icon {
  width: 6.4cqw;
}
.ds-touch-pair .ds-notes-icon {
  width: 7.8cqw;
}
.ds-authentic-menu .ds-empty-slot {
  position: absolute;
  top: 64%;
  left: 12%;
  right: 12%;
  height: 22%;
  margin: 0;
  padding: 2%;
  gap: 5%;
  border-color: #c6c6c6;
  color: #969696;
  background: #fff;
  font-size: 3.5cqw;
  line-height: 1.3;
  box-shadow: inset 0 0 0 2px #f3f3f3;
}
.ds-authentic-menu .ds-empty-slot > .ds-gba-cartridge-icon {
  width: 12.5cqw;
  flex: none;
}
.ds-authentic-menu .ds-empty-slot > span:last-child {
  text-align: center;
  flex: 1;
}
.ds-authentic-menu .ds-touch-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13%;
  padding: 0 4%;
  background: none;
  border: 0;
}
.ds-touch-footer > .ds-brightness-icon {
  width: 4.3cqw;
}
.ds-touch-footer .ds-console-icon {
  width: 8.2cqw;
}
.ds-touch-footer > .ds-alarm-icon {
  width: 5.1cqw;
}
.ds-touch-footer > a {
  display: grid;
  place-items: center;
  padding: 0.4cqw;
  pointer-events: auto;
}
.ds-port-percentage {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 25px 0 20px;
}
.ds-port-percentage strong {
  font:
    55px/1 DS Pixel,
    monospace;
  color: #567b91;
}
.ds-port-percentage small {
  font-size: 24px;
}
.ds-port-percentage > span {
  font:
    12px/1.3 DS Pixel,
    monospace;
  max-width: 90px;
}
.ds-save-file {
  background: #f2f4f5;
  border-color: #888;
  box-shadow: inset 0 0 0 2px white;
}
.ds-save-file > .ds-game-card-icon {
  width: 44px;
  margin-bottom: 18px;
}
.ds-save-meter {
  margin-bottom: 20px;
  background: repeating-linear-gradient(90deg, #ddd 0 10px, white 10px 12px);
  border-color: #555;
}
.ds-save-meter span {
  background: repeating-linear-gradient(90deg, #74a4be 0 10px, white 10px 12px);
}
.ds-faq {
  box-shadow: inset 0 0 0 2px #fff;
  border-color: #777;
}
.ds-faq summary {
  background: #f8f9f9;
  font-size: 19px;
}
.ds-faq details[open] summary {
  background: #d9e7ee;
}
.faq-slot {
  min-width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #577788;
  background: #edf4f7;
  color: #345061;
  font-size: 14px;
}
.ds-chapter-title .gold-star {
  width: 27px;
  height: 26px;
  font-size: 0;
  -webkit-text-stroke: 0;
  background: url('assets/mario-ds/power-star.png') center/contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px 0 #185a8440);
}
.power-star-count > span:first-child {
  display: grid;
  place-items: center;
  font-size: 0;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.power-star-count > span:first-child img {
  width: 81px;
  height: 78px;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 #376b2d40);
}
.manual-page {
  align-self: center;
  border-radius: 0;
  padding: 5px 8px;
  font:
    700 20px/1 DS Pixel,
    monospace;
  background: #a6d74d;
  color: #14341e;
  border: 2px solid #f8fbd3;
  box-shadow: 2px 2px 0 #205b7e;
}
.screen-notes .ds-pixel-sprite {
  margin-bottom: 12px;
}
.ds-outline-button {
  background-color: #fff;
  background-image: var(--ds-menu-gradient);
  background-size: 96px 42px;
  background-position: left bottom;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  border-color: var(--ds-menu-edge);
  color: var(--ds-menu-ink);
  box-shadow:
    inset 0 0 0 2px var(--ds-menu-inset),
    2px 3px 0 #0002;
  transition: filter 0.2s;
}
.ds-outline-button:hover,
.ds-touch-pair > a:hover {
  filter: brightness(1.06);
}
@media (max-width: 850px) {
  .ds-authentic-menu {
    width: min(100%, 440px);
  }
  .ds-hero-lcd {
    width: 100%;
  }
  .ds-group {
    height: 290px;
  }
}
@media (max-width: 600px) {
  .ds-start {
    padding-inline: 5%;
    gap: 24px;
  }
  .ds-authentic-menu {
    width: 100%;
    max-width: 390px;
  }
  .ds-start .ds-window-bar {
    font-size: 11px;
    padding: 5px 7px;
  }
  .ds-hero-caption {
    font-size: 19px;
  }
  .ds-chapter-title .gold-star {
    width: 21px;
    height: 21px;
    flex: none;
  }
  .manual-page {
    font-size: 17px;
    padding: 4px 6px;
  }
  .ds-faq summary {
    font-size: 17px;
  }
  .faq-slot {
    min-width: 23px;
    height: 23px;
    font-size: 12px;
  }
}

/* The dark menu uses the same pixels and patterns with an adapted palette. */
:root[data-theme='dark'] {
  --ds-top-grid: url('assets/mario-ds/ui/top-grid-dark.png');
  --ds-bottom-grid: url('assets/mario-ds/ui/bottom-grid-dark.png');
  --ds-clock-grid: url('assets/mario-ds/ui/clock-grid-dark.png');
  --ds-background-grid: url('assets/mario-ds/ui/background-grid-dark.png');
  --ds-menu-gradient: url('assets/mario-ds/ui/menu-gradient-dark.png');
  --ds-status-gradient: url('assets/mario-ds/ui/status-gradient-dark.png');
  --ds-file-lines: url('assets/mario-ds/ui/file-lines-dark.png');
  --ds-console-icon: url('assets/mario-ds/ui/ds-console-dark.png');
  --ds-notes-icon: url('assets/mario-ds/ui/notes-dark.png');
  --ds-gba-cartridge-icon: url('assets/mario-ds/ui/gba-cartridge-dark.png');
  --ds-game-card-icon: url('assets/mario-ds/ui/game-card-dark.png');
  --ds-screen-top-icon: url('assets/mario-ds/ui/top-screen-dark.png');
  --ds-screen-touch-icon: url('assets/mario-ds/ui/touch-screen-dark.png');
  --ds-alarm-icon: url('assets/mario-ds/ui/alarm-dark.png');
  --ds-discord-icon: url('assets/mario-ds/ui/discord-dark.svg');
  --ds-menu-ink: #e0e7eb;
  --ds-menu-edge: #8a9eab;
  --ds-menu-inset: #455460;
}
:root[data-theme='dark'] body[data-game='sm64ds'] {
  background-color: #181c21;
  background-image:
    linear-gradient(#a4b5c010 1px, transparent 1px),
    linear-gradient(90deg, #a4b5c010 1px, transparent 1px);
}
:root[data-theme='dark'] .ds-page {
  background: #20262c;
  color: #dfe7eb;
  box-shadow: 0 0 0 1px #54616c;
}
:root[data-theme='dark'] .pixel-label {
  color: #afcddd;
}
:root[data-theme='dark'] .ds-workshop .ds-window-bar {
  border-color: #6d8998;
}

:root[data-theme='dark'] .ds-hardware-chapter,
:root[data-theme='dark'] .ds-workshop {
  background: #252c33;
  border-color: #657885;
}
:root[data-theme='dark'] .ds-hardware-copy .original-note,
:root[data-theme='dark'] .ds-hardware figcaption {
  color: #a7bac6;
}
:root[data-theme='dark'] .blue-chapter-label,
:root[data-theme='dark'] .ds-hardware-copy h2 span,
:root[data-theme='dark'] .ds-port-percentage strong,
:root[data-theme='dark'] .ds-save-file > p:first-of-type {
  color: #a5c9df;
}
:root[data-theme='dark'] .ds-workshop {
  box-shadow: 3px 4px 0 #111820;
}
:root[data-theme='dark'] .ds-save-file {
  background: #303a44;
  border-color: #7b91a0;
}
:root[data-theme='dark'] .ds-faq {
  background: #252c33;
  border-color: #7b91a0;
  box-shadow: inset 0 0 0 2px #40515d;
}
:root[data-theme='dark'] .ds-faq summary {
  background: #303a44;
}
:root[data-theme='dark'] .ds-faq details + details {
  border-color: #7b91a0;
}
:root[data-theme='dark'] .ds-faq details[open] {
  background: #252f38;
}
:root[data-theme='dark'] .ds-faq details[open] summary {
  background: #394e5e;
}
:root[data-theme='dark'] .faq-slot {
  background: #283946;
  color: #c6dce9;
  border-color: #7995a8;
}
:root[data-theme='dark'] .ds-community {
  background: #303a44;
  border-color: #718795;
}
:root[data-theme='dark'] .ds-outline-button {
  background-color: #303a44;
  box-shadow:
    inset 0 0 0 2px var(--ds-menu-inset),
    2px 3px 0 #172029;
}

/* The complete opening section retains the original DS light palette. */
.ds-start,
.ds-authentic-menu {
  --ds-top-grid: url('assets/mario-ds/ui/top-grid.png');
  --ds-background-grid: url('assets/mario-ds/ui/background-grid.png');
  --ds-bottom-grid: url('assets/mario-ds/ui/bottom-grid.png');
  --ds-clock-grid: url('assets/mario-ds/ui/clock-grid.png');
  --ds-menu-gradient: url('assets/mario-ds/ui/menu-gradient.png');
  --ds-status-gradient: url('assets/mario-ds/ui/status-gradient.png');
  --ds-file-lines: url('assets/mario-ds/ui/file-lines.png');
  --ds-console-icon: url('assets/mario-ds/ui/ds-console.png');
  --ds-notes-icon: url('assets/mario-ds/ui/notes.png');
  --ds-gba-cartridge-icon: url('assets/mario-ds/ui/gba-cartridge.png');
  --ds-game-card-icon: url('assets/mario-ds/ui/game-card.png');
  --ds-screen-top-icon: url('assets/mario-ds/ui/top-screen.png');
  --ds-screen-touch-icon: url('assets/mario-ds/ui/touch-screen.png');
  --ds-alarm-icon: url('assets/mario-ds/ui/alarm.png');
  --ds-menu-ink: #232323;
  --ds-menu-edge: #777;
  --ds-menu-inset: #fff;
}
.ds-file-nav {
  background: #fff;
  color: #2d3337;
  color-scheme: light;
}
:root[data-theme='dark'] .ds-start .pixel-label {
  color: #3c505b;
}

.ds-page,
.ds-page * {
  font-family:
    DS Pixel,
    monospace;
}
