* { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Vista Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    background: #000a3c;
    color: #d9dae2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Logo and header */
  .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 56px 16px 0;
  }

  .brand-logo {
    display: block;
    height: clamp(96px, 28vw, 180px);
    width: auto;
  }

  /* "CASUAL GAMES" — large condensed bold blue, matching Paramount Games hero */
  .title-sub {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0064ff;
    line-height: 1;
    text-align: center;
  }

  .greeting-wrap {
    width: 100%;
    text-align: center;
    padding: 6px 16px 24px;
  }

  /* "Welcome back, Jeff!" — clean white, bold */
  .greeting {
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    color: #FFFFFF;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;
  }
  .greeting:hover { opacity: 0.7; }
  .greeting.hidden { display: none; }

  /* Games grid — auto-fill keeps cards evenly sized and fills the row at every width */
  .games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 920px;
    padding: 16px 20px 48px;
  }

  /* Card — Paramount+ capsule style */
  .card {
    background: transparent;
    border: none;
    text-decoration: none;
    color: #d9dae2;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.2s, opacity 0.2s;
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
  }

  /* Hover effects gated so they don't "stick" after a tap on touch devices */
  @media (hover: hover) {
    .card:hover {
      transform: scale(1.03);
      opacity: 0.92;
    }
  }

  /* Capsule art — tall portrait image */
  .card-art {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1525;
    margin-bottom: 10px;
    flex-shrink: 0;
  }

  .card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Title below art — Peak Sans bold white, matching greeting style */
  .card-title {
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #FFFFFF;
    margin-bottom: 4px;
  }

  /* Description below title — muted grey */
  .card-desc {
    font-family: 'Peak Sans', Georgia, serif;
    font-size: 12px;
    font-weight: 400;
    color: #8e8e91;
    line-height: 1.45;
  }

  /* Coming Soon cards have no description */
  .card.coming-soon .card-desc { display: none; }

  /* Per-card accent colors — mapped to Paramount brand secondary palette */
  .card[data-accent="blue"]   { --card-accent: #0064ff; }  /* Peak Blue */
  .card[data-accent="green"]  { --card-accent: #03d1e5; }  /* Sky */
  .card[data-accent="orange"] { --card-accent: #ffb71e; }  /* Sunrise Tint */
  .card[data-accent="red"]    { --card-accent: #ff008a; }  /* Horizon */
  .card[data-accent="pink"]   { --card-accent: #a8217d; }  /* Horizon Tint */
  .card[data-accent="lime"]   { --card-accent: #00abdb; }  /* Sky Tint */
  .card[data-accent="purple"] { --card-accent: #a8217d; }  /* Horizon Tint */
  .card[data-accent="gold"]   { --card-accent: #ffd400; }  /* Sunrise */

  /* Age gate modal */
  .age-gate-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.92);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .age-gate-overlay.hidden { display: none; }

  .age-gate {
    background: #000a3c;
    border: 2px solid #0064ff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,100,255,0.25), 0 0 0 1px rgba(0,100,255,0.1);
  }

  .age-gate-logo {
    margin-bottom: 16px;
  }
  .age-gate-logo img {
    height: 86px;
    width: auto;
    display: block;
    margin: 0 auto;
  }

  .age-gate h2 {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #0064ff;
  }

  .age-gate p {
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    color: #FFFFFF;
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .age-gate-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
  }

  .age-gate-fields select {
    flex: 1;
    padding: 12px 10px;
    border: 1px solid #0064ff;
    border-radius: 8px;
    background: #000a3c;
    color: #FFFFFF;
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: 1rem; /* >=16px prevents iOS Safari auto-zoom on focus */
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
  }

  .age-gate-fields select:focus {
    border-color: #0064ff;
    box-shadow: 0 0 0 3px rgba(0,100,255,0.25);
  }
  .age-gate-fields select option[value=""] { color: #6b6b6e; }

  .age-gate button {
    background: #0064ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, opacity 0.2s;
    touch-action: manipulation;
  }

  .age-gate button:disabled {
    background: #1a1a2e;
    color: #3a3a5a;
    border: 1px solid #2a2a4a;
    cursor: default;
  }

  .age-gate button:not(:disabled):hover { background: #2272ff; }

  /* Welcome modal */
  .modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .modal-overlay.hidden { display: none; }

  .modal {
    background: #000a3c;
    border: 2px solid #0064ff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,100,255,0.25), 0 0 0 1px rgba(0,100,255,0.1);
  }
  .modal-icon {
    margin-bottom: 16px;
  }
  .modal-icon img {
    height: 86px;
    width: auto;
    display: block;
    margin: 0 auto;
  }
  .modal h2 {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #0064ff;
  }
  .modal p {
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    color: #FFFFFF;
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  .modal input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #0064ff;
    border-radius: 8px;
    background: #000a3c;
    color: #FFFFFF;
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: 1rem; /* >=16px prevents iOS Safari auto-zoom on focus */
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .modal input:focus {
    border-color: #0064ff;
    box-shadow: 0 0 0 3px rgba(0,100,255,0.25);
  }
  .modal button {
    background: #0064ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-family: 'Peak Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    touch-action: manipulation;
  }
  @media (hover: hover) {
    .modal button:hover { background: #2272ff; transform: translateY(-1px); }
  }
  .modal button:active { transform: scale(0.98); }

  /* Section headers */
  .section-header {
    width: 100%;
    max-width: 920px;
    padding: 0 20px;
    margin-top: 32px;
    text-align: left;
  }

  .section-header h2 {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0064ff;
  }

  .section-header h2[title] {
    cursor: help;
    text-decoration: underline dotted rgba(0,100,255,0.4);
    text-underline-offset: 4px;
  }

  /* Collapsible experiments section */
  .collapsible-section {
    width: 100%;
    max-width: 920px;
    text-align: center;
  }

  .collapsible-section summary {
    list-style: none;
    cursor: pointer;
    padding: 0 20px;
    margin-top: 32px;
  }

  .collapsible-section summary::-webkit-details-marker { display: none; }

  .collapsible-section summary h2 {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFFFFF;
    border-bottom: 1px solid #1a2a45;
    padding-bottom: 10px;
    cursor: pointer;
    text-decoration: underline dotted rgba(0,100,255,0.4);
    text-underline-offset: 4px;
  }

  .collapsible-section summary h2::after {
    content: ' \25B6';
    font-size: 20px;
    margin-left: 8px;
    transition: transform 0.2s;
    display: inline-block;
  }

  .collapsible-section[open] summary h2::after {
    content: ' \25BC';
  }

  .collapsible-section summary:hover h2 {
    color: rgba(255,255,255,0.65);
  }

  .collapsible-section .games {
    padding-top: 16px;
  }


  /* Activity feed */
  .activity-feed {
    width: 100%;
    max-width: 920px;
    padding: 0 20px 8px;
  }
  .activity-feed h3 {
    font-family: 'Vista Sans', 'Arial Narrow', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0064ff;
    margin-bottom: 10px;
  }
  .activity-empty { color: #6b6b6e; font-size: 14px; padding: 4px 0 8px; }
  .activity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 6px;
    border-bottom: 1px solid #0e1e35;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    touch-action: manipulation;
  }
  .activity-row:last-child { border-bottom: none; }
  @media (hover: hover) {
    .activity-row:hover { background: rgba(0, 100, 255, 0.08); }
  }
  .activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--act-accent, #0064ff);
    flex-shrink: 0;
  }
  .activity-name {
    flex: 1;
    min-width: 0;
    color: #c0c0c5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .activity-score { color: #d9dae2; font-weight: 600; min-width: 70px; text-align: right; }
  .activity-time { color: #6b6b6e; font-size: 13px; min-width: 52px; text-align: right; }

  /* Privacy iframe modal */
  #privacy-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  #privacy-modal.active { display: flex; }

  .privacy-modal-inner {
    position: relative;
    width: 100%;
    max-width: 860px;
    height: 80vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .privacy-modal-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: #0d1525;
    padding: 8px 12px;
    flex-shrink: 0;
  }

  .privacy-modal-close {
    background: none;
    border: none;
    color: #d9dae2;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
  }
  .privacy-modal-close:hover { background: rgba(255,255,255,0.1); }

  .privacy-modal-inner iframe {
    flex: 1;
    width: 100%;
    border: none;
  }

  /* CMP blocking overlay — sits above page content, below Ketch's injected dialog.
     z-index 9000: above cards (z-index 1 via body > *) but below Ketch (~9999).
     will-change: transform forces a GPU compositing layer so the browser
     respects this z-index even when card hover transforms are active. */
  #cmp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.85);
    will-change: transform;
  }
  #cmp-overlay.active { display: block; }

  /* Footer */
  .footer {
    padding: 24px 16px 32px;
    text-align: center;
    color: #3a3a3c;
    font-size: 13px;
  }

  .footer-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
  }

  .footer-links a {
    color: #3a3a3c;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
    display: inline-block;
    padding: 6px 8px;
  }

  @media (hover: hover) {
    .footer-links a:hover {
      color: #6b6b6e;
    }
  }

  /* Responsive */
  @media (max-width: 640px) {
    .brand { padding: 32px 16px 0; gap: 14px; }
    .games { padding: 12px 16px 40px; gap: 14px; }
    .card-title { font-size: 13px; }
    .card-desc { font-size: 11px; }
    .footer-links a { padding: 11px 10px; }
  }

  /* ── Under-18 theme ─────────────────────────────────────────── */
  body.under18 {
    background: #DAFFFF;
    color: #1a1a1a;
  }

  /* Logo swap — hide white logo, show black logo */
  body.under18 .brand-logo-white { display: none; }
  body.under18 .brand-logo-dark  { display: block; }
  .brand-logo-dark { display: none; }

  /* Section & activity headers — darken blue for contrast on light bg */
  body.under18 .section-header h2,
  body.under18 .activity-feed h3 {
    color: #0050cc;
  }

  /* CASUAL GAMES — darken blue slightly */
  body.under18 .title-sub { color: #0050cc; }

  /* White text elements → black */
  body.under18 .greeting           { color: #000000; }
  body.under18 .card-title         { color: #000000; }
  body.under18 .card-desc          { color: #3a3a3a; }
  body.under18 .activity-name      { color: #1a1a1a; }
  body.under18 .activity-score     { color: #000000; }
  body.under18 .activity-time      { color: #3a3a3a; }
  body.under18 .activity-empty     { color: #3a3a3a; }
  body.under18 .activity-row       { border-bottom-color: #b0e8e8; }
  body.under18 .activity-row:hover { background: rgba(0,0,0,0.06); }

  /* Footer */
  body.under18 .footer,
  body.under18 .footer-links a       { color: #444444; }
  body.under18 .footer-links a:hover { color: #222222; }
  body.under18 [data-adult-only]     { display: none; }
