/* GENERATED by tools/build.js from src/styles/ (order: site.json "styles"). Do not edit. */

/* ---------- tokens.css ---------- */
/* =====================================================================
   Medha Play design tokens. Owner: architect (frozen).
   Builders: use these variables; do not redefine them. If you need a new
   token, add it with your own prefix in your own CSS file and report it.
   Colours come from the FlutterFlow app theme (owner's brand).
   Contrast notes (WCAG AA) are in DESIGN.md section 4.
   ===================================================================== */
:root {
  color-scheme: dark;

  /* ---- Brand colours (app theme) ---- */
  --mp-bg: #0A0A0F;            /* page background */
  --mp-surface-1: #1C1C26;     /* cards, sidebar, topbar */
  --mp-surface-2: #2A2A38;     /* raised: inputs, hover, chips */
  --mp-surface-3: #363648;     /* hover on surface-2, pressed */
  --mp-border: #34344A;        /* hairlines on dark */
  --mp-border-strong: #75759A; /* input and control borders: 3.8:1 on surface-1, 3.2:1 on surface-2 */

  --mp-text: #F5F5F7;          /* main text: 18.6:1 on bg */
  --mp-text-muted: #A1A1A6;    /* secondary text: 7.7:1 on bg, 5.5:1 on surface-2 */
  --mp-text-on-primary: #FFFFFF;   /* white on #0066FF = 4.8:1 */
  --mp-text-on-accent: #0A0A0F;    /* dark on pink/yellow (white on pink fails AA) */
  --mp-text-on-yellow: #0A0A0F;

  --mp-primary: #0066FF;       /* buttons and fills (NOT for small text on dark: 4.1:1) */
  --mp-primary-hover: #1A75FF;
  --mp-primary-pressed: #0052CC;
  --mp-primary-text: #5C9DFF;  /* primary-coloured TEXT/links on dark: 7.2:1 bg, 5.2:1 surface-2 */
  --mp-accent: #FF2D87;        /* accent fills; as text on bg 5.6:1 */
  --mp-accent-hover: #FF4D9A;
  --mp-yellow: #FFE500;        /* highlights, focus ring, kids */

  /* ---- Rangoli palette (tiles, pillars, ages, game art) ---- */
  --mp-rangoli-marigold: #FF9F1C;
  --mp-rangoli-turmeric: #FFE500;
  --mp-rangoli-kumkum: #E63946;
  --mp-rangoli-rose: #FF2D87;
  --mp-rangoli-peacock: #00A6A6;
  --mp-rangoli-sky: #00C2D1;
  --mp-rangoli-indigo: #4B3FD6;
  --mp-rangoli-leaf: #2BB673;
  --mp-rangoli-white: #F5F5F7;

  /* Pillar colours (gradient A -> B). Same values as src/data/pillars.json */
  --mp-smriti-a: #FF2D87;  --mp-smriti-b: #FF9F1C;
  --mp-tarka-a: #0066FF;   --mp-tarka-b: #00C2D1;
  --mp-yukti-a: #FFE500;   --mp-yukti-b: #2BB673;
  --mp-ganit-a: #FF8A00; --mp-ganit-b: #E63946;
  --mp-shabd-a: #B388FF; --mp-shabd-b: #FF2D87;
  --mp-akaar-a: #2BB673; --mp-akaar-b: #00C2D1;
  --mp-rahasya-a: #A59BFF; --mp-rahasya-b: #2EC4C4;
  --mp-abacus-a: #C2703D; --mp-abacus-b: #FFE500;

  /* Age colours. Same values as src/data/ages.json */
  --mp-age-kids: #FFE500;
  --mp-age-teens: #00C2D1;
  --mp-age-youth: #0066FF;
  --mp-age-adults: #FF2D87;
  --mp-age-seniors: #FF9F1C;

  /* Status */
  --mp-success: #2BD67B;       /* text on dark 10:1 */
  --mp-warning: #FFB020;
  --mp-danger: #FF5A5F;        /* text on dark 6.3:1 */
  --mp-info: #5C9DFF;

  /* ---- Typography ---- */
  --mp-font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mp-font-heading: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mp-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --mp-font-scale: 1;          /* 1.2 on seniors pages, 1.08 on kids pages */
  --mp-fs-xs: calc(0.75rem * var(--mp-font-scale));    /* 12 */
  --mp-fs-sm: calc(0.875rem * var(--mp-font-scale));   /* 14 */
  --mp-fs-md: calc(1rem * var(--mp-font-scale));       /* 16 body */
  --mp-fs-lg: calc(1.125rem * var(--mp-font-scale));   /* 18 */
  --mp-fs-xl: calc(1.375rem * var(--mp-font-scale));   /* 22 h3 */
  --mp-fs-2xl: calc(1.75rem * var(--mp-font-scale));   /* 28 h2 */
  --mp-fs-3xl: calc(clamp(1.875rem, 1.4rem + 2vw, 2.625rem) * var(--mp-font-scale)); /* 30-42 h1 */
  --mp-lh-tight: 1.2;
  --mp-lh: 1.55;
  --mp-fw-regular: 400;
  --mp-fw-medium: 500;
  --mp-fw-semibold: 600;
  --mp-fw-bold: 700;

  /* ---- Spacing (4px scale) ---- */
  --mp-space-1: 0.25rem;  /* 4 */
  --mp-space-2: 0.5rem;   /* 8 */
  --mp-space-3: 0.75rem;  /* 12 */
  --mp-space-4: 1rem;     /* 16 */
  --mp-space-5: 1.5rem;   /* 24 */
  --mp-space-6: 2rem;     /* 32 */
  --mp-space-7: 3rem;     /* 48 */
  --mp-space-8: 4rem;     /* 64 */

  /* ---- Shape ---- */
  --mp-radius-sm: 8px;
  --mp-radius-md: 12px;
  --mp-radius-lg: 16px;
  --mp-radius-xl: 24px;
  --mp-radius-pill: 999px;

  --mp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --mp-shadow-2: 0 6px 18px rgba(0, 0, 0, 0.45);
  --mp-shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.55);
  --mp-glow-primary: 0 0 0 1px rgba(0, 102, 255, 0.5), 0 8px 24px rgba(0, 102, 255, 0.25);

  /* ---- Interaction ---- */
  --mp-target: 44px;            /* minimum touch target */
  --mp-target-large: 56px;      /* kids and seniors */
  --mp-focus-ring: 0 0 0 3px var(--mp-bg), 0 0 0 6px var(--mp-yellow);
  --mp-focus-outline: 3px solid var(--mp-yellow);
  --mp-focus-offset: 3px;
  --mp-lift: translateY(-4px);

  /* ---- Motion ---- */
  --mp-dur-fast: 120ms;
  --mp-dur: 200ms;
  --mp-dur-slow: 320ms;
  --mp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* ---- Layout ---- */
  --mp-topbar-h: 64px;
  --mp-sidebar-w: 248px;
  --mp-sidebar-rail-w: 76px;
  --mp-bottombar-h: 64px;
  --mp-content-max: 1440px;
  --mp-prose-max: 72ch;
  --mp-gutter: clamp(16px, 3vw, 32px);
  --mp-tile-w: clamp(150px, 42vw, 240px); /* tile width in horizontal rows */
  --mp-stage-max: 960px;
  --mp-stage-bg: #12121A;

  /* ---- Layers ---- */
  --mp-z-sticky: 20;
  --mp-z-sidebar: 40;
  --mp-z-overlay: 50;
  --mp-z-dialog: 60;
  --mp-z-toast: 70;
  --mp-z-dev: 90;
}

/* Breakpoints (CSS variables cannot be used in media queries; use these numbers):
   sm  600px   phones above this
   md  900px   sidebar visible as a rail at >= 900, drawer below
   lg  1200px  full sidebar with labels
   xl  1440px  wide content
*/

/* Kids pages and the Kids setting: a little brighter and bigger. */
[data-age="kids"] {
  --mp-font-scale: 1.08;
  --mp-target: 56px;
  --mp-stage-bg: #171726;
}

/* Seniors pages and the Seniors setting: larger text, larger targets. */
[data-age="seniors"] {
  --mp-font-scale: 1.2;
  --mp-target: 56px;
  --mp-lh: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --mp-dur-fast: 0.01ms;
    --mp-dur: 0.01ms;
    --mp-dur-slow: 0.01ms;
    --mp-lift: none;
  }
}


/* ---------- base.css ---------- */
/* =====================================================================
   Medha Play base styles. Owner: architect (frozen).
   Reset, typography, links, focus, utilities and the shared primitives
   every builder uses: .mp-btn, .mp-field/.mp-input, .mp-card, .mp-chip,
   .mp-badge, .mp-prose, .mp-alert, .mp-dialog, .mp-container.
   Page-level layout (topbar, sidebar, tiles...) lives in layout.css and
   components.css (Builder 1), forms/auth in auth.css (Builder 2), the
   game stage in play.css (Builder 3).
   ===================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--mp-topbar-h) + 8px); }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol[role="list"], ul[role="list"], .mp-list-reset { list-style: none; padding: 0; margin: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ---------- Document ---------- */
body {
  min-height: 100vh;
  background: var(--mp-bg);
  color: var(--mp-text);
  font-family: var(--mp-font-ui);
  font-size: var(--mp-fs-md);
  line-height: var(--mp-lh);
  font-weight: var(--mp-fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--mp-font-heading);
  line-height: var(--mp-lh-tight);
  font-weight: var(--mp-fw-bold);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--mp-fs-3xl); }
h2 { font-size: var(--mp-fs-2xl); font-weight: var(--mp-fw-semibold); }
h3 { font-size: var(--mp-fs-xl); font-weight: var(--mp-fw-semibold); }
h4 { font-size: var(--mp-fs-lg); font-weight: var(--mp-fw-semibold); }
p { text-wrap: pretty; }
small { font-size: var(--mp-fs-sm); }
strong, b { font-weight: var(--mp-fw-semibold); }

a { color: var(--mp-primary-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8AB8FF; }

::selection { background: rgba(0, 102, 255, 0.55); color: #fff; }

/* ---------- Focus (WCAG 2.4.7 / 2.4.11) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: var(--mp-focus-outline);
  outline-offset: var(--mp-focus-offset);
  border-radius: 4px;
}
/* Elements that clip outlines can use the ring instead */
.mp-focus-ring:focus-visible { outline: none; box-shadow: var(--mp-focus-ring); }

/* ---------- Utilities ---------- */
.mp-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.mp-skip {
  position: absolute; left: var(--mp-space-4); top: -100px;
  z-index: calc(var(--mp-z-dev) + 1);
  padding: var(--mp-space-3) var(--mp-space-4);
  background: var(--mp-yellow); color: var(--mp-text-on-yellow);
  font-weight: var(--mp-fw-bold); border-radius: var(--mp-radius-sm);
  text-decoration: none;
}
.mp-skip:focus { top: var(--mp-space-3); }
.mp-container { width: 100%; max-width: var(--mp-content-max); margin-inline: auto; padding-inline: var(--mp-gutter); }
.mp-muted { color: var(--mp-text-muted); }
.mp-stack > * + * { margin-top: var(--mp-space-4); }
.mp-cluster { display: flex; flex-wrap: wrap; gap: var(--mp-space-3); align-items: center; }

/* ---------- Prose (long text: game help, about) ---------- */
.mp-prose { max-width: var(--mp-prose-max); }
.mp-prose > * + * { margin-top: var(--mp-space-4); }
.mp-prose h2 { margin-top: var(--mp-space-6); }
.mp-prose h3 { margin-top: var(--mp-space-5); }
.mp-prose ul, .mp-prose ol { padding-left: 1.4em; }
.mp-prose li + li { margin-top: var(--mp-space-2); }
.mp-prose p, .mp-prose li { color: #DADAE0; }

/* ---------- Buttons ---------- */
.mp-btn {
  --_bg: var(--mp-surface-2);
  --_fg: var(--mp-text);
  --_bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--mp-space-2);
  min-height: var(--mp-target); min-width: var(--mp-target);
  padding: 0 var(--mp-space-5);
  border: 2px solid var(--_bd); border-radius: var(--mp-radius-pill);
  background: var(--_bg); color: var(--_fg);
  font-family: var(--mp-font-ui); font-size: var(--mp-fs-md); font-weight: var(--mp-fw-semibold);
  line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--mp-dur) var(--mp-ease), transform var(--mp-dur-fast) var(--mp-ease), box-shadow var(--mp-dur) var(--mp-ease);
  -webkit-tap-highlight-color: transparent;
}
.mp-btn:hover { background: var(--mp-surface-3); color: var(--_fg); }
.mp-btn:active { transform: scale(0.98); }
.mp-btn:disabled, .mp-btn[aria-disabled="true"] { opacity: 0.55; transform: none; }
.mp-btn svg { width: 1.25em; height: 1.25em; flex: none; }

.mp-btn--primary { --_bg: var(--mp-primary); --_fg: var(--mp-text-on-primary); }
.mp-btn--primary:hover { background: var(--mp-primary-hover); }
.mp-btn--primary:active { background: var(--mp-primary-pressed); }
.mp-btn--accent { --_bg: var(--mp-accent); --_fg: var(--mp-text-on-accent); }
.mp-btn--accent:hover { background: var(--mp-accent-hover); }
.mp-btn--yellow { --_bg: var(--mp-yellow); --_fg: var(--mp-text-on-yellow); }
.mp-btn--yellow:hover { background: #FFF04D; }
.mp-btn--ghost { --_bg: transparent; --_bd: var(--mp-border-strong); }
.mp-btn--ghost:hover { background: var(--mp-surface-2); }
.mp-btn--danger { --_bg: transparent; --_fg: var(--mp-danger); --_bd: var(--mp-danger); }
.mp-btn--danger:hover { background: rgba(255, 90, 95, 0.12); }
.mp-btn--lg { min-height: 56px; padding: 0 var(--mp-space-6); font-size: var(--mp-fs-lg); }
.mp-btn--sm { min-height: 36px; padding: 0 var(--mp-space-4); font-size: var(--mp-fs-sm); }
.mp-btn--block { display: flex; width: 100%; }
.mp-btn--icon { padding: 0; border-radius: var(--mp-radius-md); }

/* ---------- Form fields ---------- */
.mp-field { display: grid; gap: var(--mp-space-2); }
.mp-field + .mp-field { margin-top: var(--mp-space-4); }
.mp-label { font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm); }
.mp-hint { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-error { color: var(--mp-danger); font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-medium); }
.mp-input, .mp-select, .mp-textarea {
  width: 100%;
  min-height: var(--mp-target);
  padding: var(--mp-space-2) var(--mp-space-3);
  background: var(--mp-bg);
  color: var(--mp-text);
  border: 2px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-md);
  font-size: max(16px, var(--mp-fs-md)); /* >= 16px stops iOS zoom */
}
.mp-input::placeholder { color: #8C8C96; }
.mp-input:hover, .mp-select:hover { border-color: #9494B8; }
.mp-input:focus-visible, .mp-select:focus-visible, .mp-textarea:focus-visible { outline: var(--mp-focus-outline); outline-offset: 1px; border-color: var(--mp-primary); }
.mp-input[aria-invalid="true"], .mp-select[aria-invalid="true"] { border-color: var(--mp-danger); }
.mp-check { display: flex; gap: var(--mp-space-3); align-items: flex-start; }
.mp-check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--mp-primary); flex: none; }

/* ---------- Cards, chips, badges ---------- */
.mp-card {
  background: var(--mp-surface-1);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: var(--mp-space-5);
}
.mp-chip {
  display: inline-flex; align-items: center; gap: var(--mp-space-2);
  min-height: 32px; padding: 0 var(--mp-space-3);
  background: var(--mp-surface-2); color: var(--mp-text);
  border-radius: var(--mp-radius-pill);
  font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-medium);
  text-decoration: none;
}
.mp-badge {
  display: inline-flex; align-items: center;
  padding: 2px var(--mp-space-2);
  border-radius: var(--mp-radius-sm);
  font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold);
  letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--mp-surface-3); color: var(--mp-text);
}
.mp-badge--smriti { background: var(--mp-smriti-a); color: var(--mp-text-on-accent); }
.mp-badge--tarka { background: var(--mp-tarka-a); color: var(--mp-text-on-primary); }
.mp-badge--yukti { background: var(--mp-yukti-a); color: var(--mp-text-on-yellow); }
.mp-badge--ganit { background: var(--mp-ganit-a); color: var(--mp-text-on-yellow); }
.mp-badge--shabd { background: var(--mp-shabd-a); color: var(--mp-text-on-yellow); }
.mp-badge--akaar { background: var(--mp-akaar-a); color: var(--mp-text-on-yellow); }
.mp-badge--rahasya { background: var(--mp-rahasya-a); color: var(--mp-text-on-yellow); }
.mp-badge--abacus { background: var(--mp-abacus-a); color: var(--mp-text-on-yellow); }

/* ---------- Alerts (role="alert" / role="status") ---------- */
.mp-alert {
  display: flex; gap: var(--mp-space-3); align-items: flex-start;
  padding: var(--mp-space-3) var(--mp-space-4);
  border-radius: var(--mp-radius-md);
  background: var(--mp-surface-2);
  border-left: 4px solid var(--mp-info);
}
.mp-alert--success { border-left-color: var(--mp-success); }
.mp-alert--warning { border-left-color: var(--mp-warning); }
.mp-alert--danger { border-left-color: var(--mp-danger); }

