:root {
      --bg1: #f7fbff;
      --bg2: #e7f0ff;
      --ink: #24324a;
      --muted: #637089;
      --blue: #2f6df6;
      --blue2: #174ec9;
      --gold: #f6b83f;
      --card: #ffffff;
      --table: #17614e;
      --table2: #0f4b3d;
      --line: rgba(255,255,255,.16);
      --shadow: 0 18px 40px rgba(20, 45, 80, .16);
      --radius: 24px;
    }

    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: radial-gradient(circle at top left, #ffffff 0, transparent 35%), linear-gradient(135deg, var(--bg1), var(--bg2));
      color: var(--ink);
    }

    button, select { font: inherit; touch-action: manipulation; }
    button { cursor: pointer; border: 0; }

    .page { width: min(1120px, 100%); margin: 0 auto; padding: 18px; }

    .hero {
      display: grid;
      grid-template-columns: 1.1fr .9fr;
      gap: 22px;
      align-items: center;
      margin: 12px 0 18px;
    }

    .brand-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(47, 109, 246, .1);
      color: var(--blue2);
      font-weight: 900;
      font-size: .88rem;
      margin-bottom: 12px;
    }

    .brand-mark {
      width: 20px;
      height: 20px;
      border-radius: 7px;
      background: linear-gradient(135deg, var(--blue), var(--gold));
      display: inline-block;
    }

    h1 {
      margin: 0 0 10px;
      font-size: clamp(2rem, 5vw, 4rem);
      line-height: .98;
      letter-spacing: -.045em;
    }

    .lead {
      margin: 0;
      color: var(--muted);
      font-size: clamp(1rem, 2vw, 1.18rem);
      line-height: 1.55;
      max-width: 690px;
    }

    .hero-card {
      background: var(--card);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 18px;
      border: 1px solid rgba(47,109,246,.12);
    }

    .hero-card strong { display: block; font-size: 1.08rem; margin-bottom: 6px; }
    .hero-card p { margin: 0; color: var(--muted); line-height: 1.45; }

    .game-shell {
      background: rgba(255,255,255,.82);
      border: 1px solid rgba(47,109,246,.14);
      box-shadow: var(--shadow);
      border-radius: 30px;
      overflow: hidden;
    }

    .game-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px;
      background: #fff;
      border-bottom: 1px solid rgba(47,109,246,.12);
    }

    .scoreboard { display: flex; gap: 10px; flex-wrap: wrap; }

    .score {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 8px 11px;
      border-radius: 16px;
      background: #f3f7ff;
      font-size: .92rem;
      font-weight: 900;
    }

    .score span { color: var(--blue2); }

    .top-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
    }

    .btn {
      border-radius: 16px;
      padding: 10px 14px;
      font-weight: 950;
      color: #fff;
      background: linear-gradient(135deg, var(--blue), var(--blue2));
      box-shadow: 0 8px 18px rgba(47,109,246,.22);
    }

    .btn.secondary {
      background: #ecf2ff;
      color: var(--blue2);
      box-shadow: none;
    }

    .btn.warn {
      background: linear-gradient(135deg, var(--gold), #ef8f1f);
      color: #3b2607;
    }

    .btn:disabled {
      opacity: .45;
      cursor: not-allowed;
      box-shadow: none;
    }

    .difficulty-select,
    .mode-select {
      border: 0;
      border-radius: 16px;
      padding: 10px 12px;
      font-weight: 950;
      color: var(--blue2);
      background: #ecf2ff;
      outline: none;
    }

    .table {
      position: relative;
      min-height: 540px;
      padding: 16px;
      background: radial-gradient(circle at center, rgba(255,255,255,.08), transparent 45%), linear-gradient(135deg, var(--table), var(--table2));
    }

    body[data-game-mode="kids"] .table {
      background:
        radial-gradient(circle at 14% 18%, rgba(255,255,255,.22) 0 28px, transparent 29px),
        radial-gradient(circle at 86% 20%, rgba(255,255,255,.18) 0 22px, transparent 23px),
        radial-gradient(circle at 18% 80%, rgba(255,255,255,.14) 0 18px, transparent 19px),
        radial-gradient(circle at 76% 76%, rgba(255,255,255,.18) 0 20px, transparent 21px),
        linear-gradient(135deg, #3ecf9f, #22a7b8 52%, #3f8cff);
    }

    .ai-area, .player-area {
      background: rgba(255,255,255,.1);
      border: 1px solid var(--line);
      border-radius: 22px;
      padding: 12px;
      color: #fff;
    }

    body[data-game-mode="kids"] .ai-area,
    body[data-game-mode="kids"] .player-area {
      background: rgba(255,255,255,.16);
      border-color: rgba(255,255,255,.26);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    }

    .ai-area {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      min-height: 132px;
    }

    .label { font-weight: 950; letter-spacing: -.02em; }
    .muted-light { color: rgba(255,255,255,.8); font-size: .92rem; }

    .board-wrap {
      min-height: 300px;
      display: grid;
      align-items: center;
      padding: 16px 0;
    }

    .board {
      position: relative;
      width: 100%;
      min-height: 240px;
      overflow: hidden;
      padding: 12px 8px;
    }

    .board .tile {
      position: absolute;
      z-index: 1;
      transition: left .16s ease, top .16s ease, transform .16s ease;
    }

    .board .tile.turn-down {
      z-index: 2;
      box-shadow: 0 10px 18px rgba(0,0,0,.24);
    }

    .placement-marker {
      position: absolute;
      width: 54px;
      height: 54px;
      border: 4px solid var(--gold);
      background: rgba(246,184,63,.08);
      border-radius: 14px;
      box-shadow: 0 0 0 3px rgba(246,184,63,.24), 0 8px 22px rgba(0,0,0,.22);
      z-index: 6;
      cursor: pointer;
      animation: markerPulse 1s ease-in-out infinite alternate;
    }

    .placement-marker::after {
      content: "";
      position: absolute;
      inset: -8px;
      border-radius: 18px;
    }

    @keyframes markerPulse {
      from { transform: scale(.96); }
      to { transform: scale(1.05); }
    }

    .empty-board {
      width: 100%;
      text-align: center;
      color: rgba(255,255,255,.86);
      font-weight: 900;
      line-height: 1.5;
      padding: 30px 12px;
      border: 2px dashed rgba(255,255,255,.25);
      border-radius: 22px;
    }

    .action-controls {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .player-area { margin-top: 6px; }

    .hand {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding: 14px 2px 4px;
      min-height: 96px;
    }

    .tile {
      width: 48px;
      min-width: 48px;
      height: 88px;
      border-radius: 12px;
      background: linear-gradient(180deg, #fffdf7, #f0eadf);
      border: 2px solid #d7cdbb;
      box-shadow: 0 8px 14px rgba(0,0,0,.18);
      display: grid;
      grid-template-rows: 1fr 1px 1fr;
      overflow: hidden;
      color: #1d2435;
      user-select: none;
      transition: transform .15s ease, box-shadow .15s ease, outline .15s ease;
    }

    .tile.horizontal {
      width: 88px;
      min-width: 88px;
      height: 48px;
      grid-template-columns: 1fr 1px 1fr;
      grid-template-rows: 1fr;
    }

    .tile.back {
      background: linear-gradient(135deg, #315fce, #173f9b);
      border-color: rgba(255,255,255,.28);
      position: relative;
    }

    body[data-game-mode="kids"] .tile.back {
      background: linear-gradient(135deg, #ff8fcf, #ffd257);
      border-color: rgba(255,255,255,.6);
      box-shadow: 0 8px 16px rgba(0,0,0,.14);
    }

    .tile.back::after {
      content: "CJ";
      color: rgba(255,255,255,.82);
      font-weight: 1000;
      display: grid;
      place-items: center;
      height: 100%;
      letter-spacing: .08em;
    }

    body[data-game-mode="kids"] .tile.back::after {
      content: "★";
      color: rgba(255,255,255,.96);
      font-size: 1.35rem;
      letter-spacing: 0;
      text-shadow: 0 2px 8px rgba(0,0,0,.12);
    }

    .tile.playable {
      outline: 4px solid rgba(246,184,63,.95);
      transform: translateY(-7px);
    }

    .tile.selected {
      outline: 4px solid #73ffbd;
      transform: translateY(-10px) scale(1.04);
      box-shadow: 0 14px 22px rgba(0,0,0,.24);
    }

    .board .tile.playable,
    .board .tile.selected {
      transform: none;
      outline: none;
    }

    .tile-face {
      position: relative;
      display: grid;
      place-items: center;
    }

    .symbol-face {
      font-size: 1.35rem;
      line-height: 1;
      display: grid;
      place-items: center;
      width: 100%;
      height: 100%;
    }

    .tile.horizontal .symbol-face {
      font-size: 1.25rem;
    }

    .divider { background: #d0c5b2; }

    .pip {
      width: 7px;
      height: 7px;
      background: #1f2b3e;
      border-radius: 50%;
      position: absolute;
    }

    .p1 { top: 50%; left: 50%; transform: translate(-50%, -50%); }
    .p2a { top: 25%; left: 25%; }
    .p2b { right: 25%; bottom: 25%; }
    .p3a { top: 22%; left: 25%; }
    .p3b { top: 50%; left: 50%; transform: translate(-50%, -50%); }
    .p3c { right: 25%; bottom: 22%; }
    .p4a { top: 22%; left: 25%; }
    .p4b { top: 22%; right: 25%; }
    .p4c { bottom: 22%; left: 25%; }
    .p4d { bottom: 22%; right: 25%; }
    .p5a { top: 20%; left: 24%; }
    .p5b { top: 20%; right: 24%; }
    .p5c { top: 50%; left: 50%; transform: translate(-50%, -50%); }
    .p5d { bottom: 20%; left: 24%; }
    .p5e { bottom: 20%; right: 24%; }
    .p6a { top: 18%; left: 24%; }
    .p6b { top: 18%; right: 24%; }
    .p6c { top: 50%; left: 24%; transform: translateY(-50%); }
    .p6d { top: 50%; right: 24%; transform: translateY(-50%); }
    .p6e { bottom: 18%; left: 24%; }
    .p6f { bottom: 18%; right: 24%; }

    .message {
      margin-top: 12px;
      background: rgba(255,255,255,.14);
      border: 1px solid rgba(255,255,255,.18);
      color: #fff;
      padding: 12px 14px;
      border-radius: 18px;
      font-weight: 900;
      line-height: 1.35;
    }

    body[data-game-mode="kids"] .message {
      background: rgba(255,255,255,.18);
      border-color: rgba(255,255,255,.28);
    }

    .tip {
      margin-top: 10px;
      color: rgba(255,255,255,.86);
      font-size: .93rem;
      line-height: 1.45;
    }

    body[data-game-mode="kids"] .tip {
      color: rgba(255,255,255,.95);
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(12,22,42,.62);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      z-index: 20;
    }

    .modal.active { display: flex; }

    .modal-card {
      width: min(460px, 100%);
      background: #fff;
      border-radius: 28px;
      padding: 24px;
      text-align: center;
      box-shadow: 0 30px 70px rgba(0,0,0,.3);
    }

    .modal-card h2 {
      margin: 0 0 8px;
      font-size: 2rem;
      letter-spacing: -.04em;
    }

    .modal-card p {
      color: var(--muted);
      line-height: 1.5;
      margin: 0 0 18px;
    }

    .mode-choice-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 16px;
    }

    .mode-choice {
      border-radius: 20px;
      padding: 18px 12px;
      background: #f3f7ff;
      color: var(--blue2);
      font-weight: 950;
      box-shadow: inset 0 0 0 2px rgba(47,109,246,.12);
    }

    .mode-choice strong {
      display: block;
      font-size: 1.1rem;
      margin-bottom: 6px;
    }

    .mode-choice span {
      display: block;
      color: var(--muted);
      font-size: .9rem;
      font-weight: 700;
      line-height: 1.3;
    }

    .content {
      display: grid;
      gap: 18px;
      margin: 22px 0;
    }

    .info-card {
      background: #fff;
      border: 1px solid rgba(47,109,246,.12);
      box-shadow: 0 12px 28px rgba(20, 45, 80, .08);
      border-radius: 24px;
      padding: 22px;
    }

    .info-card h2 {
      margin: 0 0 10px;
      font-size: 1.45rem;
      letter-spacing: -.03em;
    }

    .info-card p, .info-card li {
      color: var(--muted);
      line-height: 1.65;
    }

    .info-card ul {
      padding-left: 20px;
      margin-bottom: 0;
    }

    details {
      border-top: 1px solid #edf1fa;
      padding: 13px 0;
    }

    details:first-of-type { border-top: 0; }
    summary { cursor: pointer; font-weight: 900; color: var(--ink); }

    footer {
      text-align: center;
      padding: 24px 10px 36px;
      color: var(--muted);
      font-weight: 800;
    }

    footer a {
      color: var(--blue2);
      text-decoration: none;
      font-weight: 1000;
    }

    @media (max-width: 760px) {
      .page { padding: 12px; }
      .hero { grid-template-columns: 1fr; }

      .game-topbar {
        align-items: stretch;
        flex-direction: column;
      }

      .top-actions { justify-content: stretch; }

      .top-actions .btn,
      .top-actions .difficulty-select,
      .top-actions .mode-select {
        flex: 1;
      }

      .table {
        min-height: 580px;
        padding: 12px;
      }

      .tile {
        width: 44px;
        min-width: 44px;
        height: 82px;
      }

      .tile.horizontal {
        width: 82px;
        min-width: 82px;
        height: 44px;
      }

      .placement-marker {
        width: 50px;
        height: 50px;
      }

      .board-wrap { min-height: 315px; }

      .btn, .difficulty-select, .mode-select { padding: 12px 14px; }

      .mode-choice-grid {
        grid-template-columns: 1fr;
      }
    }
  
    
    @media (max-width: 760px) {
      .page {
        padding: 8px;
      }

      .hero {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 6px 0 10px;
      }

      .brand-pill {
        margin-bottom: 8px;
        padding: 7px 10px;
        font-size: .8rem;
      }

      h1 {
        font-size: clamp(1.7rem, 9vw, 2.35rem);
        margin-bottom: 6px;
      }

      .lead {
        font-size: .94rem;
        line-height: 1.38;
      }

      .hero-card {
        padding: 12px;
        border-radius: 18px;
      }

      .hero-card strong {
        font-size: .98rem;
      }

      .hero-card p {
        font-size: .9rem;
      }

      .game-shell {
        border-radius: 22px;
      }

      .game-topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
      }

      .scoreboard {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
      }

      .score {
        justify-content: center;
        padding: 7px 6px;
        border-radius: 13px;
        font-size: .78rem;
        white-space: nowrap;
      }

      .top-actions {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr) minmax(96px, 1.12fr);
        gap: 6px;
        justify-content: stretch;
        align-items: center;
      }

      .top-actions .btn,
      .top-actions .difficulty-select,
      .top-actions .mode-select {
        width: 100%;
        min-width: 0;
        padding: 9px 6px;
        border-radius: 13px;
        font-size: .82rem;
      }

      #soundBtn {
        padding: 9px 0;
        text-align: center;
      }

      #newGameBtn {
        grid-column: auto;
      }

      .table {
        min-height: auto;
        padding: 8px;
      }

      .ai-area {
        min-height: 86px;
        padding: 8px;
        border-radius: 16px;
        gap: 8px;
      }

      .label {
        font-size: .9rem;
      }

      .muted-light {
        font-size: .78rem;
      }

      .ai-area .hand {
        min-height: 48px;
        padding: 2px 0;
        gap: 3px;
        max-width: 72%;
        justify-content: flex-end;
        overflow: hidden;
      }

      .board-wrap {
        min-height: 250px;
        padding: 8px 0;
      }

      .board {
        min-height: 214px;
        padding: 8px 4px;
      }

      .action-controls {
        gap: 8px;
        margin-top: 6px;
      }

      .action-controls .btn {
        flex: 1;
        padding: 10px 8px;
        border-radius: 13px;
        font-size: .86rem;
      }

      .player-area {
        padding: 8px;
        border-radius: 16px;
      }

      .player-area .hand {
        min-height: 82px;
        padding: 10px 2px 3px;
        gap: 8px;
      }

      .tile {
        width: 42px;
        min-width: 42px;
        height: 78px;
        border-radius: 10px;
      }

      .tile.horizontal {
        width: 78px;
        min-width: 78px;
        height: 42px;
      }

      .ai-area .tile.back {
        width: 24px;
        min-width: 24px;
        height: 42px;
        border-radius: 7px;
      }

      .ai-area .tile.back::after {
        font-size: .6rem;
      }

      body[data-game-mode="kids"] .ai-area .tile.back::after {
        font-size: .82rem;
      }

      .pip {
        width: 6px;
        height: 6px;
      }

      .symbol-face {
        font-size: 1.18rem;
      }

      .tile.horizontal .symbol-face {
        font-size: 1.05rem;
      }

      .placement-marker {
        width: 46px;
        height: 46px;
        border-width: 3px;
        border-radius: 13px;
      }

      .message {
        margin-top: 8px;
        padding: 9px 10px;
        border-radius: 14px;
        font-size: .84rem;
      }

      .tip {
        margin-top: 7px;
        font-size: .8rem;
        line-height: 1.35;
      }

      .content {
        margin: 14px 0;
        gap: 12px;
      }

      .info-card {
        padding: 15px;
        border-radius: 18px;
      }

      .info-card h2 {
        font-size: 1.18rem;
      }

      .info-card p,
      .info-card li {
        font-size: .92rem;
        line-height: 1.5;
      }

      .modal-card {
        padding: 18px;
        border-radius: 22px;
      }

      .modal-card h2 {
        font-size: 1.55rem;
      }

      .mode-choice-grid {
        grid-template-columns: 1fr;
      }

      footer {
        padding: 18px 8px 28px;
        font-size: .9rem;
      }
    }

    @media (max-width: 420px) {
      .page {
        padding: 6px;
      }

      .score {
        font-size: .72rem;
        padding: 6px 4px;
      }

      .top-actions {
        grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr) minmax(88px, 1.08fr);
        gap: 5px;
      }

      .top-actions .btn,
      .top-actions .difficulty-select,
      .top-actions .mode-select,
      .action-controls .btn {
        font-size: .76rem;
        padding: 8px 5px;
      }

      #soundBtn {
        padding: 8px 0;
      }

      .ai-area .hand {
        max-width: 74%;
        gap: 2px;
      }

      .board-wrap {
        min-height: 235px;
      }

      .board {
        min-height: 202px;
      }

      .tile {
        width: 38px;
        min-width: 38px;
        height: 70px;
        border-radius: 9px;
      }

      .tile.horizontal {
        width: 70px;
        min-width: 70px;
        height: 38px;
      }

      .ai-area .tile.back {
        width: 22px;
        min-width: 22px;
        height: 38px;
      }

      .pip {
        width: 5.4px;
        height: 5.4px;
      }

      .symbol-face {
        font-size: 1.05rem;
      }

      .tile.horizontal .symbol-face {
        font-size: .98rem;
      }

      .placement-marker {
        width: 42px;
        height: 42px;
      }

      .message {
        font-size: .8rem;
      }

      .tip {
        font-size: .76rem;
      }
    }

    @media (max-width: 360px) {
      .scoreboard {
        grid-template-columns: 1fr 1fr;
      }

      .score:last-child {
        grid-column: 1 / -1;
      }

      .top-actions {
        grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) minmax(82px, 1.02fr);
        gap: 4px;
      }

      .top-actions .btn,
      .top-actions .difficulty-select,
      .top-actions .mode-select {
        font-size: .72rem;
        padding: 7px 4px;
      }

      #soundBtn {
        padding: 7px 0;
      }

      .tile {
        width: 36px;
        min-width: 36px;
        height: 66px;
      }

      .tile.horizontal {
        width: 66px;
        min-width: 66px;
        height: 36px;
      }

      .ai-area .hand {
        max-width: 76%;
        gap: 2px;
      }

      .ai-area .tile.back {
        width: 20px;
        min-width: 20px;
        height: 36px;
      }

      .ai-area .tile.back::after {
        font-size: .54rem;
      }

      body[data-game-mode="kids"] .ai-area .tile.back::after {
        font-size: .72rem;
      }

      .placement-marker {
        width: 40px;
        height: 40px;
      }
    }

  
    
    @media (max-width: 760px) {
      .hero .lead,
      .hero-card,
      .player-area .tip {
        display: none !important;
      }

      .hero {
        margin-bottom: 6px;
      }

      h1 {
        margin-bottom: 0;
      }
    }

  
    
    .domino-mobile-topbar {
      display: none;
    }

    @media (max-width: 760px) {
      .domino-mobile-topbar {
        position: sticky;
        top: 8px;
        z-index: 60;
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 9px 10px;
        border: 3px solid rgba(30, 46, 88, .18);
        border-radius: 20px;
        background: rgba(255, 253, 246, .94);
        backdrop-filter: blur(12px);
        box-shadow: 0 7px 0 rgba(28, 47, 80, .12);
      }

      .domino-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
        color: var(--ink);
        text-decoration: none;
        font-weight: 950;
        letter-spacing: -.5px;
        font-size: .98rem;
      }

      .domino-mobile-brand-mark {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        border: 3px solid rgba(30, 46, 88, .18);
        border-radius: 15px;
        background: linear-gradient(145deg, #fff7cb, #ffcd59);
        box-shadow: 0 4px 0 rgba(28, 47, 80, .12);
      }

      .domino-mobile-brand-mark::before {content:"";width:23px;height:34px;border:3px solid #24324a;border-radius:8px;background:radial-gradient(circle at 50% 25%,#24324a 0 2.4px,transparent 3px),radial-gradient(circle at 35% 72%,#24324a 0 2.3px,transparent 3px),radial-gradient(circle at 65% 72%,#24324a 0 2.3px,transparent 3px),linear-gradient(#24324a,#24324a) center/80% 3px no-repeat,linear-gradient(180deg,#fffdf6,#f1e8d8);transform:rotate(-12deg);box-shadow:0 2px 0 rgba(28,47,80,.18)}

      .domino-mobile-nav-toggle {
        min-width: 46px;
        height: 42px;
        display: grid;
        place-items: center;
        border: 3px solid rgba(30, 46, 88, .18);
        border-radius: 15px;
        background: #f6b83f;
        box-shadow: 0 4px 0 rgba(28, 47, 80, .12);
        color: #24324a;
        font-weight: 950;
        font-size: 1.2rem;
        cursor: pointer;
      }

      .domino-mobile-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 10px;
        border: 3px solid rgba(30, 46, 88, .18);
        border-radius: 18px;
        background: rgba(255, 253, 246, .98);
        box-shadow: 0 7px 0 rgba(28, 47, 80, .12);
      }

      .domino-mobile-nav.open {
        display: grid;
      }

      .domino-mobile-nav a {
        display: block;
        padding: 10px 12px;
        border-radius: 999px;
        color: #24324a;
        text-decoration: none;
        font-weight: 900;
        background: #f3f7ff;
      }

      .domino-mobile-nav a.domino-pill {
        background: #f6b83f;
        box-shadow: inset 0 0 0 2px rgba(30,46,88,.12);
      }
    }

  
    
    .topbar{
      position:sticky;
      top:12px;
      z-index:70;
      margin:0 auto 18px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      padding:12px 14px;
      border:4px solid rgba(30,46,88,.20);
      border-radius:22px;
      background:rgba(255,253,246,.92);
      backdrop-filter:blur(12px);
      box-shadow:0 8px 0 rgba(28,47,80,.14);
    }

    .topbar .brand{
      display:inline-flex;
      align-items:center;
      gap:10px;
      text-decoration:none;
      color:var(--ink);
      font-weight:950;
      letter-spacing:-.7px;
      font-size:clamp(1.05rem,3vw,1.45rem);
      min-width:0;
    }

    .topbar .brand-mark{
      width:50px;
      height:50px;
      border:4px solid rgba(30,46,88,.20);
      border-radius:18px;
      display:grid;
      place-items:center;
      background:linear-gradient(145deg,#fff7cb,#ffcd59);
      box-shadow:0 4px 0 rgba(28,47,80,.14);
      flex:0 0 auto;
      position:relative;
    }

    .topbar .brand-mark:before{content:"";width:26px;height:38px;border:3px solid var(--ink);border-radius:8px;background:radial-gradient(circle at 50% 25%,var(--ink) 0 2.6px,transparent 3px),radial-gradient(circle at 35% 72%,var(--ink) 0 2.5px,transparent 3px),radial-gradient(circle at 65% 72%,var(--ink) 0 2.5px,transparent 3px),linear-gradient(var(--ink),var(--ink)) center/80% 3px no-repeat,linear-gradient(180deg,#fffdf6,#f1e8d8);transform:rotate(-12deg);box-shadow:0 2px 0 rgba(28,47,80,.18)}

    .topbar .nav,
    .studio-footer .footer-links{
      display:flex;
      align-items:center;
      gap:8px;
      flex-wrap:wrap;
    }

    .topbar .nav{
      justify-content:flex-end;
    }

    .topbar .nav a,
    .studio-footer .footer-links a{
      text-decoration:none;
      color:var(--ink);
      font-weight:850;
      padding:9px 12px;
      border-radius:999px;
    }

    .topbar .nav a:hover{
      background:#fff0b7;
    }

    .topbar .nav .pill{
      background:var(--gold);
      border:3px solid rgba(30,46,88,.20);
      box-shadow:0 4px 0 rgba(28,47,80,.14);
    }

    .mobile-nav-toggle{
      display:none;
      border:3px solid rgba(30,46,88,.20);
      border-radius:16px;
      background:var(--gold);
      box-shadow:0 4px 0 rgba(28,47,80,.14);
      font-weight:950;
      color:var(--ink);
      cursor:pointer;
    }

    .studio-footer{
      margin:42px auto 0;
      border-top:4px solid rgba(30,46,88,.20);
      padding:24px 0 36px;
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:18px;
      flex-wrap:wrap;
      color:var(--muted);
      text-align:left;
      font-weight:700;
    }

    .studio-footer strong{
      display:block;
      color:var(--ink);
      font-size:1.05rem;
      margin-bottom:6px;
    }

    .studio-footer p{
      margin:6px 0;
      color:var(--muted);
      line-height:1.5;
    }

    .studio-footer a{
      color:var(--blue2);
      text-decoration:none;
      font-weight:950;
    }

    @media(max-width:860px){
      .topbar{
        top:8px;
        margin-top:0;
        border-width:3px;
        padding:9px 10px;
      }

      .topbar .brand{
        font-size:1rem;
      }

      .topbar .brand-mark{
        width:42px;
        height:42px;
        border-radius:15px;
      }

      .topbar .brand-mark:before{
        font-size:26px;
      }

      .mobile-nav-toggle{
        display:inline-grid;
        place-items:center;
        width:48px;
        height:44px;
      }

      .topbar .nav{
        display:none;
      }

      .topbar .nav.is-open{
        position:absolute;
        top:calc(100% + 8px);
        left:0;
        right:0;
        display:grid;
        grid-template-columns:1fr;
        gap:7px;
        padding:10px;
        border:3px solid rgba(30,46,88,.20);
        border-radius:18px;
        background:rgba(255,253,246,.98);
        box-shadow:0 7px 0 rgba(28,47,80,.14);
      }

      .topbar .nav.is-open a{
        display:block;
        background:#f3f7ff;
      }

      .topbar .nav.is-open a.pill{
        background:var(--gold);
      }

      .studio-footer{
        display:block;
      }

      .studio-footer .footer-links{
        margin-top:12px;
      }
    }

    @media(max-width:560px){
      .studio-footer{
        padding:20px 0 30px;
      }

      .studio-footer .footer-links{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:7px;
      }

      .studio-footer .footer-links a{
        background:#f3f7ff;
        text-align:center;
      }
    }

  
    
    @media (max-width: 760px) {
      .hero .brand-pill,
      .hero h1 {
        display: none !important;
      }

      .hero {
        padding-top: 0 !important;
        margin-top: 0 !important;
      }
    }
