/* ------------------------------------------
   GLOBAL PALETTE (slightly tweaked)
------------------------------------------- */
:root {
  --bg-top: #fdfdff;
  --bg-bottom: #e1f1ff;
  --bg: #e1f1ff;

  --card: #f7fbff;
  --card-hover: #ffffff;

  --text: #11141f;
  --muted: #4b5b78;

  --accent-start: #00b7ff;
  --accent-end: #00e0c6;
  --accent-soft: rgba(0, 183, 255, 0.18);

  --ring: rgba(0, 183, 255, 0.45);
  --radius: 20px;
  --shadow: 0 16px 32px rgba(10, 33, 70, 0.2);
  --border-soft: rgba(220, 235, 255, 0.98);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #050910;
    --bg-bottom: #05070f;
    --bg: #050910;

    --card: rgba(10, 17, 28, 0.96);
    --card-hover: rgba(16, 24, 38, 0.98);

    --text: #f7f8ff;
    --muted: #b5c1dd;

    --border-soft: rgba(129, 148, 188, 0.9);
    --shadow: 0 20px 42px rgba(0, 0, 0, 0.9);
    --accent-soft: rgba(0, 183, 255, 0.35);
  }
}

/* Smooth eShop background, no mid-screen cutoff */
body.theme-eshop {
  --accent-start: #ff9c2f;
  --accent-end: #ffb94a;
  --accent-soft: rgba(255, 156, 47, 0.22);

  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,0.96), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(255,255,255,0.90), transparent 55%),
    linear-gradient(180deg, #fdfdff 0%, #eef5ff 45%, #f9fcff 100%);
  background-attachment: fixed;
}



html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);

  /* Wii U / 3DS-ish sky background */
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.96), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(160, 235, 255, 0.35), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(0, 183, 255, 0.25), transparent 60%),
    linear-gradient(180deg, #fdfdff, var(--bg-bottom));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ------------------------------------------
   FLOATING BUBBLES (HOME-menu style)
------------------------------------------- */
.bg-floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  perspective: 1400px;
}

/* uses --floater-bg so variants can override */
.bg-floaters .floater {
  position: absolute;
  border-radius: 24px;

  background: var(
    --floater-bg,
    radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), transparent 60%),
    radial-gradient(circle at 82% 92%, rgba(220,240,255,0.5), transparent 70%),
    linear-gradient(135deg, #00b7ff, #00e0c6)
  );

  background-size: 140% 140%;

  box-shadow:
    0 14px 34px rgba(0, 40, 80, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 2px 6px rgba(255,255,255,0.95),
    inset 0 -3px 7px rgba(0,150,230,0.28);

  opacity: 0.35;
  filter: blur(0.4px);

  animation:
    floatY var(--float-speed, 18s) ease-in-out infinite alternate,
    driftX var(--drift-speed, 32s) ease-in-out infinite alternate,
    softRotate var(--rotate-speed, 28s) ease-in-out infinite alternate,
    softShimmer 22s ease-in-out infinite;

  transform-style: preserve-3d;
}

/* glossy streak */
.bg-floaters .floater::after {
  content: "";
  position: absolute;
  inset: 10% 12%;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.9),
      rgba(255,255,255,0.35) 35%,
      transparent 70%
    );
  opacity: 0.9;
  pointer-events: none;
}

/* COLOR VARIANTS – Joy-Con / 3DS inspired */
.floater-mii-blue {
  --floater-bg:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), transparent 60%),
    radial-gradient(circle at 82% 92%, rgba(190,235,255,0.55), transparent 70%),
    linear-gradient(135deg, #00c6ff, #00e0c6);
}

.floater-mii-green {
  --floater-bg:
    radial-gradient(circle at 26% 20%, rgba(255,255,255,0.98), transparent 60%),
    radial-gradient(circle at 80% 92%, rgba(210,255,225,0.6), transparent 70%),
    linear-gradient(135deg, #1ed880, #0abf47);
}

.floater-mii-orange {
  --floater-bg:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.98), transparent 60%),
    radial-gradient(circle at 82% 90%, rgba(255,240,210,0.6), transparent 70%),
    linear-gradient(135deg, #ffc947, #ff8b35);
}

