  
    :root {
      /* Old-site-inspired warm palette */
      --bg: #F8F0D8;
      --bg-2: #F1E4C4;
      --surface: #FFF8E1;
      --surface-2: #FFF3C4;
      --surface-3: #FFE066;
      --text: #2D2410;
      --text-muted: #7A6845;
      --text-head: #363015;
      --accent: #C89B1A;
      --accent-dark: #A67C00;
      --accent-glow: rgba(200,155,26,0.18);
      --link: #993333;
      --link-hover: #7A2929;
      --danger: #C0392B;
      --success: #27AE60;

      --shadow-sm: 0 1px 2px rgba(45,36,16,0.06);
      --shadow: 0 4px 16px rgba(45,36,16,0.10);
      --shadow-lg: 0 8px 32px rgba(45,36,16,0.14);

      --radius-sm: 8px;
      --radius: 16px;
      --radius-lg: 24px;
      --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.5;
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* Warm textured background reminiscent of leikjanet_bg.jpg */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      z-index: -1;
      background:
        radial-gradient(ellipse 900px 500px at 10% 0%, rgba(255,228,102,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 700px 400px at 90% 10%, rgba(200,155,26,0.10) 0%, transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(120,100,50,0.015) 2px, rgba(120,100,50,0.015) 4px);
      pointer-events: none;
    }

    /* ─── Header ─── */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 100;
      background:
        linear-gradient(
          180deg,
          rgba(255,248,225,0.06) 0%,
          transparent 60%
        ),
        rgba(45,36,16,0.92);
      backdrop-filter: blur(12px) saturate(1.2);
      border-bottom: 1px solid rgba(255,248,225,0.08);
    }

    .header-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
      display: flex;
      align-items: center;
      gap: 24px;
      height: 72px;
    }

    .logo {
      display: flex;
      align-items: center;
      text-decoration: none;
      flex-shrink: 0;
      transition: transform var(--transition);
    }
    .logo:hover { transform: scale(1.06); }
    .logo canvas {
      height: 48px;
      width: 48px;
      display: block;
      filter: drop-shadow(0 0 8px rgba(255,228,102,0.3));
    }

    .search-wrap {
      flex: 1;
      max-width: 400px;
      position: relative;
    }
    .search-wrap input {
      width: 100%;
      height: 42px;
      padding: 0 44px 0 16px;
      border-radius: var(--radius);
      border: 1px solid rgba(255,248,225,0.12);
      background: rgba(255,248,225,0.08);
      color: #FFF8E1;
      font-size: 0.9375rem;
      outline: none;
      transition: var(--transition);
    }
    .search-wrap input::placeholder { color: rgba(255,248,225,0.45); }
    .search-wrap input:focus {
      border-color: #FFE066;
      box-shadow: 0 0 0 3px var(--accent-glow);
      background: rgba(255,248,225,0.12);
    }
    .search-wrap svg {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: rgba(255,248,225,0.45);
      pointer-events: none;
    }

    .main-nav {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
      margin-left: auto;
    }
    .main-nav::-webkit-scrollbar { display: none; }

    .nav-link {
      padding: 8px 16px;
      border-radius: var(--radius-sm);
      color: rgba(255,248,225,0.65);
      font-size: 0.875rem;
      font-weight: 500;
      text-decoration: none;
      white-space: nowrap;
      transition: var(--transition);
      position: relative;
    }
    .nav-link:hover,
    .nav-link.active {
      color: #FFF8E1;
      background: rgba(255,248,225,0.08);
    }
    .nav-link.active::after {
      content: '';
      position: absolute;
      bottom: -14px;
      left: 50%;
      transform: translateX(-50%);
      width: 16px;
      height: 3px;
      border-radius: 2px;
      background: #FFE066;
    }

    /* ─── Layout ─── */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
    }

    /* ─── Live counter ─── */
    .live-counter {
      text-align: center;
      padding: 28px 0 12px;
      font-size: 0.875rem;
      color: var(--text-muted);
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .live-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 0 3px rgba(39,174,96,0.25);
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(0.9); }
    }
    .live-counter strong { color: var(--accent-dark); font-weight: 700; }

    /* ─── Recently played bar ─── */
    .recent-bar {
      background: var(--surface);
      border: 1px solid rgba(120,100,50,0.08);
      border-radius: 0 0 var(--radius) var(--radius);
      padding: 16px 20px;
      margin-bottom: 32px;
      display: flex;
      align-items: center;
      gap: 16px;
      overflow-x: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--bg-2) transparent;
      box-shadow: var(--shadow);
    }
    .recent-bar::-webkit-scrollbar { height: 4px; }
    .recent-bar::-webkit-scrollbar-thumb { background: var(--bg-2); border-radius: 4px; }

    .recent-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.8125rem;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--text-muted);
      letter-spacing: 0.06em;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .recent-label img { height: 22px; width: auto; opacity: 0.7; }

    .recent-thumb {
      width: 52px;
      height: 52px;
      border-radius: var(--radius-sm);
      object-fit: cover;
      border: 2px solid transparent;
      transition: var(--transition);
      cursor: pointer;
      flex-shrink: 0;
    }
    .recent-thumb:hover {
      border-color: var(--accent);
      transform: scale(1.1);
      box-shadow: 0 0 16px rgba(200,155,26,0.25);
    }
    .recent-empty {
      font-size: 0.8125rem;
      color: var(--text-muted);
      font-style: italic;
    }
    .btn-clear {
      margin-left: auto;
      padding: 6px 14px;
      border: none;
      border-radius: var(--radius-sm);
      background: rgba(192,57,43,0.10);
      color: var(--danger);
      font-size: 0.75rem;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
      flex-shrink: 0;
    }
    .btn-clear:hover { background: rgba(192,57,43,0.18); }

    /* ─── Featured grid ─── */
    .featured-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      margin-bottom: 48px;
    }
    @media (max-width: 900px) {
      .featured-grid { grid-template-columns: 1fr; }
    }

    .spot-card {
      background: var(--surface);
      border: 1px solid rgba(120,100,50,0.08);
      border-radius: var(--radius-lg);
      padding: 20px;
      display: flex;
      gap: 16px;
      align-items: flex-start;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
      cursor: pointer;
      text-decoration: none;
      color: inherit;
      box-shadow: var(--shadow);
    }
    .spot-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--link));
      opacity: 0;
      transition: var(--transition);
    }
    .spot-card:hover {
      transform: translateY(-3px);
      border-color: rgba(120,100,50,0.15);
      box-shadow: var(--shadow-lg);
    }
    .spot-card:hover::before { opacity: 1; }

    .spot-thumb {
      width: 88px;
      height: 88px;
      border-radius: var(--radius);
      object-fit: cover;
      flex-shrink: 0;
    }
    .spot-badge {
      position: absolute;
      top: 16px;
      left: 16px;
      height: 28px;
      filter: drop-shadow(0 2px 4px rgba(45,36,16,0.25));
      pointer-events: none;
      z-index: 2;
    }
    .spot-content { flex: 1; min-width: 0; }
    .spot-label {
      font-size: 0.6875rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--link);
      margin-bottom: 4px;
    }
    .spot-title {
      font-family: 'Outfit', sans-serif;
      font-size: 1.125rem;
      font-weight: 800;
      color: var(--text-head);
      margin-bottom: 6px;
      line-height: 1.25;
    }
    .spot-desc {
      font-size: 0.8125rem;
      color: var(--text-muted);
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ─── Section headers ─── */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      margin-top: 40px;
    }
    .section-title {
      font-family: 'Outfit', sans-serif;
      font-size: 1.375rem;
      font-weight: 800;
      color: var(--text-head);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .section-title::after {
      content: '';
      display: block;
      width: 32px;
      height: 4px;
      border-radius: 2px;
      background: var(--accent);
      opacity: 0.6;
    }
    .section-link {
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--link);
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: var(--transition);
    }
    .section-link:hover { color: var(--link-hover); gap: 8px; }

    /* ─── Game cards ─── */
    .games-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 16px;
    }
    @media (max-width: 600px) {
      .games-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
    }

    .game-card {
      background: var(--surface);
      border: 1px solid rgba(120,100,50,0.08);
      border-radius: var(--radius);
      overflow: hidden;
      transition: var(--transition);
      cursor: pointer;
      text-decoration: none;
      color: inherit;
      position: relative;
      box-shadow: var(--shadow-sm);
    }
    .game-card:hover {
      transform: translateY(-4px);
      border-color: rgba(120,100,50,0.18);
      box-shadow: var(--shadow);
    }
    .game-card:hover .game-thumb { transform: scale(1.08); }
    .game-card:hover .game-play {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    .game-image-wrap {
      position: relative;
      aspect-ratio: 1;
      overflow: hidden;
    }
    .game-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }
    .game-play {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.8);
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(45,36,16,0.75);
      border: 2px solid var(--accent);
      color: #FFE066;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: var(--transition);
      backdrop-filter: blur(4px);
    }

    .game-info { padding: 10px 12px 12px; }
    .game-name {
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--text-head);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .game-meta {
      font-size: 0.6875rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    /* ─── Category strip ─── */
    .category-strip {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 8px;
      margin-bottom: 24px;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .category-strip::-webkit-scrollbar { display: none; }

    .category-chip {
      padding: 8px 18px;
      border-radius: 999px;
      background: var(--surface);
      border: 1px solid rgba(120,100,50,0.08);
      color: var(--text-muted);
      font-size: 0.8125rem;
      font-weight: 500;
      white-space: nowrap;
      cursor: pointer;
      transition: var(--transition);
      text-decoration: none;
      box-shadow: var(--shadow-sm);
    }
    .category-chip:hover,
    .category-chip.active {
      background: var(--accent);
      color: #2D1F00;
      border-color: var(--accent-dark);
      font-weight: 600;
    }

    /* ─── Footer ─── */
    .site-footer {
      margin-top: 80px;
      padding: 40px 24px;
      border-top: 1px solid rgba(120,100,50,0.10);
      text-align: center;
      color: var(--text-muted);
      font-size: 0.8125rem;
    }
    .footer-links {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .footer-links a {
      color: var(--text-muted);
      text-decoration: none;
      transition: var(--transition);
    }
    .footer-links a:hover { color: var(--link); }

    /* ─── No results ─── */
    .no-results {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
    }
    .no-results h3 {
      color: var(--text-head);
      font-family: 'Outfit', sans-serif;
      font-size: 1.25rem;
      margin-bottom: 8px;
    }

    /* ─── Animations ─── */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .anim-in { animation: fadeInUp 0.5s ease both; }
    .delay-1 { animation-delay: 0.05s; }
    .delay-2 { animation-delay: 0.1s; }
    .delay-3 { animation-delay: 0.15s; }

    /* ─── Scrollbar ─── */
    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--bg-2); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: #E0D0A8; }
  

/* ─── Game play page ─── */
.game-play-page {
  padding: 32px 24px;
  text-align: center;
}
.game-play-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.game-play-header {
  margin-bottom: 20px;
}
.game-play-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--text-head);
}
.game-play-header .lead {
  font-size: 18px;
  line-height: 1.5;
  max-width: 44ch;
  margin: 0 auto;
  color: var(--text-muted);
}
.game-frame {
  display: block;
  margin: 28px auto 0;
  box-shadow: var(--shadow);
  border: none;
  max-width: 100%;
  border-radius: var(--radius-sm);
}
.game-coming-soon {
  margin: 40px auto;
  max-width: 480px;
  padding: 40px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.game-coming-soon h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  color: var(--text-head);
  margin: 0 0 8px;
}
.game-coming-soon p {
  color: var(--text-muted);
}
.game-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #2D1F00;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.game-nav-back:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ─── Taxonomy pages ─── */
.section-intro {
  max-width: 62ch;
  margin: -12px auto 28px;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.6;
}
.term-count {
  opacity: 0.65;
  font-size: 0.8em;
}
.game-taxonomies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.game-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(120,100,50,0.18);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: var(--transition);
}
.tag-chip:hover {
  background: var(--surface);
  color: var(--text-head);
}

/* ─── Ruffle / legacy Flash games ─── */
.ruffle-container {
  overflow: hidden;
  background: #000;
}
.ruffle-container ruffle-player {
  display: block;
  width: 100%;
  height: 100%;
}
.ruffle-error {
  margin: 0;
  padding: 24px;
  color: #fff;
  text-align: center;
}