/* ---------- Dialog (<dialog class="mp-dialog">) ---------- */
.mp-dialog {
  width: min(92vw, 480px);
  padding: var(--mp-space-6);
  background: var(--mp-surface-1);
  color: var(--mp-text);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-xl);
  box-shadow: var(--mp-shadow-lift);
}
.mp-dialog::backdrop { background: rgba(5, 5, 10, 0.72); }

/* ---------- Decorative kolam line pattern (use sparingly, 4-8% opacity) ---------- */
.mp-kolam-bg { position: relative; isolation: isolate; }
.mp-kolam-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("/assets/img/kolam-pattern.svg");
  background-size: 160px 160px;
  opacity: 0.06;
}

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

/* ---------- Forced colours (Windows high contrast) ---------- */
@media (forced-colors: active) {
  .mp-btn, .mp-input, .mp-select, .mp-card { border: 1px solid CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}


/* ---------- layout.css ---------- */
/* =====================================================================
   layout.css  Owner: Builder 1 (shell and browse pages).
   Topbar, sidebar (full / icon rail / phone drawer), content area,
   bottom bar, breadcrumbs, footer. DESIGN.md 3.0 and 4.
   Breakpoints: 600 / 900 (sidebar) / 1200 (full sidebar) / 1440.
   ===================================================================== */

.mp-icon { width: 24px; height: 24px; flex: none; fill: currentColor; }
html.mp-lock, html.mp-lock body { overflow: hidden; }

/* ---------- Topbar ---------- */
.mp-topbar {
  position: sticky; top: 0; z-index: var(--mp-z-sticky);
  display: flex; align-items: center; gap: var(--mp-space-3);
  height: calc(var(--mp-topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--mp-gutter) 0;
  padding-left: max(var(--mp-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--mp-gutter), env(safe-area-inset-right, 0px));
  background: rgba(20, 20, 29, 0.94);
  border-bottom: 1px solid var(--mp-border);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
}
.mp-topbar__menu { --_bg: transparent; flex: none; }
.mp-topbar__logo {
  display: inline-flex; align-items: center; gap: var(--mp-space-2);
  flex: none; min-height: 44px;
  color: var(--mp-text); text-decoration: none;
  font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold);
  font-size: 1.25rem; letter-spacing: -0.01em;
}
.mp-topbar__logo:hover { color: #fff; }
.mp-topbar__logo img { width: 36px; height: 36px; border-radius: 10px; }
.mp-topbar__account { display: flex; align-items: center; gap: var(--mp-space-2); margin-left: auto; flex: none; }
.mp-topbar__search-btn { --_bg: transparent; display: none; margin-left: auto; }

/* ---------- Shell grid ---------- */
.mp-shell { display: block; }
.mp-content {
  min-width: 0;
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--mp-topbar-h));
}
.mp-main {
  flex: 1 0 auto;
  width: 100%; max-width: var(--mp-content-max);
  margin-inline: auto;
  padding: var(--mp-space-5) var(--mp-gutter) var(--mp-space-7);
}
.mp-main:focus { outline: none; }
.mp-main > * + * { margin-top: var(--mp-space-7); }
.mp-main > .mp-breadcrumbs + * { margin-top: var(--mp-space-3); }

/* ---------- Sidebar (shared) ---------- */
.mp-sidebar {
  display: flex; flex-direction: column; gap: var(--mp-space-1);
  background: var(--mp-surface-1);
  border-right: 1px solid var(--mp-border);
  padding: var(--mp-space-3) var(--mp-space-3) var(--mp-space-4);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--mp-surface-3) transparent;
}
.mp-sidebar__drawer-head { display: none; }
.mp-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mp-nav + .mp-nav, .mp-nav--secondary { margin-top: var(--mp-space-2); padding-top: var(--mp-space-2); border-top: 1px solid var(--mp-border); }
.mp-nav__heading {
  margin: var(--mp-space-3) 0 var(--mp-space-1);
  padding: var(--mp-space-2) var(--mp-space-3) 0;
  border-top: 1px solid var(--mp-border);
  color: var(--mp-text-muted);
  font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.mp-nav__heading + .mp-nav { border-top: 0; margin-top: 0; padding-top: 0; }
.mp-nav__link {
  position: relative;
  display: flex; align-items: center; gap: var(--mp-space-3);
  min-height: 44px; padding: var(--mp-space-1) var(--mp-space-3);
  border-radius: var(--mp-radius-md);
  color: #D6D6DD; text-decoration: none;
  font-weight: var(--mp-fw-medium); font-size: var(--mp-fs-md);
  transition: background-color var(--mp-dur-fast) var(--mp-ease), color var(--mp-dur-fast) var(--mp-ease);
}
.mp-nav__link:hover { background: var(--mp-surface-2); color: #fff; }
.mp-nav__link[aria-current="page"], .mp-nav__link.is-in-section {
  background: var(--mp-surface-2); color: #fff; font-weight: var(--mp-fw-semibold);
}
.mp-nav__link[aria-current="page"]::before, .mp-nav__link.is-in-section::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--mp-yellow);
}
.mp-nav__icon {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 9px;
  color: currentColor;
}
.mp-nav__icon .mp-icon { width: 22px; height: 22px; }
.mp-nav__text { min-width: 0; line-height: 1.25; }
.mp-nav__text small { display: block; color: var(--mp-text-muted); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-medium); }
.mp-nav__icon--smriti { background: linear-gradient(135deg, var(--mp-smriti-a), var(--mp-smriti-b)); color: var(--mp-text-on-accent); }
.mp-nav__icon--tarka { background: linear-gradient(135deg, var(--mp-tarka-a), var(--mp-tarka-b)); color: #fff; }
.mp-nav__icon--yukti { background: linear-gradient(135deg, var(--mp-yukti-a), var(--mp-yukti-b)); color: var(--mp-text-on-yellow); }
.mp-nav__icon--ganit { background: linear-gradient(135deg, var(--mp-ganit-a), var(--mp-ganit-b)); color: var(--mp-text-on-yellow); }
.mp-nav__icon--shabd { background: linear-gradient(135deg, var(--mp-shabd-a), var(--mp-shabd-b)); color: var(--mp-text-on-yellow); }
.mp-nav__icon--akaar { background: linear-gradient(135deg, var(--mp-akaar-a), var(--mp-akaar-b)); color: var(--mp-text-on-yellow); }
.mp-nav__icon--rahasya { background: linear-gradient(135deg, var(--mp-rahasya-a), var(--mp-rahasya-b)); color: var(--mp-text-on-yellow); }
.mp-nav__icon--abacus { background: linear-gradient(135deg, var(--mp-abacus-a), var(--mp-abacus-b)); color: var(--mp-text-on-yellow); }
.mp-nav__age {
  font-size: 10px; font-weight: var(--mp-fw-bold); letter-spacing: -0.02em; line-height: 1;
  color: var(--mp-text-on-yellow); background: var(--_age, var(--mp-surface-3));
}
.mp-nav__age--kids { --_age: var(--mp-age-kids); }
.mp-nav__age--teens { --_age: var(--mp-age-teens); }
.mp-nav__age--youth { --_age: var(--mp-age-youth); color: #fff; }
.mp-nav__age--adults { --_age: var(--mp-age-adults); }
.mp-nav__age--seniors { --_age: var(--mp-age-seniors); }
.mp-sidebar__foot {
  margin-top: auto; padding: var(--mp-space-4) var(--mp-space-3);
  border-radius: var(--mp-radius-md);
  color: var(--mp-text-muted); font-size: var(--mp-fs-xs); line-height: 1.45;
}
.mp-sidebar__foot::before { opacity: 0.08; }
.mp-sidebar__foot p { position: relative; }

/* Rail tooltip (ui/shell.js positions it; only used 900-1199px) */
.mp-tip {
  position: fixed; z-index: var(--mp-z-overlay); pointer-events: none;
  padding: 6px 10px; border-radius: var(--mp-radius-sm);
  background: #F5F5F7; color: #0A0A0F;
  font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-semibold); white-space: nowrap;
  box-shadow: var(--mp-shadow-2);
  transform: translateY(-50%);
}

/* ---------- Drawer backdrop ---------- */
.mp-drawer-backdrop {
  position: fixed; inset: 0; z-index: calc(var(--mp-z-sidebar) - 1);
  background: rgba(5, 5, 10, 0.7);
}

/* ---------- Phones and small tablets (< 900px): drawer + bottom bar ---------- */
@media (max-width: 899.98px) {
  .mp-sidebar {
    position: fixed; z-index: var(--mp-z-sidebar);
    top: 0; bottom: 0; left: 0;
    width: min(86vw, 320px);
    padding-top: calc(var(--mp-space-3) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--mp-space-4) + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--mp-shadow-lift);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform var(--mp-dur-slow) var(--mp-ease), visibility 0s linear var(--mp-dur-slow);
  }
  .mp-sidebar.is-open { transform: none; visibility: visible; transition: transform var(--mp-dur-slow) var(--mp-ease), visibility 0s linear 0s; }
  .mp-sidebar__drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--mp-space-2); padding: 0 0 var(--mp-space-2) var(--mp-space-2); }
  .mp-sidebar__close { --_bg: transparent; }
  .mp-nav__link[aria-current="page"]::before, .mp-nav__link.is-in-section::before { left: -12px; }
  .mp-content { padding-bottom: calc(var(--mp-bottombar-h) + env(safe-area-inset-bottom, 0px)); }
  .no-js .mp-topbar__menu { display: none; }
}

/* ---------- Icon rail (900-1199px) and full sidebar (1200px+) ---------- */
@media (min-width: 900px) {
  .mp-shell { display: grid; grid-template-columns: var(--mp-sidebar-rail-w) minmax(0, 1fr); }
  .mp-topbar__menu { display: none; }
  .mp-sidebar {
    position: sticky; top: var(--mp-topbar-h);
    height: calc(100vh - var(--mp-topbar-h));
    padding-inline: var(--mp-space-2);
  }
  .mp-drawer-backdrop { display: none !important; }
  .mp-bottom-nav { display: none; }
}
@media (min-width: 900px) and (max-width: 1199.98px) {
  .mp-nav__link { justify-content: center; padding: var(--mp-space-1); min-height: 48px; }
  .mp-nav__icon { width: 40px; height: 36px; }
  .mp-nav__text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .mp-nav__heading {
    height: 1px; margin: var(--mp-space-2) var(--mp-space-2); padding: 0;
    overflow: hidden; color: transparent; background: var(--mp-border); border: 0;
  }
  .mp-nav__link[aria-current="page"]::before, .mp-nav__link.is-in-section::before { left: -8px; }
  .mp-sidebar__foot { display: none; }
}
@media (min-width: 1200px) {
  .mp-shell { grid-template-columns: var(--mp-sidebar-w) minmax(0, 1fr); }
  .mp-sidebar { padding-inline: var(--mp-space-3); }
}

/* ---------- Search area responsive ---------- */
@media (max-width: 599.98px) {
  .mp-topbar { gap: var(--mp-space-2); }
  .mp-topbar__logo { font-size: 1.0625rem; }
  .mp-topbar__logo img { width: 32px; height: 32px; }
  .mp-topbar__search-btn { display: inline-flex; }
  .mp-topbar__account { margin-left: 0; }
  .mp-topbar__signup { display: none; }
  .no-js .mp-topbar__search-btn { display: none; }
  .mp-topbar.is-search-open .mp-topbar__logo,
  .mp-topbar.is-search-open .mp-topbar__menu,
  .mp-topbar.is-search-open .mp-topbar__search-btn,
  .mp-topbar.is-search-open .mp-topbar__account { display: none; }
}
@media (max-width: 359.98px) {
  .mp-topbar__name { display: none; }
}

/* ---------- Bottom bar (phones) ---------- */
.mp-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--mp-z-sticky);
  background: rgba(20, 20, 29, 0.97);
  border-top: 1px solid var(--mp-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mp-bottom-nav ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: var(--mp-bottombar-h); }
