/* =========================================================
   DNDGamersUK — style.css
   Colours are taken from the logo's RGB lighting.
   Change them in one place below.
   ========================================================= */

:root {
  /* Background & surfaces */
  --bg:        #0b0b14;
  --bg-2:      #10101c;
  --surface:   #161625;
  --surface-2: #1d1d30;
  --line:      rgba(255, 255, 255, 0.08);

  /* Text */
  --text:      #f4f4fb;
  --muted:     #a6a6c0;
  --faint:     #6f6f8a;

  /* Logo RGB palette */
  --magenta: #ff3ddb;
  --orange:  #ff9a1f;
  --yellow:  #ffe14a;
  --green:   #38f28a;
  --cyan:    #22d3ee;
  --blue:    #3b82f6;
  --purple:  #8b5cf6;
  --gold:    #f2b705;   /* the PCIe connector */
  --yt-red:  #ff0033;

  --rgb: linear-gradient(90deg, var(--magenta), var(--orange), var(--yellow), var(--green), var(--cyan), var(--blue), var(--purple));

  /* Type */
  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-body:    "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Shape */
  --radius:    20px;
  --radius-sm: 12px;
  --max:       1160px;
  --header-h:  72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 61, 219, 0.10), transparent 60%),
    radial-gradient(900px 600px at 110% 80%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.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: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: #111; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.uk { color: var(--cyan); }
.rgb-text {
  background: var(--rgb); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.35em; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .6em 1.05em; font-size: .9rem; }
.btn-lg { padding: 1em 1.6em; font-size: 1.05rem; }

.btn-yt { background: var(--yt-red); color: #fff; box-shadow: 0 6px 22px -6px rgba(255, 0, 51, .55); }
.btn-yt:hover { box-shadow: 0 10px 30px -6px rgba(255, 0, 51, .75); }
.yt-icon { width: 1.15em; height: 1.15em; fill: currentColor; }

.btn-mw { background: var(--green); color: #06210f; box-shadow: 0 6px 22px -6px rgba(56, 242, 138, .45); }
.btn-mw:hover { box-shadow: 0 10px 30px -6px rgba(56, 242, 138, .65); }

.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: rgba(255,255,255,.18); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(11, 11, 20, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(11, 11, 20, .9); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .02em; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 6px; }
.site-nav ul a {
  display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 500; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.site-nav ul a:hover, .site-nav ul a[aria-current="true"], .site-nav ul a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.06); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.bars { display: grid; gap: 5px; width: 20px; margin: 0 auto; }
.bars span { height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 14px;
    padding: 16px 20px 24px;
    background: rgba(11, 11, 20, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav ul a { padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; }
  .site-nav .btn { align-self: stretch; padding: 14px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 96px; overflow: hidden; }
.hero-grid {
  position: absolute; inset: auto -20% 0 -20%; height: 46%;
  background-image:
    linear-gradient(rgba(139, 92, 246, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, .22) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
  opacity: .55; pointer-events: none;
  animation: grid-move 6s linear infinite;
}
@keyframes grid-move { to { background-position: 0 56px, 0 0; } }

.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 48px; }

.hero-logo { position: relative; justify-self: center; width: min(100%, 480px); }
.hero-logo img { position: relative; width: 100%; height: auto; animation: float 6s ease-in-out infinite; }
.logo-glow {
  position: absolute; inset: 14%; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--magenta), var(--orange), var(--yellow), var(--green), var(--cyan), var(--blue), var(--purple), var(--magenta));
  filter: blur(70px); opacity: .32;
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(56, 242, 138, .3); background: rgba(56, 242, 138, .06);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); margin: 20px 0 10px; }
.hero-sub { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--text); margin-bottom: 18px; }
.hero-lead { color: var(--muted); font-size: 1.1rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 34px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: .88rem; color: var(--muted); padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero { padding: 24px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .hero-logo { width: min(78%, 340px); }
  .hero-lead { margin: 0 auto; }
  .hero-actions, .tags { justify-content: center; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.kicker { font-family: var(--font-mono); font-size: .85rem; color: var(--purple); letter-spacing: .06em; margin-bottom: 10px; }
.section h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.section-intro { color: var(--muted); max-width: 36em; margin: 14px auto 0; font-size: 1.1rem; }
.rgb-rule { height: 3px; width: 120px; margin: 22px auto 0; border-radius: 3px; background: var(--rgb); box-shadow: 0 0 14px rgba(139, 92, 246, .5); }

/* ---------- Feature cards (Find Us) ---------- */
.feature-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }

.feature-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; isolation: isolate;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-yt:hover { border-color: rgba(255, 0, 51, .45); box-shadow: 0 20px 50px -20px rgba(255, 0, 51, .45); }
.feature-mw:hover { border-color: rgba(56, 242, 138, .4); box-shadow: 0 20px 50px -20px rgba(56, 242, 138, .35); }

.feature-visual { height: 220px; display: grid; place-items: center; position: relative; }
.feature-yt .feature-visual { background: radial-gradient(circle at 50% 60%, rgba(255, 0, 51, .22), transparent 65%); }
.feature-mw .feature-visual { background: radial-gradient(circle at 50% 60%, rgba(56, 242, 138, .16), transparent 65%); }

.feature-body { padding: 8px 32px 32px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.feature-body h3 { font-size: 1.65rem; }
.feature-body p { color: var(--muted); }
.feature-body .btn { align-self: flex-start; margin-top: auto; }
.handle { font-family: var(--font-mono); font-size: .9rem; color: var(--faint) !important; margin-bottom: 8px; }

.card-label { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint) !important; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.pill-live { color: var(--green); background: rgba(56, 242, 138, .1); border: 1px solid rgba(56, 242, 138, .35); }
.pill-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* YouTube visual: a little retro screen */
.screen {
  position: relative; width: 240px; height: 140px; border-radius: 18px;
  background: linear-gradient(160deg, #1a0a12, #2a0c18);
  border: 3px solid #2e2e44; box-shadow: inset 0 0 40px rgba(255, 0, 51, .25), 0 10px 30px rgba(0,0,0,.4);
  display: grid; place-items: center; overflow: hidden;
}
.play-btn {
  width: 78px; height: 54px; border-radius: 14px; background: var(--yt-red);
  display: grid; place-items: center; box-shadow: 0 0 30px rgba(255, 0, 51, .6);
  transition: transform .25s;
}
.play-btn svg { width: 30px; height: 30px; fill: #fff; }
.feature-yt:hover .play-btn { transform: scale(1.08); }
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 4px);
}

/* MakerWorld visual: 3D printer */
.printer { width: 230px; height: auto; }
.printer .frame { fill: #2e2e44; }
.printer .head { fill: #3c3c58; stroke: var(--green); stroke-width: 1.5; }
.printer .nozzle { fill: var(--orange); }
.printer .bed { fill: #3c3c58; }
.printer .layers rect { fill: var(--green); opacity: .85; }
.printer .layers rect:nth-child(2) { fill: var(--cyan); }
.printer .layers rect:nth-child(3) { fill: var(--blue); }
.printer .layers rect:nth-child(4) { fill: var(--purple); animation: layer 2.4s ease-in-out infinite; }
.print-head { animation: head 2.4s ease-in-out infinite; }
@keyframes head { 0%, 100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }
@keyframes layer { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-visual { height: 190px; }
  .feature-body { padding: 4px 24px 28px; }
}

/* ---------- Project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
/* 5 cards: three across, then two wider ones (each card spans part of a 6-column grid) */
.project-grid > .project-card { grid-column: span 2; }
.project-grid > .project-card:nth-child(n+4) { grid-column: span 3; }

.project-card {
  --accent: var(--cyan);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project-card[data-accent="green"]   { --accent: var(--green); }
.project-card[data-accent="gold"]    { --accent: var(--gold); }
.project-card[data-accent="cyan"]    { --accent: var(--cyan); }
.project-card[data-accent="magenta"] { --accent: var(--magenta); }
.project-card[data-accent="money"]   { --accent: #2fd08a; }

.project-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); opacity: .8;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 18px 44px -22px var(--accent);
}

.project-visual {
  height: 150px; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  border-bottom: 1px dashed var(--line);
}
.project-visual svg { width: 100%; max-width: 200px; height: auto; }

.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { font-size: 1.25rem; }
.project-body p { color: var(--muted); font-size: .98rem; margin-bottom: 8px; }
.project-body .btn { margin-top: auto; align-self: flex-start; }

.pill-status {
  align-self: flex-start;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.is-soon .pill-status::before { content: "◷"; font-size: .9em; }
.project-card:not(.is-soon) .pill-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.btn-card {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn-card:hover { background: var(--accent); color: #0b0b14; }
.btn-disabled {
  cursor: default; color: var(--faint);
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px);
  border: 1px dashed rgba(255,255,255,.18);
}
.btn-disabled:hover { transform: none; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px); color: var(--faint); }

/* Card visuals */
.viz-cube .c-top   { fill: color-mix(in srgb, var(--green) 85%, white); }
.viz-cube .c-left  { fill: var(--green); }
.viz-cube .c-right { fill: color-mix(in srgb, var(--green) 55%, black); }
.viz-cube { animation: float 5s ease-in-out infinite; }

.viz-board .trophy { fill: var(--gold); filter: drop-shadow(0 0 6px rgba(242, 183, 5, .5)); }
.viz-board .row { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.09); }
.viz-board .r1 { stroke: var(--gold); fill: rgba(242, 183, 5, .12); }
.viz-board text { font-family: var(--font-mono); font-size: 8px; fill: var(--muted); }
.viz-board .rows text:first-of-type { fill: var(--gold); }

.viz-term .win { fill: #0e0e19; stroke: rgba(255,255,255,.12); }
.viz-term .bar { fill: #22223a; }
.viz-term .d1 { fill: #ff5f57; } .viz-term .d2 { fill: #febc2e; } .viz-term .d3 { fill: #28c840; }
.viz-term text { font-family: var(--font-mono); font-size: 8px; fill: var(--cyan); }
.viz-term .dim { fill: var(--faint); }
.viz-term .cursor { animation: blink 1s steps(1) infinite; }
.viz-term .dl { stroke: var(--cyan); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }

.viz-more .pad { fill: #26263d; stroke: var(--magenta); stroke-width: 1.5; }
.viz-more .dpad { fill: #3a3a58; }
.viz-more .b1 { fill: var(--yellow); } .viz-more .b2 { fill: var(--magenta); }
.viz-more .b3 { fill: var(--cyan); }   .viz-more .b4 { fill: var(--green); }
.viz-more .spark { stroke: var(--magenta); stroke-width: 2; stroke-linecap: round; animation: blink 2s ease-in-out infinite; }

@media (max-width: 1080px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid > .project-card, .project-grid > .project-card:nth-child(n+4) { grid-column: span 1; }
  .project-grid > .project-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 580px)  { .project-grid { grid-template-columns: 1fr; } .project-grid > .project-card:last-child:nth-child(odd) { grid-column: auto; } .project-visual { height: 140px; } }

/* ---------- Roblox games ---------- */
.games-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.game-card {
  --accent: var(--green);
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.game-joker { --accent: var(--magenta); }
.game-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 20px 50px -22px var(--accent); }
.game-art { aspect-ratio: 16 / 9; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.game-art svg { width: 100%; height: 100%; }
.game-body { padding: 24px 28px 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-body h3 { font-size: 1.6rem; }
.game-body p:not(.card-label) { color: var(--muted); }
.game-body .btn { align-self: flex-start; margin-top: auto; }
.btn-play { background: var(--text); color: #0b0b14; box-shadow: 0 6px 22px -8px var(--accent); }
.btn-play:hover { background: #fff; box-shadow: 0 10px 30px -8px var(--accent); }
.tags a { color: inherit; text-decoration: none; }
.tags li:has(a):hover { border-color: var(--green); color: var(--text); }

/* Area 51 art */
.art-a51 { background: radial-gradient(ellipse at 50% 120%, rgba(56, 242, 138, .22), transparent 60%), linear-gradient(180deg, #0a0f1c, #101a24); }
.art-a51 .stars circle { fill: #fff; opacity: .7; }
.art-a51 .ufo-body { fill: #3c3c58; stroke: var(--cyan); stroke-width: 1.5; }
.art-a51 .ufo-dome { fill: rgba(34, 211, 238, .35); stroke: var(--cyan); stroke-width: 1.2; }
.art-a51 .ufo-light { fill: var(--yellow); animation: blinkA 1.2s infinite; }
.art-a51 .ufo-light.l2 { animation-delay: .4s; } .art-a51 .ufo-light.l3 { animation-delay: .8s; }
.art-a51 .ufo { animation: hover 4s ease-in-out infinite; }
.art-a51 .alien { fill: var(--green); filter: drop-shadow(0 0 8px rgba(56, 242, 138, .7)); animation: abduct 4s ease-in-out infinite; }
.art-a51 .alien .eye { fill: #0b0b14; }
.art-a51 .stairs rect { fill: #2e2e44; stroke: rgba(255,255,255,.12); }
.art-a51 .fence { stroke: #4a4a66; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.art-a51 .fence .wire { stroke-dasharray: 3 5; stroke-width: 1.5; }
.art-a51 .sign rect { fill: var(--yellow); }
.art-a51 .sign text { font: 700 9px var(--font-mono); fill: #1a1300; text-anchor: middle; letter-spacing: .08em; }
@keyframes hover { 50% { transform: translateY(-4px); } }
@keyframes abduct { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes blinkA { 50% { opacity: .25; } }

/* Joker art */
.art-joker { background: radial-gradient(ellipse at 50% 110%, rgba(255, 61, 219, .25), transparent 60%), linear-gradient(180deg, #140b1c, #1a0f24); }
.art-joker .table ellipse { fill: #1e5a3a; opacity: .55; }
.art-joker .card { fill: #f4f4fb; stroke: rgba(0,0,0,.25); }
.art-joker .suit { font: 700 11px var(--font-body); fill: #1a1a2a; }
.art-joker .suit-big { font: 400 26px var(--font-display); fill: #1a1a2a; text-anchor: middle; }
.art-joker .red { fill: #e0244a; }
.art-joker .card.jk { fill: #fff6fd; stroke: var(--magenta); stroke-width: 2; }
.art-joker .hat { fill: var(--magenta); }
.art-joker .bell { fill: var(--yellow); } .art-joker .bell.b2 { fill: var(--cyan); }
.art-joker .face { fill: #ffe9c7; }
.art-joker .smile { fill: none; stroke: #1a1a2a; stroke-width: 1.6; stroke-linecap: round; }
.art-joker .jk-text { font: 700 7px var(--font-mono); fill: var(--magenta); text-anchor: middle; letter-spacing: .14em; }
.art-joker .joker-card { transform-box: view-box; animation: peek 3.5s ease-in-out infinite; }
.art-joker .q { font: 400 34px var(--font-display); fill: var(--yellow); opacity: .8; animation: blinkA 2.4s infinite; }
.art-joker .q2 { fill: var(--cyan); animation-delay: 1.2s; }
@keyframes peek { 0%, 100% { translate: 0 0; } 50% { translate: 4px -10px; } }

@media (max-width: 860px) {
  .games-grid { grid-template-columns: 1fr; }
  .game-body { padding: 20px 22px 26px; }
}

/* ---------- Tools & Downloads page ---------- */
.tools-hero { padding-bottom: 24px; }
.tools-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.crumbs { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.tools-section { padding: 0 0 80px; }

.tool-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.tool-top { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; padding: 36px; border-bottom: 1px dashed var(--line); background: radial-gradient(circle at 20% 40%, rgba(34, 211, 238, .12), transparent 55%); }
.tool-visual svg { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)); }
.tool-info { display: flex; flex-direction: column; gap: 14px; }
.tool-info h2 { font-size: clamp(2.2rem, 4.4vw, 3rem); }
.tool-tagline { color: var(--muted); font-size: 1.12rem; }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }
.btn-dl { background: var(--cyan); color: #04161b; box-shadow: 0 8px 26px -8px rgba(34, 211, 238, .7); }
.btn-dl:hover { box-shadow: 0 12px 34px -8px rgba(34, 211, 238, .9); }
.dl-ico { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dl-meta { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); }
.dl-alt { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: .92rem; color: var(--faint); }
.dl-alt a { color: var(--muted); }
.dl-alt a:hover { color: var(--cyan); }
.req { display: grid; gap: 6px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.req b { color: var(--text); font-weight: 600; margin-right: 4px; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.tool-block { padding: 30px 36px; border-top: 1px solid var(--line); }
.tool-block:nth-child(odd) { border-right: 1px solid var(--line); }
.tool-block:nth-child(-n+2) { border-top: 0; }
.tool-block h3 { font-size: 1.2rem; margin-bottom: 14px; display: flex; gap: .5em; align-items: center; }
.tool-block p { color: var(--muted); margin-bottom: 10px; }
.tool-block p.small { font-size: .9rem; color: var(--faint); margin-top: 10px; }
.tool-block code, .tool-block kbd { font-family: var(--font-mono); font-size: .85em; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 6px; padding: .08em .4em; color: var(--text); }
.tool-block kbd { border-bottom-width: 2px; }
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--green); background: rgba(56, 242, 138, .12); }
.ticks b, .plain b, .steps b { color: var(--text); font-weight: 600; }
.steps { counter-reset: s; display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font: 400 .8rem/1 var(--font-display); color: #0b0b14; background: var(--cyan); }
.plain { display: grid; gap: 12px; color: var(--muted); }
.cmd { margin: 0 0 10px; padding: 12px 14px; border-radius: 10px; background: #08080f; border: 1px solid var(--line); overflow-x: auto; }
.cmd code { background: none; border: 0; padding: 0; color: var(--green); }
.cmd code::before { content: "PS> "; color: var(--faint); }
.hash { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px 10px 14px; border-radius: 10px; cursor: pointer; text-align: left; background: rgba(0,0,0,.3); border: 1px solid var(--line-2, rgba(255,255,255,.14)); color: var(--text); font: inherit; }
.hash:hover { border-color: var(--cyan); }
.hash-val { flex: 1; min-width: 0; font: 500 .78rem/1.5 var(--font-mono); word-break: break-all; color: var(--muted); }
.hash-copy { flex: none; font: 700 .68rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: .5em .7em; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.hash.copied { border-color: var(--green); }
.hash.copied .hash-copy { background: var(--green); color: #06210f; }

.tool-soon { display: flex; align-items: center; gap: 20px; margin-top: 24px; padding: 24px 28px; border-radius: var(--radius); border: 1px dashed rgba(255,255,255,.18); background: repeating-linear-gradient(-45deg, rgba(255,255,255,.015) 0 10px, transparent 10px 20px); }
.tool-soon-ico { font-size: 2rem; }
.tool-soon h2 { font-size: 1.25rem; margin-bottom: 4px; }
.tool-soon p { color: var(--muted); }
.tool-soon .btn { margin-left: auto; }

/* Open-source card visual */
.viz-code .br { fill: none; stroke: var(--magenta); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.viz-code .sl { stroke: var(--cyan); stroke-width: 5; stroke-linecap: round; opacity: .55; }
.viz-code .cup { fill: var(--gold); filter: drop-shadow(0 0 6px rgba(242, 183, 5, .5)); }

/* LAN Leaderboard tool card */
.tool-card + .tool-card { margin-top: 24px; }
.tool-lan .tool-top { background: radial-gradient(circle at 20% 40%, rgba(242, 183, 5, .12), transparent 55%); }
.tool-shot { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0,0,0,.45); }
.btn-lan { background: var(--gold); color: #1a1300; box-shadow: 0 8px 26px -8px rgba(242, 183, 5, .7); }
.btn-lan:hover { box-shadow: 0 12px 34px -8px rgba(242, 183, 5, .9); }

/* VNC illustration */
.viz-vnc .win { fill: #0e0e19; stroke: rgba(255,255,255,.14); }
.viz-vnc .bar { fill: #22223a; }
.viz-vnc .title { font: 500 9px var(--font-mono); fill: var(--muted); }
.viz-vnc .winbtn { stroke: var(--faint); stroke-width: 1.4; fill: none; }
.viz-vnc .tool { fill: #1a1a2c; }
.viz-vnc .chip { fill: #2c2c46; } .viz-vnc .chip.on { fill: var(--cyan); opacity: .8; }
.viz-vnc .live { fill: var(--green); filter: drop-shadow(0 0 4px var(--green)); animation: blink 1.6s ease-in-out infinite; }
.viz-vnc .mac .desk { fill: #2b2257; }
.viz-vnc .menubar { fill: rgba(255,255,255,.18); }
.viz-vnc .mb-dot { fill: #fff; } .viz-vnc .mb-txt { fill: rgba(255,255,255,.7); }
.viz-vnc .app { fill: #f4f4fb; } .viz-vnc .app2 { fill: #1d1d30; stroke: var(--magenta); stroke-width: 1.2; }
.viz-vnc .tl.r { fill: #ff5f57; } .viz-vnc .tl.y { fill: #febc2e; } .viz-vnc .tl.g { fill: #28c840; }
.viz-vnc .line { fill: #c9c9da; }
.viz-vnc .dock { fill: rgba(255,255,255,.2); }
.viz-vnc .dock-i rect:nth-child(1) { fill: var(--cyan); } .viz-vnc .dock-i rect:nth-child(2) { fill: var(--green); }
.viz-vnc .dock-i rect:nth-child(3) { fill: var(--yellow); } .viz-vnc .dock-i rect:nth-child(4) { fill: var(--orange); }
.viz-vnc .dock-i rect:nth-child(5) { fill: var(--magenta); } .viz-vnc .dock-i rect:nth-child(6) { fill: var(--purple); }
.viz-vnc .dock-i rect:nth-child(7) { fill: var(--blue); } .viz-vnc .dock-i rect:nth-child(8) { fill: #c9d1e0; }
.viz-vnc .cursor { fill: #fff; stroke: #0b0b14; stroke-width: 1; animation: cursorMove 6s ease-in-out infinite; }
.viz-vnc .scale { stroke: var(--cyan); stroke-width: 3; fill: none; stroke-linecap: round; opacity: .9; }
@keyframes cursorMove { 0%, 100% { transform: translate(0, 0); } 40% { transform: translate(70px, -30px); } 70% { transform: translate(-60px, 10px); } }

@media (max-width: 900px) {
  .tool-top { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-block { padding: 24px; border-right: 0 !important; }
  .tool-block:nth-child(2) { border-top: 1px solid var(--line); }
  .tool-soon { flex-direction: column; align-items: flex-start; }
  .tool-soon .btn { margin-left: 0; }
}
@media (max-width: 480px) { .dl-actions .btn { width: 100%; } }

/* ---------- Live YouTube subscriber count ---------- */
.yt-subs { display: flex; align-items: baseline; gap: 10px; margin: -2px 0 10px; color: var(--muted) !important; }
.yt-subs[hidden] { display: none; }
.yt-subs-num { font: 400 2.4rem/1 var(--font-display); color: var(--text); text-shadow: 0 0 22px rgba(255, 0, 51, .45); font-variant-numeric: tabular-nums; }
.yt-subs-label { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.sub-count { margin-left: 2px; padding: .2em .5em; border-radius: 999px; background: rgba(0, 0, 0, .28); font-size: .82em; font-variant-numeric: tabular-nums; }
.sub-count[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; padding-bottom: 36px; background: var(--bg-2); }
.site-footer .rgb-rule { width: 100%; margin: 0; border-radius: 0; height: 2px; opacity: .7; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 32px; }
.footer-inner .brand img { width: 56px; height: 56px; }
.footer-inner .brand > span { display: flex; flex-direction: column; }
.footer-tag { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); letter-spacing: .06em; }
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; transition: color .15s, background-color .15s; }
.footer-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.copyright { width: 100%; color: var(--faint); font-size: .88rem; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .footer-inner { flex-direction: column; text-align: center; } .footer-links { justify-content: center; } }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- BudgetBuddy ---------- */
.viz-bb .w1 { fill: #3ccb8f; } .viz-bb .w2 { fill: #10a86a; } .viz-bb .w3 { fill: #0f706d; }
.viz-bb .clasp { fill: #fff; }
.viz-bb .ring { fill: none; stroke-width: 9; }
.viz-bb .s1 { stroke: #3b82f6; } .viz-bb .s2 { stroke: #2fd08a; } .viz-bb .s3 { stroke: #f5a524; } .viz-bb .s4 { stroke: #8b5cf6; }
.viz-bb .pound { font: 700 15px var(--font-mono); fill: var(--text); }
.viz-bb { animation: float 5s ease-in-out infinite; }
.tool-bb .tool-top { background: radial-gradient(circle at 20% 40%, rgba(47, 208, 138, .13), transparent 55%); }
.btn-bb { background: #2fd08a; color: #04261a; box-shadow: 0 8px 26px -8px rgba(47, 208, 138, .7); }
.btn-bb:hover { box-shadow: 0 12px 34px -8px rgba(47, 208, 138, .9); }
.dl-meta-line { margin: -4px 0 0; }

/* ---------- Arcade ---------- */
.game-solitaire { --accent: var(--purple); }
.game-soon { --accent: var(--cyan); border-style: dashed; }
a.game-art { display: block; }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.game-card:hover .game-art img { transform: scale(1.03); }
.game-title { font-size: 1.6rem; }
.game-feats { display: flex; flex-wrap: wrap; gap: 6px 8px; list-style: none; padding: 0; margin: 0; }
.game-feats li { font: 600 .78rem/1 var(--font-mono); color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.pill-soon { color: var(--cyan); background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .3); }
.art-soon { background: radial-gradient(ellipse at 50% 120%, rgba(34, 211, 238, .2), transparent 60%), linear-gradient(180deg, #0d0d1c, #121226); }
.art-soon .cab-body { fill: #1d1d33; stroke: rgba(255,255,255,.14); }
.art-soon .scr { fill: #0a0a14; stroke: var(--cyan); stroke-width: 1.2; }
.art-soon .scr-txt { font: 700 9px var(--font-mono); fill: var(--cyan); text-anchor: middle; letter-spacing: .12em; animation: blink 1.4s steps(1) infinite; }
.art-soon .cab-panel { fill: #26263f; }
.art-soon .stick { fill: var(--magenta); } .art-soon .stick-rod { stroke: #8a8aa8; stroke-width: 2.5; stroke-linecap: round; }
.art-soon .b1 { fill: var(--yellow); } .art-soon .b2 { fill: var(--green); }
.art-soon .coin { fill: #0a0a14; stroke: var(--gold); stroke-width: 1.2; }
.art-soon .pix rect { fill: var(--purple); opacity: .5; }
.art-soon .cab { animation: float 5s ease-in-out infinite; }
.art-sol { background: radial-gradient(ellipse at 45% 115%, rgba(139, 92, 246, .38), transparent 62%), linear-gradient(180deg, #120d22, #0c0a18); }
.art-sol .slots rect { fill: rgba(255,255,255,.03); stroke: rgba(255,255,255,.14); }
.art-sol .slots text { font: 400 14px var(--font-display); fill: rgba(255,255,255,.22); text-anchor: middle; }
.art-sol .back { fill: #17122b; stroke: url(#sol-rgb); stroke-width: 2.4; }
.art-sol .back-txt { font: 400 13px var(--font-display); fill: #fff; text-anchor: middle; }
.art-sol .face { fill: #f6f6fb; stroke: rgba(0,0,0,.25); }
.art-sol .idx { font: 700 11px var(--font-body); fill: #14141f; }
.art-sol .red { fill: #e0244a; }
.art-sol .pip { font: 400 30px var(--font-body); text-anchor: middle; }
.art-sol .gpu { fill: #1d1d2e; }
.art-sol .fan-o { fill: none; stroke: url(#sol-rgb); stroke-width: 2.2; }
.art-sol .fan-hub { fill: #c9c9d9; }
.art-sol .cpu { fill: #e0244a; }
.art-sol .die { fill: #fff; stroke: url(#sol-rgb); stroke-width: 1.2; }
.art-sol .heart { font: 700 9px var(--font-body); fill: #e0244a; text-anchor: middle; }
.art-sol .pins path { stroke: #f2b705; stroke-width: 1.4; }
.art-sol .timer rect { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.14); }
.art-sol .timer text { font: 700 10px var(--font-mono); fill: var(--text); text-anchor: middle; }
.art-sol .spark path { fill: var(--yellow); opacity: .85; animation: blink 2.2s ease-in-out infinite; }
.art-sol .spark .s2 { fill: var(--cyan); animation-delay: 1.1s; }
.art-sol .lift { transform-box: view-box; animation: peek 3.5s ease-in-out infinite; }
.game-snake { --accent: var(--magenta); }
.art-snake { background: radial-gradient(ellipse at 50% 120%, rgba(255, 61, 219, .25), transparent 62%), linear-gradient(180deg, #0f0c1b, #0b0b14); }
.art-snake .board { stroke: rgba(255, 61, 219, .35); stroke-width: 1; }
.art-snake .body { fill: none; stroke: #ff3ddb; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 61, 219, .6)); }
.art-snake .head rect { fill: #ff3ddb; filter: drop-shadow(0 0 6px rgba(255, 61, 219, .7)); }
.art-snake .head circle { fill: #14141f; }
.art-snake .chip .pkg { fill: #ff3ddb; } .art-snake .chip .die { fill: #14141f; }
.art-snake .chip .pins { stroke: #ff3ddb; stroke-width: 1.6; }
.art-snake .chip { filter: drop-shadow(0 0 7px rgba(255, 61, 219, .8)); animation: blink 1.8s ease-in-out infinite; }
.art-snake .d20-out { fill: rgba(242, 183, 5, .12); stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.art-snake .d20-in { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .7; }
.art-snake .d20-txt { font: 700 7px var(--font-mono); fill: var(--gold); text-anchor: middle; }
.art-snake .d20 { filter: drop-shadow(0 0 6px rgba(242, 183, 5, .55)); }
.art-snake .score rect { fill: rgba(11, 11, 20, .85); stroke: rgba(255,255,255,.16); }
.art-snake .score text { font: 700 9px var(--font-mono); fill: var(--text); text-anchor: middle; letter-spacing: .08em; }
/* Arcade grids: three across on wide screens */
@media (min-width: 1081px) { .arcade-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 861px) and (max-width: 1080px) { .arcade-grid > .game-card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.pill { white-space: nowrap; flex-shrink: 0; }
.game-creator { --accent: #2dd4bf; }
.pill-test { color: var(--gold); background: rgba(242, 183, 5, .1); border: 1px solid rgba(242, 183, 5, .4); }
.pill-test::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Four cards: two by two rather than three plus one */
@media (min-width: 1081px) { .arcade-grid:has(> .game-card:nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
.game-mtb { --accent: #ff7a1a; }
.pill-beta { color: #ff8a3d; background: rgba(255, 122, 26, .1); border: 1px solid rgba(255, 122, 26, .4); }
.pill-beta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Wide cards: picture beside the text.
   Five cards on a wide screen: three on top, then the 4th (newest game) stretches across two columns.
   Two-column screens: an odd last card stretches across both. */
@media (min-width: 1081px) {
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) { grid-column: span 2; }
}
@media (min-width: 1081px) { .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) { flex-direction: row; } }
@media (min-width: 861px) and (max-width: 1080px) { .arcade-grid > .game-card:last-child:nth-child(odd) { flex-direction: row; } }
@media (min-width: 1081px) {
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) > .game-art { flex: 0 0 50%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) .game-body { justify-content: center; }
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) .game-body .btn { margin-top: 8px; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .arcade-grid > .game-card:last-child:nth-child(odd) > .game-art { flex: 0 0 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .arcade-grid > .game-card:last-child:nth-child(odd) .game-body { justify-content: center; }
  .arcade-grid > .game-card:last-child:nth-child(odd) .game-body .btn { margin-top: 8px; }
}
.arcade-grid .game-art picture { display: contents; }
/* Optional tall picture, used only when a card is shown wide (picture beside the text) */
.arcade-grid .game-art > .art-tall { display: none; }   /* stronger than the picture rule above */
@media (min-width: 1081px) {
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4):has(.art-tall) > .game-art > picture:not(.art-tall) { display: none; }
  .arcade-grid:has(> .game-card:nth-child(5):last-child) > .game-card:nth-child(4) > .game-art > .art-tall { display: contents; }
}
@media (min-width: 861px) { .arcade-grid .game-art > svg, .arcade-grid .game-art img { position: absolute; inset: 0; } }
.game-niamh { --accent: #ff4fa3; }
/* A lone card on the last row of three (7, 10, 13 cards...) becomes a full-width banner, picture beside the text */
@media (min-width: 1081px) {
  .arcade-grid > .game-card:last-child:nth-child(3n+1):not(:nth-child(4)) { grid-column: 1 / -1; flex-direction: row; }
  .arcade-grid > .game-card:last-child:nth-child(3n+1):not(:nth-child(4)) > .game-art { flex: 0 0 33%; aspect-ratio: auto; min-height: 220px; border-bottom: 0; border-right: 1px solid var(--line); }
  .arcade-grid > .game-card:last-child:nth-child(3n+1):not(:nth-child(4)) .game-body { justify-content: center; }
  .arcade-grid > .game-card:last-child:nth-child(3n+1):not(:nth-child(4)) .game-body .btn { margin-top: 8px; }
}

/* ---------- Playville (new game launch) ---------- */
/* Navy matches the logo artwork's own background, so the logo sits seamlessly on the band */
.pv-section {
  --pv-navy: #1c1a51; --pv-teal: #22d3c5; --pv-pink: #ff5fa8; --pv-yellow: #ffd23f;
  position: relative; padding: 72px 0; overflow: hidden;
  background:
    radial-gradient(700px 360px at 85% 10%, rgba(255, 95, 168, .18), transparent 65%),
    radial-gradient(640px 380px at 10% 90%, rgba(34, 211, 197, .16), transparent 65%),
    var(--pv-navy);
  border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08);
}
.pv-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 56px; align-items: center; }
.pv-logo { display: block; }
.pv-logo img { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 18px 50px -24px rgba(0,0,0,.8); }
.pv-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-title { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; }
.pv-tag { font-size: 1.2rem; font-weight: 600; color: var(--pv-yellow); margin: -4px 0 0; }
.pv-lead { color: #d4d2f2; max-width: 60ch; }
.pv-feats li { color: #d4d2f2; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.pv-note { color: #a9a6d6; font-size: .92rem; max-width: 34ch; margin: 0; }
.pv-note b { color: #f4f4fb; font-weight: 600; }
.pill-new { color: #ffd23f; background: rgba(255, 210, 63, .1); border: 1px solid rgba(255, 210, 63, .45); }
.pill-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.btn-pv { background: var(--pv-teal); color: #0d1e3a; box-shadow: 0 8px 26px -8px rgba(34, 211, 197, .75); }
.btn-pv:hover { background: #4fe3d7; box-shadow: 0 12px 34px -8px rgba(34, 211, 197, .95); }
.pv-rooms { grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pv-rooms a { display: block; position: relative; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 14px 34px -16px rgba(0,0,0,.7); transition: transform .25s ease; text-decoration: none; }
.pv-rooms a:hover { transform: translateY(-4px) rotate(-.4deg); }
.pv-rooms img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; }
.pv-rooms span { position: absolute; left: 10px; bottom: 10px; font-weight: 700; font-size: .85rem; color: var(--pv-navy); background: #fff; padding: 4px 10px; border-radius: 999px; }
@media (max-width: 860px) {
  .pv-section { padding: 56px 0; }
  .pv-inner { grid-template-columns: 1fr; }
  .pv-logo { max-width: 460px; margin: 0 auto; }
  .pv-rooms { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .pv-rooms { grid-template-columns: 1fr; }
  .pv-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pv-rooms a { transition: none; } .pv-rooms a:hover { transform: none; } }
.pv-banner {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px 36px; align-items: center;
  margin: 0 0 32px; padding: 22px 32px 22px 22px; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: radial-gradient(520px 260px at 90% 0%, rgba(255, 95, 168, .2), transparent 65%), #1c1a51;
  border: 1px solid rgba(255,255,255,.12); transition: transform .25s ease, box-shadow .25s ease;
}
.pv-banner:hover { transform: translateY(-3px); box-shadow: 0 20px 50px -22px rgba(34, 211, 197, .6); }
.pv-banner img { width: 100%; height: auto; display: block; border-radius: 12px; }
.pv-banner-copy { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.pv-banner-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; }
.pv-banner-text { color: #d4d2f2; max-width: 58ch; }
.pv-banner .btn { margin-top: 4px; background: #22d3c5; color: #0d1e3a; box-shadow: 0 8px 26px -8px rgba(34, 211, 197, .75); }
@media (max-width: 700px) {
  .pv-banner { grid-template-columns: 1fr; padding: 16px 16px 22px; }
  .pv-banner picture { max-width: 380px; margin: 0 auto; }
  .pv-banner .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pv-banner { transition: none; } .pv-banner:hover { transform: none; } }
/* Mid-size screens: tighten the top nav so every link and Subscribe fit */
@media (min-width: 821px) and (max-width: 1100px) {
  .site-nav { gap: 12px; }
  .site-nav ul { gap: 0; }
  .site-nav ul a { padding: 8px 9px; font-size: .95rem; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 1.05rem; }
}
@media (min-width: 821px) and (max-width: 940px) {
  .site-nav ul a { padding: 8px 7px; font-size: .9rem; }
  .site-nav .btn { padding: .6em 1em; font-size: .88rem; }
}

/* ---------- FAQ (quick answers) ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s; }
.faq-item[open] { border-color: rgba(139, 92, 246, .45); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 1.2rem/1 var(--font-mono); color: var(--cyan); background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .3); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq-item h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin: 0; }
.faq-item p { color: var(--muted); margin: 0; padding: 0 22px 20px; max-width: 70ch; }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }
.game-brick { --accent: #39ff14; }
/* Two cards on the last row of three (8, 11, 14 cards...): the last one stretches across two columns, picture beside the text */
@media (min-width: 1081px) {
  .arcade-grid > .game-card:last-child:nth-child(3n+2):not(:nth-child(2)) { grid-column: span 2; flex-direction: row; }
  .arcade-grid > .game-card:last-child:nth-child(3n+2):not(:nth-child(2)) > .game-art { flex: 0 0 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .arcade-grid > .game-card:last-child:nth-child(3n+2):not(:nth-child(2)) .game-body { justify-content: center; }
  .arcade-grid > .game-card:last-child:nth-child(3n+2):not(:nth-child(2)) .game-body .btn { margin-top: 8px; }
}

/* ---------- 27 Oct 2026: new header, Games groups, Applications, Privacy ---------- */
.site-nav .ext { display: inline-block; margin-left: .25em; font-size: .8em; opacity: .6; }
.game-pv { --accent: #22d3c5; }
.game-brain { --accent: #84cc16; }

/* Jump links under a page title (Games, Applications) */
.games-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.games-jump a { display: block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); text-decoration: none; font-weight: 500; transition: color .15s, border-color .15s; }
.games-jump a:hover { color: var(--text); border-color: var(--cyan); }

/* Games page: Originals and Classics groups */
.games-group { padding-bottom: 72px; scroll-margin-top: calc(var(--header-h) + 8px); }
.group-head { margin-bottom: 28px; max-width: 46em; }
.group-head .kicker { margin-bottom: 6px; }
.group-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.group-head p:not(.kicker) { color: var(--muted); margin-top: 10px; }
.group-head h2::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 12px; border-radius: 3px; background: var(--rgb); }

/* Homepage Games section */
.group-title { font-size: 1.35rem; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.classics-strip { margin-top: 40px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px 24px; }
.classics-strip .group-title { grid-column: 1 / -1; margin: 0; }
.classics-list { display: flex; flex-wrap: wrap; gap: 10px; }
.classics-list a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s, transform .15s; }
.classics-list a:hover { border-color: var(--purple); transform: translateY(-2px); }
@media (max-width: 640px) {
  .classics-strip { grid-template-columns: 1fr; }
  .classics-list { display: grid; grid-template-columns: 1fr 1fr; }
  .classics-strip .btn { justify-self: stretch; justify-content: center; }
}

/* Homepage Applications: four cards in one row on wide screens */
@media (min-width: 1081px) {
  .project-grid:has(> .project-card:nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
  .project-grid:has(> .project-card:nth-child(4):last-child) > .project-card { grid-column: auto; }
}
.apps-more { text-align: center; margin-top: 32px; }

/* Privacy & cookies page */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; list-style: disc; }
.prose li { margin-bottom: 8px; }
.prose b, .prose strong { color: var(--text); }
.prose a { color: var(--cyan); }
.prose .summary { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid rgba(56, 242, 138, .3); border-radius: var(--radius-sm); padding: 20px 22px; }
.prose .summary p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.store-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.store-table th, .store-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.store-table th { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); background: var(--surface); }
.store-table td { color: var(--muted); }
.store-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.store-table tr:last-child td { border-bottom: 0; }
.updated { font-family: var(--font-mono); font-size: .85rem; color: var(--faint); }

/* ---------- 27 Oct 2026 (later): 3D Models page ---------- */
.feature-body .btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.feature-body .btn-row .btn { margin-top: 0; }
.model-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.model-card { --accent: var(--green); }
.model-brick { --accent: #ff7a3c; }
.model-fidget { --accent: var(--magenta); }
.model-card .game-art { background: radial-gradient(ellipse at 50% 115%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 62%), linear-gradient(180deg, #10101c, #161625); }
.model-card .btn-mw { align-self: flex-start; margin-top: auto; }
.model-more { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px 28px; border-radius: var(--radius); border: 1px dashed rgba(56, 242, 138, .35); background: rgba(56, 242, 138, .04); }
.model-more h2 { font-size: 1.3rem; margin-bottom: 4px; }
.model-more p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .model-grid { grid-template-columns: 1fr; } }
/* brick kit art */
.art-brick .brick { stroke: rgba(0,0,0,.35); stroke-width: 1.2; }
.art-brick .b1 { fill: #ff7a3c; } .art-brick .b2 { fill: #e85d2a; } .art-brick .b3 { fill: #ff9a5c; }
.art-brick .stud { fill: rgba(255,255,255,.22); }
.art-brick .roof { fill: #8b5cf6; stroke: rgba(0,0,0,.3); stroke-width: 1.2; }
.art-brick .win { fill: #22d3ee; opacity: .85; } .art-brick .door { fill: #3b2a1e; }
.art-brick .ground { fill: #2e2e44; }
.art-brick .falling { animation: brickdrop 3s ease-in-out infinite; }
.art-brick .ruler { stroke: var(--yellow); stroke-width: 1.5; fill: none; }
.art-brick .ruler-txt { font: 700 9px var(--font-mono); fill: var(--yellow); text-anchor: middle; }
@keyframes brickdrop { 0%, 15% { transform: translateY(-26px); opacity: 0; } 45%, 100% { transform: none; opacity: 1; } }
/* fidget art */
.art-fidget .base { fill: #1d1d30; stroke: rgba(255,255,255,.14); stroke-width: 1.5; }
.art-fidget .glow { fill: url(#fid-rgb); opacity: .9; }
.art-fidget .cap { stroke: rgba(0,0,0,.35); stroke-width: 1.2; }
.art-fidget .cap-top { fill: rgba(255,255,255,.12); }
.art-fidget .k1 .cap { fill: #ff3ddb; } .art-fidget .k2 .cap { fill: #38f28a; } .art-fidget .k3 .cap { fill: #22d3ee; }
.art-fidget .legend { font: 400 15px var(--font-display); fill: #0b0b14; text-anchor: middle; }
.art-fidget .key { animation: keypress 2.4s ease-in-out infinite; }
.art-fidget .k2 { animation-delay: .8s; } .art-fidget .k3 { animation-delay: 1.6s; }
.art-fidget .click { font: 700 10px var(--font-mono); fill: var(--yellow); letter-spacing: .1em; animation: blinkA 2.4s infinite; }
@keyframes keypress { 0%, 20%, 100% { transform: none; } 8% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .art-brick .falling, .art-fidget .key { animation: none; } }
