:root {
      --ink: #20124d;
      --ink-soft: #493983;
      --paper: #fffdf6;
      --sun: #ffd74a;
      --pink: #ff5d8f;
      --blue: #3a86ff;
      --green: #4cc986;
      --mint: #c6f7df;
      --violet: #8d5cf6;
      --shadow: rgba(31, 18, 77, 0.22);
      --line: #20124d;
      --radius: 28px;
    }

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

    body {
      margin: 0;
      font-family: ui-rounded, "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(circle at 8% 12%, rgba(255, 215, 74, 0.85) 0 70px, transparent 72px),
        radial-gradient(circle at 92% 16%, rgba(255, 93, 143, 0.42) 0 92px, transparent 94px),
        radial-gradient(circle at 16% 88%, rgba(76, 201, 134, 0.5) 0 115px, transparent 118px),
        linear-gradient(135deg, #fff4c8 0%, #eafaff 45%, #efe7ff 100%);
      min-height: 100vh;
      overflow-x: hidden;
    }

    a { color: inherit; }

    .page {
      width: min(1180px, calc(100% - 28px));
      margin: 0 auto;
    }

    .topbar {
      position: sticky;
      top: 12px;
      z-index: 50;
      margin: 14px auto 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 14px;
      border: 4px solid var(--line);
      border-radius: 22px;
      background: rgba(255, 253, 246, 0.88);
      backdrop-filter: blur(12px);
      box-shadow: 0 8px 0 var(--shadow);
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      font-weight: 950;
      letter-spacing: -0.7px;
      font-size: clamp(1.15rem, 3vw, 1.7rem);
    }

    .logo-mark {
      width: 48px;
      height: 48px;
      border: 4px solid var(--line);
      border-radius: 16px;
      background:
        radial-gradient(circle at 28% 30%, #ffffff 0 7px, transparent 8px),
        linear-gradient(135deg, var(--sun) 0 48%, var(--pink) 49% 100%);
      box-shadow: 0 4px 0 var(--shadow);
      position: relative;
      flex: 0 0 auto;
      overflow: hidden;
    }

    .logo-mark::before {
      content: "";
      position: absolute;
      width: 17px;
      height: 17px;
      left: 9px;
      top: 22px;
      border: 4px solid var(--line);
      border-radius: 6px;
      background: var(--blue);
    }

    .logo-mark::after {
      content: "";
      position: absolute;
      width: 15px;
      height: 15px;
      right: 8px;
      bottom: 8px;
      border: 4px solid var(--line);
      border-radius: 50%;
      background: var(--green);
    }

    .nav, .footer-links, .lang-switcher, .actions, .card-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .nav { justify-content: flex-end; }
    .nav a, .footer-links a, .lang-switcher a {
      text-decoration: none;
      font-weight: 850;
      padding: 9px 12px;
      border-radius: 999px;
    }

    .nav a:hover, .lang-switcher a:hover { background: #fff0b7; }

    .nav .pill {
      background: var(--sun);
      border: 3px solid var(--line);
      box-shadow: 0 4px 0 var(--shadow);
    }

    .hero, .legal-hero {
      position: relative;
      padding: clamp(44px, 7vw, 80px) 0 28px;
    }

    .hero {
      display: grid;
      grid-template-columns: 1.05fr 0.95fr;
      gap: clamp(24px, 5vw, 58px);
      align-items: center;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--mint);
      border: 3px solid var(--line);
      border-radius: 999px;
      padding: 8px 13px;
      font-weight: 900;
      box-shadow: 0 5px 0 var(--shadow);
      margin-bottom: 18px;
    }

    .spark {
      display: inline-grid;
      place-items: center;
      width: 24px;
      height: 24px;
      background: var(--sun);
      border: 3px solid var(--line);
      border-radius: 50%;
      font-size: 0.8rem;
    }

    h1 {
      margin: 0;
      font-size: clamp(3rem, 8vw, 6.8rem);
      line-height: 0.88;
      letter-spacing: -5px;
      text-wrap: balance;
    }

    .joy {
      color: var(--pink);
      text-shadow: 5px 5px 0 var(--sun);
    }

    .hero-text, .intro-text {
      margin: 22px 0 0;
      max-width: 720px;
      font-size: clamp(1.05rem, 2vw, 1.25rem);
      line-height: 1.6;
      color: var(--ink-soft);
      font-weight: 650;
    }

    .btn, .mini-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 52px;
      padding: 12px 18px;
      border: 4px solid var(--line);
      border-radius: 16px;
      text-decoration: none;
      font-weight: 950;
      box-shadow: 0 7px 0 var(--shadow);
      background: var(--sun);
      transition: transform 0.1s ease, box-shadow 0.1s ease;
    }

    .btn.secondary, .mini-btn.ghost { background: var(--paper); }
    .btn:hover, .mini-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 0 var(--shadow); }
    .btn:active, .mini-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--shadow); }

    .hero-art {
      min-height: 420px;
      border: 5px solid var(--line);
      border-radius: 34px;
      background:
        radial-gradient(circle at 20% 84%, rgba(76, 201, 134, 0.55) 0 50px, transparent 52px),
        radial-gradient(circle at 70% 88%, rgba(76, 201, 134, 0.45) 0 70px, transparent 72px),
        linear-gradient(to bottom, #9de8ff 0 52%, #79d58b 53% 100%);
      box-shadow: 0 14px 0 var(--shadow);
      padding: 24px;
      position: relative;
      overflow: hidden;
      transform: rotate(1deg);
    }

    .hero-tile {
      position: absolute;
      border: 4px solid var(--line);
      border-radius: 24px;
      background: rgba(255,253,246,0.94);
      box-shadow: 0 8px 0 var(--shadow);
      padding: 16px;
      font-weight: 950;
    }

    .hero-tile.one { left: 26px; top: 28px; width: 160px; transform: rotate(-5deg); }
    .hero-tile.two { right: 25px; top: 78px; width: 190px; transform: rotate(5deg); }
    .hero-tile.three { left: 44px; bottom: 42px; width: 190px; transform: rotate(-3deg); }
    .hero-tile.four { right: 58px; bottom: 50px; width: 155px; transform: rotate(4deg); }

    .mini-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; margin-top:10px; }
    .mini-grid span { aspect-ratio:1; display:grid; place-items:center; border:3px solid var(--line); border-radius:8px; background:#fff4c8; }

    .dots { display:flex; gap:8px; margin-top:12px; }
    .dots span { width:38px; height:38px; border:3px solid var(--line); border-radius:12px; background:var(--sun); }
    .dots span:nth-child(2) { background:var(--green); }
    .dots span:nth-child(3) { background:var(--blue); }

    .section { margin: 38px 0; }

    .section-title {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }

    .section-title h2, .legal-card h2, .about-card h2, .games-note h2 {
      margin: 0;
      font-size: clamp(2rem, 5vw, 4rem);
      letter-spacing: -2px;
      line-height: 0.98;
    }

    .section-title p {
      margin: 0;
      max-width: 560px;
      color: var(--ink-soft);
      font-weight: 650;
      line-height: 1.55;
    }

    .games-grid, .features, .games-page-grid, .about-grid {
      display: grid;
      gap: 18px;
    }

    .games-grid { grid-template-columns: repeat(4, 1fr); }
    .features { grid-template-columns: repeat(4, 1fr); }
    .games-page-grid, .about-grid { grid-template-columns: repeat(2, 1fr); }

    .game-card, .feature, .legal-card, .about-card, .games-note {
      position: relative;
      border: 5px solid var(--line);
      border-radius: var(--radius);
      background: rgba(255,253,246,0.94);
      box-shadow: 0 11px 0 var(--shadow);
      padding: clamp(20px, 3vw, 34px);
      overflow: hidden;
    }

    .game-card {
      min-height: 340px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .game-card::before, .about-card::before, .games-note::before {
      content: "";
      position: absolute;
      inset: auto -20px -52px -20px;
      height: 140px;
      opacity: 0.45;
      background:
        radial-gradient(circle at 18% 40%, var(--green) 0 36px, transparent 38px),
        radial-gradient(circle at 46% 60%, var(--blue) 0 42px, transparent 44px),
        radial-gradient(circle at 78% 50%, var(--sun) 0 34px, transparent 36px);
    }

    .game-card > *, .about-card > *, .games-note > * { position: relative; z-index: 2; }

    .game-tag {
      display: inline-flex;
      border: 3px solid var(--line);
      background: var(--mint);
      border-radius: 999px;
      padding: 7px 12px;
      font-weight: 950;
      margin-bottom: 22px;
    }

    .game-card h3, .game-card h2 {
      margin: 4px 0 12px;
      font-size: clamp(1.9rem, 3.4vw, 3.35rem);
      letter-spacing: -2px;
      line-height: 0.92;
    }

    .game-card p, .feature p, .legal-card p, .legal-card li, .about-card p, .about-card li, .games-note p {
      color: var(--ink-soft);
      line-height: 1.65;
      font-weight: 640;
    }

    .game-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
    .game-meta span {
      border: 3px solid var(--line);
      border-radius: 999px;
      background: #fff;
      padding: 7px 10px;
      font-weight: 900;
      font-size: 0.9rem;
      box-shadow: 0 4px 0 var(--shadow);
    }

    .sudoku { background: linear-gradient(135deg, rgba(255,247,223,0.96), rgba(233,244,255,0.96)); }
    .parrot { background: linear-gradient(135deg, rgba(238,255,244,0.96), rgba(255,246,214,0.96)); }
    .birds { background: linear-gradient(135deg, rgba(232,248,255,0.96), rgba(255,249,228,0.96)); }
    .domino { background: linear-gradient(135deg, rgba(255,244,249,0.96), rgba(236,255,245,0.96)); }

    .feature { min-height: 190px; border-width: 4px; border-radius: 22px; }
    .feature-icon {
      width: 54px;
      height: 54px;
      display: grid;
      place-items: center;
      border: 3px solid var(--line);
      border-radius: 16px;
      background: var(--sun);
      box-shadow: 0 4px 0 var(--shadow);
      font-size: 1.6rem;
      margin-bottom: 14px;
    }

    .manifesto, .legal-card, .about-card, .games-note {
      margin: 22px 0 36px;
    }

    .legal-card h2 {
      margin: 34px 0 10px;
      font-size: clamp(1.55rem, 3vw, 2.25rem);
      letter-spacing: -1px;
    }
    .legal-card h2:first-child { margin-top: 0; }

    .notice-box {
      border: 4px solid var(--line);
      border-radius: 22px;
      background: #fff4c8;
      box-shadow: 0 7px 0 var(--shadow);
      padding: 18px;
      margin: 22px 0;
    }

    .values-list {
      display: grid;
      gap: 12px;
      padding: 0;
      margin: 18px 0 0;
      list-style: none;
    }

    .values-list li {
      border: 3px solid var(--line);
      border-radius: 18px;
      background: #fff4c8;
      box-shadow: 0 5px 0 var(--shadow);
      padding: 13px 15px;
    }

    .creator-avatar {
      width: 116px;
      height: 116px;
      border: 5px solid var(--line);
      border-radius: 34px;
      background:
        radial-gradient(circle at 35% 34%, #fff 0 11px, transparent 12px),
        radial-gradient(circle at 65% 34%, #fff 0 11px, transparent 12px),
        linear-gradient(135deg, var(--blue) 0 50%, var(--violet) 51% 100%);
      box-shadow: 0 8px 0 var(--shadow);
      margin-bottom: 18px;
      position: relative;
    }

    .studio-footer {
      margin: 36px 0 18px;
      border: 4px solid var(--line);
      border-radius: 26px;
      background: rgba(32, 18, 77, 0.92);
      color: #fffdf6;
      padding: 24px;
      box-shadow: 0 9px 0 var(--shadow);
      display: flex;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap;
      align-items: center;
    }

    .studio-footer strong { font-size: 1.35rem; }
    .studio-footer p { margin: 5px 0 0; color: rgba(255,253,246,0.78); font-weight: 650; }
    .footer-links a { color: #fffdf6; opacity: 0.9; padding: 4px 0; }
    .footer-links a:hover { opacity: 1; text-decoration: underline; }

    .language-box {
      margin-top: 18px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }

    .language-box span { font-weight: 900; color: var(--ink-soft); }
    .language-box a {
      border: 3px solid var(--line);
      border-radius: 999px;
      background: #fff;
      box-shadow: 0 4px 0 var(--shadow);
      padding: 6px 10px;
      text-decoration: none;
      font-weight: 900;
    }

    .language-box a.active { background: var(--sun); }

    .cookie-notice {
      position: fixed;
      left: 16px;
      right: 16px;
      bottom: 16px;
      z-index: 1000;
      max-width: 980px;
      margin: 0 auto;
      border: 4px solid var(--line);
      border-radius: 24px;
      background: rgba(255, 253, 246, 0.96);
      box-shadow: 0 10px 0 var(--shadow);
      padding: 16px;
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      backdrop-filter: blur(10px);
    }

    .cookie-notice.is-visible { display: flex; }
    .cookie-notice p { margin: 0; color: var(--ink-soft); font-weight: 700; line-height: 1.45; }
    .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }
    .cookie-btn {
      cursor: pointer;
      border: 3px solid var(--line);
      border-radius: 13px;
      background: var(--sun);
      color: var(--ink);
      padding: 10px 14px;
      font: inherit;
      font-weight: 950;
      box-shadow: 0 4px 0 var(--shadow);
    }
    .cookie-btn.secondary { background: #fff; }

    @media (max-width: 980px) {
      .hero { grid-template-columns: 1fr; }
      .games-grid, .features { grid-template-columns: repeat(2, 1fr); }
      .games-page-grid, .about-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 640px) {
      .page { width: min(100% - 18px, 1180px); }
      .topbar { position: static; border-width: 3px; }
      .nav { width: 100%; justify-content: flex-start; }
      .nav a { font-size: 0.88rem; padding: 8px 9px; }
      h1 { letter-spacing: -3px; }
      .hero-art { min-height: 390px; }
      .hero-tile.one { left: 14px; top: 20px; width: 140px; }
      .hero-tile.two { right: 12px; top: 86px; width: 160px; }
      .hero-tile.three { left: 16px; bottom: 28px; width: 160px; }
      .hero-tile.four { right: 14px; bottom: 34px; width: 128px; }
      .games-grid, .features { grid-template-columns: 1fr; }
      .game-card { min-height: 310px; }
      .section-title { align-items: start; flex-direction: column; }
      .studio-footer { align-items: flex-start; }
      .cookie-notice { align-items: flex-start; flex-direction: column; }
      .cookie-actions { width: 100%; }
      .cookie-btn { flex: 1 1 auto; }
    }


    .hero-art {
      position: relative;
      min-height: 530px;
    }

    .game-window {
      position: absolute;
      inset: 24px 0 auto auto;
      width: min(500px, 100%);
      border: 5px solid var(--line);
      border-radius: 34px;
      background: rgba(255, 253, 246, 0.86);
      box-shadow: 0 14px 0 var(--shadow);
      overflow: hidden;
      transform: rotate(1.5deg);
    }

    .window-top {
      height: 54px;
      border-bottom: 5px solid var(--line);
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 18px;
      background: #c9f4ff;
    }

    .dot {
      width: 16px;
      height: 16px;
      border: 3px solid var(--line);
      border-radius: 50%;
      background: var(--pink);
    }

    .dot:nth-child(2) {
      background: var(--sun);
    }

    .dot:nth-child(3) {
      background: var(--green);
    }

    .window-scene {
      position: relative;
      padding: 28px;
      min-height: 450px;
      background:
        radial-gradient(circle at 20% 84%, rgba(76, 201, 134, 0.55) 0 50px, transparent 52px),
        radial-gradient(circle at 70% 88%, rgba(76, 201, 134, 0.45) 0 70px, transparent 72px),
        linear-gradient(to bottom, #9de8ff 0 52%, #79d58b 53% 100%);
    }

    .floating-card {
      position: absolute;
      border: 4px solid var(--line);
      border-radius: 22px;
      background: var(--paper);
      box-shadow: 0 8px 0 var(--shadow);
      padding: 14px;
    }

    .sudoku-mini {
      width: 170px;
      left: 28px;
      top: 30px;
      transform: rotate(-5deg);
    }

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

    .sudoku-cell {
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border: 3px solid var(--line);
      border-radius: 8px;
      background: #fff4c8;
      font-weight: 950;
      font-size: 1.1rem;
    }

    .parrot-mini {
      width: 195px;
      right: 18px;
      top: 74px;
      transform: rotate(5deg);
      background: #fff9e8;
    }

    .parrot-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      margin-top: 10px;
    }

    .parrot-pixel {
      aspect-ratio: 1;
      border: 3px solid var(--line);
      border-radius: 12px;
      position: relative;
      background: var(--c);
      box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.12);
    }

    .parrot-pixel::before {
      content: "";
      position: absolute;
      width: 13px;
      height: 10px;
      right: -7px;
      top: 16px;
      border: 3px solid var(--line);
      background: var(--sun);
      clip-path: polygon(0 0, 100% 50%, 0 100%);
    }

    .parrot-pixel::after {
      content: "";
      position: absolute;
      width: 6px;
      height: 6px;
      right: 8px;
      top: 10px;
      background: var(--line);
      border-radius: 50%;
    }

    .bird-mini {
      width: 174px;
      left: 24px;
      bottom: 26px;
      transform: rotate(-3deg);
      background: #f7fbff;
    }

    .bird-wire {
      position: relative;
      height: 72px;
      margin-top: 10px;
    }

    .bird-wire::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 44px;
      height: 4px;
      border-radius: 999px;
      background: var(--line);
    }

    .tiny-bird {
      position: absolute;
      top: 4px;
      width: 38px;
      height: 42px;
      left: var(--x);
      transform: translateX(-50%);
    }

    .tiny-bird::before {
      content: "";
      position: absolute;
      left: 7px;
      top: 15px;
      width: 25px;
      height: 22px;
      border: 3px solid var(--line);
      border-radius: 50% 48% 54% 46%;
      background: var(--c);
      box-shadow: inset -4px -3px 0 rgba(0, 0, 0, 0.13);
    }

    .tiny-bird::after {
      content: "";
      position: absolute;
      right: -1px;
      top: 8px;
      width: 18px;
      height: 18px;
      border: 3px solid var(--line);
      border-radius: 50%;
      background: var(--c);
      box-shadow: inset -3px -2px 0 rgba(0, 0, 0, 0.12);
    }

    .tiny-bird i {
      position: absolute;
      right: -7px;
      top: 16px;
      width: 0;
      height: 0;
      border-left: 10px solid var(--sun);
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      z-index: 3;
    }

    .domino-mini {
      width: 128px;
      left: 214px;
      right: auto;
      bottom: 102px;
      transform: rotate(2deg);
      background: #fff7fd;
      padding: 12px;
    }

    .domino-row {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 10px;
    }

    .domino-tile {
      width: 42px;
      height: 72px;
      border: 3px solid var(--line);
      border-radius: 12px;
      background: #fffdf6;
      box-shadow: inset -4px -5px 0 rgba(0, 0, 0, 0.08);
      display: grid;
      grid-template-rows: 1fr 3px 1fr;
      overflow: hidden;
    }

    .domino-divider {
      background: var(--line);
      opacity: 0.85;
    }

    .domino-half {
      display: grid;
      place-items: center;
      font-size: 0.92rem;
      font-weight: 950;
      letter-spacing: -1px;
    }

    .domino-pips {
      display: grid;
      grid-template-columns: repeat(2, 7px);
      gap: 4px;
      align-content: center;
      justify-content: center;
    }

    .domino-pips i {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--line);
    }

    .domino-mode {
      font-size: 0.62rem;
      font-weight: 950;
      line-height: 1.15;
      color: var(--ink-soft);
    }

    .score-bubble {
      left: 80px;
      bottom: 80px;
      transform: rotate(4deg);
      background: var(--sun);
      font-weight: 950;
      font-size: 1.1rem;
    }

    .mascot {
      position: absolute;
      right: 14px;
      bottom: 22px;
      width: 130px;
      height: 130px;
      border: 5px solid var(--line);
      border-radius: 42px 42px 54px 54px;
      background:
        radial-gradient(circle at 34% 32%, #fff 0 12px, transparent 13px),
        radial-gradient(circle at 68% 32%, #fff 0 12px, transparent 13px),
        linear-gradient(135deg, var(--blue) 0 50%, var(--violet) 51% 100%);
      box-shadow: 0 9px 0 var(--shadow);
    }

    .mascot::before,
    .mascot::after {
      content: "";
      position: absolute;
      width: 9px;
      height: 9px;
      top: 48px;
      background: var(--line);
      border-radius: 50%;
      z-index: 2;
    }

    .mascot::before {
      left: 37px;
    }

    .mascot::after {
      right: 37px;
    }

    .smile {
      position: absolute;
      left: 50%;
      top: 65px;
      width: 40px;
      height: 19px;
      transform: translateX(-50%);
      border-bottom: 5px solid var(--line);
      border-radius: 0 0 999px 999px;
    }

    .orbit {
      position: absolute;
      border: 4px solid var(--line);
      border-radius: 999px;
      background: var(--paper);
      box-shadow: 0 6px 0 var(--shadow);
      display: grid;
      place-items: center;
      font-weight: 950;
      animation: bob 4s ease-in-out infinite;
    }

    .orbit.one {
      width: 86px;
      height: 86px;
      right: 430px;
      top: 60px;
      background: var(--sun);
    }

    .orbit.two {
      width: 70px;
      height: 70px;
      right: 10px;
      top: 0;
      background: var(--pink);
      animation-delay: -1s;
    }

    .orbit.three {
      width: 74px;
      height: 74px;
      right: 390px;
      bottom: 40px;
      background: var(--green);
      animation-delay: -2s;
    }

    @keyframes bob {
      0%, 100% { transform: translateY(0) rotate(-4deg); }
      50% { transform: translateY(-14px) rotate(5deg); }
    }


    /* Restored original hero illustration layout */
    @media (max-width: 920px) {
      .hero-art {
        min-height: 520px;
      }

      .game-window {
        left: 50%;
        right: auto;
        transform: translateX(-50%) rotate(1deg);
      }

      .orbit.one {
        left: 2%;
        right: auto;
      }

      .orbit.three {
        left: 5%;
        right: auto;
      }
    }

    @media (max-width: 640px) {
      .hero-art {
        min-height: 500px;
      }

      .game-window {
        width: 100%;
      }

      .window-scene {
        min-height: 430px;
        padding: 18px;
      }

      .sudoku-mini {
        width: 148px;
        left: 16px;
      }

      .parrot-mini {
        width: 168px;
        right: 8px;
        top: 88px;
      }

      .bird-mini {
        width: 142px;
        left: 12px;
        bottom: 24px;
      }

      .domino-mini {
        width: 104px;
        left: 156px;
        right: auto;
        bottom: 92px;
      }

      .domino-tile {
        width: 36px;
        height: 62px;
      }

      .mascot {
        right: 8px;
        bottom: 18px;
        width: 104px;
        height: 104px;
      }
    }


    /* Fix: the hero container must not draw a second window behind .game-window */
    .hero-art {
      border: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
      padding: 0 !important;
      overflow: visible !important;
      transform: none !important;
    }


    /* Fix: center the mascot pupils inside the white eyes */
    .mascot::before,
    .mascot::after {
      top: 38px !important;
    }

    .mascot::before {
      left: 40px !important;
    }

    .mascot::after {
      right: 37px !important;
    }

    @media (max-width: 640px) {
      .mascot::before,
      .mascot::after {
        top: 29px !important;
      }

      .mascot::before {
        left: 31px !important;
      }

      .mascot::after {
        right: 29px !important;
      }
    }


/* Mobile header inspired by the Repete, Papagaio! mobile header.
   Desktop layout is intentionally unchanged. */
.mobile-nav-toggle {
  display: none;
  width: 58px;
  height: 58px;
  border: 4px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--shadow);
  color: var(--ink);
  font: inherit;
  font-size: 1.7rem;
  font-weight: 950;
  cursor: pointer;
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 12px 14px;
    gap: 12px;
    align-items: center;
    border-width: 3px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
    font-size: clamp(1.15rem, 4.65vw, 1.6rem);
    line-height: 1.05;
    overflow: hidden;
  }

  .brand > span:last-child {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    flex: 0 1 auto;
  }

  .logo-mark {
    width: clamp(46px, 13vw, 56px);
    height: clamp(46px, 13vw, 56px);
    flex-basis: clamp(46px, 13vw, 56px);
    border-radius: 18px;
  }

  .mobile-nav-toggle {
    display: grid;
    place-items: center;
    width: clamp(50px, 13.5vw, 58px);
    height: clamp(50px, 13.5vw, 58px);
    flex: 0 0 clamp(50px, 13.5vw, 58px);
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    width: auto;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 4px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 253, 246, 0.98);
    box-shadow: 0 8px 0 var(--shadow);
    z-index: 200;
  }

  .nav.is-open {
    display: grid;
  }

  .nav a {
    display: grid;
    place-items: center;
    min-height: 42px;
    text-align: center;
    background: var(--paper);
    border: 3px solid rgba(32, 18, 77, 0.18);
    border-radius: 14px;
    box-shadow: 0 3px 0 rgba(32, 18, 77, 0.10);
    line-height: 1.15;
    font-size: .92rem;
    padding: 8px 10px;
  }

  .nav a.pill {
    background: var(--sun);
    border-color: var(--line);
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }

  .brand {
    font-size: clamp(1.04rem, 4.45vw, 1.22rem);
    gap: 8px;
  }

  .logo-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .mobile-nav-toggle {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }
}

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

@media (max-width: 350px) {
  .brand {
    font-size: .98rem;
    gap: 7px;
  }

  .logo-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .mobile-nav-toggle {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
}

