    :root {
      /* Green Chalkboard Theme (Default) */
      --board-bg: #1e3b2b;
      --board-texture: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.3) 100%);
      --chalk-white: #f8f9fa;
      --chalk-yellow: #fff3a0;
      --chalk-green: #a8ffb2;
      --chalk-blue: #9ee2ff;
      --chalk-orange: #ffd09e;
      --chalk-pink: #ffb3d9;
      --chalk-purple: #e3bfff;
      --chalk-dim: rgba(248, 249, 250, 0.4);
      --wood-border: #5c3a21;
      --wood-inner: #3d2312;
      --font-chalk-heading: 'Fredericka the Great', cursive;
      --font-chalk-hand: 'Cabin Sketch', cursive;
      --font-chalk-sub: 'Patrick Hand', cursive;
    }

    [data-theme="dark"] {
      /* Black Chalkboard Theme */
      --board-bg: #17181c;
      --board-texture: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.5) 100%);
      --wood-border: #3a2213;
      --wood-inner: #241308;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    body {
      background-color: #0b0d0e;
      background-image: repeating-linear-gradient(45deg, #111 0, #111 10px, #0b0d0e 10px, #0b0d0e 20px);
      color: var(--chalk-white);
      font-family: var(--font-chalk-sub);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 1.5rem;
      overflow-x: hidden;
    }

    /* Wooden Blackboard Frame */
    .board-frame {
      width: 100%;
      max-width: 1150px;
      background: var(--wood-border);
      border: 6px solid var(--wood-inner);
      border-radius: 16px;
      padding: 18px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.8);
      position: relative;
    }

    /* Chalkboard Surface */
    .blackboard {
      background-color: var(--board-bg);
      background-image: var(--board-texture);
      border-radius: 8px;
      border: 3px dashed rgba(255, 255, 255, 0.15);
      padding: 2rem;
      box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 1.75rem;
    }

    /* Chalk Dust & Noise Overlay Effect */
    .blackboard::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 2px, transparent 2px, transparent 4px);
      pointer-events: none;
      opacity: 0.7;
    }

    /* Top Chalk Bar / Header */
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2px dashed var(--chalk-dim);
      padding-bottom: 1rem;
      position: relative;
      z-index: 2;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-family: var(--font-chalk-heading);
      font-size: 1.8rem;
      letter-spacing: 2px;
      text-decoration: none;
      color: var(--chalk-white);
      text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4), 0 0 2px var(--chalk-white);
    }

    .brand-icon {
      width: 18px;
      height: 18px;
      background-color: var(--chalk-yellow);
      display: inline-block;
      transform: rotate(-8deg);
      box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    /* Chalk Eraser & Wooden Buttons */
    .eraser-btn {
      background: #c29b68;
      border: 2px solid #5c3a21;
      border-bottom: 6px solid #3d2312;
      color: #2b1a0e;
      padding: 0.4rem 0.8rem;
      border-radius: 6px;
      cursor: pointer;
      font-family: var(--font-chalk-hand);
      font-size: 1.1rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      box-shadow: 0 4px 10px rgba(0,0,0,0.4);
      transition: transform 0.1s ease;
    }

    .eraser-btn:active {
      transform: translateY(3px);
      border-bottom-width: 3px;
    }

    /* Board Main Header */
    .title-section {
      text-align: center;
      position: relative;
      z-index: 2;
    }

    .board-title {
      font-family: var(--font-chalk-heading);
      font-size: 2.8rem;
      color: var(--chalk-yellow);
      text-shadow: 2px 2px 4px rgba(0,0,0,0.6), 0 0 3px var(--chalk-yellow);
      letter-spacing: 3px;
    }

    .board-subtitle {
      font-family: var(--font-chalk-sub);
      font-size: 1.2rem;
      color: var(--chalk-white);
      opacity: 0.85;
      margin-top: 0.2rem;
    }

    /* Player Tag Input (Chalk Box) */
    .user-tag-bar {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      border: 2px solid var(--chalk-white);
      padding: 0.4rem 1.2rem;
      border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Hand-drawn look */
      background: rgba(0,0,0,0.15);
      margin: 0 auto;
      box-shadow: 0 0 5px var(--chalk-dim);
      position: relative;
      z-index: 2;
    }

    .user-tag-bar label {
      font-family: var(--font-chalk-hand);
      font-size: 1.2rem;
      letter-spacing: 1px;
      color: var(--chalk-yellow);
    }

    .user-tag-bar input {
      background: transparent;
      border: none;
      outline: none;
      color: var(--chalk-green);
      font-family: var(--font-chalk-hand);
      font-size: 1.4rem;
      width: 140px;
      text-shadow: 0 0 2px var(--chalk-green);
    }

    /* 3x3 Grid Layout */
    .games-list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
      width: 100%;
      position: relative;
      z-index: 2;
    }

    @media (max-width: 850px) {
      .games-list { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 550px) {
      .games-list { grid-template-columns: 1fr; }
    }

    /* Chalk Card Button */
    .game-launch-btn {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-start;
      padding: 1.25rem;
      background: rgba(255, 255, 255, 0.03);
      border: 2px solid var(--chalk-color, var(--chalk-white));
      border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Sketchy hand-drawn border */
      text-decoration: none;
      color: var(--chalk-white);
      min-height: 140px;
      transition: all 0.2s ease;
      cursor: pointer;
      position: relative;
      box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    }

    .game-launch-btn:hover {
      transform: scale(1.03) rotate(-1deg);
      background: rgba(255, 255, 255, 0.08);
      box-shadow: 0 0 12px var(--chalk-color, var(--chalk-white));
    }

    .game-info {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.3rem;
      text-align: left;
    }

    .game-name {
      font-family: var(--font-chalk-hand);
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--chalk-color, var(--chalk-white));
      text-shadow: 0 0 3px var(--chalk-color, var(--chalk-white));
    }

    .game-tag {
      font-family: var(--font-chalk-sub);
      font-size: 1.0rem;
      color: var(--chalk-white);
      opacity: 0.8;
      line-height: 1.2;
    }

    .action-row {
      display: flex;
      justify-content: flex-end;
      width: 100%;
      margin-top: 0.8rem;
    }

    .action-arrow {
      font-family: var(--font-chalk-hand);
      font-size: 1.6rem;
      font-weight: 800;
      color: var(--chalk-color, var(--chalk-white));
      text-shadow: 0 0 3px var(--chalk-color, var(--chalk-white));
    }

    /* About Modal Overlay & Box */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .modal-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .about-box {
      background-color: var(--board-bg);
      background-image: var(--board-texture);
      border: 3px dashed var(--chalk-yellow);
      border-radius: 12px;
      padding: 2rem;
      max-width: 500px;
      width: 90%;
      box-shadow: 0 0 30px rgba(0,0,0,0.8);
      position: relative;
    }

    .about-box h2 {
      font-family: var(--font-chalk-heading);
      color: var(--chalk-yellow);
      font-size: 2rem;
      margin-bottom: 0.8rem;
    }
    .about-box h3 {
      font-family: var(--font-chalk-heading);
      color: var(--chalk-yellow);
      font-size: 2rem;
      margin-bottom: 0.8rem;
    }

    .about-box p {
      font-family: var(--font-chalk-sub);
      font-size: 1.2rem;
      line-height: 1.5;
      color: var(--chalk-white);
      margin-bottom: 1.2rem;
    }

    .close-modal-btn {
      float: right;
      background: transparent;
      border: 1px dashed var(--chalk-white);
      color: var(--chalk-white);
      font-family: var(--font-chalk-hand);
      font-size: 1rem;
      padding: 0.3rem 0.8rem;
      border-radius: 4px;
      cursor: pointer;
    }

    .close-modal-btn:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    /* Chalk Ledge Wooden Tray at Bottom */
    .chalk-tray {
      height: 18px;
      background: #4a2e18;
      border-top: 3px solid #2b1a0e;
      border-radius: 0 0 8px 8px;
      position: relative;
      display: flex;
      align-items: center;
      padding: 0 20px;
      gap: 15px;
    }

    .chalk-piece {
      width: 35px;
      height: 8px;
      border-radius: 3px;
      box-shadow: 1px 2px 3px rgba(0,0,0,0.5);
    }

    :root {
      --board-bg: #173d32;
      --board-texture:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
        radial-gradient(ellipse at 15% 0%, rgba(131, 194, 137, 0.12), transparent 50%);
      --wood-border: #755036;
      --wood-inner: #32251b;
      --chalk-yellow: #f3d976;
      --chalk-green: #a6dfab;
      --chalk-blue: #92d4dc;
      --chalk-orange: #efa97c;
      --chalk-pink: #e99cb5;
      --chalk-purple: #b9b1e3;
    }

    [data-theme="dark"] {
      --board-bg: #171d1a;
      --board-texture:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
        radial-gradient(ellipse at 15% 0%, rgba(131, 194, 137, 0.07), transparent 50%);
      --wood-border: #53402f;
      --wood-inner: #282018;
    }

    body {
      justify-content: flex-start;
      padding: 28px;
      background-color: #111613;
      background-image:
        radial-gradient(ellipse at top, rgba(75, 114, 81, 0.17), transparent 55%),
        repeating-linear-gradient(45deg, #151a17 0, #151a17 1px, #111613 1px, #111613 12px);
    }

    .board-frame {
      width: min(100%, 1280px);
      max-width: 1280px;
      margin: auto;
      padding: 9px;
      border: 3px solid var(--wood-inner);
      border-radius: 8px;
      box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
    }

    .blackboard {
      gap: 28px;
      padding: 30px 34px 34px;
      border: 1px solid rgba(248, 249, 250, 0.15);
      border-radius: 4px;
      background-size: 34px 34px, 34px 34px, auto;
      box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.25);
    }

    .blackboard::before {
      display: none;
    }

    header {
      min-height: 48px;
      padding-bottom: 16px;
      border-bottom: 1px solid rgba(248, 249, 250, 0.2);
    }

    .brand {
      gap: 10px;
      font-family: var(--font-chalk-hand);
      font-size: 1.35rem;
      letter-spacing: 0;
      text-shadow: none;
    }

    .brand-icon {
      width: 12px;
      height: 24px;
      transform: rotate(8deg);
      box-shadow: none;
    }

    .nav-actions {
      gap: 8px;
    }

    .eraser-btn {
      min-height: 38px;
      padding: 5px 11px;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-bottom-width: 1px;
      border-radius: 5px;
      background: rgba(13, 23, 18, 0.42);
      color: var(--chalk-white);
      font-family: var(--font-chalk-sub);
      font-size: 1rem;
      box-shadow: none;
    }

    .eraser-btn:active {
      transform: translateY(1px);
      border-bottom-width: 1px;
    }

    .title-section {
      text-align: left;
    }

    .board-title {
      color: var(--chalk-yellow);
      font-size: 3rem;
      letter-spacing: 0;
      line-height: 1.1;
      text-shadow: none;
    }

    .board-subtitle {
      margin-top: 8px;
      font-size: 1.15rem;
      opacity: 0.76;
    }

    .user-tag-bar {
      align-self: flex-start;
      gap: 12px;
      margin: -8px 0 0;
      padding: 7px 10px 7px 12px;
      border: 1px solid rgba(248, 249, 250, 0.24);
      border-radius: 5px;
      background: rgba(4, 17, 11, 0.25);
      box-shadow: none;
    }

    .user-tag-bar label {
      font-size: 0.95rem;
      letter-spacing: 0;
    }

    .user-tag-bar input {
      width: 130px;
      padding: 2px 4px;
      border-bottom: 1px solid rgba(166, 223, 171, 0.55);
      font-size: 1.1rem;
      text-shadow: none;
    }

    .games-list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      counter-reset: game-index;
    }

    .game-launch-btn {
      min-width: 0;
      min-height: 150px;
      padding: 18px 18px 14px;
      border: 1px solid rgba(248, 249, 250, 0.2);
      border-top: 2px solid var(--chalk-color, var(--chalk-white));
      border-radius: 5px;
      background: rgba(5, 18, 12, 0.24);
      box-shadow: none;
      color: var(--chalk-white);
      text-decoration: none;
      transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
      counter-increment: game-index;
      animation: tile-enter 420ms both;
    }

    .game-launch-btn:nth-child(2) { animation-delay: 35ms; }
    .game-launch-btn:nth-child(3) { animation-delay: 70ms; }
    .game-launch-btn:nth-child(4) { animation-delay: 105ms; }
    .game-launch-btn:nth-child(5) { animation-delay: 140ms; }
    .game-launch-btn:nth-child(6) { animation-delay: 175ms; }
    .game-launch-btn:nth-child(7) { animation-delay: 210ms; }

    .game-launch-btn::before {
      content: "0" counter(game-index);
      position: absolute;
      top: 12px;
      right: 15px;
      color: rgba(248, 249, 250, 0.42);
      font-family: var(--font-chalk-sub);
      font-size: 0.85rem;
      font-variant-numeric: tabular-nums;
    }

    .game-launch-btn:hover {
      transform: translateY(-3px);
      border-color: var(--chalk-color, var(--chalk-white));
      background: rgba(255, 255, 255, 0.075);
      box-shadow: none;
    }

    .game-launch-btn:focus-visible,
    .eraser-btn:focus-visible,
    .user-tag-bar input:focus-visible,
    .close-modal-btn:focus-visible {
      outline: 2px solid var(--chalk-yellow);
      outline-offset: 3px;
    }

    .game-info {
      gap: 8px;
      max-width: 100%;
    }

    .game-name {
      max-width: calc(100% - 24px);
      color: var(--chalk-color, var(--chalk-white));
      font-size: 1.45rem;
      line-height: 1.15;
      text-shadow: none;
    }

    .game-tag {
      max-width: 30ch;
      font-size: 1rem;
      line-height: 1.25;
      opacity: 0.72;
    }

    .action-row {
      margin-top: 8px;
    }

    .action-arrow {
      color: var(--chalk-color, var(--chalk-white));
      font-family: var(--font-chalk-sub);
      font-size: 1.4rem;
      text-shadow: none;
    }

    .about-box {
      border-radius: 6px;
    }

    .chalk-tray {
      height: 15px;
      border-radius: 0 0 4px 4px;
    }

    @keyframes tile-enter {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 900px) {
      body { padding: 18px; }
      .games-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .blackboard { padding: 24px; }
    }

    @media (max-width: 600px) {
      body { padding: 10px; }
      .board-frame { padding: 5px; }
      .blackboard { gap: 22px; padding: 18px 14px 22px; }
      header { align-items: flex-start; }
      .brand { font-size: 1.15rem; }
      .nav-actions { flex-wrap: wrap; justify-content: flex-end; }
      .nav-actions .eraser-btn { font-size: 0.9rem; }
      .board-title { font-size: 2rem; }
      .board-subtitle { font-size: 1rem; }
      .user-tag-bar { flex-wrap: wrap; }
      .games-list { grid-template-columns: 1fr; gap: 9px; }
      .game-launch-btn { min-height: 126px; padding: 15px; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
      }
    }