.mp-bottom-nav__link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; padding: 4px 2px;
  color: var(--mp-text-muted); text-decoration: none;
  font-size: 0.6875rem; font-weight: var(--mp-fw-semibold); line-height: 1.1; text-align: center;
}
.mp-bottom-nav__link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-bottom-nav__link .mp-icon { width: 24px; height: 24px; }
.mp-bottom-nav__link:hover { color: #fff; }
.mp-bottom-nav__link[aria-current="page"], .mp-bottom-nav__link.is-in-section { color: var(--mp-yellow); }
.mp-bottom-nav__link:focus-visible { outline-offset: -3px; }

/* ---------- Breadcrumbs ---------- */
.mp-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--mp-space-1); font-size: var(--mp-fs-sm); }
.mp-breadcrumbs li { display: inline-flex; align-items: center; gap: var(--mp-space-1); color: var(--mp-text-muted); }
.mp-breadcrumbs a { color: var(--mp-text-muted); text-decoration: none; padding: 6px 2px; }
.mp-breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.mp-breadcrumbs .mp-icon { width: 14px; height: 14px; opacity: 0.7; }
.mp-breadcrumbs [aria-current="page"] { color: #D6D6DD; font-weight: var(--mp-fw-medium); }

/* ---------- Footer ---------- */
.mp-footer {
  margin-top: auto;
  border-top: 1px solid var(--mp-border);
  background: #101018;
}
.mp-footer::before { opacity: 0.05; }
.mp-footer__inner {
  max-width: var(--mp-content-max); margin-inline: auto;
  padding: var(--mp-space-6) var(--mp-gutter);
  display: grid; gap: var(--mp-space-4);
}
.mp-footer__brand { display: grid; gap: var(--mp-space-1); }
.mp-footer__brand .mp-topbar__logo { justify-self: start; }
.mp-footer__links { display: flex; flex-wrap: wrap; gap: var(--mp-space-1) var(--mp-space-5); }
.mp-footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: #D6D6DD; text-decoration: none; font-weight: var(--mp-fw-medium); }
.mp-footer__links a:hover { color: #fff; text-decoration: underline; }
.mp-footer__note { display: flex; align-items: center; gap: var(--mp-space-2); color: var(--mp-text); font-size: var(--mp-fs-sm); }
.mp-footer__note .mp-icon { color: var(--mp-success); width: 20px; height: 20px; }
.mp-footer__copy { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-footer__powered { white-space: nowrap; }
.mp-footer__powered img { display: inline-block; height: 1.25em; width: auto; margin-right: 4px; vertical-align: -0.3em; }
@media (min-width: 900px) {
  .mp-footer__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .mp-footer__links { justify-content: flex-end; }
  .mp-footer__note, .mp-footer__copy { grid-column: 1 / -1; }
}

/* ---------- Toasts ---------- */
.mp-toasts {
  position: fixed; z-index: var(--mp-z-toast);
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--mp-space-5) + env(safe-area-inset-bottom, 0px));
  display: grid; gap: var(--mp-space-2); width: min(92vw, 420px);
  pointer-events: none;
}
@media (max-width: 899.98px) { .mp-toasts { bottom: calc(var(--mp-bottombar-h) + var(--mp-space-3) + env(safe-area-inset-bottom, 0px)); } }
.mp-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--mp-space-3);
  padding: var(--mp-space-3) var(--mp-space-4);
  background: #F5F5F7; color: #0A0A0F;
  border-radius: var(--mp-radius-md); box-shadow: var(--mp-shadow-lift);
  font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm);
  animation: mp-toast-in var(--mp-dur-slow) var(--mp-ease);
}
.mp-toast--success { border-left: 6px solid #12A150; }
.mp-toast--warning { border-left: 6px solid #C77700; }
.mp-toast--danger { border-left: 6px solid #D92D33; }
@keyframes mp-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Print ---------- */
@media print {
  .mp-topbar, .mp-sidebar, .mp-bottom-nav, .mp-footer, .mp-ad, .mp-dev-badge, .mp-toasts { display: none !important; }
  .mp-shell { display: block; }
  body { background: #fff; color: #000; }
}


/* ---------- components.css ---------- */
/* =====================================================================
   components.css  Owner: Builder 1 (shell and browse pages).
   Search combobox, account menu, tiles, rows, grids, hero, pillar cards,
   Daily Chanakya card, age cards, page heads, chips, misc browse pieces.
   DESIGN.md 3.1-3.3, 3.11 and 5.
   ===================================================================== */

/* ---------- Search (ARIA 1.2 combobox) ---------- */
.mp-search { position: relative; flex: 1 1 auto; min-width: 0; max-width: 560px; margin-inline: auto; }
.mp-search__form { position: relative; display: flex; align-items: center; }
.mp-search__icon { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--mp-text-muted); pointer-events: none; }
.mp-search__input {
  width: 100%; height: 44px;
  padding: 0 44px 0 44px;
  background: var(--mp-surface-2); color: var(--mp-text);
  border: 2px solid transparent; border-radius: var(--mp-radius-pill);
  font-size: max(16px, var(--mp-fs-md));
  transition: border-color var(--mp-dur) var(--mp-ease), background-color var(--mp-dur) var(--mp-ease);
}
.mp-search__input::placeholder { color: #9A9AA6; }
.mp-search__input:hover { background: var(--mp-surface-3); }
.mp-search__input:focus-visible { outline: none; border-color: var(--mp-yellow); background: var(--mp-bg); }
.mp-search__input::-webkit-search-cancel-button { display: none; }
.mp-search__close {
  position: absolute; right: 4px; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--mp-text-muted);
}
.mp-search__close:hover { color: #fff; background: var(--mp-surface-3); }
.mp-search__popup {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: var(--mp-z-overlay);
  max-height: min(70vh, 560px); overflow-y: auto;
  padding: var(--mp-space-2);
  background: var(--mp-surface-1); border: 1px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-lg); box-shadow: var(--mp-shadow-lift);
}
.mp-search__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mp-search__option {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: var(--mp-space-3);
  padding: var(--mp-space-2); border-radius: var(--mp-radius-md);
  cursor: pointer; color: var(--mp-text);
}
.mp-search__option[aria-selected="true"], .mp-search__option:hover { background: var(--mp-surface-3); }
.mp-search__option[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--mp-yellow); }
.mp-search__thumb { width: 72px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; background: var(--mp-surface-2); }
.mp-search__badge {
  display: grid; place-items: center; width: 72px; aspect-ratio: 16 / 9; border-radius: 8px;
  font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-sm); color: var(--mp-text-on-accent);
  background: var(--_c, var(--mp-surface-3));
}
.mp-search__badge .mp-icon { width: 22px; height: 22px; }
.mp-search__title { display: block; font-weight: var(--mp-fw-semibold); line-height: 1.25; }
.mp-search__meta { display: block; color: var(--mp-text-muted); font-size: var(--mp-fs-xs); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-search__empty { padding: var(--mp-space-3); color: var(--mp-text-muted); }
@media (max-width: 599.98px) {
  .mp-search { display: none; position: static; max-width: none; }
  .mp-topbar.is-search-open .mp-search { display: block; }
  .mp-search__popup { left: var(--mp-space-2); right: var(--mp-space-2); top: calc(var(--mp-topbar-h) + env(safe-area-inset-top, 0px) - 4px); position: fixed; }
}

/* ---------- Header account menu ---------- */
.mp-account-menu { position: relative; }
.mp-avatar {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--_c, var(--mp-accent)); color: var(--mp-text-on-accent);
  font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: 1.05rem; line-height: 1;
}
.mp-avatar--child { --_c: var(--mp-yellow); }
.mp-account-menu__btn {
  display: inline-flex; align-items: center; gap: var(--mp-space-2);
  min-height: 44px; padding: 2px 10px 2px 2px;
  background: var(--mp-surface-2); color: var(--mp-text);
  border: 0; border-radius: var(--mp-radius-pill);
}
.mp-account-menu__btn:hover { background: var(--mp-surface-3); }
.mp-account-menu__btn .mp-icon { width: 18px; height: 18px; color: var(--mp-text-muted); }
.mp-account-menu__name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm); }
.mp-account-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--mp-z-overlay);
  width: min(86vw, 280px);
  padding: var(--mp-space-3);
  background: var(--mp-surface-1); border: 1px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-lg); box-shadow: var(--mp-shadow-lift);
}
.mp-account-menu__who { display: flex; gap: var(--mp-space-3); align-items: center; padding: var(--mp-space-1) var(--mp-space-1) var(--mp-space-3); border-bottom: 1px solid var(--mp-border); margin-bottom: var(--mp-space-2); }
.mp-account-menu__who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.mp-role-chip { display: inline-flex; align-items: center; margin-top: 2px; padding: 1px 8px; border-radius: var(--mp-radius-pill); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold); background: var(--mp-surface-3); color: var(--mp-text); }
.mp-role-chip--child { background: var(--mp-yellow); color: var(--mp-text-on-yellow); }
.mp-account-menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mp-account-menu__item {
  display: flex; align-items: center; gap: var(--mp-space-3); width: 100%;
  min-height: 44px; padding: 0 var(--mp-space-3);
  background: transparent; border: 0; border-radius: var(--mp-radius-md);
  color: var(--mp-text); text-decoration: none; font-weight: var(--mp-fw-medium); text-align: left;
}
.mp-account-menu__item:hover { background: var(--mp-surface-2); color: #fff; }
.mp-account-menu__item .mp-icon { width: 20px; height: 20px; color: var(--mp-text-muted); }
@media (max-width: 599.98px) {
  .mp-account-menu__name, .mp-account-menu__btn > .mp-icon { display: none; }
  .mp-account-menu__btn { padding: 2px; }
}

/* ---------- Section titles ---------- */
.mp-section-title { font-size: var(--mp-fs-xl); margin-bottom: var(--mp-space-4); }
.mp-section-title--sm { font-size: var(--mp-fs-lg); margin-bottom: var(--mp-space-3); }

/* ---------- Hero ---------- */
.mp-hero {
  display: grid; gap: var(--mp-space-5);
  padding: var(--mp-space-6) var(--mp-space-5);
  border-radius: var(--mp-radius-xl);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(0, 102, 255, 0.28), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(255, 45, 135, 0.22), transparent 55%),
    var(--mp-surface-1);
  border: 1px solid var(--mp-border);
  overflow: hidden;
}
.mp-hero::before { opacity: 0.07; }
.mp-hero__kicker {
  display: inline-flex; align-items: center; gap: var(--mp-space-2);
  margin-bottom: var(--mp-space-3);
  padding: 4px 12px; border-radius: var(--mp-radius-pill);
  background: rgba(255, 229, 0, 0.14); color: var(--mp-yellow);
  font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-semibold);
}
.mp-hero h1 { max-width: 18ch; }
.mp-hero__lead { margin-top: var(--mp-space-3); max-width: 56ch; color: #D6D6DD; font-size: var(--mp-fs-lg); }
.mp-hero__actions { margin-top: var(--mp-space-5); }
.mp-hero__pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); align-content: center; }
@media (min-width: 1000px) {
  .mp-hero { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: center; padding: var(--mp-space-7) var(--mp-space-7); }
}

/* ---------- Pillar cards (category links) ---------- */
.mp-pillar-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.mp-pillar-card {
  --_a: var(--mp-smriti-a); --_b: var(--mp-smriti-b);
  position: relative;
  display: flex; align-items: center; gap: var(--mp-space-3);
  min-height: 72px; padding: var(--mp-space-3) var(--mp-space-4) var(--mp-space-3) var(--mp-space-3);
  border-radius: var(--mp-radius-lg);
  background: rgba(10, 10, 15, 0.55);
  border: 1px solid var(--mp-border);
  color: var(--mp-text); text-decoration: none;
  transition: transform var(--mp-dur) var(--mp-ease), border-color var(--mp-dur) var(--mp-ease), background-color var(--mp-dur) var(--mp-ease);
}
.mp-pillar-card--tarka { --_a: var(--mp-tarka-a); --_b: var(--mp-tarka-b); }
.mp-pillar-card--yukti { --_a: var(--mp-yukti-a); --_b: var(--mp-yukti-b); }
.mp-pillar-card--ganit { --_a: var(--mp-ganit-a); --_b: var(--mp-ganit-b); }
.mp-pillar-card--shabd { --_a: var(--mp-shabd-a); --_b: var(--mp-shabd-b); }
.mp-pillar-card--akaar { --_a: var(--mp-akaar-a); --_b: var(--mp-akaar-b); }
.mp-pillar-card--rahasya { --_a: var(--mp-rahasya-a); --_b: var(--mp-rahasya-b); }
.mp-pillar-card--abacus { --_a: var(--mp-abacus-a); --_b: var(--mp-abacus-b); }
.mp-pillar-card:hover { color: #fff; transform: var(--mp-lift); border-color: var(--_b); background: var(--mp-surface-2); }
.mp-pillar-card__icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--_a), var(--_b));
  color: var(--mp-text-on-accent);
}
.mp-pillar-card--tarka .mp-pillar-card__icon { color: #fff; }
.mp-pillar-card__icon .mp-icon { width: 26px; height: 26px; }
.mp-pillar-card__text { display: grid; min-width: 0; flex: 1; }
.mp-pillar-card__name { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-lg); line-height: 1.2; }
.mp-pillar-card__meaning { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-medium); }
.mp-pillar-card__desc { margin-top: var(--mp-space-1); color: #CFCFD6; font-size: var(--mp-fs-sm); }
.mp-pillar-card__go { color: var(--mp-text-muted); width: 20px; height: 20px; }

/* ---------- Rows (horizontal scrollers) ---------- */
.mp-row { position: relative; }
.mp-row-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--mp-space-7); }
.mp-row-group:focus { outline: none; }
.mp-row__head { display: flex; align-items: center; gap: var(--mp-space-3); margin-bottom: var(--mp-space-3); }
.mp-row__head h2 { display: flex; align-items: center; gap: var(--mp-space-2); flex-wrap: wrap; font-size: var(--mp-fs-xl); min-width: 0; }
.mp-row__sub { color: var(--mp-text-muted); font-weight: var(--mp-fw-medium); font-family: var(--mp-font-ui); font-size: var(--mp-fs-md); }
.mp-row__icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; }
.mp-row__icon .mp-icon { width: 20px; height: 20px; }
.mp-row__icon--smriti { background: linear-gradient(135deg, var(--mp-smriti-a), var(--mp-smriti-b)); color: var(--mp-text-on-accent); }
.mp-row__icon--tarka { background: linear-gradient(135deg, var(--mp-tarka-a), var(--mp-tarka-b)); color: #fff; }
.mp-row__icon--yukti { background: linear-gradient(135deg, var(--mp-yukti-a), var(--mp-yukti-b)); color: var(--mp-text-on-yellow); }
.mp-row__icon--ganit { background: linear-gradient(135deg, var(--mp-ganit-a), var(--mp-ganit-b)); color: var(--mp-text-on-yellow); }
.mp-row__icon--shabd { background: linear-gradient(135deg, var(--mp-shabd-a), var(--mp-shabd-b)); color: var(--mp-text-on-yellow); }
.mp-row__icon--akaar { background: linear-gradient(135deg, var(--mp-akaar-a), var(--mp-akaar-b)); color: var(--mp-text-on-yellow); }
.mp-row__icon--rahasya { background: linear-gradient(135deg, var(--mp-rahasya-a), var(--mp-rahasya-b)); color: var(--mp-text-on-yellow); }
.mp-row__icon--abacus { background: linear-gradient(135deg, var(--mp-abacus-a), var(--mp-abacus-b)); color: var(--mp-text-on-yellow); }
.mp-row__age {
  display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 6px; border-radius: 8px;
  font-family: var(--mp-font-ui); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold);
  background: var(--_age); color: var(--mp-text-on-yellow);
}
.mp-row__age--kids { --_age: var(--mp-age-kids); }
.mp-row__age--teens { --_age: var(--mp-age-teens); }
.mp-row__age--youth { --_age: var(--mp-age-youth); color: #fff; }
.mp-row__age--adults { --_age: var(--mp-age-adults); }
.mp-row__age--seniors { --_age: var(--mp-age-seniors); }
.mp-row__more {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--mp-space-3);
  border-radius: var(--mp-radius-pill);
  color: var(--mp-primary-text); font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm); text-decoration: none;
}
.mp-row__more:hover { background: var(--mp-surface-2); color: #fff; }
.mp-row__nav { display: none; gap: var(--mp-space-2); flex: none; margin-left: auto; }
.mp-row__more + .mp-row__nav { margin-left: 0; }
.mp-row__arrow { --_bg: var(--mp-surface-2); min-height: 40px; min-width: 40px; width: 40px; height: 40px; padding: 0; }
@media (hover: hover) and (min-width: 900px) {
  .mp-row__nav { display: inline-flex; }
}
.mp-row__list {
  list-style: none; margin: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--mp-tile-w);
  gap: var(--mp-space-3);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px;
  padding: 6px 4px 14px; margin-inline: -4px;
  scrollbar-width: thin; scrollbar-color: var(--mp-surface-3) transparent;
}
.mp-row__list > li { scroll-snap-align: start; min-width: 0; }
.mp-row__list::-webkit-scrollbar { height: 8px; }
.mp-row__list::-webkit-scrollbar-thumb { background: var(--mp-surface-3); border-radius: 8px; }
.mp-row--featured .mp-row__list { grid-auto-columns: clamp(250px, 78vw, 400px); }
.mp-row__empty { padding: var(--mp-space-4); border: 1px dashed var(--mp-border-strong); border-radius: var(--mp-radius-lg); color: var(--mp-text-muted); grid-column: 1 / -1; }
.mp-row__list > .mp-row__empty { width: min(80vw, 480px); }

/* Kids row: a little brighter */
.mp-row--age-kids {
  padding: var(--mp-space-4);
  border-radius: var(--mp-radius-xl);
  background: linear-gradient(135deg, rgba(255, 229, 0, 0.12), rgba(0, 194, 209, 0.10));
  border: 1px solid rgba(255, 229, 0, 0.25);
}
.mp-row--age-kids .mp-row__list { --mp-tile-w: clamp(160px, 44vw, 250px); }
.mp-row--age-seniors .mp-tile__title { font-size: 1.125rem; }

/* ---------- Grid ---------- */
.mp-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .mp-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--mp-space-4); } }
[data-age="kids"] .mp-grid { gap: var(--mp-space-4); }
@media (min-width: 600px) { [data-age="kids"] .mp-grid, [data-age="seniors"] .mp-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }

/* ---------- Game tile ---------- */
.mp-tile {
  --_a: var(--mp-smriti-a); --_b: var(--mp-smriti-b);
  position: relative;
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--mp-radius-lg);
  background: var(--mp-surface-1);
  color: var(--mp-text); text-decoration: none;
  box-shadow: var(--mp-shadow-1);
  transition: transform var(--mp-dur) var(--mp-ease), box-shadow var(--mp-dur) var(--mp-ease), background-color var(--mp-dur) var(--mp-ease);
}
.mp-tile--tarka { --_a: var(--mp-tarka-a); --_b: var(--mp-tarka-b); }
.mp-tile--yukti { --_a: var(--mp-yukti-a); --_b: var(--mp-yukti-b); }
.mp-tile--ganit { --_a: var(--mp-ganit-a); --_b: var(--mp-ganit-b); }
.mp-tile--shabd { --_a: var(--mp-shabd-a); --_b: var(--mp-shabd-b); }
.mp-tile--akaar { --_a: var(--mp-akaar-a); --_b: var(--mp-akaar-b); }
.mp-tile--rahasya { --_a: var(--mp-rahasya-a); --_b: var(--mp-rahasya-b); }
.mp-tile--abacus { --_a: var(--mp-abacus-a); --_b: var(--mp-abacus-b); }
.mp-tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 2px;
  background: linear-gradient(135deg, var(--_a), var(--_b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity var(--mp-dur) var(--mp-ease);
}
.mp-tile:hover, .mp-tile:focus-visible { transform: var(--mp-lift); box-shadow: var(--mp-shadow-lift); background: var(--mp-surface-2); color: #fff; }
.mp-tile:hover::after, .mp-tile:focus-visible::after { opacity: 1; }
.mp-tile:focus-visible { outline-offset: 4px; }
.mp-tile__media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--mp-radius-lg) var(--mp-radius-lg) 0 0;
  background: linear-gradient(135deg, var(--_a), var(--_b));
}
.mp-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--mp-dur-slow) var(--mp-ease); }
.mp-tile:hover .mp-tile__media img { transform: scale(1.04); }
.mp-tile__play {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--mp-yellow); color: var(--mp-text-on-yellow);
  box-shadow: var(--mp-shadow-2);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--mp-dur) var(--mp-ease), transform var(--mp-dur) var(--mp-ease);
}
.mp-tile__play .mp-icon { width: 20px; height: 20px; margin-left: 2px; }
.mp-tile:hover .mp-tile__play, .mp-tile:focus-visible .mp-tile__play { opacity: 1; transform: none; }
.mp-tile__body { display: grid; gap: 2px; padding: var(--mp-space-2) var(--mp-space-3) var(--mp-space-3); }
.mp-tile__title { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-md); line-height: 1.25; }
.mp-tile__meta, .mp-tile__kicker { display: flex; align-items: center; gap: 6px; color: var(--mp-text-muted); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-medium); }
.mp-tile__note { color: #C8C8D0; font-size: var(--mp-fs-xs); line-height: 1.4; }
.mp-tile__dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--_a), var(--_b)); flex: none; }
.mp-tile--featured .mp-tile__body { padding: var(--mp-space-3) var(--mp-space-4) var(--mp-space-4); gap: var(--mp-space-1); }
.mp-tile--featured .mp-tile__title { font-size: var(--mp-fs-lg); font-weight: var(--mp-fw-bold); }
.mp-tile__desc { color: #C8C8D0; font-size: var(--mp-fs-sm); line-height: 1.45; }
[data-age="kids"] .mp-tile__title { font-size: 1.0625rem; }
[data-age="seniors"] .mp-tile__title { font-size: 1.1875rem; }
[data-age="seniors"] .mp-tile__note { font-size: var(--mp-fs-sm); }

/* ---------- Daily Chanakya card (home) ---------- */
.mp-daily-card {
  display: grid; gap: var(--mp-space-4); align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--mp-space-5);
  border-radius: var(--mp-radius-xl);
  background: linear-gradient(120deg, rgba(255, 229, 0, 0.16), rgba(255, 159, 28, 0.10) 45%, rgba(28, 28, 38, 1) 85%), var(--mp-surface-1);
  border: 1px solid rgba(255, 229, 0, 0.35);
}
.mp-daily-card::before { opacity: 0.06; }
.mp-daily-card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--mp-yellow); color: var(--mp-text-on-yellow);
}
.mp-daily-card__icon .mp-icon { width: 30px; height: 30px; }
.mp-daily-card h2 { font-size: var(--mp-fs-xl); }
.mp-daily-card__tag { color: var(--mp-yellow); font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm); }
.mp-daily-card__today { margin-top: var(--mp-space-1); color: #D6D6DD; }
.mp-daily-card__today strong { color: #fff; }
.mp-daily-card__streak { margin-top: var(--mp-space-1); display: inline-flex; align-items: center; gap: var(--mp-space-1); color: var(--mp-rangoli-marigold); font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm); }
.mp-daily-card__streak .mp-icon { width: 18px; height: 18px; }
.mp-daily-card > .mp-btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 700px) {
  .mp-daily-card { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--mp-space-5) var(--mp-space-6); }
  .mp-daily-card > .mp-btn { grid-column: auto; }
}