.floater-mii-pink {
  --floater-bg:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.98), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(255,215,240,0.6), transparent 70%),
    linear-gradient(135deg, #ff7bc1, #ff4fa3);
}

/* legacy aliases */
.floater-blue-wii  {
  --floater-bg: radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), transparent 60%),
                 radial-gradient(circle at 82% 92%, rgba(190,235,255,0.55), transparent 70%),
                 linear-gradient(135deg, #00c6ff, #00e0c6);
}
.floater-green     {
  --floater-bg: radial-gradient(circle at 26% 20%, rgba(255,255,255,0.98), transparent 60%),
                 radial-gradient(circle at 80% 92%, rgba(210,255,225,0.6), transparent 70%),
                 linear-gradient(135deg, #1ed880, #0abf47);
}
.floater-pink      {
  --floater-bg: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.98), transparent 60%),
                 radial-gradient(circle at 80% 90%, rgba(255,215,240,0.6), transparent 70%),
                 linear-gradient(135deg, #ff7bc1, #ff4fa3);
}

/* positions */
.floater-1 { width:120px; height:80px; top:12%; left:4%;  --float-speed:18s; --drift-speed:36s; --rotate-speed:30s; }
.floater-2 { width:80px;  height:80px; top:22%; right:6%; --float-speed:22s; --drift-speed:32s; --rotate-speed:27s; border-radius:999px; }
.floater-3 { width:140px; height:90px; bottom:14%; left:12%; --float-speed:20s; --drift-speed:40s; --rotate-speed:34s; }
.floater-4 { width:90px;  height:60px; bottom:8%; right:14%; --float-speed:24s; --drift-speed:34s; --rotate-speed:32s; }
.floater-5 { width:60px;  height:60px; top:48%; left:45%; --float-speed:19s; --drift-speed:30s; --rotate-speed:26s; border-radius:999px; }
.floater-6 { width:115px; height:75px; top:34%; right:28%; --float-speed:21s; --drift-speed:38s; --rotate-speed:35s; }
.floater-7 { width:78px;  height:78px; bottom:24%; left:30%; --float-speed:17s; --drift-speed:29s; --rotate-speed:22s; border-radius:999px; }

.pulse {
  animation:
    floatY var(--float-speed, 18s) ease-in-out infinite alternate,
    driftX var(--drift-speed, 32s) ease-in-out infinite alternate,
    softRotate var(--rotate-speed, 28s) ease-in-out infinite alternate,
    softPulse 6s ease-in-out infinite,
    softShimmer 22s ease-in-out infinite;
}

/* animations (plus shimmer) */
@keyframes floatY {
  0%   { transform: translate3d(0, 0, var(--parallax, 0px)); }
  40%  { transform: translate3d(0, -28px, var(--parallax, 0px)); }
  70%  { transform: translate3d(0, 12px, var(--parallax, 0px)); }
  100% { transform: translate3d(0, -6px, var(--parallax, 0px)); }
}

@keyframes driftX {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(18px); }
  100% { transform: translateX(-14px); }
}

@keyframes softRotate {
  0%   { rotate: 0deg; }
  50%  { rotate: 4deg; }
  100% { rotate: -3deg; }
}

@keyframes softPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes softShimmer {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 50% 40%; }
  100% { background-position: 0% 0%; }
}

/* parallax depth */
.parallax-deep   { --parallax: -40px; }
.parallax-middle { --parallax: -20px; }
.parallax-soft   { --parallax: -8px; }

.container {
  max-width: 1120px;
  margin: 0 auto 32px;
  padding: 18px 18px 32px;
  position: relative;
  z-index: 2;
}

header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #dff7ff 40%, #b2ecff 60%, #75d6ff 80%);
  box-shadow:
    0 8px 22px rgba(0, 113, 188, 0.32),
    inset 0 2px 6px rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
    color: gray;
}

.sub {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Toolbar */
.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  width: 100%;
  max-width: 760px;
}

.intro {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 840px;
}

.intro a {
  color: var(--accent-start);
  text-decoration: underline;
}

.input {
  background: var(--card);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  border: 2px solid rgba(211, 225, 248, 1);
  outline: none;
  transition: 160ms ease;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.02),
    0 8px 18px rgba(10, 33, 70, 0.12);
}

