/* 3DS Guide Library — Nintendo 3DS–inspired interface.
   Sections: tokens · base · site chrome · components · pages · ads/consent · console (home) · responsive · motion */

/* ===== Tokens ===== */
:root {
  color-scheme: light;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #e6eaee;
  --bg-stripe: rgba(255, 255, 255, .55);
  --card: #ffffff;
  --card-2: #f2f4f7;
  --line: #d3d9df;
  --bevel: #c1c8cf;
  --ink: #2a2f35;
  --ink-2: #59626c;
  --ink-3: #848d97;
  --link: #0b78ad;
  --btn-top: #ffffff;
  --btn-bot: #e8ecef;
  --title-top: #fbfcfd;
  --title-bot: #e6eaed;
  --cursor: #1ec8f5;
  --cursor-2: #8ae6ff;
  --glow: rgba(30, 200, 245, .42);
  --radius: 16px;
  /* Console shell (Aqua Blue default) */
  --shell: #2ba5d4;
  --shell-hi: #82d7f3;
  --shell-lo: #0f6a92;
  --shell-ink: #ffffff;
}
[data-shell="black"] { --shell: #383d45; --shell-hi: #737a84; --shell-lo: #16181c; --shell-ink: #ffffff; }
[data-shell="red"]   { --shell: #d22633; --shell-hi: #f7767d; --shell-lo: #84111b; --shell-ink: #ffffff; }
[data-shell="pink"]  { --shell: #f0a0bf; --shell-hi: #ffdbe8; --shell-lo: #bd648a; --shell-ink: #5b1d37; }
[data-shell="white"] { --shell: #e4e8ec; --shell-hi: #ffffff; --shell-lo: #a3adb7; --shell-ink: #36404a; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #14171b;
    --bg-stripe: rgba(255, 255, 255, .022);
    --card: #1f2329;
    --card-2: #272c33;
    --line: #333941;
    --bevel: #0b0d10;
    --ink: #e8ecf0;
    --ink-2: #a9b2bc;
    --ink-3: #79838d;
    --link: #62cbf3;
    --btn-top: #2b3038;
    --btn-bot: #23272e;
    --title-top: #2a2f36;
    --title-bot: #21252b;
    --glow: rgba(30, 200, 245, .3);
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image: repeating-linear-gradient(-45deg, var(--bg-stripe) 0 2px, transparent 2px 9px);
}
main { flex: 1; }
a { color: var(--link); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cursor); outline-offset: 2px; }

.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 800; }
.skip-link:focus { top: 12px; }

.container { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 20px 0 32px; }
.container.narrow { width: min(820px, 100% - 32px); }

/* ===== Site chrome ===== */
.sitebar {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--shell-ink);
  background: linear-gradient(180deg, var(--shell-hi) -70%, var(--shell) 45%, var(--shell-lo) 170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 4px 14px -6px rgba(0, 0, 0, .35);
}
.sitebar-inner { width: min(1180px, 100% - 32px); margin: 0 auto; height: 62px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; color: inherit; text-decoration: none; font-size: 1.15rem; font-weight: 900; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; flex: none; padding: 5px; border-radius: 10px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.brand-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sitebar-search {
  display: flex; align-items: center;
  width: min(360px, 38vw); height: 40px;
  padding: 0 4px 0 16px;
  border-radius: 99px;
  background: #fff;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2), 0 1px 0 rgba(255, 255, 255, .35);
}
.sitebar-search:focus-within { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2), 0 0 0 3px var(--cursor); }
.sitebar-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .95rem; color: #2a2f35; outline: none; }
.sitebar-search input::placeholder { color: #8a939c; }
.sitebar-search button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--shell); color: var(--shell-ink); cursor: pointer; }
.sitebar-status { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; opacity: .92; }
.icon-btn, .home-button { display: grid; place-items: center; flex: none; border-radius: 50%; text-decoration: none; }
.icon-btn { width: 40px; height: 40px; color: inherit; background: rgba(255, 255, 255, .18); }
.search-link { display: none; }
.home-button {
  width: 44px; height: 44px;
  color: #59626c;
  background: radial-gradient(circle at 50% 30%, #ffffff, #d6dce1 68%, #b4bcc4);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28), inset 0 1px 0 #fff;
  transition: transform .06s, box-shadow .06s;
}
.home-button .i, .icon-btn .i { width: 20px; height: 20px; }
.home-button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }

.battery { position: relative; display: inline-block; width: 1.9em; height: .95em; padding: .1em; border: .13em solid currentColor; border-radius: .22em; }
.battery::after { content: ""; position: absolute; right: -.32em; top: 25%; width: .18em; height: 50%; border-radius: 0 .1em .1em 0; background: currentColor; }
.battery-level { display: block; width: var(--level, 100%); height: 100%; border-radius: .08em; background: #5ac648; }
.battery.low .battery-level { background: #e5484d; }

.crumbs { width: min(1180px, 100% - 32px); margin: 16px auto 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.crumbs li { display: flex; align-items: center; gap: 6px; color: var(--ink-3); min-width: 0; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin-right: 2px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .6; }
.crumbs a { padding: 3px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink-2); font-weight: 800; text-decoration: none; max-width: 60vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crumbs a:hover { border-color: var(--cursor); }
.crumbs a[aria-current] { background: transparent; border-color: transparent; color: var(--ink); }

.sitefoot {
  margin-top: 36px;
  color: var(--shell-ink);
  background: linear-gradient(180deg, var(--shell) 0%, var(--shell-lo) 260%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.grille { height: 12px; background: radial-gradient(circle, rgba(0, 0, 0, .3) 0 1.5px, transparent 2px) 50% 50% / 11px 11px; opacity: .55; }
.sitefoot-inner { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 14px 0 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; font-size: .9rem; }
.sitefoot-text { margin: 0; }
.shell-picker { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.shell-picker > span { margin-right: 4px; }
.swatch { width: 26px; height: 26px; padding: 0; border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); cursor: pointer; transition: transform .1s; }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--cursor); outline-offset: 2px; }
.swatch-aqua { background: linear-gradient(#82d7f3, #2ba5d4 60%, #0f6a92); }
.swatch-black { background: linear-gradient(#737a84, #383d45 60%, #16181c); }
.swatch-red { background: linear-gradient(#f7767d, #d22633 60%, #84111b); }
.swatch-pink { background: linear-gradient(#ffdbe8, #f0a0bf 60%, #bd648a); }
.swatch-white { background: linear-gradient(#ffffff, #e4e8ec 60%, #a3adb7); }
.sitefoot-links { display: flex; gap: 18px; }
.sitefoot-links a, .linklike { color: inherit; font-weight: 800; }
.linklike { padding: 0; border: 0; background: none; text-decoration: underline; cursor: pointer; }

/* ===== Components ===== */
.window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 3px 0 var(--bevel), 0 12px 26px -16px rgba(0, 0, 0, .3);
}
.window-title {
  display: flex; align-items: center; gap: .55em;
  margin: 0;
  padding: .75rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--title-top), var(--title-bot));
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.window-title .i { color: var(--shell); }
[data-shell="white"] .window-title .i { color: var(--ink-3); }
.count { margin-left: auto; min-width: 1.9em; padding: 1px 8px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-3); font-size: .78rem; font-weight: 900; text-align: center; }
.stack { display: grid; gap: 20px; align-content: start; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips-center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card-2); color: var(--ink-2); font-size: .82rem; font-weight: 800; text-decoration: none; }
a.chip:hover { border-color: var(--cursor); box-shadow: 0 0 0 2px var(--glow); }
.chip-shell { border-color: transparent; background: var(--shell); color: var(--shell-ink); }

.glyph { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; flex: none; border-radius: 50%; background: #3c424a; color: #fff; font-size: .82em; font-weight: 900; line-height: 1; }
.glyph-b { background: #8b939c; }
.key { display: inline-block; padding: 0 .45em; border: 1px solid var(--line); border-radius: .4em; background: var(--card); box-shadow: 0 1px 0 var(--bevel); font-size: .85em; font-weight: 800; line-height: 1.5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px;
  padding: 0 20px 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: linear-gradient(var(--btn-top), var(--btn-bot));
  box-shadow: 0 3px 0 var(--bevel);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.btn:hover { border-color: var(--cursor); box-shadow: 0 3px 0 var(--bevel), 0 0 0 2px var(--glow); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--bevel); }
.btn-primary { border-color: transparent; background: linear-gradient(var(--shell-hi) -50%, var(--shell) 50%, var(--shell-lo) 180%); box-shadow: 0 3px 0 var(--shell-lo); color: var(--shell-ink); }
.btn-primary .glyph { background: rgba(255, 255, 255, .92); color: #2a2f35; }
.btn-primary:hover { box-shadow: 0 3px 0 var(--shell-lo), 0 0 0 3px var(--glow); }
.btn-block { width: 100%; }

/* List buttons — the 3DS settings-menu row */
.list { display: grid; gap: 10px; margin: 0; padding: 14px; list-style: none; }
.list-loose { padding: 0; margin-top: 14px; }
.list-btn {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(var(--btn-top), var(--btn-bot));
  box-shadow: 0 2px 0 var(--bevel);
  color: var(--ink);
  text-decoration: none;
  transition: transform .06s;
}
.list-btn:hover, .list-btn:focus-visible { outline: none; border-color: var(--cursor); animation: cursor-pulse 1.2s ease-in-out infinite; }
.list-btn:active { transform: translateY(2px); }
@keyframes cursor-pulse {
  0%, 100% { box-shadow: 0 2px 0 var(--bevel), 0 0 0 2px var(--cursor), 0 0 10px 1px var(--glow); }
  50% { box-shadow: 0 2px 0 var(--bevel), 0 0 0 2px var(--cursor-2), 0 0 18px 4px var(--glow); }
}
.list-num { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); color: var(--ink-3); font-size: .85rem; font-weight: 900; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.list-btn:hover .list-num { border-color: transparent; background: var(--shell); color: var(--shell-ink); }
.list-text strong { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.3; }
.list-text small { display: block; margin-top: 2px; overflow: hidden; color: var(--ink-2); font-size: .88rem; white-space: nowrap; text-overflow: ellipsis; }
.list-meta, .kind { color: var(--ink-3); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kind { padding: 2px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.kind-game { border-color: transparent; background: var(--shell); color: var(--shell-ink); }
.chev { width: 18px; height: 18px; color: var(--ink-3); }
.list-empty { padding: 10px 6px; color: var(--ink-3); }

/* Game icons — rounded 3DS app icons with gloss */
.gicon {
  position: relative;
  display: inline-grid; place-items: center; flex: none;
  overflow: hidden;
  border-radius: 22%;
  background: linear-gradient(150deg, hsl(var(--hue, 200) 80% 66%), hsl(calc(var(--hue, 200) + 32) 70% 42%));
  color: #fff;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 1px 3px rgba(0, 0, 0, .25);
}
.gicon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 48%); pointer-events: none; }
.gicon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gicon-xs { width: 22px; height: 22px; font-size: 9px; border-radius: 6px; }
.gicon-sm { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }
.gicon-lg { width: 116px; height: 116px; font-size: 42px; border: 4px solid var(--card); border-radius: 28px; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .4); }

/* L / R shoulder buttons */
.lr-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.lr-btn {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px 16px 68px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 14px 14px;
  background: linear-gradient(var(--btn-top), var(--btn-bot));
  box-shadow: 0 3px 0 var(--bevel);
  color: var(--ink);
  text-decoration: none;
  transition: transform .06s;
}
.lr-btn.next { grid-column: 2; padding: 16px 68px 16px 18px; text-align: right; }
.lr-btn:hover, .lr-btn:focus-visible { outline: none; border-color: var(--cursor); animation: cursor-pulse 1.2s ease-in-out infinite; }
.lr-btn:active, .lr-btn.pressed { transform: translateY(3px); }
.lr-key {
  position: absolute; left: 14px; top: 50%;
  width: 40px; height: 28px; margin-top: -14px;
  display: grid; place-items: center;
  border-radius: 16px 6px 6px 6px;
  background: linear-gradient(var(--shell-hi) -40%, var(--shell) 55%, var(--shell-lo) 160%);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  color: var(--shell-ink);
  font-weight: 900;
}
.next .lr-key { left: auto; right: 14px; border-radius: 6px 16px 6px 6px; }
.lr-btn small { color: var(--ink-3); font-size: .74rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.lr-btn strong { font-weight: 800; line-height: 1.3; }

/* ===== Pages ===== */
.lede { margin: 6px 0 12px; color: var(--ink-2); font-size: 1.04rem; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; margin-top: 20px; }
.side-col { position: sticky; top: 82px; display: grid; gap: 18px; }

/* Game */
.hero-art { position: relative; height: 150px; overflow: hidden; background: linear-gradient(135deg, hsl(var(--hue) 75% 62%), hsl(calc(var(--hue) + 40) 68% 36%)); }
.hero-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .22) 0 1.5px, transparent 2px) 0 0 / 18px 18px; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-deco { position: absolute; right: 18px; top: -26px; color: rgba(255, 255, 255, .2); font-size: 170px; font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.hero-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; padding: 0 26px 22px; }
.hero-body .gicon-lg { margin-top: -54px; }
.hero-text { padding-top: 16px; }
.hero-text h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 900; line-height: 1.15; letter-spacing: -.015em; }
.tabs { display: flex; gap: 8px; padding: 0 26px 20px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 7px 8px 7px 15px; border: 1px solid var(--line); border-radius: 99px; background: linear-gradient(var(--btn-top), var(--btn-bot)); box-shadow: 0 2px 0 var(--bevel); color: var(--ink); font-weight: 800; font-size: .92rem; text-decoration: none; }
.tab .count { margin: 0; }
.tab:hover { border-color: var(--cursor); box-shadow: 0 2px 0 var(--bevel), 0 0 0 2px var(--glow); }
.facts { margin: 0; padding: 6px 18px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-3); font-weight: 800; font-size: .88rem; }
.facts dd { margin: 0; font-weight: 800; text-align: right; }
.side-actions { padding: 4px 16px 16px; }

/* Article */
.article-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc-col { position: sticky; top: 82px; display: grid; gap: 18px; max-height: calc(100vh - 100px); overflow: auto; padding-bottom: 4px; }
.toc summary { cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.toc[open] summary::after { transform: rotate(225deg); }
.toc:not([open]) summary { border-bottom: 0; }
.toc ol { margin: 0; padding: 8px; list-style: none; }
.toc a { display: block; padding: 7px 10px; border-left: 3px solid transparent; border-radius: 9px; color: var(--ink-2); font-size: .9rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
.toc li[data-level="3"] a { padding-left: 24px; font-size: .86rem; font-weight: 600; }
.toc a:hover { background: var(--card-2); color: var(--ink); }
.toc a.is-active { border-left-color: var(--shell); background: var(--card-2); color: var(--ink); }
.article-main { min-width: 0; }
.article-head { padding: 22px 28px 20px; }
.article-head h1 { margin: 12px 0 4px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; line-height: 1.12; letter-spacing: -.015em; }
.game-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--card-2); color: var(--ink-2); font-size: .84rem; font-weight: 800; text-decoration: none; }
.game-chip:hover { border-color: var(--cursor); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--ink-3); font-size: .88rem; font-weight: 800; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-main > .window + .window, .article-main > .ad-slot + .window { margin-top: 18px; }

.prose { padding: 10px 32px 32px; font-size: 1.06rem; line-height: 1.78; }
.prose article > * { max-width: 72ch; }
.prose h2 { position: relative; margin: 1.7em 0 .6em; padding: .45em .8em .45em 1.05em; border-radius: 10px; background: linear-gradient(90deg, var(--card-2), transparent); font-size: 1.36rem; font-weight: 900; line-height: 1.3; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 3px; background: var(--shell); }
.prose h3 { display: flex; align-items: center; gap: .55em; margin: 1.5em 0 .4em; font-size: 1.14rem; font-weight: 800; line-height: 1.35; }
.prose h3::before { content: ""; flex: none; width: .5em; height: .5em; border-radius: 50%; background: var(--cursor); box-shadow: 0 0 0 3px var(--glow); }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--shell); font-weight: 900; }
[data-shell="white"] .prose li::marker, [data-shell="white"] .prose h2::before { background: var(--ink-3); color: var(--ink-3); }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { font-weight: 800; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px 14px 20px; border: 1px solid var(--line); border-left: 5px solid var(--cursor); border-radius: 12px; background: var(--card-2); color: var(--ink-2); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code { padding: .12em .4em; border: 1px solid var(--line); border-radius: 6px; background: var(--card-2); font-family: var(--mono); font-size: .88em; }
.prose pre { overflow: auto; padding: 14px 16px; border-radius: 12px; background: #1c2025; color: #e6eaee; line-height: 1.55; }
.prose pre code { padding: 0; border: 0; background: none; color: inherit; }
.prose table { display: block; width: fit-content; max-width: 100%; overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 12px; border-collapse: separate; border-spacing: 0; font-size: .95rem; line-height: 1.5; }
.prose caption { padding: 8px 12px; color: var(--ink-3); font-weight: 800; text-align: left; }
.prose th, .prose td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: linear-gradient(var(--title-top), var(--title-bot)); color: var(--ink-2); font-weight: 900; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: var(--card-2); }
.prose figure { margin: 1.6em 0; }
.prose img { display: block; border: 1px solid var(--line); border-radius: 12px; }
.prose figcaption { margin-top: 8px; color: var(--ink-3); font-size: .88rem; text-align: center; }

/* Search */
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 12px; align-items: end; padding: 18px; }
.field { display: grid; gap: 6px; }
.field-label { color: var(--ink-3); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.input, .select select { width: 100%; height: 46px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .06); }
.input:focus, .select select:focus { outline: none; border-color: var(--cursor); box-shadow: 0 0 0 4px var(--glow); }
.select { position: relative; display: block; }
.select select { padding-right: 38px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); pointer-events: none; }
.result-count { margin: 22px 4px 0; color: var(--ink-2); font-weight: 800; }
.empty-window { margin-top: 18px; padding: 26px 22px; text-align: center; color: var(--ink-2); }
.empty-window p { margin: 0 0 14px; }
.empty-window p:last-child { margin: 0; }

/* Error dialog */
.error-wrap { min-height: 58vh; display: grid; place-items: center; }
.dialog { width: min(520px, 100%); text-align: center; }
.dialog-body { padding: 30px 28px 24px; }
.error-code { margin: 0; color: var(--ink-3); font-family: var(--mono); font-size: .9rem; font-weight: 700; letter-spacing: .06em; }
.error-status { margin: 6px 0 8px; color: var(--shell); font-size: 4.6rem; font-weight: 900; line-height: 1; }
[data-shell="white"] .error-status { color: var(--ink-3); }
.error-message { margin: 0; color: var(--ink-2); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.dialog-actions a { padding: 16px; background: linear-gradient(var(--btn-top), var(--btn-bot)); color: var(--ink); font-weight: 800; text-decoration: none; }
.dialog-actions a + a { border-left: 1px solid var(--line); }
.dialog-actions a:hover { background: var(--card-2); box-shadow: inset 0 0 0 2px var(--cursor); }
.dialog-actions .primary { color: var(--link); }

/* ===== Ads & consent ===== */
.ad-slot { display: none; position: relative; min-height: 250px; margin: 18px auto; padding-top: 22px; overflow: hidden; border: 1px dashed var(--line); border-radius: 12px; background: repeating-linear-gradient(-45deg, rgba(127, 127, 127, .05) 0 6px, transparent 6px 12px); }
.ad-slot::before { content: "Advertisement"; position: absolute; top: 5px; left: 10px; color: var(--ink-3); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.consent-granted .ad-slot { display: block; }
.ad-sidebar { min-height: 600px; margin: 0; }
.page-home .ad-slot { width: min(728px, 100%); margin: 6px auto 0; }
@media (max-width: 767px) { .consent-granted .ad-slot[data-devices="desktop"] { display: none; } }
@media (min-width: 768px) { .consent-granted .ad-slot[data-devices="mobile"] { display: none; } }

.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; justify-content: center; padding: 16px; pointer-events: none; }
.consent[hidden] { display: none; }
.consent-box { width: min(560px, 100%); padding: 18px 20px; pointer-events: auto; box-shadow: 0 3px 0 var(--bevel), 0 18px 40px -10px rgba(0, 0, 0, .45); }
.consent-title { margin: 0 0 4px; font-weight: 900; }
.consent-text { margin: 0 0 14px; color: var(--ink-2); font-size: .92rem; }
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ===== Home: the console =====
   Shell geometry uses em, where 1em = 1mm of a real 3DS (--u).
   Screen UIs use --p = one logical 3DS pixel (400×240 top, 320×240 bottom). */
.page-home { background-image: radial-gradient(ellipse 70% 55% at 50% 36%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), repeating-linear-gradient(-45deg, var(--bg-stripe) 0 2px, transparent 2px 9px); }
@media (prefers-color-scheme: dark) { .page-home { background-image: radial-gradient(ellipse 70% 55% at 50% 36%, rgba(120, 170, 210, .14), rgba(0, 0, 0, 0) 70%), repeating-linear-gradient(-45deg, var(--bg-stripe) 0 2px, transparent 2px 9px); } }
.page-home .sitefoot { margin-top: 28px; }
.home-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 16px 4px; }
.console-tip { margin: 0; color: var(--ink-3); font-size: .86rem; text-align: center; }

.console {
  --u: min(calc((100vw - 32px) / 134), max(5px, calc((100vh - 64px) / 156)), 7px);
  --pt: calc(var(--u) * 77 / 400);
  --pb: calc(var(--u) * 61.5 / 320);
  --depth: 0;
  --mx: 0;
  --bright: 1;
  position: relative;
  width: 134em;
  font-size: var(--u);
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Lid */
.lid {
  position: relative; z-index: 1;
  height: 76em;
  padding: 2.2em;
  border-radius: 9em 9em 3.5em 3.5em;
  background: linear-gradient(170deg, var(--shell-hi) -25%, var(--shell) 30%, var(--shell) 62%, var(--shell-lo) 125%);
  box-shadow: inset 0 .45em 0 rgba(255, 255, 255, .35), inset 0 -.7em 0 rgba(0, 0, 0, .18), 0 1em 2.5em -.5em rgba(0, 0, 0, .35);
}
.lid-face {
  position: relative; height: 100%;
  border-radius: 7em 7em 2em 2em;
  background: radial-gradient(130% 100% at 25% -10%, #43474f, #1a1c20 50%, #0c0d0f);
  box-shadow: inset 0 0 0 .2em rgba(255, 255, 255, .05), inset 0 .5em 1em rgba(255, 255, 255, .07);
}
.camera { position: absolute; left: 50%; top: 4.4em; width: 2.4em; height: 2.4em; margin-left: -1.2em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #5d7fa3 0 14%, #111820 34%, #000 70%); box-shadow: 0 0 0 .35em #08090b, 0 0 0 .5em rgba(255, 255, 255, .07); }
.speaker { position: absolute; top: 30.5em; width: 7em; height: 8.75em; background: radial-gradient(circle, #000 0 .42em, rgba(255, 255, 255, .07) .48em, transparent .58em) 0 0 / 1.75em 1.75em; }
.speaker-l { left: 9.6em; }
.speaker-r { right: 9.6em; }

/* Screens (shared) */
.screen { position: absolute; overflow: hidden; border-radius: .5em; background: #000; }
.screen::before { content: ""; position: absolute; inset: 0; z-index: 5; background: linear-gradient(115deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 36%); pointer-events: none; }
.screen::after { content: ""; position: absolute; inset: 0; z-index: 6; background: #000; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.console.asleep .screen::after { opacity: 1; }
.console.launching .screen::after { background: #fff; opacity: 1; }
.console.home-flash .screen::after { background: #fff; animation: flash .45s ease; }
@keyframes flash { 40% { opacity: .75; } }
.screen-top { left: 50%; top: 12em; width: 77em; height: 46.2em; margin-left: -38.5em; box-shadow: 0 0 0 .6em #050506, 0 0 0 .75em rgba(255, 255, 255, .07); }

/* 3D depth slider */
.depth { position: absolute; left: 106.4em; top: 10.2em; width: 6em; height: 26em; }
.depth-label { position: absolute; left: 0; top: 0; color: #8a9099; font-size: 2.1em; font-weight: 900; }
.led-3d { position: absolute; left: 4.4em; top: .45em; width: 1.3em; height: 1.3em; border-radius: 50%; background: #2a2d31; box-shadow: inset 0 0 0 .15em rgba(0, 0, 0, .6); transition: background .2s, box-shadow .2s; }
.depth.on .led-3d { background: #86ff5c; box-shadow: 0 0 .9em #86ff5c; }
.depth-track { position: absolute; left: .6em; top: 4em; width: 2.6em; height: 20em; border-radius: 1.3em; background: #040506; box-shadow: inset 0 .3em .5em rgba(0, 0, 0, .8), 0 0 0 .15em rgba(255, 255, 255, .07); cursor: ns-resize; touch-action: none; }
.depth-track:focus-visible { outline: .4em solid var(--cursor); outline-offset: .3em; }
.depth-knob { position: absolute; left: -.45em; top: calc((1 - var(--depth)) * 16em); width: 3.5em; height: 4em; border-radius: 1em; background: linear-gradient(90deg, #a9b0b8, #f1f3f5 45%, #949ba3); box-shadow: 0 .3em .5em rgba(0, 0, 0, .6); }

/* Hinge and shoulders */
.hinge {
  position: relative; z-index: 2;
  height: 6.5em;
  margin: -1em 14em 0;
  border-radius: 3.25em;
  background: linear-gradient(180deg, var(--shell-lo), var(--shell) 22%, var(--shell-hi) 50%, var(--shell) 78%, var(--shell-lo));
  box-shadow: 0 .6em 1em -.2em rgba(0, 0, 0, .35);
}
.hinge::before, .hinge::after { content: ""; position: absolute; top: 0; bottom: 0; width: .35em; background: rgba(0, 0, 0, .2); }
.hinge::before { left: 16%; }
.hinge::after { right: 16%; }
.led-notify { position: absolute; right: 5em; top: 50%; width: 1.6em; height: 1.6em; margin-top: -.8em; border-radius: 50%; background: #3b3f44; box-shadow: inset 0 0 0 .2em rgba(0, 0, 0, .35); }
.led-notify.blink { animation: notify .9s ease; }
@keyframes notify { 30%, 60% { background: #3fd8ff; box-shadow: 0 0 1.2em #3fd8ff; } }
.shoulder {
  position: absolute; z-index: 0; top: 75em;
  width: 20em; height: 8em;
  padding-top: 1.4em;
  background: linear-gradient(180deg, var(--shell-hi) -60%, var(--shell-lo) 120%);
  color: var(--shell-ink);
  cursor: pointer;
  transition: transform .06s;
}
.shoulder span { display: block; font-size: 2.2em; font-weight: 900; opacity: .75; }
.shoulder-l { left: 1em; border-radius: 6em 1.5em 0 0; padding-left: 5em; }
.shoulder-r { right: 1em; border-radius: 1.5em 6em 0 0; padding-right: 5em; text-align: right; }
.shoulder:active, .shoulder.pressed { transform: translateY(.5em); }

/* Base */
.base {
  position: relative; z-index: 1;
  height: 76em;
  margin-top: -1.5em;
  border-radius: 3em 3em 10em 10em;
  background: linear-gradient(180deg, var(--shell-hi) -45%, var(--shell) 22%, var(--shell) 70%, var(--shell-lo) 145%);
  box-shadow: inset 0 .5em 0 rgba(255, 255, 255, .3), inset 0 -.9em 0 rgba(0, 0, 0, .2), 0 1.5em 3em -.5em rgba(0, 0, 0, .4);
}
.screen-bottom { left: 50%; top: 7em; width: 61.5em; height: 46.125em; margin-left: -30.75em; box-shadow: 0 0 0 2.6em #131417, 0 0 0 2.85em rgba(0, 0, 0, .2), 0 .3em 0 2.85em rgba(255, 255, 255, .16); }

/* Circle Pad */
.cpad { position: absolute; left: 9em; top: 12em; width: 20em; height: 20em; border-radius: 50%; background: radial-gradient(circle, rgba(0, 0, 0, .28), rgba(0, 0, 0, .12) 68%, transparent 71%); box-shadow: inset 0 1em 1.5em rgba(0, 0, 0, .3); cursor: grab; touch-action: none; }
.cpad-knob { position: absolute; inset: 2.75em; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .06) 0 .5em, rgba(0, 0, 0, .06) .5em 1em), radial-gradient(circle at 50% 35%, #8b9097, #5a5f66 60%, #3c4046); box-shadow: 0 .8em 1em rgba(0, 0, 0, .4), inset 0 .3em 0 rgba(255, 255, 255, .28); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }

/* D-Pad */
.dpad { position: absolute; left: 10.5em; top: 41.5em; width: 17em; height: 17em; }
.dpad::before { content: ""; position: absolute; inset: -10%; border-radius: 50%; background: rgba(0, 0, 0, .1); box-shadow: inset 0 .5em 1em rgba(0, 0, 0, .25); }
.dpad-cross { position: absolute; inset: 0; transition: transform .06s; }
.dpad-cross::before, .dpad-cross::after { content: ""; position: absolute; border-radius: 12%; background: linear-gradient(145deg, #4a4e55, #26292e); box-shadow: 0 .5em 0 #121316, 0 .8em 1em rgba(0, 0, 0, .35); }
.dpad-cross::before { left: 33.5%; width: 33%; top: 0; height: 100%; }
.dpad-cross::after { top: 33.5%; height: 33%; left: 0; width: 100%; }
.dpad[data-press="up"] .dpad-cross { transform: perspective(30em) rotateX(12deg); }
.dpad[data-press="down"] .dpad-cross { transform: perspective(30em) rotateX(-12deg); }
.dpad[data-press="left"] .dpad-cross { transform: perspective(30em) rotateY(-12deg); }
.dpad[data-press="right"] .dpad-cross { transform: perspective(30em) rotateY(12deg); }
.dpad-hit { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; }
.dpad-hit.up { left: 25%; top: -10%; width: 50%; height: 45%; }
.dpad-hit.down { left: 25%; bottom: -10%; width: 50%; height: 45%; }
.dpad-hit.left { top: 25%; left: -10%; width: 45%; height: 50%; }
.dpad-hit.right { top: 25%; right: -10%; width: 45%; height: 50%; }

/* A B X Y */
.abxy { position: absolute; left: 104em; top: 13em; width: 22em; height: 22em; }
.face-btn {
  position: absolute; width: 32%; height: 32%;
  padding: 0; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ffffff, #dadfe4 55%, #aeb6be);
  box-shadow: 0 .45em 0 #79828c, 0 .75em .9em rgba(0, 0, 0, .35), inset 0 -.2em .3em rgba(0, 0, 0, .12);
  color: #69727c;
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.face-btn span { font-size: 3.2em; font-weight: 900; }
.face-btn:active, .face-btn.pressed { transform: translateY(.4em); box-shadow: 0 .05em 0 #79828c, 0 .2em .3em rgba(0, 0, 0, .3); }
.btn-x { left: 34%; top: 0; }
.btn-y { left: 0; top: 34%; }
.btn-a { left: 68%; top: 34%; }
.btn-b { left: 34%; top: 68%; }
[data-shell="black"] .face-btn { background: radial-gradient(circle at 40% 30%, #6c727b, #3b4047 58%, #212428); color: #c9ced4; box-shadow: 0 .45em 0 #0b0c0e, 0 .75em .9em rgba(0, 0, 0, .4); }

/* SELECT / HOME / START */
.sysbar { position: absolute; left: 43em; top: 59.5em; width: 48em; height: 5em; display: flex; overflow: hidden; border-radius: 2.5em; background: linear-gradient(#f3f5f7, #b7bec5); box-shadow: 0 .4em 0 rgba(0, 0, 0, .25), inset 0 .15em 0 rgba(255, 255, 255, .8); }
.sys-btn { flex: 1; display: grid; place-items: center; padding: 0; border: 0; border-right: .15em solid rgba(0, 0, 0, .12); background: transparent; color: #5b646e; cursor: pointer; }
.sys-btn:last-child { border-right: 0; }
.sys-btn span { font-size: 1.65em; font-weight: 900; letter-spacing: .06em; }
.sys-home .i { width: 2.9em; height: 2.9em; stroke-width: 2.4; }
.sys-btn:active, .sys-btn.pressed { background: rgba(0, 0, 0, .08); box-shadow: inset 0 .3em .5em rgba(0, 0, 0, .2); }

.power { position: absolute; left: 113.2em; top: 47.5em; width: 5.6em; height: 5.6em; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle at 45% 35%, #f6f7f8, #c3cad1 70%, #9aa3ac); box-shadow: 0 .35em 0 rgba(0, 0, 0, .3), inset 0 .1em 0 #fff; color: #5b646e; cursor: pointer; }
.power .i { width: 3em; height: 3em; stroke-width: 2.6; }
.power:active, .power.pressed { transform: translateY(.3em); box-shadow: 0 .05em 0 rgba(0, 0, 0, .3); }
.mic { position: absolute; left: 95em; top: 61.5em; width: 1em; height: 1em; border-radius: 50%; background: rgba(0, 0, 0, .45); }
.led { position: absolute; width: 1.3em; height: 1.3em; border-radius: 50%; background: #3a3e44; box-shadow: inset 0 0 0 .2em rgba(0, 0, 0, .3); }
.led-power { left: 9em; top: 69em; background: #52b8ff; box-shadow: 0 0 1em #52b8ff; }
.led-charge { left: 12.2em; top: 69em; }
.led-wifi { right: 9em; top: 69em; background: #ffb534; box-shadow: 0 0 .9em #ffb534; }
.console.asleep .led-power { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .2; box-shadow: none; } }

/* ----- Screen UI (shared) ----- */
.ui { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; color: #39414a; font-family: var(--font); line-height: 1.25; filter: brightness(var(--bright)); }
.ui a { color: inherit; }
.ui .glyph { width: 1.45em; height: 1.45em; }
.ui .key { border-color: #c8cfd6; background: #fff; box-shadow: 0 1px 0 #b4bcc4; color: #3a424b; }

/* ----- Top screen ----- */
.ui-top {
  --p: var(--pt);
  --par: calc(var(--mx) * var(--depth) * 5 * var(--p));
  font-size: calc(12 * var(--p));
  background: radial-gradient(120% 90% at 50% 0%, #ffffff, #eaeef2 70%, #dce1e6);
}
.ui-top::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(120, 135, 150, .07) 0 calc(1 * var(--p)), transparent 0 calc(6 * var(--p))); pointer-events: none; }
.statusbar { position: relative; z-index: 2; flex: none; height: calc(18 * var(--p)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(7 * var(--p)); border-bottom: 1px solid rgba(0, 0, 0, .07); background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .6)); color: #69727c; font-size: calc(10 * var(--p)); font-weight: 800; font-variant-numeric: tabular-nums; }
.statusbar .i { width: calc(12 * var(--p)); height: calc(12 * var(--p)); stroke-width: 2.6; }
.sb-left, .sb-right { display: flex; align-items: center; gap: calc(6 * var(--p)); }
.sb-signal { display: flex; align-items: flex-end; gap: calc(1.5 * var(--p)); height: calc(9 * var(--p)); }
.sb-signal i { width: calc(2.5 * var(--p)); border-radius: 1px; background: #5ac648; }
.sb-signal i:nth-child(1) { height: 40%; }
.sb-signal i:nth-child(2) { height: 70%; }
.sb-signal i:nth-child(3) { height: 100%; }
.stage { position: relative; z-index: 1; flex: 1; min-height: 0; }
.panel { position: absolute; inset: calc(9 * var(--p)) calc(13 * var(--p)); display: flex; flex-direction: column; animation: panel-in .28s ease; }
.panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(calc(6 * var(--p))); } }

.tag { align-self: flex-start; display: inline-flex; align-items: center; gap: .45em; padding: calc(2.5 * var(--p)) calc(8 * var(--p)); border-radius: 99px; background: var(--shell); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: var(--shell-ink); font-size: calc(8.5 * var(--p)); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tag .i { width: 1.25em; height: 1.25em; }
.welcome-title, .banner-title, .panel-help h2 {
  text-shadow: calc(var(--depth) * -1.6 * var(--p)) 0 rgba(255, 40, 90, .38), calc(var(--depth) * 1.6 * var(--p)) 0 rgba(0, 190, 255, .38);
}
.welcome-title { margin: calc(6 * var(--p)) 0 calc(3 * var(--p)); color: #252a30; font-size: calc(23 * var(--p)); font-weight: 900; line-height: 1.05; letter-spacing: -.01em; transform: translateX(calc(var(--par) * 1.5)); }
.welcome-desc { display: -webkit-box; margin: 0; overflow: hidden; color: #5e6771; font-size: calc(10.5 * var(--p)); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.recent { margin-top: auto; padding: calc(5 * var(--p)) calc(8 * var(--p)) calc(3 * var(--p)); border: 1px solid rgba(0, 0, 0, .08); border-radius: calc(8 * var(--p)); background: rgba(255, 255, 255, .88); box-shadow: 0 calc(1.5 * var(--p)) 0 rgba(0, 0, 0, .06); transform: translateX(calc(var(--par) * -1)); }
.recent h2 { margin: 0 0 calc(2 * var(--p)); color: #8a939c; font-size: calc(8 * var(--p)); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.recent ol { margin: 0; padding: 0; list-style: none; }
.recent a { display: flex; align-items: baseline; gap: calc(6 * var(--p)); padding: calc(3 * var(--p)) 0; border-top: 1px dashed rgba(0, 0, 0, .09); font-size: calc(10 * var(--p)); text-decoration: none; }
.recent li:first-child a { border-top: 0; }
.r-title { flex: 0 1 auto; overflow: hidden; color: #2d343b; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.r-game { flex: 1 1 0; min-width: 0; overflow: hidden; color: #8a939c; font-size: calc(8.5 * var(--p)); white-space: nowrap; text-overflow: ellipsis; }
.recent time { color: #8a939c; font-size: calc(8.5 * var(--p)); font-variant-numeric: tabular-nums; }
.recent a:hover .r-title { color: #0b78ad; text-decoration: underline; }
.empty-note { margin: auto 0 0; color: #6b747d; font-weight: 800; }
.screen-hint { display: flex; align-items: center; justify-content: center; gap: .5em; margin: calc(6 * var(--p)) 0 0; color: #8a939c; font-size: calc(8.5 * var(--p)); font-weight: 800; }
.hint-arrow { display: inline-block; font-size: .8em; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(calc(2 * var(--p))); } }

.panel-game { gap: calc(6 * var(--p)); }
.banner { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: calc(10 * var(--p)); background: linear-gradient(135deg, hsl(var(--hue, 200) 72% 62%), hsl(calc(var(--hue, 200) + 40) 66% 38%)); box-shadow: 0 calc(2 * var(--p)) calc(6 * var(--p)) rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(255, 255, 255, .3); }
.banner::before { content: ""; position: absolute; inset: calc(-10 * var(--p)); background: radial-gradient(circle, rgba(255, 255, 255, .28) 0 calc(1.2 * var(--p)), transparent calc(1.6 * var(--p))) 0 0 / calc(14 * var(--p)) calc(14 * var(--p)); transform: translateX(calc(var(--par) * -2)); }
.banner-art { position: absolute; inset: calc(-10 * var(--p)); transform: translateX(calc(var(--par) * -1)); }
.banner-art img { width: 100%; height: 100%; object-fit: cover; }
.banner-deco { position: absolute; right: calc(8 * var(--p)); top: calc(-14 * var(--p)); color: rgba(255, 255, 255, .2); font-size: calc(100 * var(--p)); font-weight: 900; letter-spacing: -.05em; line-height: 1; transform: translateX(calc(var(--par) * -.5)); }
.banner-card { position: absolute; left: calc(8 * var(--p)); right: calc(8 * var(--p)); bottom: calc(8 * var(--p)); display: flex; align-items: center; gap: calc(8 * var(--p)); padding: calc(6 * var(--p)); border-radius: calc(8 * var(--p)); background: rgba(255, 255, 255, .95); box-shadow: 0 calc(2 * var(--p)) calc(6 * var(--p)) rgba(0, 0, 0, .2); transform: translateX(calc(var(--par) * 1.5)); }
.banner-icon .gicon { width: calc(42 * var(--p)); height: calc(42 * var(--p)); font-size: calc(15 * var(--p)); border-radius: calc(9 * var(--p)); }
.banner-text { min-width: 0; }
.banner-title { display: -webkit-box; margin: 0; overflow: hidden; color: #252a30; font-size: calc(13.5 * var(--p)); font-weight: 900; line-height: 1.15; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.banner-summary { display: -webkit-box; margin: calc(2 * var(--p)) 0 0; overflow: hidden; color: #5e6771; font-size: calc(9 * var(--p)); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.panel-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: calc(6 * var(--p)); }
.meta-chips { display: flex; gap: calc(4 * var(--p)); min-width: 0; margin: 0; padding: 0; overflow: hidden; list-style: none; }
.meta-chips li { flex: none; padding: calc(2 * var(--p)) calc(6 * var(--p)); border: 1px solid rgba(0, 0, 0, .1); border-radius: 99px; background: #fff; color: #5e6771; font-size: calc(8.5 * var(--p)); font-weight: 800; white-space: nowrap; }
.meta-chips li.strong { border-color: transparent; background: var(--shell); color: var(--shell-ink); }
.screen-actions { display: flex; flex: none; gap: calc(5 * var(--p)); }
.screen-btn { display: inline-flex; align-items: center; gap: calc(4 * var(--p)); padding: calc(3 * var(--p)) calc(9 * var(--p)) calc(3 * var(--p)) calc(3 * var(--p)); border: 1px solid #c5ccd3; border-radius: 99px; background: linear-gradient(#fff, #e7ebee); box-shadow: 0 calc(1.5 * var(--p)) 0 #b3bbc3; color: #3a424b; font-size: calc(9.5 * var(--p)); font-weight: 900; text-decoration: none; cursor: pointer; }
.ui .screen-btn { color: #3a424b; }
.screen-btn:hover { border-color: var(--cursor); }
.screen-btn:active { transform: translateY(calc(1.5 * var(--p))); box-shadow: none; }

.panel-help h2 { margin: 0 0 calc(7 * var(--p)); color: #252a30; font-size: calc(14 * var(--p)); font-weight: 900; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: calc(5 * var(--p)) calc(12 * var(--p)); margin: 0; font-size: calc(9.5 * var(--p)); }
.controls div { display: flex; align-items: center; gap: calc(6 * var(--p)); }
.controls dt { display: flex; flex: none; gap: calc(3 * var(--p)); align-items: center; min-width: calc(62 * var(--p)); }
.controls dd { margin: 0; color: #5e6771; font-weight: 700; }

/* ----- Bottom (touch) screen ----- */
.ui-bottom { --p: var(--pb); font-size: calc(11 * var(--p)); background: linear-gradient(180deg, #f6f7f9, #e1e5e9); }
.applets { position: relative; z-index: 1; flex: none; height: calc(30 * var(--p)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(7 * var(--p)); border-bottom: 1px solid #cfd5db; background: linear-gradient(#ffffff, #eceff2); }
.applet-group { display: flex; gap: calc(7 * var(--p)); }
.applet { width: calc(23 * var(--p)); height: calc(23 * var(--p)); display: grid; place-items: center; padding: 0; border: 1px solid #c6cdd4; border-radius: 50%; background: linear-gradient(#fff, #e1e6ea); box-shadow: 0 calc(1.5 * var(--p)) 0 #b4bcc4; color: #56606a; text-decoration: none; cursor: pointer; }
.ui .applet { color: #56606a; }
.applet .i { width: calc(13 * var(--p)); height: calc(13 * var(--p)); stroke-width: 2.3; }
.applet:hover, .applet:focus-visible { outline: none; box-shadow: 0 calc(1.5 * var(--p)) 0 #b4bcc4, 0 0 0 calc(2 * var(--p)) var(--cursor); }
.applet:active { transform: translateY(calc(1.5 * var(--p))); box-shadow: 0 0 0 calc(2 * var(--p)) var(--cursor); }
.applet:disabled { opacity: .4; cursor: default; box-shadow: 0 calc(1.5 * var(--p)) 0 #b4bcc4; }

.grid {
  --rows: 3;
  --cell: calc(188 * var(--p) / var(--rows));
  position: relative;
  flex: 1; min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows), var(--cell));
  grid-auto-columns: var(--cell);
  padding: 0 calc(var(--cell) * .15);
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.grid::-webkit-scrollbar { display: none; }
.slot { display: grid; place-items: center; width: var(--cell); height: var(--cell); outline: none; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.slot .gicon, .slot.empty::before { width: calc(var(--cell) * .8); height: calc(var(--cell) * .8); border-radius: calc(var(--cell) * .17); }
.slot .gicon { font-size: calc(var(--cell) * .28); transition: transform .15s ease; }
.slot.empty::before { content: ""; background: rgba(110, 125, 140, .08); box-shadow: inset 0 0 0 1px rgba(110, 125, 140, .13); }
.tile:hover .gicon { transform: scale(1.05); }
.tile.is-selected .gicon, .tile:focus-visible .gicon { transform: scale(1.08); animation: tile-glow 1.1s ease-in-out infinite; }
.tile.bump .gicon { animation: bump .25s ease; }
@keyframes tile-glow {
  0%, 100% { box-shadow: 0 0 0 calc(2 * var(--p)) #fff, 0 0 0 calc(4 * var(--p)) var(--cursor), 0 0 calc(8 * var(--p)) calc(3 * var(--p)) var(--glow); }
  50% { box-shadow: 0 0 0 calc(2 * var(--p)) #fff, 0 0 0 calc(4 * var(--p)) var(--cursor-2), 0 0 calc(16 * var(--p)) calc(6 * var(--p)) var(--glow); }
}
@keyframes bump { 30% { transform: scale(1.08) translateX(calc(-3 * var(--p))); } 70% { transform: scale(1.08) translateX(calc(3 * var(--p))); } }

.bottombar { flex: none; height: calc(22 * var(--p)); display: flex; align-items: center; gap: calc(7 * var(--p)); padding: 0 calc(7 * var(--p)); border-top: 1px solid #cfd5db; background: linear-gradient(#eef1f3, #dde2e6); }
.zoom { display: flex; gap: calc(3 * var(--p)); }
.zoom button { width: calc(20 * var(--p)); height: calc(15 * var(--p)); display: grid; place-items: center; padding: 0; border: 1px solid #c6cdd4; border-radius: calc(5 * var(--p)); background: linear-gradient(#fff, #e1e6ea); box-shadow: 0 1px 0 #b4bcc4; color: #56606a; font-size: calc(12 * var(--p)); font-weight: 900; line-height: 1; cursor: pointer; }
.zoom button:active { transform: translateY(1px); box-shadow: none; }
.scrollbar { position: relative; flex: 1; height: calc(8 * var(--p)); border-radius: 99px; background: rgba(0, 0, 0, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15); cursor: pointer; touch-action: none; }
.scrollthumb { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border: 1px solid #a9b2ba; border-radius: 99px; background: linear-gradient(#ffffff, #c9d0d6); }
.toast { position: absolute; left: 50%; top: 46%; z-index: 4; padding: calc(5 * var(--p)) calc(12 * var(--p)); border-radius: 99px; background: rgba(38, 43, 50, .9); color: #fff; font-size: calc(10.5 * var(--p)); font-weight: 800; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, -50%); transition: opacity .2s; }
.toast.show { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .layout-2, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .side-col, .toc-col { position: static; max-height: none; overflow: visible; }
  .ad-sidebar { min-height: 250px; }
}
@media (max-width: 640px) {
  .sitebar-inner { height: 56px; gap: 10px; }
  .sitebar-search, .sitebar-status { display: none; }
  .search-link { display: grid; }
  .brand { font-size: 1.05rem; }
  .hero-art { height: 110px; }
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 18px 18px; }
  .hero-body .gicon-lg { width: 92px; height: 92px; margin-top: -46px; font-size: 34px; border-radius: 24px; }
  .tabs { padding: 0 18px 18px; }
  .list { padding: 10px; }
  .list-btn { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 11px 12px; }
  .list-meta, .kind { display: none; }
  .article-head { padding: 18px 18px 16px; }
  .prose { padding: 6px 18px 22px; font-size: 1.02rem; }
  .prose h2 { font-size: 1.22rem; }
  .lr-nav { grid-template-columns: minmax(0, 1fr); }
  .lr-btn.next { grid-column: auto; }
  .search-form { grid-template-columns: minmax(0, 1fr); }
  .sitefoot-inner { flex-direction: column; align-items: flex-start; }
}

/* Phone console: bigger screens, controls in a row below the Touch Screen. */
@media (max-width: 600px) {
  .home-wrap { padding: 14px 8px 4px; }
  .console { --u: calc((100vw - 16px) / 134); --pt: calc(var(--u) * 124 / 340); --pb: calc(var(--u) * 124 / 320); }
  .lid { height: 90em; border-radius: 7em 7em 3em 3em; }
  .lid-face { border-radius: 5em 5em 1.5em 1.5em; }
  .camera { top: 1.3em; width: 1.8em; height: 1.8em; margin-left: -.9em; }
  .speaker, .depth, .cpad, .power, .mic { display: none; }
  .screen-top { top: 4.4em; width: 124em; height: 80em; margin-left: -62em; }
  .hinge { margin: -1em 22em 0; }
  .shoulder { top: 89em; width: 22em; }
  .base { height: 146em; border-radius: 3em 3em 9em 9em; }
  .screen-bottom { top: 6em; width: 124em; height: 93em; margin-left: -62em; box-shadow: 0 0 0 1.6em #131417, 0 0 0 1.8em rgba(0, 0, 0, .2); }
  .dpad { left: 8em; top: 111em; width: 22em; height: 22em; }
  .abxy { left: 99em; top: 106em; width: 30em; height: 30em; }
  .face-btn span { font-size: 4em; }
  .sysbar { left: 41em; top: 116em; width: 52em; height: 7em; border-radius: 3.5em; }
  .sys-btn span { font-size: 2.1em; }
  .sys-home .i { width: 3.6em; height: 3.6em; }
  .led-power, .led-charge, .led-wifi { top: 140em; }
  .console-tip { display: none; }
}

/* ===== Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Corrections and contact */
.feedback-panel { padding: clamp(20px, 4vw, 36px); }
.feedback-panel h1 { margin-top: 0; }
.feedback-form { display: grid; gap: 20px; margin-top: 24px; }
.feedback-form textarea { min-height: 180px; resize: vertical; font: inherit; }
.feedback-form .btn { justify-self: start; }
.feedback-form p { margin: 0; font-size: .9rem; }
.feedback-notice { padding: 16px; border: 1px solid currentColor; border-radius: 8px; }
.article-feedback { padding: 20px; margin-top: 20px; }

/* Open Video embeds (pzfans.com) inside articles */
.ov-embed { margin: 1.5rem 0; }
.ov-embed iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0;
  border-radius: var(--radius); background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--bevel);
}
.ov-embed figcaption { margin-top: .5rem; font-size: .9rem; color: var(--ink); opacity: .8; }