/* ---------- Age cards ---------- */
.mp-age-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)); }
.mp-age-card {
  --_age: var(--mp-age-kids);
  position: relative; overflow: hidden;
  display: grid; gap: var(--mp-space-1); align-content: start;
  height: 100%; min-height: 128px;
  padding: var(--mp-space-4);
  border-radius: var(--mp-radius-lg);
  background: var(--mp-surface-1);
  border: 1px solid var(--mp-border);
  border-top: 4px solid var(--_age);
  color: var(--mp-text); text-decoration: none;
  transition: transform var(--mp-dur) var(--mp-ease), background-color var(--mp-dur) var(--mp-ease);
}
.mp-age-card:hover { transform: var(--mp-lift); background: var(--mp-surface-2); color: #fff; }
.mp-age-card--teens { --_age: var(--mp-age-teens); }
.mp-age-card--youth { --_age: var(--mp-age-youth); }
.mp-age-card--adults { --_age: var(--mp-age-adults); }
.mp-age-card--seniors { --_age: var(--mp-age-seniors); }
.mp-age-card__range {
  justify-self: start; padding: 2px 10px; border-radius: var(--mp-radius-pill);
  background: var(--_age); color: var(--mp-text-on-yellow);
  font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold);
}
.mp-age-card--youth .mp-age-card__range { color: #fff; }
.mp-age-card__label { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-lg); }
.mp-age-card__text { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-age-cards--compact .mp-age-card { min-height: 0; }

/* ---------- Page heads (category, age, info pages) ---------- */
.mp-page-head {
  --_a: var(--mp-primary); --_b: var(--mp-accent);
  position: relative;
  display: flex; gap: var(--mp-space-4); align-items: flex-start;
  padding: var(--mp-space-5);
  border-radius: var(--mp-radius-xl);
  background: var(--mp-surface-1);
  border: 1px solid var(--mp-border);
  overflow: hidden;
}
.mp-page-head::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--_a), var(--_b));
}
.mp-page-head--smriti { --_a: var(--mp-smriti-a); --_b: var(--mp-smriti-b); }
.mp-page-head--tarka { --_a: var(--mp-tarka-a); --_b: var(--mp-tarka-b); }
.mp-page-head--yukti { --_a: var(--mp-yukti-a); --_b: var(--mp-yukti-b); }
.mp-page-head--ganit { --_a: var(--mp-ganit-a); --_b: var(--mp-ganit-b); }
.mp-page-head--shabd { --_a: var(--mp-shabd-a); --_b: var(--mp-shabd-b); }
.mp-page-head--akaar { --_a: var(--mp-akaar-a); --_b: var(--mp-akaar-b); }
.mp-page-head--rahasya { --_a: var(--mp-rahasya-a); --_b: var(--mp-rahasya-b); }
.mp-page-head--abacus { --_a: var(--mp-abacus-a); --_b: var(--mp-abacus-b); }
.mp-page-head--age-kids { --_a: var(--mp-age-kids); --_b: var(--mp-rangoli-peacock); background: linear-gradient(135deg, rgba(255, 229, 0, 0.14), rgba(0, 166, 166, 0.12)), var(--mp-surface-1); }
.mp-page-head--age-teens { --_a: var(--mp-age-teens); --_b: var(--mp-rangoli-indigo); }
.mp-page-head--age-youth { --_a: var(--mp-age-youth); --_b: var(--mp-rangoli-sky); }
.mp-page-head--age-adults { --_a: var(--mp-age-adults); --_b: var(--mp-rangoli-marigold); }
.mp-page-head--age-seniors { --_a: var(--mp-age-seniors); --_b: var(--mp-yellow); }
.mp-page-head--daily { --_a: var(--mp-yellow); --_b: var(--mp-rangoli-marigold); }
.mp-page-head--boards { --_a: var(--mp-primary); --_b: var(--mp-rangoli-sky); }
.mp-page-head--parent { --_a: var(--mp-success); --_b: var(--mp-rangoli-peacock); }
.mp-page-head__icon {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--_a), var(--_b)); color: var(--mp-text-on-accent);
}
.mp-page-head__icon .mp-icon { width: 30px; height: 30px; }
.mp-page-head__icon--tarka, .mp-page-head__icon--boards { color: #fff; }
.mp-page-head__icon--brand { background: linear-gradient(135deg, var(--mp-primary), var(--mp-accent)); color: #fff; }
.mp-page-head__age { font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-sm); color: var(--mp-text-on-yellow); }
.mp-page-head__age--youth { color: #fff; }
.mp-page-head__text { min-width: 0; }
.mp-page-head__lead { margin-top: var(--mp-space-2); max-width: 70ch; color: #D6D6DD; font-size: var(--mp-fs-lg); }
.mp-page-head__note { margin-top: var(--mp-space-3); display: flex; align-items: center; gap: var(--mp-space-2); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-page-head__note .mp-icon { width: 20px; height: 20px; color: var(--mp-success); flex: none; }
@media (max-width: 599.98px) {
  .mp-page-head { flex-direction: column; padding: var(--mp-space-4); }
  .mp-page-head__icon { width: 48px; height: 48px; }
}

/* ---------- Chips ---------- */
.mp-chip:is(a):hover { background: var(--mp-surface-3); color: #fff; }
.mp-chip--age { --_age: var(--mp-age-kids); }
.mp-chip--age-teens { --_age: var(--mp-age-teens); }
.mp-chip--age-youth { --_age: var(--mp-age-youth); }
.mp-chip--age-adults { --_age: var(--mp-age-adults); }
.mp-chip--age-seniors { --_age: var(--mp-age-seniors); }
.mp-chip__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--_age); flex: none; }
a.mp-chip { min-height: 44px; padding: 0 var(--mp-space-4); }

/* ---------- Cards, contact, misc ---------- */
.mp-card__title { font-size: var(--mp-fs-lg); margin-bottom: var(--mp-space-3); }
.mp-card > * + * { margin-top: var(--mp-space-3); }
.mp-card > .mp-card__title + * { margin-top: 0; }
.mp-contact-cards { display: grid; gap: var(--mp-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.mp-address { font-style: normal; line-height: 1.7; color: #D6D6DD; }
.mp-numbered { padding-left: 1.4em; display: grid; gap: var(--mp-space-2); color: #DADAE0; }
.mp-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--mp-space-2); }
.mp-ticks li { position: relative; padding-left: 28px; color: #DADAE0; }
.mp-ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(43, 214, 123, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%232BD67B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.mp-link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  background: none; border: 0;
  color: var(--mp-primary-text); font-weight: var(--mp-fw-semibold); text-decoration: underline; text-underline-offset: 3px;
}
.mp-link-btn:hover { color: #8AB8FF; }
.mp-table-wrap { overflow-x: auto; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-md); }
.mp-table { width: 100%; font-size: var(--mp-fs-sm); }
.mp-table th, .mp-table td { padding: var(--mp-space-2) var(--mp-space-3); text-align: left; border-bottom: 1px solid var(--mp-border); white-space: nowrap; }
.mp-table th { color: var(--mp-text-muted); font-weight: var(--mp-fw-semibold); background: rgba(255, 255, 255, 0.02); }
.mp-table tbody tr:last-child td { border-bottom: 0; }
.mp-table td.mp-num, .mp-table th.mp-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 404 ---------- */
.mp-notfound { display: grid; gap: var(--mp-space-4); justify-items: start; padding: var(--mp-space-6) var(--mp-space-5); border-radius: var(--mp-radius-xl); background: var(--mp-surface-1); border: 1px solid var(--mp-border); overflow: hidden; }
.mp-notfound__code {
  font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); line-height: 1;
  font-size: clamp(4rem, 3rem + 6vw, 7rem); letter-spacing: -0.04em; color: var(--mp-yellow);
}
.mp-notfound .mp-pillar-cards { width: 100%; }

/* ---------- Prose blocks on browse pages ---------- */
.mp-main > .mp-prose { font-size: var(--mp-fs-md); }

/* Home: popular games in the hero, then every game in one grid */
.mp-hero__popular { display: grid; gap: var(--mp-space-3); align-content: center; min-width: 0; }
.mp-hero__popular-title { margin: 0; font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); color: var(--mp-yellow); letter-spacing: 0.02em; }
.mp-hero__games, .mp-allgames__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); }
.mp-hero__games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mp-allgames__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.mp-hero__games .mp-tile-item, .mp-allgames__grid .mp-tile-item { min-width: 0; }
.mp-hero__games .mp-tile, .mp-allgames__grid .mp-tile { width: 100%; }
.mp-hero__games .mp-tile__meta { display: none; }
.mp-allgames { scroll-margin-top: 80px; }

/* ---- Live race (/race/) ---- */
.mp-race { display: grid; gap: var(--mp-space-4, 1rem); }
.mp-race__panel { display: grid; gap: var(--mp-space-3, .75rem); }
.mp-race__box { border: 1px solid var(--mp-border, #0002); border-radius: 14px; padding: 1rem; display: grid; gap: .6rem; justify-items: start; }
.mp-race__box h3 { margin: 0; }
.mp-race__join { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.mp-race__code { font-size: 2.2rem; font-weight: 800; letter-spacing: .25em; margin: 0; font-variant-numeric: tabular-nums; }
.mp-race__list { margin: 0; padding-left: 1.4rem; display: grid; gap: .3rem; }
.mp-race__list li { display: flex; justify-content: space-between; gap: 1rem; max-width: 26rem; }
.mp-race__list li.is-me { font-weight: 700; }
.mp-race__stage { min-height: 320px; }


/* ---------- intro.css ---------- */
/* Home: cinematic scroll entrance (like a short film you scroll through).
   --p (0..1) is set by pages/home.js from the scroll position; every layer moves at its own speed.
   0-0.3 walk up to the hall, 0.18-0.5 the doors open, 0.45-1 the category halls fly past. */
.mp-intro { position: relative; height: 560vh; margin: calc(var(--mp-space-5) * -1) calc(var(--mp-space-5) * -1) var(--mp-space-6); --p: 0; }
.mp-intro__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #07060f; isolation: isolate; }
.mp-intro__sky {
  position: absolute; inset: -10% 0 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 32% 8%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 22%, #fff9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 66% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 26%, #fffa 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 6%, #fff8 50%, transparent 51%),
    radial-gradient(80% 60% at 50% 100%, #2a1a4d 0%, #0b0918 60%, #07060f 100%);
  transform: translateY(calc(var(--p) * -80px));
}
.mp-intro__moon {
  position: absolute; top: 12%; right: 14%; width: clamp(40px, 6vw, 80px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #f2d58a 60%, #b98c3a); box-shadow: 0 0 60px 10px #f6d67a44;
  transform: translateY(calc(var(--p) * -140px));
}
.mp-intro__city {
  position: absolute; left: 0; bottom: 18%; width: 100%; height: 45%;
  transform: translateY(calc(var(--p) * 120px)) scale(calc(1 + var(--p) * 0.5)); transform-origin: 50% 100%;
  opacity: calc(1 - var(--p) * 1.6);
}
.mp-intro__hall {
  position: absolute; left: 50%; bottom: 14%; width: min(560px, 74vw); aspect-ratio: 1.25; translate: -50% 0;
  background: linear-gradient(#1b1630, #120f22); border: 1px solid #3a2f5c; border-radius: 10px 10px 0 0; box-shadow: 0 0 120px 30px #0008;
  transform-origin: 50% 82%; transform: scale(calc(1 + var(--p) * var(--p) * 9)); opacity: calc(1.6 - var(--p) * 1.8);
}
.mp-intro__sign {
  position: absolute; top: 9%; left: 50%; translate: -50% 0; display: flex; gap: 12px; align-items: center; padding: 10px 22px;
  border-radius: 12px; background: #0b0918; border: 2px solid #ff9f1c88; box-shadow: 0 0 24px #ff9f1c66, inset 0 0 18px #ff2d8733; white-space: nowrap;
}
.mp-intro__sign img { width: clamp(28px, 4vw, 48px); height: auto; }
.mp-intro__sign span {
  font-family: var(--mp-font-heading); font-weight: 800; font-size: clamp(1.1rem, 3vw, 2rem); letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff, #ffcf6b 60%, #ff9f1c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mp-intro__doorway {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: 30%; height: 52%; perspective: 700px;
  background: #2a1606; border: 3px solid #c2703d; border-bottom: 0; box-shadow: 0 0 40px #ff9f1c55;
}
.mp-intro__light { position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 60%, #fff3c4, #ffb347 45%, #a8521a 100%); opacity: calc(0.35 + var(--p) * 2); }
.mp-intro__door { position: absolute; top: 0; bottom: 0; width: 50%; background: linear-gradient(90deg, #191428, #241c3a); border: 2px solid #3b2f5e; }
.mp-intro__door::after { content: ""; position: absolute; top: 52%; width: 30%; height: 4px; border-radius: 2px; background: #d9b16a; }
.mp-intro__door--l { left: 0; transform-origin: 0 50%; transform: rotateY(calc(clamp(0, (var(--p) - 0.18) * 3.2, 1) * -105deg)); }
.mp-intro__door--l::after { right: 10%; }
.mp-intro__door--r { right: 0; transform-origin: 100% 50%; transform: rotateY(calc(clamp(0, (var(--p) - 0.18) * 3.2, 1) * 105deg)); }
.mp-intro__door--r::after { left: 10%; }
.mp-intro__glow { position: absolute; left: 50%; bottom: -40%; width: 70%; height: 60%; translate: -50% 0; background: radial-gradient(closest-side, #ffb34766, transparent); opacity: calc(0.4 + var(--p) * 1.5); }
.mp-intro__text {
  position: absolute; left: clamp(16px, 6vw, 80px); top: 50%; translate: 0 -50%; max-width: min(560px, 80vw); color: #f5f5f7;
  opacity: calc(1 - var(--p) * 5); transform: translateY(calc(var(--p) * -120px));
}
.mp-intro__kicker { margin: 0 0 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #ffcf6b; }
.mp-intro__kicker span { color: #ff2d87; }
.mp-intro__title {
  margin: 0; font-family: var(--mp-font-display); font-weight: 700; font-size: clamp(4rem, 14vw, 10rem); line-height: 0.86;
  letter-spacing: 0.005em; text-transform: uppercase; text-shadow: 0 6px 40px #000;
}
.mp-intro__lead { margin: 18px 0 0; max-width: 40ch; font-size: clamp(1rem, 2vw, 1.2rem); color: #d7d3ea; }
.mp-intro__scroll {
  position: absolute; left: 50%; bottom: 4%; translate: -50% 0; display: grid; justify-items: center; gap: 10px; color: #f5f5f7; text-decoration: none;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; opacity: calc(1 - var(--p) * 6);
}
.mp-intro__mouse { width: 24px; height: 38px; border: 2px solid #f5f5f7aa; border-radius: 12px; position: relative; }
.mp-intro__mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #ff9f1c;
  animation: mp-intro-wheel 1.6s ease-in-out infinite;
}
@keyframes mp-intro-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
/* the hall of games: a corridor lined with game posters that you walk down (--w 0..1), ending at the arena */
:root { --mp-font-display: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", sans-serif-condensed, sans-serif; }
.mp-intro { --w: clamp(0, (var(--p) - 0.3) / 0.62, 1); }
.mp-intro__hallway { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 45%; pointer-events: none; opacity: clamp(0, (var(--p) - 0.3) * 7, 1); }
.mp-intro__track { position: absolute; left: 50%; top: 48%; transform-style: preserve-3d; transform: translateZ(calc(var(--w) * 3900px)); }
.mp-intro__poster {
  position: absolute; width: min(300px, 34vw); translate: -50% -50%; display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: 6px;
  background: #15111f; border: 1px solid #ff9f1c55; color: #fff; text-decoration: none; pointer-events: auto;
  box-shadow: 0 0 40px #ff9f1c22, 0 20px 40px #000c;
  transform: translate3d(calc(var(--side) * min(560px, 44vw)), 0, var(--z)) rotateY(calc(var(--side) * -62deg));
}
.mp-intro__poster img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.mp-intro__poster span { font-family: var(--mp-font-display); font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.04em; text-align: center; }
.mp-intro__arena { position: absolute; translate: -50% -50%; transform: translate3d(0, 40px, -4500px); transform-style: preserve-3d; width: 1100px; height: 700px; }
.mp-intro__spot { position: absolute; top: -120px; left: 30%; width: 220px; height: 640px; translate: -50% 0; background: linear-gradient(#fff6d8aa, #ffb34722 60%, transparent); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); filter: blur(6px); }
.mp-intro__spot--r { left: 70%; }
.mp-intro__ring {
  position: absolute; left: 50%; bottom: 0; width: 760px; height: 300px; translate: -50% 0; border-radius: 10px;
  background: linear-gradient(#24182f, #120d1a); border-top: 6px solid #ff9f1c; box-shadow: 0 -30px 120px #ff9f1c55, inset 0 0 60px #000;
}
.mp-intro__board {
  position: absolute; left: 50%; top: -150px; width: 260px; height: 260px; translate: -50% 0; border: 6px solid #c2703d; border-radius: 6px;
  background: repeating-conic-gradient(#f2d58a 0 25%, #5b2d1d 0 50%) 0 0 / 65px 65px; box-shadow: 0 0 80px #ffcf6b88;
  transform: rotateX(55deg); transform-origin: 50% 100%;
}
.mp-intro__ringname { position: absolute; left: 0; right: 0; bottom: 60px; text-align: center; font-family: var(--mp-font-display); font-size: 3.4rem; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 30px #ff9f1c; }
/* progress rail on the left, like chapters of a film */
.mp-intro__rail { position: absolute; left: clamp(8px, 2vw, 28px); top: 30%; height: 40%; width: 2px; background: #ffffff22; }
.mp-intro__rail span { position: absolute; inset: 0; background: #ff9f1c; transform-origin: 50% 0; transform: scaleY(var(--p)); }
/* three chapters of text, one after the other */
.mp-intro__text--2 { opacity: calc(min((var(--p) - 0.38) * 8, (0.66 - var(--p)) * 8)); transform: none; pointer-events: none; }
.mp-intro__text--3 { opacity: clamp(0, (var(--p) - 0.84) * 9, 1); transform: translateY(calc((1 - clamp(0, (var(--p) - 0.84) * 9, 1)) * 40px)); }
@media (max-width: 700px) {
  .mp-intro { height: 460vh; margin-inline: calc(var(--mp-space-4) * -1); }
  .mp-intro__hall { width: 86vw; bottom: 10%; }
  .mp-intro__text { top: 20%; translate: 0 0; }
  .mp-intro__poster span { font-size: 1rem; }
  .mp-intro__text--3 { top: 12%; translate: 0 0; }
  .mp-intro__text--3 .mp-intro__title { font-size: 3.6rem; }
  .mp-intro__track { transform: translateZ(calc(var(--w) * 3200px)); }
}
/* still picture for people who turn motion off */
@media (prefers-reduced-motion: reduce) {
  .mp-intro { height: auto; --p: 0.32 !important; }
  .mp-intro__stage { position: relative; height: min(90vh, 640px); }
  .mp-intro__hallway, .mp-intro__text--2, .mp-intro__text--3, .mp-intro__rail { display: none; }
  .mp-intro__text { opacity: 1; transform: none; }
  .mp-intro__mouse::after { animation: none; }
}
/* inside the hall: a warm floor grid running away from you, and lamps overhead */
.mp-intro__stage::before, .mp-intro__stage::after { content: ""; position: absolute; left: -50%; right: -50%; pointer-events: none; opacity: clamp(0, (var(--p) - 0.45) * 3, 0.9); }
.mp-intro__stage::before {
  top: 55%; bottom: -10%; z-index: -1;
  background: repeating-linear-gradient(90deg, #ff9f1c33 0 2px, transparent 2px 90px), repeating-linear-gradient(0deg, #ff9f1c33 0 2px, transparent 2px 70px), linear-gradient(#2a1608, #120a05);
  transform: perspective(500px) rotateX(68deg); transform-origin: 50% 0;
  background-position: 0 calc(var(--p) * 600px);
}
.mp-intro__stage::after {
  top: -10%; height: 45%; z-index: -1;
  background: radial-gradient(circle at 50% 50%, #ffe7a8 0 4px, #ffb34744 5px, transparent 26px) 0 calc(var(--p) * 500px) / 160px 120px, linear-gradient(#120a05, #1e1108);
  transform: perspective(500px) rotateX(-68deg); transform-origin: 50% 100%;
}
@media (min-width: 900px) {
  .mp-intro__hall { left: calc(66% - clamp(0, var(--p) * 4, 1) * 16%); }
}
@media (prefers-reduced-motion: reduce) { .mp-intro__stage::before, .mp-intro__stage::after { display: none; } }

/* Home: rooftop chase band. --q (0..1) follows the band through the screen; each layer slides at its own speed. */
.mp-chase { position: relative; overflow: hidden; border-radius: 20px; margin-block: var(--mp-space-6); min-height: 340px; display: grid; align-items: center;
  background: linear-gradient(#1d1446, #7a2e5a 65%, #f08a4b); --q: 0.5; isolation: isolate; }
.mp-chase__layers { position: absolute; inset: 0; z-index: -1; }
.mp-chase__far, .mp-chase__near { position: absolute; bottom: 0; left: 0; width: 200%; height: 70%; }
.mp-chase__far { transform: translateX(calc(var(--q) * -12%)); opacity: .9; }
.mp-chase__near { height: 55%; transform: translateX(calc(var(--q) * -38%)); }
.mp-chase__runner { position: absolute; bottom: 34%; width: 18px; height: 34px; border-radius: 4px 4px 2px 2px; background: #00a6a6;
  box-shadow: 0 -16px 0 -2px #c68642, 0 -24px 0 -5px #ffe500; transform: translateX(calc(var(--q) * var(--s) * 1vw)); }
.mp-chase__runner::after { content: ''; position: absolute; left: 3px; right: 3px; top: 100%; height: 12px; border-inline: 4px solid #3a2a1a; }
.mp-chase__runner--a { left: 6%; --s: 70; }
.mp-chase__runner--b { left: 2%; --s: 60; background: #ff2d87; opacity: .6; bottom: 40%; }
.mp-chase__runner--c { left: -2%; --s: 52; background: #ffe500; opacity: .5; bottom: 37%; }
.mp-chase__text { max-width: 34rem; padding: var(--mp-space-5); border-radius: 16px; background: linear-gradient(90deg, #0000, #0007 30%); margin-left: auto; color: #fff; text-shadow: 0 2px 12px #0008; }
.mp-chase__text h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: .2em 0; }
.mp-chase__kicker { font-weight: 700; color: #ffe500; margin: 0; }
@media (max-width: 640px) { .mp-chase { align-items: start; min-height: 420px; } .mp-chase__text { margin: 0; } }
@media (prefers-reduced-motion: reduce) { .mp-chase__far, .mp-chase__near, .mp-chase__runner { transform: none; } }
/* real 3D version (pages/intro3d.js): the canvas replaces the drawn building, corridor and arena */
.mp-intro__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.mp-intro.is-3d .mp-intro__sky, .mp-intro.is-3d .mp-intro__city, .mp-intro.is-3d .mp-intro__hall,
.mp-intro.is-3d .mp-intro__stage::before, .mp-intro.is-3d .mp-intro__stage::after { display: none; }
.mp-intro.is-3d .mp-intro__hallway { display: none; }   /* the posters are drawn on the 3D walls instead */
.mp-intro.is-3d .mp-intro__text, .mp-intro.is-3d .mp-intro__scroll, .mp-intro.is-3d .mp-intro__rail { z-index: 2; }
.mp-intro.is-3d .mp-intro__text { text-shadow: 0 4px 30px #000; }


/* ---------- auth.css ---------- */
/* =====================================================================
   auth.css  Accounts: login, signup, parent zone, account, dev badge,
   mock Google dialog. DESIGN.md 3.7-3.10, 5, 10 and 12.
   ===================================================================== */

/* ---------- Auth card ---------- */
.mp-auth { display: grid; justify-items: center; }
.mp-auth__card {
  width: 100%; max-width: 520px;
  padding: var(--mp-space-6) var(--mp-space-5);
  background: var(--mp-surface-1);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-xl);
  box-shadow: var(--mp-shadow-2);
}
.mp-auth__card > * + * { margin-top: var(--mp-space-4); }
.mp-auth__head { display: flex; align-items: center; gap: var(--mp-space-3); }
.mp-auth__head img { width: 48px; height: 48px; border-radius: 14px; }
.mp-auth__head h1 { font-size: var(--mp-fs-2xl); }
.mp-auth__body > * + * { margin-top: var(--mp-space-4); }
.mp-auth__signedin > * + * { margin-top: var(--mp-space-4); }
.mp-auth__foot { padding-top: var(--mp-space-4); border-top: 1px solid var(--mp-border); color: var(--mp-text-muted); text-align: center; }
.mp-auth__note { display: flex; gap: var(--mp-space-2); align-items: flex-start; padding: var(--mp-space-3); border-radius: var(--mp-radius-md); background: var(--mp-surface-2); font-size: var(--mp-fs-sm); }
.mp-auth__note .mp-icon { color: var(--mp-success); width: 20px; height: 20px; margin-top: 1px; }
.mp-auth__google-note { text-align: center; }
@media (max-width: 599.98px) { .mp-auth__card { padding: var(--mp-space-5) var(--mp-space-4); } }

.mp-form > * + * { margin-top: var(--mp-space-4); }
.mp-form .mp-field + .mp-field { margin-top: var(--mp-space-4); }
.mp-form-error:focus { outline: var(--mp-focus-outline); outline-offset: 2px; }
.mp-error:not([hidden])::before { content: "! "; font-weight: var(--mp-fw-bold); }

/* ---------- Tabs ---------- */
.mp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--mp-bg); border-radius: var(--mp-radius-pill); border: 1px solid var(--mp-border); }
.mp-tabs__tab {
  min-height: 44px; padding: 0 var(--mp-space-3);
  border: 0; border-radius: var(--mp-radius-pill);
  background: transparent; color: var(--mp-text-muted);
  font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-sm);
}
.mp-tabs__tab:hover { color: #fff; background: var(--mp-surface-2); }
.mp-tabs__tab[aria-selected="true"] { background: var(--mp-surface-3); color: #fff; box-shadow: inset 0 -3px 0 var(--mp-yellow); }
.mp-tabs__panel > * + * { margin-top: var(--mp-space-4); }
.mp-tabs__panel:focus-visible { outline-offset: 6px; }

/* ---------- Password field ---------- */
.mp-password { position: relative; }
.mp-password .mp-input { padding-right: 52px; }
.mp-password__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 40px;
  border: 0; border-radius: var(--mp-radius-sm);
  background: transparent; color: var(--mp-text-muted);
}
.mp-password__toggle:hover { color: #fff; background: var(--mp-surface-2); }
.mp-password__toggle .mp-icon { width: 22px; height: 22px; }

/* ---------- Divider, Google ---------- */
.mp-divider { display: flex; align-items: center; gap: var(--mp-space-3); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-divider::before, .mp-divider::after { content: ""; flex: 1; height: 1px; background: var(--mp-border-strong); opacity: 0.6; }
.mp-btn--google { --_bg: #F5F5F7; --_fg: #1F1F1F; --_bd: #F5F5F7; }
.mp-btn--google:hover { background: #FFFFFF; color: #1F1F1F; }

/* ---------- Forgot password ---------- */
.mp-forgot__panel { margin-top: var(--mp-space-2); padding: var(--mp-space-4); border-radius: var(--mp-radius-md); background: var(--mp-surface-2); }
.mp-forgot__panel > * + * { margin-top: var(--mp-space-3); }
.mp-forgot__panel .mp-input { background: var(--mp-bg); }

/* ---------- Sign-up steps ---------- */
.mp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mp-space-2); counter-reset: none; }
.mp-steps__item { display: flex; align-items: center; gap: var(--mp-space-2); color: var(--mp-text-muted); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-semibold); }
.mp-steps__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--mp-border-strong); flex: none; font-size: var(--mp-fs-xs); }
.mp-steps__item.is-current { color: #fff; }
.mp-steps__item.is-current .mp-steps__num { border-color: var(--mp-yellow); background: var(--mp-yellow); color: var(--mp-text-on-yellow); }
.mp-steps__item.is-done .mp-steps__num { border-color: var(--mp-success); color: var(--mp-success); }
.mp-step > * + * { margin-top: var(--mp-space-4); }
.mp-step__title { font-size: var(--mp-fs-xl); }
.mp-step__title:focus { outline: none; }
.mp-minor__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(43, 214, 123, 0.16); color: var(--mp-success); }
.mp-minor__icon .mp-icon { width: 30px; height: 30px; }
.mp-minor__icon--mail { background: rgba(92, 157, 255, 0.16); color: var(--mp-primary-text); }
.mp-minor__steps { padding-left: 1.4em; display: grid; gap: var(--mp-space-2); color: #DADAE0; }

/* ---------- Parent zone ---------- */
.mp-parent > * + *, .mp-account > * + * { margin-top: var(--mp-space-5); }
.mp-parent__grid, .mp-account__grid { display: grid; gap: var(--mp-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.mp-parent__main { display: grid; gap: var(--mp-space-5); }
@media (min-width: 1100px) {
  .mp-parent__main { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); align-items: start; }
  .mp-parent__children { grid-column: 1; grid-row: 1 / span 2; }
}
.mp-parent__section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--mp-space-2); }
.mp-parent__section-head .mp-section-title { margin-bottom: var(--mp-space-3); }
.mp-parent__verify { max-width: 640px; }
.mp-child-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mp-space-3); }
.mp-child-card {
  padding: var(--mp-space-4);
  background: var(--mp-surface-1); border: 1px solid var(--mp-border);
  border-left: 4px solid var(--_age, var(--mp-age-kids));
  border-radius: var(--mp-radius-lg);
}
.mp-child-card--teens { --_age: var(--mp-age-teens); }
.mp-child-card > * + * { margin-top: var(--mp-space-3); }
.mp-child-card__head { display: flex; align-items: center; gap: var(--mp-space-3); }
.mp-child-card__head .mp-avatar { width: 48px; height: 48px; font-size: 1.25rem; }
.mp-child-card__name { font-family: var(--mp-font-heading); font-size: var(--mp-fs-lg); font-weight: var(--mp-fw-bold); line-height: 1.2; }
.mp-child-card__user { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-child-card__user code { font-family: var(--mp-font-mono); color: #fff; background: var(--mp-surface-2); padding: 1px 6px; border-radius: 6px; }
.mp-child-card__facts { display: flex; flex-wrap: wrap; gap: var(--mp-space-2); }
.mp-child-card__panel { padding: var(--mp-space-4); border-radius: var(--mp-radius-md); background: var(--mp-surface-2); }
.mp-child-card__panel > * + * { margin-top: var(--mp-space-3); }
.mp-child-card__panel .mp-input { background: var(--mp-bg); }
.mp-child-card__panel h3 { font-size: var(--mp-fs-md); }

/* ---------- Account ---------- */
.mp-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--mp-space-2) var(--mp-space-4); }
.mp-facts dt { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-facts dd { font-weight: var(--mp-fw-semibold); overflow-wrap: anywhere; }
.mp-inline-field { display: flex; gap: var(--mp-space-2); }
.mp-inline-field .mp-input { flex: 1; min-width: 0; }
.mp-account__scores { grid-column: 1 / -1; }
.mp-account__streak { display: flex; align-items: center; gap: var(--mp-space-2); font-size: var(--mp-fs-xl); font-weight: var(--mp-fw-bold); font-family: var(--mp-font-heading); }
.mp-account__streak .mp-icon { color: var(--mp-rangoli-marigold); width: 28px; height: 28px; }
.mp-account__child-note { display: flex; gap: var(--mp-space-2); align-items: flex-start; color: #DADAE0; }
.mp-account__child-note .mp-icon { color: var(--mp-success); width: 20px; height: 20px; margin-top: 2px; }
.mp-dialog__title { font-size: var(--mp-fs-xl); }
.mp-dialog .mp-form > * + * { margin-top: var(--mp-space-4); }
.mp-dialog__actions { justify-content: flex-end; }

/* ---------- Mock Google dialog (test mode only) ---------- */
.mp-mock-google .mp-form > * + * { margin-top: var(--mp-space-4); }
.mp-mock-google__brand { display: flex; align-items: center; gap: var(--mp-space-2); font-weight: var(--mp-fw-semibold); }
.mp-mock-google__tag { display: inline-flex; padding: 2px 8px; border-radius: var(--mp-radius-pill); background: var(--mp-warning); color: #0A0A0F; font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-bold); }

/* ---------- Dev badge (local hosts only) ---------- */
.mp-dev-badge {
  position: fixed; z-index: var(--mp-z-dev);
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: min(92vw, 340px);
  font-size: var(--mp-fs-xs);
}
@media (max-width: 899.98px) { .mp-dev-badge { bottom: calc(var(--mp-bottombar-h) + 10px + env(safe-area-inset-bottom, 0px)); } }
.mp-dev-badge__pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 2px solid #0A0A0F; border-radius: var(--mp-radius-pill);
  background: var(--mp-warning); color: #0A0A0F;
  font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-xs);
  box-shadow: var(--mp-shadow-2);
}
.mp-dev-badge--real .mp-dev-badge__pill { background: var(--mp-danger); }
/* phones: a short label so the pill covers less of the game while testing */
.mp-dev-badge__short { display: none; }
@media (max-width: 599.98px) {
  .mp-dev-badge__pill { min-height: 28px; padding: 0 10px; }
  .mp-dev-badge__long { display: none; }
  .mp-dev-badge__short { display: inline; }
}
.mp-dev-badge__panel {
  margin-bottom: 8px; padding: var(--mp-space-3);
  background: var(--mp-surface-1); color: var(--mp-text);
  border: 1px solid var(--mp-border-strong); border-radius: var(--mp-radius-md);
  box-shadow: var(--mp-shadow-lift);
  display: grid; gap: var(--mp-space-2);
}
.mp-dev-badge__panel p { color: var(--mp-text-muted); line-height: 1.4; }
.mp-dev-badge__panel .mp-btn { justify-content: flex-start; }


/* ---------- play.css ---------- */
/* =====================================================================
   play.css  Game page stage, setting picker, result panel, login gate,
   Daily Chanakya, leaderboards, ad slots. DESIGN.md 3.4-3.6, 5, 9, 13.
   Game-internal styles never go here: they live in src/games/<slug>/style.css.
   ===================================================================== */

/* ---------- Game page head ---------- */
.mp-game-page > * + * { margin-top: var(--mp-space-6); }
.mp-game-head { display: grid; gap: var(--mp-space-2); max-width: var(--mp-stage-max); }
.mp-game-head__pillar .mp-badge { text-decoration: none; min-height: 28px; padding: 4px 10px; }
.mp-game-head__lead { color: #D6D6DD; font-size: var(--mp-fs-lg); max-width: 64ch; }

/* ---------- Stage ---------- */
.mp-stage {
  position: relative;
  max-width: var(--mp-stage-max);
  background: var(--mp-stage-bg);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  box-shadow: var(--mp-shadow-2);
  overflow: hidden;
}
.mp-stage:fullscreen { max-width: none; width: 100vw; height: 100vh; border-radius: 0; overflow: auto; display: flex; flex-direction: column; }
.mp-stage:fullscreen .mp-stage__game { flex: 1; display: grid; align-content: center; }
.mp-stage__cover { display: grid; gap: 0; }
@media (min-width: 760px) { .mp-stage__cover { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mp-stage__art { position: relative; background: linear-gradient(135deg, var(--mp-surface-2), var(--mp-bg)); }
.mp-stage__thumb { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mp-stage__setup { display: grid; gap: var(--mp-space-4); align-content: center; padding: var(--mp-space-5); }
.mp-stage__play { justify-self: start; min-width: 180px; }
.mp-stage__play[disabled] { opacity: 0.6; }
.mp-stage__setting-line { color: #D6D6DD; font-size: var(--mp-fs-sm); min-height: 1.4em; }
.mp-stage__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mp-space-2);
  padding: var(--mp-space-2) var(--mp-space-3);
  background: var(--mp-surface-1); border-bottom: 1px solid var(--mp-border);
}
.mp-stage__tools { display: flex; flex-wrap: wrap; gap: var(--mp-space-2); }
.mp-stage__tools .mp-btn { min-height: 40px; }
@media (max-width: 479.98px) {
  .mp-stage__tools .mp-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mp-stage__tools .mp-btn { padding: 0; width: 44px; min-height: 44px; }
}
.mp-chip--setting { background: var(--mp-surface-3); font-weight: var(--mp-fw-semibold); }
.mp-stage__game { padding: var(--mp-space-4); min-height: 280px; }
@media (max-width: 599.98px) { .mp-stage__game { padding: var(--mp-space-3) var(--mp-space-2); } }
.mp-stage__game:focus { outline: none; }
.mp-stage__loading { display: grid; place-items: center; min-height: 240px; color: var(--mp-text-muted); }
.mp-stage[data-age="kids"] { --mp-stage-bg: #171726; }

/* ---------- Setting picker (radio cards) ---------- */
.mp-setting-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.mp-setting-picker__legend { padding: 0; margin-bottom: var(--mp-space-3); font-family: var(--mp-font-heading); font-weight: var(--mp-fw-semibold); font-size: var(--mp-fs-lg); }
.mp-setting-picker__options { display: grid; gap: var(--mp-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mp-setting-picker--inline .mp-setting-picker__options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.mp-setting-picker__option {
  --_c: var(--mp-age-kids);
  position: relative;
  display: grid; gap: 2px; align-content: start;
  min-height: 64px; padding: var(--mp-space-2) var(--mp-space-3) var(--mp-space-2) 40px;
  border: 2px solid var(--mp-border-strong); border-radius: var(--mp-radius-md);
  background: var(--mp-surface-1);
  cursor: pointer;
  transition: border-color var(--mp-dur-fast) var(--mp-ease), background-color var(--mp-dur-fast) var(--mp-ease);
}
.mp-setting-picker__option--teens { --_c: var(--mp-age-teens); }
.mp-setting-picker__option--adults { --_c: var(--mp-age-adults); }
.mp-setting-picker__option--seniors { --_c: var(--mp-age-seniors); }
.mp-setting-picker__option:hover { background: var(--mp-surface-2); }
.mp-setting-picker__option input {
  position: absolute; left: 12px; top: 12px;
  width: 20px; height: 20px; margin: 0;
  accent-color: var(--mp-yellow);
}
.mp-setting-picker__option:has(input:checked) { border-color: var(--_c); background: var(--mp-surface-2); box-shadow: inset 0 0 0 1px var(--_c); }
.mp-setting-picker__option:has(input:focus-visible) { outline: var(--mp-focus-outline); outline-offset: 2px; }
.mp-setting-picker__name { font-weight: var(--mp-fw-bold); }
.mp-setting-picker__hint { color: var(--mp-text-muted); font-size: var(--mp-fs-xs); line-height: 1.35; }
.mp-setting-picker__note { margin-top: var(--mp-space-2); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
@media (max-width: 359.98px) { .mp-setting-picker__options { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Result panel ---------- */
.mp-result {
  display: grid; gap: var(--mp-space-3); justify-items: start;
  padding: var(--mp-space-6) var(--mp-space-5);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(255, 229, 0, 0.12), transparent 60%),
    var(--mp-surface-1);
  border-top: 1px solid var(--mp-border);
}
.mp-result__title { font-size: var(--mp-fs-xl); }
.mp-result__title:focus { outline: none; }
.mp-result__title:focus-visible { outline: var(--mp-focus-outline); outline-offset: 4px; }
.mp-result__score { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); line-height: 1.05; color: #fff; }
.mp-result__score small { font-size: 0.45em; color: var(--mp-text-muted); font-weight: var(--mp-fw-semibold); }
.mp-result__best-new { display: inline-flex; align-items: center; gap: var(--mp-space-2); padding: 4px 12px; border-radius: var(--mp-radius-pill); background: var(--mp-yellow); color: var(--mp-text-on-yellow); font-weight: var(--mp-fw-bold); }
.mp-result__best-new .mp-icon { width: 18px; height: 18px; }
.mp-result__stats { display: flex; flex-wrap: wrap; gap: var(--mp-space-2); }
.mp-result__stats > div { min-width: 104px; padding: var(--mp-space-2) var(--mp-space-3); border-radius: var(--mp-radius-md); background: var(--mp-surface-2); }
.mp-result__stats dt { color: var(--mp-text-muted); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-semibold); }
.mp-result__stats dd { font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-lg); font-variant-numeric: tabular-nums; }
.mp-result__done { font-weight: var(--mp-fw-semibold); color: var(--mp-yellow); }
.mp-result__actions { margin-top: var(--mp-space-2); }

/* ---------- Login gate dialog ---------- */
.mp-gate { position: relative; text-align: center; }
.mp-gate > * + * { margin-top: var(--mp-space-4); }
.mp-gate__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-inline: auto; border-radius: 16px; background: linear-gradient(135deg, var(--mp-primary), var(--mp-accent)); color: #fff; }
.mp-gate__icon .mp-icon { width: 30px; height: 30px; }
.mp-gate__title { font-size: var(--mp-fs-xl); }
.mp-gate__text { color: #D6D6DD; }
.mp-gate__actions { display: grid; gap: var(--mp-space-2); }
.mp-gate__kids { font-size: var(--mp-fs-sm); }
.mp-gate__close-form { position: absolute; top: var(--mp-space-2); right: var(--mp-space-2); margin: 0 !important; }
.mp-gate__close { --_bg: transparent; }

/* ---------- Game page text ---------- */
.mp-game-info { max-width: var(--mp-stage-max); }
.mp-settings-list { display: grid; gap: var(--mp-space-2); }
.mp-settings-list__row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--mp-space-3); padding: var(--mp-space-2) var(--mp-space-3); border-radius: var(--mp-radius-md); background: var(--mp-surface-1); border-left: 4px solid var(--_c, var(--mp-age-kids)); }
.mp-settings-list__row--teens { --_c: var(--mp-age-teens); }
.mp-settings-list__row--adults { --_c: var(--mp-age-adults); }
.mp-settings-list__row--seniors { --_c: var(--mp-age-seniors); }
.mp-settings-list dt { font-weight: var(--mp-fw-bold); }
.mp-settings-list dd { color: #DADAE0; }
@media (max-width: 479.98px) { .mp-settings-list__row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- Daily Chanakya ---------- */
.mp-daily > * + * { margin-top: var(--mp-space-5); }
.mp-daily__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--mp-space-4); }
.mp-daily__top .mp-section-title { margin-bottom: var(--mp-space-1); }
.mp-daily__date { color: var(--mp-text-muted); font-weight: var(--mp-fw-medium); }
.mp-daily__streak { padding: var(--mp-space-3) var(--mp-space-4); border-radius: var(--mp-radius-lg); background: var(--mp-surface-1); border: 1px solid rgba(255, 159, 28, 0.4); }
.mp-daily__streak-now { display: flex; align-items: center; gap: var(--mp-space-2); font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-lg); }
.mp-daily__streak-now .mp-icon { color: var(--mp-rangoli-marigold); }
.mp-daily__streak .mp-muted { font-size: var(--mp-fs-sm); }
.mp-daily__kicker { display: flex; align-items: center; gap: var(--mp-space-2); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-semibold); }
.mp-daily__game { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-2xl); line-height: 1.15; }
.mp-daily__game a { color: inherit; text-decoration: none; }
.mp-daily__game a:hover { text-decoration: underline; }
.mp-daily__done { display: flex; gap: var(--mp-space-2); align-items: center; padding: var(--mp-space-2) var(--mp-space-3); border-radius: var(--mp-radius-md); background: rgba(43, 214, 123, 0.14); color: #CFF7DE; font-weight: var(--mp-fw-semibold); }
.mp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--mp-space-2); max-width: 560px; }
.mp-week__day { display: grid; justify-items: center; gap: 4px; padding: var(--mp-space-2) 0; border-radius: var(--mp-radius-md); background: var(--mp-surface-1); font-size: var(--mp-fs-xs); color: var(--mp-text-muted); }
.mp-week__dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--mp-border-strong); color: transparent; }
.mp-week__dot .mp-icon { width: 18px; height: 18px; }
.mp-week__day.is-played .mp-week__dot { border: 0; background: var(--mp-rangoli-marigold); color: var(--mp-text-on-yellow); }
.mp-week__day.is-today { box-shadow: inset 0 0 0 2px var(--mp-yellow); color: #fff; }
.mp-daily__about { max-width: var(--mp-prose-max); }

/* ---------- Leaderboards ---------- */
.mp-boards > * + * { margin-top: var(--mp-space-5); }
.mp-boards__controls { display: grid; gap: var(--mp-space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); max-width: 820px; }
.mp-boards__controls .mp-field + .mp-field { margin-top: 0; }
.mp-boards__body > * + * { margin-top: var(--mp-space-4); }
.mp-boards .mp-table-wrap { max-width: 820px; }
.mp-board-table { width: 100%; font-size: var(--mp-fs-md); }
.mp-board-table caption { text-align: left; padding: 0 0 var(--mp-space-3); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); }
.mp-board-table th, .mp-board-table td { padding: var(--mp-space-3); text-align: left; border-bottom: 1px solid var(--mp-border); }
.mp-board-table th { color: var(--mp-text-muted); font-size: var(--mp-fs-sm); font-weight: var(--mp-fw-semibold); }
.mp-board-table td:first-child, .mp-board-table th:first-child { width: 4.5rem; }
.mp-board-table td:last-child, .mp-board-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.mp-board-table tr.is-you td { background: rgba(255, 229, 0, 0.1); font-weight: var(--mp-fw-bold); }
.mp-board-table tr.is-you td:first-child { box-shadow: inset 4px 0 0 var(--mp-yellow); }
.mp-rank { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; background: var(--mp-surface-2); font-weight: var(--mp-fw-bold); }
.mp-rank--1 { background: var(--mp-yellow); color: var(--mp-text-on-yellow); }
.mp-rank--2 { background: #D9D9E3; color: #0A0A0F; }
.mp-rank--3 { background: var(--mp-rangoli-marigold); color: #0A0A0F; }
.mp-you-chip { margin-left: var(--mp-space-2); padding: 1px 8px; border-radius: var(--mp-radius-pill); background: var(--mp-yellow); color: var(--mp-text-on-yellow); font-size: var(--mp-fs-xs); }
.mp-myrank { display: grid; gap: var(--mp-space-2); max-width: 560px; padding: var(--mp-space-5); border-radius: var(--mp-radius-xl); background: var(--mp-surface-1); border: 1px solid var(--mp-border); }
.mp-myrank__big { font-family: var(--mp-font-heading); font-weight: var(--mp-fw-bold); font-size: var(--mp-fs-2xl); }
.mp-local-bests { max-width: 820px; }

/* ---------- Ad slot (hidden until ui/ads.js allows it) ---------- */
.mp-ad {
  max-width: var(--mp-stage-max);
  padding: var(--mp-space-3);
  border: 1px solid var(--mp-border); border-radius: var(--mp-radius-md);
  background: var(--mp-surface-1);
}
.mp-ad__label { margin-bottom: var(--mp-space-2); color: var(--mp-text-muted); font-size: var(--mp-fs-xs); font-weight: var(--mp-fw-semibold); letter-spacing: 0.06em; text-transform: uppercase; }
.mp-ad__test { display: grid; place-items: center; min-height: 90px; border: 2px dashed var(--mp-border-strong); border-radius: var(--mp-radius-sm); color: var(--mp-text-muted); font-size: var(--mp-fs-sm); text-align: center; padding: var(--mp-space-3); }


/* ---------- village.css ---------- */
/* Mera Gaon (/village/): the isometric village board, the bar of resources, the sheets that slide up from
   the bottom, the units and the raid screen. Everything here is prefixed .mp-vg so it cannot leak into the
   rest of the site. The board itself is one transformed element, so panning and zooming stay cheap. */

/* ---------------------------------------------------------------- page shell */
.mp-vg-shell {
  margin: var(--mp-space-5) 0;
}

.mp-vg-panel:empty {
  display: none;
}

.mp-vg-panel {
  margin-bottom: var(--mp-space-3);
}

.mp-vg-stagewrap[hidden] {
  display: none;
}

.mp-vg {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--mp-space-2);
  position: relative;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg, 16px);
  background: var(--mp-surface-1);
  padding: var(--mp-space-2);
}

.mp-vg.is-busy {
  cursor: progress;
}

.mp-vg.is-busy .mp-vg-dock,
.mp-vg.is-busy .mp-vg-sheet {
  opacity: 0.75;
}

/* ---------------------------------------------------------------- resource bar */
.mp-vg-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mp-space-2);
}

.mp-vg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  font-size: var(--mp-fs-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.mp-vg-chip b {
  font-weight: var(--mp-fw-semibold);
}

.mp-vg-chip em {
  color: var(--mp-text-muted);
  font-style: normal;
  font-size: var(--mp-fs-xs);
}

.mp-vg-chip.is-full b {
  color: var(--mp-warning);
}

.mp-vg-chip i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mp-vg-chip--gold i {
  background: radial-gradient(circle at 35% 30%, #FFE79A, #E7B22F 70%, #C98B16);
}

.mp-vg-chip--grain i {
  /* clearly not gold: a khaki ear of grain rather than a yellow coin */
  background: linear-gradient(135deg, #D8C184, #8A7540);
  border-radius: 50% 10% 50% 10%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.mp-vg-chip--valour i {
  background: conic-gradient(from 0.1turn, #2BB673, #00C2D1, #2BB673);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 100%, 50% 73%, 21% 100%, 32% 57%, 2% 35%, 39% 35%);
  border-radius: 0;
}

.mp-vg-chip--hall i {
  background: linear-gradient(#C2502F, #8A3A20);
  clip-path: polygon(50% 0, 100% 45%, 85% 100%, 15% 100%, 0 45%);
  border-radius: 0;
}

.mp-vg-chip--builder i {
  background: linear-gradient(#8A8F9A, #5C6270);
  clip-path: polygon(20% 0, 80% 0, 60% 55%, 70% 100%, 30% 100%, 40% 55%);
  border-radius: 0;
}

.mp-vg-chip--time i {
  background: var(--mp-surface-3);
  border: 2px solid var(--mp-text-muted);
}

.mp-vg-chip--sm {
  font-size: var(--mp-fs-xs);
  padding: 0.2em 0.5em;
}

.mp-vg-collect {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 0.4em 0.9em;
  background: linear-gradient(#FFD766, #E7B22F);
  color: #2A1C10;
  font-weight: var(--mp-fw-semibold);
  font-size: var(--mp-fs-sm);
  cursor: pointer;
  min-height: 36px;
}

.mp-vg-collect:hover {
  background: linear-gradient(#FFE79A, #F0BE3F);
}

/* ---------------------------------------------------------------- the board */
.mp-vg-stage {
  position: relative;
  height: min(62vh, 560px);
  min-height: 320px;
  border-radius: var(--mp-radius-md, 12px);
  overflow: hidden;
  background: linear-gradient(#1B2A3A 0%, #27405A 42%, #3C6B57 100%);
}

.mp-vg-port {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  outline-offset: -3px;
}

.mp-vg-port:active {
  cursor: grabbing;
}

.mp-vg-port:focus-visible {
  outline: 3px solid var(--mp-yellow);
}

.mp-vg-board {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.mp-vg-ground {
  position: absolute;
  top: 0;
  left: 0;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
}

.mp-vg-layer {
  position: absolute;
  inset: 0;
}

/* ---------------------------------------------------------------- buildings */
.mp-vg-b {
  position: absolute;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mp-vg-b .mp-vg-art {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mp-vg-b:focus-visible {
  outline: 3px solid var(--mp-yellow);
  outline-offset: 2px;
  border-radius: 6px;
}

.mp-vg-b.is-selected .mp-vg-art {
  filter: drop-shadow(0 0 0 #FFE500) drop-shadow(0 0 6px rgba(255, 229, 0, 0.9));
}

.mp-vg-b.is-new .mp-vg-art,
.mp-vg-b.is-working .mp-vg-art {
  opacity: 0.82;
}

.mp-vg-b.is-new .mp-vg-art {
  filter: grayscale(0.5);
}

.mp-vg-b--enemy {
  cursor: default;
}

.mp-vg-b.is-wrecked .mp-vg-art {
  animation: mp-vg-wreck 400ms ease-in forwards;
}

@keyframes mp-vg-wreck {
  to { opacity: 0; transform: translateY(6px) scale(0.86) rotate(-3deg); filter: brightness(0.5); }
}

.mp-vg-b__badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -4px);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--mp-fw-semibold);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.mp-vg-b__badge--clock {
  background: #12121A;
  color: #F5F5F7;
}

.mp-vg-b__badge--gold {
  background: linear-gradient(#FFD766, #E7B22F);
  color: #2A1C10;
}

.mp-vg-b__badge--grain {
  background: linear-gradient(#EADCA6, #C8A24A);
  color: #2A1C10;
}

.mp-vg-b__hp {
  /* under the building, not at the top of its art box: a tall tower would float its bar in mid-air */
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 2px;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  pointer-events: none;
}

.mp-vg-b__hp i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(#56E08A, #2BB673);
}

/* placing and moving */
.mp-vg-ghost {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(43, 182, 115, 0.9));
}

.mp-vg-ghost svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mp-vg-ghost.is-bad {
  filter: drop-shadow(0 0 4px rgba(255, 90, 95, 0.95)) saturate(0.4);
}

.mp-vg-cursor {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 229, 0, 0.3);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 229, 0, 0.8);
}

/* ---------------------------------------------------------------- units */
.mp-vg-u {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 46px;
  pointer-events: none;
  will-change: transform;
}

.mp-vg-u-art,
.mp-vg-u-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mp-vg-u__shadow {
  fill: rgba(0, 0, 0, 0.3);
}

.mp-vg-u.is-hit .mp-vg-u__body {
  filter: brightness(2.2) saturate(0.4);
}

.mp-vg-u.is-down .mp-vg-u-art {
  animation: mp-vg-fall 480ms ease-in forwards;
  transform-origin: 50% 90%;
}

@keyframes mp-vg-fall {
  to { opacity: 0; transform: rotate(-72deg) translateY(4px); }
}

/* the walk: legs swing, body bobs a little */
.mp-vg-u.is-walk .mp-vg-u__leg--f { animation: mp-vg-stepf 420ms linear infinite; }
.mp-vg-u.is-walk .mp-vg-u__leg--b { animation: mp-vg-stepb 420ms linear infinite; }
.mp-vg-u.is-walk .mp-vg-u__body { animation: mp-vg-bob 420ms ease-in-out infinite; }

@keyframes mp-vg-stepf {
  0%, 100% { transform: rotate(14deg); }
  50% { transform: rotate(-14deg); }
}

@keyframes mp-vg-stepb {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(14deg); }
}

@keyframes mp-vg-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.2px); }
}

.mp-vg-u__leg--f,
.mp-vg-u__leg--b {
  transform-origin: 50% 12%;
}

/* the swing */
.mp-vg-u.is-attack .mp-vg-u__arm { animation: mp-vg-swing 520ms ease-in-out infinite; transform-origin: 20% 15%; }
.mp-vg-u.is-attack .mp-vg-u__gada { animation: mp-vg-swing 620ms ease-in-out infinite; transform-origin: 90% 90%; }
.mp-vg-u.is-attack .mp-vg-u__bow { animation: mp-vg-draw 700ms ease-in-out infinite; }
.mp-vg-u.is-attack .mp-vg-u__flame { animation: mp-vg-flare 500ms ease-in-out infinite; }
.mp-vg-u .mp-vg-u__spark { animation: mp-vg-flare 900ms ease-in-out infinite; }

@keyframes mp-vg-swing {
  0%, 100% { transform: rotate(-18deg); }
  45% { transform: rotate(34deg); }
}

@keyframes mp-vg-draw {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(-2px); }
}

@keyframes mp-vg-flare {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.8; }
}

/* what the defences throw */
.mp-vg-shot {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF1B8, #E7772F);
  box-shadow: 0 0 6px rgba(255, 180, 60, 0.9);
  animation: mp-vg-fly var(--ms, 200ms) linear forwards;
  pointer-events: none;
}

@keyframes mp-vg-fly {
  to { transform: translate(var(--dx), var(--dy)); }
}

/* ---------------------------------------------------------------- the dock */
.mp-vg-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--mp-space-2);
}

.mp-vg-dockbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 0.4em 0.2em;
  border: 1px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-md, 12px);
  background: var(--mp-surface-2);
  color: var(--mp-text);
  font-size: var(--mp-fs-xs);
  font-weight: var(--mp-fw-medium);
  cursor: pointer;
}

.mp-vg-dockbtn:hover {
  background: var(--mp-surface-3);
}

.mp-vg-dockbtn__i {
  font-size: var(--mp-fs-lg);
  line-height: 1;
}

.mp-vg-dockbtn--go {
  background: linear-gradient(var(--mp-accent), #D81E71);
  border-color: transparent;
  color: #fff;
}

.mp-vg-dockbtn--go:hover {
  background: linear-gradient(var(--mp-accent-hover), #E42A7D);
}

/* ---------------------------------------------------------------- sheets */
.mp-vg-sheetwrap {
  position: absolute;
  left: var(--mp-space-2);
  right: var(--mp-space-2);
  bottom: calc(48px + var(--mp-space-4));
  z-index: 20;
}

.mp-vg-sheet {
  max-height: min(58vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--mp-surface-1);
  border: 1px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-lg, 16px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  padding: var(--mp-space-3);
}

.mp-vg-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mp-space-2);
  margin-bottom: var(--mp-space-2);
}

.mp-vg-sheet__head h3 {
  margin: 0;
  font-size: var(--mp-fs-lg);
}

.mp-vg-sheet__close {
  border: 1px solid var(--mp-border-strong);
  background: var(--mp-surface-2);
  color: var(--mp-text);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: var(--mp-fs-lg);
  line-height: 1;
  cursor: pointer;
}

.mp-vg-sheet__body > * + * {
  margin-top: var(--mp-space-3);
}

.mp-vg-sheet h4 {
  margin: var(--mp-space-3) 0 var(--mp-space-1);
  font-size: var(--mp-fs-md);
}

.mp-vg-muted {
  color: var(--mp-text-muted);
  font-size: var(--mp-fs-sm);
}

/* lists of buildings and units */
.mp-vg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--mp-space-2);
}

.mp-vg-list__row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--mp-space-2);
  padding: var(--mp-space-2);
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-md, 12px);
}

.mp-vg-list__row > .mp-btn,
.mp-vg-list__row > .mp-vg-have,
.mp-vg-list__row > p {
  grid-column: 3;
}

.mp-vg-list__art {
  display: grid;
  place-items: end center;
  height: 56px;
}

.mp-vg-list__art svg {
  max-width: 100%;
  max-height: 56px;
}

.mp-vg-list__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mp-vg-list__text strong {
  font-size: var(--mp-fs-sm);
}

.mp-vg-list__text small {
  font-size: var(--mp-fs-xs);
  color: var(--mp-text);
}

.mp-vg-list__text .mp-vg-muted {
  font-size: var(--mp-fs-xs);
}

.mp-vg-list__cost {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  grid-column: 2;
  margin: 0;
}

.mp-vg-have {
  font-variant-numeric: tabular-nums;
  font-weight: var(--mp-fw-semibold);
  text-align: center;
}

.mp-vg-info {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--mp-space-3);
  align-items: end;
}

.mp-vg-info .mp-vg-list__art {
  height: 72px;
}

.mp-vg-info .mp-vg-list__art svg {
  max-height: 72px;
}

.mp-vg-working {
  margin: 0;
  padding: 0.4em 0.7em;
  border-radius: var(--mp-radius-sm, 8px);
  background: var(--mp-surface-2);
  border-left: 3px solid var(--mp-warning);
  font-size: var(--mp-fs-sm);
  font-variant-numeric: tabular-nums;
}

.mp-vg-upgrade {
  padding: var(--mp-space-2);
  border: 1px dashed var(--mp-border-strong);
  border-radius: var(--mp-radius-md, 12px);
}

.mp-vg-upgrade p {
  margin: 0 0 var(--mp-space-1);
  font-size: var(--mp-fs-sm);
}

.mp-vg-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.mp-vg-queue li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--mp-space-2);
  padding: 2px var(--mp-space-2);
  background: var(--mp-surface-2);
  border-radius: var(--mp-radius-sm, 8px);
  font-size: var(--mp-fs-sm);
}

.mp-vg-queue svg {
  width: 28px;
  height: 34px;
}

.mp-vg-queue__time {
  font-variant-numeric: tabular-nums;
  color: var(--mp-warning);
}

.mp-vg-queue__x {
  border: 0;
  background: none;
  color: var(--mp-text-muted);
  font-size: var(--mp-fs-lg);
  line-height: 1;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
}

.mp-vg-queue__x:hover {
  color: var(--mp-danger);
}

.mp-vg-target {
  display: grid;
  gap: 2px;
  padding: var(--mp-space-3);
  border-radius: var(--mp-radius-md, 12px);
  background: linear-gradient(140deg, rgba(255, 45, 135, 0.14), rgba(0, 102, 255, 0.14));
  border: 1px solid var(--mp-border-strong);
}

.mp-vg-target strong {
  font-family: var(--mp-font-heading);
  font-size: var(--mp-fs-lg);
}

.mp-vg-say {
  margin: 0;
  min-height: 1.4em;
  font-size: var(--mp-fs-sm);
  color: var(--mp-text-muted);
}

.mp-vg-flash {
  margin: 0 0 var(--mp-space-2);
  padding: 0.5em 0.8em;
  border-radius: var(--mp-radius-sm, 8px);
  background: rgba(43, 182, 115, 0.16);
  border: 1px solid var(--mp-success);
  color: var(--mp-text);
  font-size: var(--mp-fs-sm);
}

/* ---------------------------------------------------------------- raid screen */
.mp-vg-raid {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: var(--mp-space-2);
  position: relative;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg, 16px);
  background: var(--mp-surface-1);
  padding: var(--mp-space-2);
}

.mp-vg-raid__top {
  display: flex;
  align-items: center;
  gap: var(--mp-space-3);
  flex-wrap: wrap;
}

.mp-vg-raid__who {
  display: grid;
  line-height: 1.2;
}

.mp-vg-raid__who strong {
  font-family: var(--mp-font-heading);
}

.mp-vg-raid__pct b,
.mp-vg-raid__clock span {
  font-variant-numeric: tabular-nums;
  font-weight: var(--mp-fw-semibold);
}

.mp-vg-raid__clock {
  margin-left: auto;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
}

.mp-vg-raid__stars {
  display: flex;
  gap: 3px;
}

.mp-vg-raid__stars i {
  width: 18px;
  height: 18px;
  background: var(--mp-surface-3);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 100%, 50% 73%, 21% 100%, 32% 57%, 2% 35%, 39% 35%);
}

.mp-vg-raid__stars i.is-on {
  background: linear-gradient(#FFE500, #FF9F1C);
}

.mp-vg-raid__stars--big {
  justify-content: center;
}

.mp-vg-raid__stars--big i {
  width: 34px;
  height: 34px;
}

.mp-vg-raid__take {
  display: flex;
  gap: var(--mp-space-2);
}

.mp-vg-raid__stage {
  position: relative;
  height: min(58vh, 520px);
  min-height: 300px;
  border-radius: var(--mp-radius-md, 12px);
  overflow: hidden;
  background: linear-gradient(#20161B 0%, #3A2A2E 45%, #4A5B40 100%);
}

.mp-vg-raid__bar {
  display: flex;
  gap: var(--mp-space-2);
  overflow-x: auto;
  padding-bottom: 2px;
}

.mp-vg-troop {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0;
  width: 62px;
  padding: 2px;
  border: 2px solid var(--mp-border-strong);
  border-radius: var(--mp-radius-md, 12px);
  background: var(--mp-surface-2);
  color: var(--mp-text);
  cursor: pointer;
}

.mp-vg-troop.is-picked {
  border-color: var(--mp-yellow);
  background: var(--mp-surface-3);
}

.mp-vg-troop:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-vg-troop svg {
  width: 34px;
  height: 40px;
}

.mp-vg-troop__n {
  font-weight: var(--mp-fw-bold);
  font-variant-numeric: tabular-nums;
  font-size: var(--mp-fs-sm);
}

.mp-vg-troop__name {
  font-size: 10px;
  color: var(--mp-text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-vg-raid__end {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
}

.mp-vg-raid__hint {
  margin: 0;
  min-height: 1.4em;
  font-size: var(--mp-fs-sm);
  color: var(--mp-text-muted);
}

.mp-vg-sheet--result {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 90%);
  text-align: center;
  z-index: 30;
}

.mp-vg-sheet--result h3 {
  margin: 0 0 var(--mp-space-2);
  font-family: var(--mp-font-heading);
}

.mp-vg-tally {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--mp-space-2);
  margin: var(--mp-space-3) 0;
  padding: 0;
}

/* ---------------------------------------------------------------- full screen
   Like the game on a phone: the village (or the raid) covers the whole screen, the site's bars hide, and the
   board takes every pixel the resource bar and the dock leave. "Exit" goes back to the page. */
.mp-vg-fullbtn {
  margin-bottom: var(--mp-space-2);
}

.mp-vg-exit {
  display: none;
}

html.mp-vg-locked,
html.mp-vg-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

.mp-vg-stagewrap.is-full {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  background: #0B1018;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.mp-vg-stagewrap.is-full > .mp-vg,
.mp-vg-stagewrap.is-full > .mp-vg-raid {
  flex: 1;
  min-height: 0;
  grid-template-rows: auto auto 1fr auto auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mp-vg-stagewrap.is-full > .mp-vg {
  grid-template-rows: auto 1fr auto auto;
}

.mp-vg-stagewrap.is-full .mp-vg-stage,
.mp-vg-stagewrap.is-full .mp-vg-raid__stage {
  height: auto;
  min-height: 0;
}

.mp-vg-stagewrap.is-full .mp-vg-say:empty {
  display: none;
}

.mp-vg-stagewrap.is-full .mp-vg-sheet {
  max-height: min(64vh, 560px);
}

.mp-vg-stagewrap.is-full .mp-vg-exit {
  display: inline-flex;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  z-index: 30;
  min-height: 34px;
  padding: 0 0.9em;
  align-items: center;
  border: 1px solid var(--mp-border-strong);
  border-radius: 999px;
  background: rgba(11, 16, 24, 0.85);
  color: var(--mp-text);
  font-size: var(--mp-fs-xs);
  font-weight: var(--mp-fw-semibold);
  cursor: pointer;
}

.mp-vg-stagewrap.is-full > .mp-vg .mp-vg-hud,
.mp-vg-stagewrap.is-full .mp-vg-raid__top {
  padding-right: 4.5em;           /* room for Exit */
}

/* ---------------------------------------------------------------- page text */
.mp-vg-about {
  margin-top: var(--mp-space-6);
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 640px) {
  .mp-vg-stage,
  .mp-vg-raid__stage {
    height: min(54vh, 420px);
  }

  .mp-vg-list__row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .mp-vg-list__art {
    height: 44px;
  }

  .mp-vg-list__art svg {
    max-height: 44px;
  }

  .mp-vg-dockbtn {
    font-size: 10px;
  }
}

/* ---------------------------------------------------------------- calmer motion */
@media (prefers-reduced-motion: reduce) {
  .mp-vg-u.is-walk .mp-vg-u__leg--f,
  .mp-vg-u.is-walk .mp-vg-u__leg--b,
  .mp-vg-u.is-walk .mp-vg-u__body,
  .mp-vg-u.is-attack .mp-vg-u__arm,
  .mp-vg-u.is-attack .mp-vg-u__gada,
  .mp-vg-u.is-attack .mp-vg-u__bow,
  .mp-vg-u.is-attack .mp-vg-u__flame,
  .mp-vg-u .mp-vg-u__spark,
  .mp-vg-b.is-wrecked .mp-vg-art,
  .mp-vg-u.is-down .mp-vg-u-art {
    animation: none;
  }

  .mp-vg-u.is-down .mp-vg-u-art {
    opacity: 0.2;
  }

  .mp-vg-shot {
    display: none;
  }
}

/* ---------------------------------------------------------------- raids on real villages */
.mp-vg-chip--shield i {
  background: linear-gradient(#5C9DFF, #2E63C8);
  clip-path: polygon(50% 0, 100% 18%, 85% 100%, 50% 85%, 15% 100%, 0 18%);
  border-radius: 0;
}

.mp-vg-target--real {
  background: linear-gradient(140deg, rgba(255, 159, 28, 0.18), rgba(255, 45, 135, 0.16));
  border-color: var(--mp-rangoli-marigold);
}

.mp-vg-log {
  margin-top: var(--mp-space-3);
}

.mp-vg-loglist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--mp-space-2);
}

.mp-vg-loglist__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--mp-space-2);
  padding: var(--mp-space-2);
  border-radius: var(--mp-radius-md, 12px);
  background: var(--mp-surface-2);
  border-left: 3px solid var(--mp-border-strong);
}

.mp-vg-loglist__row.is-defence {
  border-left-color: var(--mp-danger);
}

.mp-vg-loglist__row.is-attack {
  border-left-color: var(--mp-success);
}

.mp-vg-loglist__who {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mp-vg-loglist__who strong {
  font-size: var(--mp-fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-vg-loglist__row .mp-vg-raid__stars i {
  width: 13px;
  height: 13px;
}

.mp-vg-loglist__row .mp-btn {
  grid-column: 3;
}

/* ---------------------------------------------------------------- the Sardar and the fireworks */
.mp-vg-troop--hero {
  border-color: var(--mp-rangoli-marigold);
}

.mp-vg-troop--spell .mp-vg-troop__n {
  margin-top: 2px;
}

.mp-vg-u--hero .mp-vg-u-art {
  transform: scale(1.3);
  transform-origin: 50% 92%;
}

.mp-vg-spell {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 2px auto;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.mp-vg-spell--aandhi {
  background: radial-gradient(circle at 40% 35%, #FFF1B8, #E7772F 60%, #B23A12);
}

.mp-vg-spell--josh {
  background: radial-gradient(circle at 40% 35%, #BFF3D0, #2BB673 60%, #1C7A4D);
}

.mp-vg-spell--dhuaan {
  background: radial-gradient(circle at 40% 35%, #E8ECF2, #9AA3B0 60%, #5C6270);
}

.mp-vg-burst {
  position: absolute;
  display: block;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: mp-vg-burst 1.1s ease-out forwards;
}

.mp-vg-burst--aandhi { background: radial-gradient(circle, rgba(255, 199, 61, 0.85), rgba(231, 119, 47, 0.25) 65%, transparent 72%); }
.mp-vg-burst--josh   { background: radial-gradient(circle, rgba(43, 182, 115, 0.55), rgba(43, 182, 115, 0.18) 65%, transparent 72%); }
.mp-vg-burst--dhuaan { background: radial-gradient(circle, rgba(230, 236, 242, 0.75), rgba(154, 163, 176, 0.3) 65%, transparent 72%); }
.mp-vg-burst--smash  { background: radial-gradient(circle, rgba(255, 229, 0, 0.6), rgba(255, 159, 28, 0.2) 65%, transparent 72%); }

@keyframes mp-vg-burst {
  from { opacity: 0.95; transform: translate(-50%, -50%) scale(0.35); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

.mp-vg-ready {
  padding: 0.3em 0.7em;
  border-radius: 999px;
  background: rgba(43, 182, 115, 0.18);
  border: 1px solid var(--mp-success);
  font-size: var(--mp-fs-sm);
  white-space: nowrap;
}

.mp-vg-hero .mp-vg-working,
.mp-vg-hero .mp-vg-ready {
  grid-column: 3;
}

@media (prefers-reduced-motion: reduce) {
  .mp-vg-burst { animation-duration: 300ms; }
  .mp-vg-spark { animation: none; }
}

/* ---------------------------------------------------------------- top villages */
.mp-vg-top {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.mp-vg-top li {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--mp-space-2);
  padding: 0.3em var(--mp-space-2);
  border-radius: var(--mp-radius-sm, 8px);
  font-size: var(--mp-fs-sm);
}

.mp-vg-top li.is-me {
  background: rgba(255, 229, 0, 0.14);
}

.mp-vg-top__rank {
  color: var(--mp-text-muted);
  font-variant-numeric: tabular-nums;
}

.mp-vg-top__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-vg-top b {
  font-variant-numeric: tabular-nums;
}

/* count and the make buttons sit together on one line */
/* the name and notes take the whole width; the buy buttons sit on the line under them */
.mp-vg-list__row > .mp-vg-list__text {
  grid-column: 2 / -1;
}

.mp-vg-list__buy {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: var(--mp-space-2);
}

.mp-vg-list__buy .mp-vg-have {
  min-width: 1.6em;
}


/* ---------- cinema.css ---------- */
/* Inner pages: the same dark, cinematic look as the home intro (fighterready style).
   Every page except home. --sy (scroll px) and --sp (0..1 page progress) are set on <html> by ui/cinema.js. */
:root { --sy: 0; --sp: 0; --mp-cine-glow: #ff9f1c; --mp-cine-ink: #07060f; }
body.mp-body:not(.mp-page-home) { background: var(--mp-cine-ink); }
/* a starry night sky behind everything, drifting slower than the page */
body.mp-body:not(.mp-page-home)::before {
  content: ""; position: fixed; inset: -20% 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 32% 8%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 30%, #fff8 50%, transparent 51%), radial-gradient(1.5px 1.5px at 66% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 36%, #fff9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 6%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 62%, #fff5 50%, transparent 51%), radial-gradient(1px 1px at 74% 70%, #fff5 50%, transparent 51%),
    radial-gradient(70% 50% at 80% 0%, #2a1a4d88, transparent 70%), radial-gradient(60% 50% at 10% 100%, #3a1d0a88, transparent 70%),
    var(--mp-cine-ink);
  transform: translateY(calc(var(--sy) * -0.08px));
}
body.mp-body:not(.mp-page-home) .mp-topbar, body.mp-body:not(.mp-page-home) .mp-sidebar { background: #0b0918e6; backdrop-filter: blur(10px); border-color: #ffffff12; }

/* film reel progress rail on the left edge, like the chapter rail on home */
.mp-reel { position: fixed; left: 6px; top: 25vh; height: 50vh; width: 2px; background: #ffffff1f; z-index: 30; pointer-events: none; }
.mp-reel span { position: absolute; inset: 0; background: var(--mp-cine-glow); box-shadow: 0 0 10px var(--mp-cine-glow); transform-origin: 50% 0; transform: scaleY(var(--sp)); }

/* ---------- hero: page heads become a movie title card ---------- */
body:not(.mp-page-home) .mp-page-head, body:not(.mp-page-home) .mp-game-head {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; gap: var(--mp-space-4);
  min-height: clamp(260px, 44vh, 440px); max-width: none;
  padding: clamp(24px, 5vw, 56px); border-radius: 18px;
  background: radial-gradient(90% 120% at 85% 0%, color-mix(in srgb, var(--_a, #ff2d87) 45%, transparent), transparent 60%),
              radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, var(--_b, #ff9f1c) 40%, transparent), transparent 65%),
              linear-gradient(#15111f, #0b0918);
  border: 1px solid #ff9f1c44; box-shadow: 0 0 60px #ff9f1c1f, 0 30px 60px #000a;
}
/* warm floor grid running away from you, scrolls a little faster than the page */
body:not(.mp-page-home) .mp-page-head::before, body:not(.mp-page-home) .mp-game-head::before {
  content: ""; position: absolute; left: -50%; right: -50%; top: 58%; bottom: -40%; z-index: -1; opacity: .7;
  background: repeating-linear-gradient(90deg, #ff9f1c2e 0 2px, transparent 2px 80px), repeating-linear-gradient(0deg, #ff9f1c2e 0 2px, transparent 2px 60px);
  background-position: 0 calc(var(--sy) * 0.6px);
  transform: perspective(420px) rotateX(66deg); transform-origin: 50% 0;
  -webkit-mask: linear-gradient(transparent, #000 40%); mask: linear-gradient(transparent, #000 40%);
}
/* vignette instead of the old thin colour bar */
body:not(.mp-page-home) .mp-page-head::after, body:not(.mp-page-home) .mp-game-head::after {
  content: ""; position: absolute; inset: 0; top: 0; height: auto; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 50%, #000a 100%), linear-gradient(90deg, #07060fcc, transparent 70%);
}
body:not(.mp-page-home) .mp-page-head__text, body:not(.mp-page-home) .mp-game-head > * {
  position: relative; transform: translateY(calc(var(--sy) * -0.25px)); opacity: calc(1 - var(--sy) / 700);
}
body:not(.mp-page-home) .mp-game-head { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
body:not(.mp-page-home) .mp-page-head h1, body:not(.mp-page-home) .mp-game-head h1 {
  margin: 0; font-family: var(--mp-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(3rem, 9vw, 6.5rem); line-height: .88; color: #f5f5f7; text-shadow: 0 6px 40px #000;
}
body:not(.mp-page-home) .mp-page-head__text::before {
  content: "Medha Play  ·  Now showing"; display: block; margin-bottom: 12px; white-space: pre;
  font-size: .75rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #ffcf6b;
}
body:not(.mp-page-home) .mp-page-head__lead, body:not(.mp-page-home) .mp-game-head__lead { margin-top: 14px; max-width: 46ch; font-size: clamp(1rem, 2vw, 1.2rem); color: #d7d3ea; }
body:not(.mp-page-home) .mp-page-head__note { color: #b9b4cf; }
body:not(.mp-page-home) .mp-page-head__icon { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 30px color-mix(in srgb, var(--_b, #ff9f1c) 60%, transparent); align-self: flex-start; }

/* ---------- chapter titles ---------- */
body:not(.mp-page-home) .mp-main { counter-reset: mp-ch; }
body:not(.mp-page-home) .mp-section-title {
  counter-increment: mp-ch; display: flex; align-items: baseline; gap: 14px;
  font-family: var(--mp-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .03em;
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; color: #fff;
}
body:not(.mp-page-home) .mp-section-title::before {
  content: "Ch. " counter(mp-ch, decimal-leading-zero); font-family: var(--mp-font-ui); font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; color: var(--mp-cine-glow); padding: 3px 8px; border: 1px solid #ff9f1c66; border-radius: 4px; translate: 0 -.5em;
}
body:not(.mp-page-home) .mp-section-title::after { content: ""; flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, #ff9f1c88, transparent); }

/* ---------- game tiles become lit posters ---------- */
body:not(.mp-page-home) .mp-grid { perspective: 1200px; }
body:not(.mp-page-home) .mp-tile {
  background: #15111f; border: 1px solid #ff9f1c33; border-radius: 8px; padding: 8px 8px 0;
  box-shadow: 0 0 30px #ff9f1c14, 0 18px 36px #000c; transform-style: preserve-3d;
}
body:not(.mp-page-home) .mp-tile__media { border-radius: 4px; }
body:not(.mp-page-home) .mp-tile:hover, body:not(.mp-page-home) .mp-tile:focus-visible {
  background: #1c1628; border-color: #ff9f1c99; transform: translateY(-6px) rotateX(4deg) rotateY(-6deg);
  box-shadow: 0 0 50px #ff9f1c44, 0 28px 50px #000d;
}
body:not(.mp-page-home) .mp-tile__title { font-family: var(--mp-font-display); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
body:not(.mp-page-home) .mp-tile__play { background: var(--mp-cine-glow); }

/* ---------- category, info and account cards ---------- */
body:not(.mp-page-home) .mp-pillar-card, body:not(.mp-page-home) .mp-card {
  background: linear-gradient(#17121f, #0e0b16); border: 1px solid #ff9f1c2e; box-shadow: 0 18px 40px #0009;
}
body:not(.mp-page-home) .mp-pillar-card:hover { background: #1c1628; border-color: var(--_b); box-shadow: 0 0 40px color-mix(in srgb, var(--_b) 30%, transparent), 0 18px 40px #000a; }
body:not(.mp-page-home) .mp-pillar-card__name, body:not(.mp-page-home) .mp-card__title {
  font-family: var(--mp-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; font-size: 1.6rem; line-height: 1;
}
body:not(.mp-page-home) .mp-card { border-top: 2px solid var(--mp-cine-glow); border-radius: 12px; }
body:not(.mp-page-home) .mp-prose { max-width: 66ch; font-size: 1.08rem; color: #d7d3ea; }
body:not(.mp-page-home) .mp-prose p:first-child::first-letter { float: left; font-family: var(--mp-font-display); font-size: 4.2em; line-height: .8; padding: 6px 10px 0 0; color: var(--mp-cine-glow); }

/* ---------- game stage: a lit screen in a dark theatre ---------- */
body:not(.mp-page-home) .mp-stage { border: 1px solid #ff9f1c55; box-shadow: 0 0 80px #ff9f1c2a, 0 40px 80px #000d; border-radius: 14px; }

/* ---------- leaderboard: scoreboard look ---------- */
body:not(.mp-page-home) .mp-boards__controls { padding: 16px; border-radius: 12px; background: #0e0b16; border: 1px solid #ff9f1c2e; }
body:not(.mp-page-home) .mp-table-wrap { border-color: #ff9f1c44; background: #0e0b16; box-shadow: 0 0 40px #ff9f1c14; }
body:not(.mp-page-home) .mp-table th { font-family: var(--mp-font-display); font-weight: 400; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: #ffcf6b; background: #ff9f1c12; }
body:not(.mp-page-home) .mp-table tbody tr:nth-child(1) td { color: #ffe08a; }
body:not(.mp-page-home) .mp-table tbody tr:hover td { background: #ff9f1c0d; }

/* buttons glow like the home sign */
body:not(.mp-page-home) .mp-btn--primary { background: linear-gradient(90deg, #ff9f1c, #ff2d87); color: #0a0a0f; border: 0; box-shadow: 0 0 24px #ff9f1c55; }
body:not(.mp-page-home) .mp-btn--primary:hover { box-shadow: 0 0 36px #ff9f1c99; }

/* scenes fade and rise in as you reach them (class added by ui/cinema.js) */
.js body:not(.mp-page-home) .mp-reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js body:not(.mp-page-home) .mp-reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 700px) {
  body:not(.mp-page-home) .mp-page-head { flex-direction: column; align-items: flex-start; justify-content: flex-end; min-height: 300px; }
  .mp-reel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.mp-body:not(.mp-page-home)::before, body:not(.mp-page-home) .mp-page-head__text, body:not(.mp-page-home) .mp-game-head > * { transform: none; opacity: 1; }
  body:not(.mp-page-home) .mp-tile:hover { transform: none; }
  .js body:not(.mp-page-home) .mp-reveal { opacity: 1; transform: none; transition: none; }
}

/* game pages: a slim title card so the game itself is on screen straight away (phones especially) */
body.mp-page-game .mp-game-head { min-height: 0; padding: clamp(18px, 4vw, 36px); }
body.mp-page-game .mp-game-head h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); }
body.mp-page-game .mp-game-head__lead { margin-top: 8px; }
@media (max-width: 700px) {
  body.mp-page-game .mp-game-head { padding: 16px 18px; border-radius: 14px; }
  body.mp-page-game .mp-game-head__lead { font-size: .95rem; }
  body.mp-page-game .mp-main > .mp-game-page > * + * { margin-top: 14px; }
}
@media (max-width: 700px) {
  body.mp-page-game .mp-stage__art { max-height: 140px; overflow: hidden; }
  body.mp-page-game .mp-stage__thumb { width: 100%; height: 140px; object-fit: cover; }
}