.input::placeholder {
  color: rgba(96, 112, 138, 0.9);
}

.input:focus {
  border-color: rgba(0, 183, 255, 0.85);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 10px 24px rgba(10, 33, 70, 0.22);
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  position: relative;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(to bottom, var(--accent-start), var(--accent-end));
  box-shadow:
    0 10px 22px rgba(0, 138, 214, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 12px 26px rgba(0, 138, 214, 0.55),
    0 0 0 1px rgba(255, 255, 255, 1);
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 138, 214, 0.35),
    0 0 0 1px rgba(255, 255, 255, 1);
}

/* Grids */
#latest.grid { grid-template-columns: 1fr; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

/* Cards */
.card {
  position: relative;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.9), rgba(245,248,255,0.96) 55%);
  border-radius: 26px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow:
    0 10px 22px rgba(15, 35, 70, 0.18),
    0 0 0 1px rgba(210, 225, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 140ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
  overflow: hidden;
}

/* subtle glossy top */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.0) 55%
  );
  opacity: 0.8;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

/* Wii U “bounce” on hover */
.card:hover {
  transform: translateY(-4px) scale(1.02);
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.96), #ffffff 60%);
  border-color: rgba(0, 183, 255, 0.65);
  box-shadow:
    0 16px 32px rgba(15, 35, 70, 0.25),
    0 0 0 1px rgba(255, 255, 255, 1);
}

/* focus / deep-link wobble */
.card.jump-target {
  animation: cardWobble 260ms ease-out;
  box-shadow:
    0 18px 38px rgba(15, 35, 70, 0.3),
    0 0 0 2px rgba(0, 183, 255, 0.75),
    0 0 0 1px rgba(255,255,255,0.9);
}

.card .title a:focus-visible {
  outline: none;
  animation: cardWobble 260ms ease-out;
  box-shadow:
    0 18px 38px rgba(15, 35, 70, 0.3),
    0 0 0 2px rgba(0, 183, 255, 0.75),
    0 0 0 1px rgba(255,255,255,0.9);
}

/* Wobble like a 3DS tile */
@keyframes cardWobble {
  0% {
    transform: translateY(-2px) scale(1.01) rotate(0deg);
  }
  30% {
    transform: translateY(-4px) scale(1.03) rotate(-1.2deg);
  }
  70% {
    transform: translateY(-3px) scale(1.02) rotate(0.6deg);
  }
  100% {
    transform: translateY(-3px) scale(1.02) rotate(0deg);
  }
}

.title {
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1.3;
  margin: 0;
  color: var(--text);
}

.title a {
  color: inherit;
  text-decoration: none;
}

.title a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.ghost {
  background: rgba(238, 245, 255, 0.96);
  border: 1px solid rgba(203, 217, 242, 0.95);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  transition: 140ms ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .ghost {
    background: rgba(19, 27, 43, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    color: #eff3ff;
  }
}

.ghost:hover {
  background: rgba(226, 238, 255, 0.98);
  border-color: rgba(0, 183, 255, 0.4);
  box-shadow: 0 5px 12px rgba(10, 33, 70, 0.18);
}

.footer {
  color: var(--muted);
  text-align: center;
  margin: 26px 0 8px;
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-start);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.empty {
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 18px;
  background: #f1f6ff;
  border: 2px dashed rgba(0, 183, 255, 0.4);
  box-shadow: 0 10px 24px rgba(10, 33, 70, 0.12);
}

/* NEWEST badge */
.latest {
  border: 1px solid rgba(0, 183, 255, 0.75);
  background: linear-gradient(
    145deg,
    rgba(0, 183, 255, 0.08),
    var(--card)
  );
  padding-top: 32px;
  padding-right: 20px;
  position: relative;
}

.latest::after {
  content: "Newest";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.76rem;
  padding: 4px 11px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(0, 183, 255, 0.95), rgba(0, 224, 198, 0.9));
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow:
    0 6px 14px rgba(0, 120, 195, 0.5),
    inset 0 1px 3px rgba(255,255,255,0.95);
  z-index: 3;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .latest::after {
    background:
      linear-gradient(135deg, rgba(0, 183, 255, 0.95), rgba(0, 224, 198, 0.9));
    color: #f7fbff;
  }
}
.latest .title {
  color: #11141f !important;
}
/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static !important;
  width: auto;
  height: auto;
  margin: 8px 0;
  padding: 8px 12px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid rgba(0, 183, 255, 0.35);
}

/* --- NAVBAR --- */
.navbar {
  width: min(1120px, 100% - 24px);
  margin: 10px auto 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-radius: 18px;
  background: linear-gradient(
    to bottom,
    #fdfdff,
    #edf3ff
  );
  border: 1px solid var(--border-soft);
  box-shadow:
    0 10px 20px rgba(10, 33, 70, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

@media (prefers-color-scheme: dark) {
  .navbar {
    background: linear-gradient(to bottom, #0f1524, #050910);
    border-color: rgba(90, 112, 162, 0.95);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(40, 54, 91, 0.9);
  }

  .nav-link {
    color: #e7eeff;
  }

  .nav-link:hover {
    background: rgba(32, 44, 70, 0.95);
    border-color: rgba(114, 139, 191, 0.95);
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.nav-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 11px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #dff7ff 40%, #a4e5ff 80%);
  box-shadow:
    0 6px 16px rgba(0, 113, 188, 0.38),
    inset 0 1px 4px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* eShop-style status bar */
.nav-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #425679;
  padding-inline: 6px;
}

.nav-status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#nav-time {
  font-variant-numeric: tabular-nums;
}

/* battery */
.nav-battery {
  gap: 4px;
}

.nav-battery-icon {
  position: relative;
  width: 20px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(60, 82, 120, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255,255,255,0.4);
  background: linear-gradient(180deg, #f9fcff, #d7e2f5);
  overflow: hidden;
}

.nav-battery-level {
  position: absolute;
  inset: 1px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5fd85a, #9cf46b);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.nav-battery-cap {
  position: absolute;
  top: 2px;
  right: -3px;
  width: 3px;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(180deg, #d4deef, #b7c7e6);
  box-shadow: 0 0 0 1px rgba(60, 82, 120, 0.6);
}

.nav-battery-percent {
  font-size: 0.74rem;
}

@media (prefers-color-scheme: dark) {
  .nav-status {
    color: #d7e3ff;
  }
  .nav-battery-icon {
    border-color: rgba(160, 185, 230, 0.9);
    background: linear-gradient(180deg, #1b2135, #121827);
    box-shadow:
      0 0 0 1px rgba(10, 15, 25, 0.9),
      inset 0 0 0 1px rgba(255,255,255,0.08);
  }
  .nav-battery-cap {
    background: linear-gradient(180deg, #1f2640, #141b2e);
    box-shadow: 0 0 0 1px rgba(160, 185, 230, 0.9);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 140ms ease;
}

.nav-link:hover {
  background: #e5efff;
  border-color: rgba(197, 212, 240, 0.95);
}

.nav-link[aria-current="page"],
.nav-link.active {
  background: linear-gradient(to bottom, var(--accent-start), var(--accent-end));
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow:
    0 8px 18px rgba(0, 138, 214, 0.55),
    0 0 0 1px rgba(255, 255, 255, 1);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.nav-spacer { flex: 1; }

/* FAQ panel */
#faq {
  margin-top: 28px;
  background: #f6f9ff;
  border-radius: 18px;
  padding: 18px 18px 12px;
  border: 1px solid rgba(225, 236, 255, 0.95);
  box-shadow: 0 12px 24px rgba(10, 33, 70, 0.14);
}

#faq-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

#faq a {
  color: #006fd3;
}

#faq a:hover {
  text-decoration: underline;
}

details {
  padding: 8px 2px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

details p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  #faq {
    background: rgba(10, 17, 28, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.85);
  }

  #faq summary {
    color: #f7f8ff;
  }

  #faq details p {
    color: #c3cce5;
  }

  #faq a {
    color: #7bd5ff;
  }
}

/* Dialog (Details) */
.dialog-shell {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
}

.dialog-shell::backdrop {
  background: rgba(7, 15, 30, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog-body {
  background: var(--card);
  border-radius: 20px;
  padding: 18px 18px 16px;
  min-width: 320px;
  max-width: min(560px, 92vw);
  color: var(--text);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 22px 48px rgba(10, 33, 70, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dialog-title {
  font-size: 1.02rem;
  font-weight: 700;
}

.dialog-content {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .navbar {
    border-radius: 16px;
    padding-inline: 12px;
  }

  header {
    gap: 12px;
  }

  .brand {
    gap: 12px;
  }

  .logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------
   HOME Dock (bottom strip like a system bar)
------------------------------------------- */
.home-dock {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 20px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.95),
    rgba(232,243,255,0.96)
  );
  border: 1px solid rgba(220,235,255,0.98);
  box-shadow:
    0 8px 20px rgba(15, 35, 70, 0.22),
    0 0 0 1px rgba(255,255,255,1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 6;
}

.home-dock-button {
  appearance: none;
  border: 0;
  background: radial-gradient(circle at 20% 0%, #ffffff, #eef4ff 60%);
  border-radius: 18px;
  padding: 6px 10px;
  min-width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #264469;
  box-shadow:
    0 4px 10px rgba(15, 35, 70, 0.22),
    0 0 0 1px rgba(255,255,255,0.98);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease, filter 120ms ease;
}

.home-dock-button span.icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00b7ff;
  box-shadow: 0 0 8px rgba(0,183,255,0.9);
}

.home-dock-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 6px 14px rgba(15, 35, 70, 0.26),
    0 0 0 1px rgba(255,255,255,1);
}

.home-dock-button:active {
  transform: translateY(0);
  box-shadow:
    0 3px 8px rgba(15, 35, 70, 0.18),
    0 0 0 1px rgba(255,255,255,1);
}

@media (max-width: 640px) {
  .home-dock {
    bottom: 6px;
    padding-inline: 10px;
  }
  .home-dock-button {
    padding-inline: 8px;
  }
}
#vs-container.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
/* Make firmware titles fully opaque + darker + slightly outlined */
.card .title,
.card .title a {
  color: #0a1633;              /* darker navy */
  opacity: 1;                  /* in case something inherited lowered it */
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
}

/* “Muted” text more readable on bright cards */
.muted {
  color: #314469;
  font-size: 0.9rem;
}

/* Slightly tone down the card background so text pops more */
.card {
  background: radial-gradient(
    circle at 20% 0%,
    #eef3ff,
    #dde7ff 60%
  );
}

/* Keep the "Newest" card readable as well */
.latest .title,
.latest .title a {
  color: #f7fbff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}


/* ------------------------------------------
   Page-specific helpers (changelog / verify / api)
   (No global resets / :root / body / navbar here)
------------------------------------------- */

/* Semantic status colors shared by verify + API */
:root {
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #f59e0b;
}

/* Generic section card used on secondary pages */
.section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-top: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.section h2 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.section small {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Shared monospace utility */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ------------------------------------------
   changelog.html specific
------------------------------------------- */

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.9rem;
  align-items: center;
}

.toc strong {
  margin-right: 4px;
}

.toc a {
  color: #0070d8;
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(223, 237, 255, 0.95);
  border: 1px solid rgba(197, 212, 240, 0.95);
  box-shadow: 0 3px 7px rgba(10, 33, 70, 0.12);
}

.toc a:hover {
  background: rgba(211, 230, 255, 0.98);
}

@media (prefers-color-scheme: dark) {
  .toc a {
    background: rgba(19, 27, 43, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    color: #e7eeff;
  }
}

/* changelog entries */
.changelog-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.entry {
  background: var(--card-hover);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 14px 14px 12px;
  box-shadow:
    0 10px 20px rgba(10, 33, 70, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.75);
  transition: 160ms ease;
}

.entry:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(10, 33, 70, 0.2),
    0 0 0 1px rgba(255, 255, 255, 1);
}

.entry h3 {
  margin: 0 0 4px 0;
  font-size: 1.02rem;
}

.entry h3 a {
  color: inherit;
  text-decoration: none;
}

.entry h3 a:hover {
  text-decoration: underline;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.entry ul {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: 0.9rem;
}

.chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5efff;
  border: 1px solid rgba(197, 212, 240, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
}

.chip:hover {
  background: #d9e6ff;
}

@media (prefers-color-scheme: dark) {
  .chip {
    background: rgba(19, 27, 43, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    color: #e7eeff;
  }

  .chip:hover {
    background: rgba(30, 42, 68, 0.98);
  }
}

/* ------------------------------------------
   verify.html specific
------------------------------------------- */

/* Shared controls */
.input,
.select,
.btn,
.ghost,
textarea {
  border-radius: 999px;
  padding: 11px 14px;
  border: 2px solid rgba(211, 225, 248, 1);
  background: var(--card);
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: 160ms ease;
}

.input,
.select,
textarea {
  width: 100%;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.02),
    0 8px 18px rgba(10, 33, 70, 0.12);
}

textarea {
  border-radius: 18px;
  resize: vertical;
}

.input::placeholder,
textarea::placeholder {
  color: rgba(96, 112, 138, 0.9);
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: rgba(0, 183, 255, 0.85);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 10px 24px rgba(10, 33, 70, 0.22);
}

/* override generic .btn only where needed */
.btn {
  cursor: pointer;
  border: 0;
  padding-inline: 22px;
  background: linear-gradient(to bottom, var(--accent-start), var(--accent-end));
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    0 10px 22px rgba(0, 138, 214, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 12px 26px rgba(0, 138, 214, 0.55),
    0 0 0 1px rgba(255, 255, 255, 1);
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 138, 214, 0.35),
    0 0 0 1px rgba(255, 255, 255, 1);
}

.ghost {
  cursor: pointer;
  background: rgba(238, 245, 255, 0.96);
  border-radius: 999px;
  border: 1px solid rgba(203, 217, 242, 0.95);
  box-shadow: 0 4px 10px rgba(10, 33, 70, 0.12);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
}

.ghost:hover {
  background: rgba(226, 238, 255, 0.98);
  border-color: rgba(0, 183, 255, 0.4);
  box-shadow: 0 5px 12px rgba(10, 33, 70, 0.18);
}

@media (prefers-color-scheme: dark) {
  .input,
  .select,
  textarea {
    border-color: rgba(90, 112, 162, 0.95);
    background: rgba(10, 17, 28, 0.96);
    color: #e7eeff;
  }

  .ghost {
    background: rgba(19, 27, 43, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    color: #eff3ff;
  }
}

/* verify layout bits */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
  align-items: flex-start;
}

/* KPI badges (verify) */
.kpi {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e5efff;
  border: 1px solid rgba(197, 212, 240, 0.95);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ok   { color: var(--ok); }
.bad  { color: var(--bad); }
.warn { color: var(--warn); }

@media (prefers-color-scheme: dark) {
  .badge {
    background: rgba(19, 27, 43, 0.98);
    border-color: rgba(96, 121, 168, 0.95);
    color: #e7eeff;
  }
}

/* Progress bar (verify) */
.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(211, 225, 248, 1);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
}

/* Results table (verify) */
.table-wrap {
  max-height: 60vh;
  overflow: auto;
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: fixed;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

thead th {
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3ff;
}

@media (prefers-color-scheme: dark) {
  thead th {
    background: rgba(16, 24, 38, 0.98);
  }
}

tbody tr {
  background: var(--card);
  border: 1px solid var(--border-soft);
}

tbody tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

tbody tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.status-ok       { color: var(--ok);   font-weight: 700; }
.status-miss     { color: var(--bad);  font-weight: 700; }
.status-extra    { color: var(--warn); font-weight: 700; }
.status-mismatch { color: var(--bad);  font-weight: 700; }

/* ------------------------------------------
   api.html specific
------------------------------------------- */

/* For API we just reuse .section, .card, .badge, .mono etc.
   Only add what’s unique to the docs layout. */

/* Single-column card layout for API if you add `api-grid` class in api.html:
   <section class="grid api-grid">…</section> */
.api-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 6px;
}

/* Small endpoint-type pill (reuses .badge styles) */
.badge-endpoint {
  @extend .badge; /* if you don't use a preprocessor, just add `badge` and `badge-endpoint` classes in HTML */
}
