:root {
      --blue: #0866ff;
      --blue-2: #3d82ff;
      --ink: #0a1833;
      --paper: #ffffff;
      --soft: #eef5ff;
      --yellow: #ffd54a;
      --pink: #ff5caa;
      --green: #24d17e;
      --purple: #7b61ff;
      --red: #ff5b5b;
      --border: rgba(8, 102, 255, .18);
      --shadow: 0 18px 45px rgba(13, 58, 130, .16);
      --radius: 26px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(circle at 15% 5%, rgba(61,130,255,.18), transparent 34%),
        radial-gradient(circle at 90% 25%, rgba(255,92,170,.13), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
      overflow-x: hidden;
    }

    button, input, select, textarea { font: inherit; }
    button { -webkit-tap-highlight-color: transparent; }
    a { color: inherit; }

    .noise {
      pointer-events: none;
      position: fixed;
      inset: 0;
      opacity: .035;
      z-index: 9999;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 100;
      backdrop-filter: blur(18px);
      background: rgba(248, 251, 255, .82);
      border-bottom: 1px solid rgba(8,102,255,.12);
    }

    .nav {
      max-width: 1220px;
      margin: 0 auto;
      padding: 14px 20px;
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 950;
      letter-spacing: -.04em;
      margin-right: auto;
      white-space: nowrap;
    }

    .brand-mark {
      width: 44px;
      height: 44px;
      display: block;
      object-fit: cover;
      border-radius: 14px;
      box-shadow: 0 9px 20px rgba(8,102,255,.26);
      transform: rotate(-4deg);
      transition: .25s ease;
    }

    .brand:hover .brand-mark { transform: rotate(4deg) scale(1.06); }

    .navlinks {
      display: flex;
      gap: 7px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .nav-btn {
      border: 0;
      color: #315078;
      background: transparent;
      padding: 10px 13px;
      border-radius: 14px;
      font-weight: 800;
      cursor: pointer;
    }

    .nav-btn:hover, .nav-btn.active {
      background: white;
      color: var(--blue);
      box-shadow: 0 6px 20px rgba(13,58,130,.09);
    }

    .utility-btn {
      width: 44px;
      height: 44px;
      border: 0;
      border-radius: 14px;
      background: white;
      cursor: pointer;
      box-shadow: 0 6px 18px rgba(13,58,130,.09);
      font-size: 20px;
    }

    .page {
      display: none;
      max-width: 1220px;
      margin: 0 auto;
      padding: 36px 20px 70px;
      animation: pageIn .4s ease;
    }
    .page.active { display: block; }
    @keyframes pageIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

    .hero {
      min-height: 620px;
      display: grid;
      grid-template-columns: 1.1fr .9fr;
      align-items: center;
      gap: 42px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      padding: 8px 12px;
      border-radius: 999px;
      background: white;
      color: var(--blue);
      font-size: 13px;
      font-weight: 900;
      box-shadow: 0 7px 20px rgba(13,58,130,.08);
      margin-bottom: 18px;
    }

    .hero h1 {
      margin: 0;
      max-width: 780px;
      font-size: clamp(56px, 9vw, 118px);
      line-height: .86;
      letter-spacing: -.08em;
      font-weight: 1000;
      color: var(--ink);
    }

    .hero h1 span {
      display: inline-block;
      color: var(--blue);
      transform: rotate(-2deg);
    }

    .hero p {
      font-size: clamp(18px, 2.1vw, 24px);
      color: #516a8c;
      max-width: 700px;
      line-height: 1.55;
      margin: 25px 0 0;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 28px;
    }

    .btn {
      border: 0;
      border-radius: 16px;
      padding: 15px 20px;
      font-weight: 900;
      cursor: pointer;
      transition: .18s ease;
      box-shadow: 0 8px 22px rgba(13,58,130,.09);
    }
    .btn:hover { transform: translateY(-2px) scale(1.01); }
    .btn:active { transform: translateY(1px) scale(.98); }
    .btn.primary { background: var(--blue); color: white; }
    .btn.secondary { background: white; color: var(--blue); }
    .btn.dark { background: var(--ink); color: white; }
    .btn.yellow { background: var(--yellow); color: #3e2c00; }
    .btn.pink { background: var(--pink); color: white; }
    .btn.ghost { background: transparent; border: 1px solid var(--border); color: #315078; box-shadow: none; }

    .hero-toy {
      position: relative;
      min-height: 510px;
      display: grid;
      place-items: center;
    }

    .blob {
      width: min(450px, 90vw);
      aspect-ratio: 1;
      border-radius: 42% 58% 65% 35% / 39% 38% 62% 61%;
      background: linear-gradient(145deg, var(--blue), #68a5ff);
      box-shadow: 0 45px 90px rgba(8,102,255,.28);
      display: grid;
      place-items: center;
      animation: blob 7s ease-in-out infinite alternate;
      position: relative;
    }

    @keyframes blob {
      from { border-radius: 42% 58% 65% 35% / 39% 38% 62% 61%; transform: rotate(-2deg); }
      to { border-radius: 62% 38% 34% 66% / 54% 62% 38% 46%; transform: rotate(3deg); }
    }

    .mega-b {
      width: 220px;
      height: 220px;
      border: 0;
      padding: 0;
      border-radius: 50px;
      background: white;
      overflow: hidden;
      display: block;
      box-shadow: 0 30px 50px rgba(1,35,95,.2);
      user-select: none;
      cursor: pointer;
      transition: transform .18s ease, box-shadow .18s ease;
    }
    .mega-b img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }
    .mega-b:hover { transform: scale(1.04) rotate(-2deg); box-shadow: 0 35px 60px rgba(1,35,95,.28); }
    .mega-b:active { transform: scale(.92) rotate(5deg); }

    .float-chip {
      position: absolute;
      background: white;
      border-radius: 16px;
      padding: 12px 14px;
      font-weight: 900;
      box-shadow: var(--shadow);
      animation: drift 4s ease-in-out infinite alternate;
    }
    .float-chip.c1 { top: 7%; left: 0; transform: rotate(-7deg); }
    .float-chip.c2 { top: 18%; right: -2%; transform: rotate(5deg); animation-delay: .8s; }
    .float-chip.c3 { bottom: 8%; left: 5%; transform: rotate(4deg); animation-delay: 1.4s; }
    .float-chip.c4 { bottom: 15%; right: 0; transform: rotate(-5deg); animation-delay: .4s; }
    @keyframes drift { to { translate: 0 -12px; } }

    .section-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 20px;
      margin: 12px 0 20px;
    }
    .section-head h2, .page-title {
      margin: 0;
      font-size: clamp(34px, 5vw, 62px);
      letter-spacing: -.055em;
      line-height: .95;
    }
    .section-head p, .page-subtitle { color: #6b7f9e; max-width: 650px; line-height: 1.55; }

    .card-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 18px;
    }

    .card {
      background: rgba(255,255,255,.9);
      border: 1px solid rgba(8,102,255,.11);
      border-radius: var(--radius);
      padding: 22px;
      box-shadow: var(--shadow);
    }

    .feature-card {
      min-height: 230px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition: .22s ease;
    }
    .feature-card:hover { transform: translateY(-5px) rotate(.3deg); }
    .feature-card .icon { font-size: 42px; }
    .feature-card h3 { margin: 16px 0 8px; font-size: 24px; }
    .feature-card p { color: #6b7f9e; line-height: 1.5; margin: 0; }
    .feature-card:after {
      content: "→";
      position: absolute;
      right: 20px;
      bottom: 16px;
      font-size: 30px;
      color: var(--blue);
      font-weight: 1000;
    }

    .chaos-strip {
      margin: 45px 0;
      overflow: hidden;
      border-radius: 20px;
      background: var(--ink);
      color: white;
      transform: rotate(-1deg);
    }
    .ticker {
      display: flex;
      gap: 42px;
      padding: 14px 0;
      width: max-content;
      animation: ticker 22s linear infinite;
      font-weight: 950;
      letter-spacing: .04em;
    }
    @keyframes ticker { to { transform: translateX(-50%); } }

    .status-card {
      margin-top: 24px;
      background: linear-gradient(135deg, var(--blue), #69a6ff);
      color: white;
      border-radius: 32px;
      padding: 28px;
      box-shadow: 0 30px 60px rgba(8,102,255,.22);
    }
    .status-message { font-size: clamp(24px, 4vw, 42px); font-weight: 950; letter-spacing: -.04em; min-height: 58px; }
    .progress-wrap { height: 18px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; margin: 18px 0 10px; }
    .progress-bar { height: 100%; width: 7%; background: white; border-radius: inherit; transition: width .55s cubic-bezier(.2,.8,.2,1); }
    .status-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
    .percent { opacity: .85; font-weight: 800; }

    .dashboard {
      display: grid;
      grid-template-columns: 1.4fr .6fr;
      gap: 18px;
      margin: 28px 0;
    }
    .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .stat { padding: 18px; border-radius: 20px; background: var(--soft); }
    .stat b { display: block; font-size: 32px; letter-spacing: -.05em; }
    .stat span { font-size: 13px; color: #6b7f9e; font-weight: 800; }

    .mini-feed { display: grid; gap: 10px; }
    .feed-item { background: #f7faff; border-radius: 16px; padding: 12px 14px; color: #496486; font-size: 14px; }

    .arcade-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 22px; }
    .game-card { min-height: 300px; position: relative; overflow: hidden; }
    .game-card h3 { margin-top: 0; font-size: 28px; letter-spacing: -.03em; }
    .game-card p { color: #6b7f9e; }
    .game-area { margin-top: 18px; min-height: 160px; border-radius: 20px; background: #f5f9ff; padding: 16px; border: 1px dashed rgba(8,102,255,.2); }

    #clickArena { position: relative; height: 230px; overflow: hidden; cursor: crosshair; }
    #clickTarget {
      position: absolute; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--pink); color: white; font-weight: 1000; cursor: pointer; display: none;
      box-shadow: 0 10px 24px rgba(255,92,170,.35);
    }

    #reactionBox {
      min-height: 180px; display: grid; place-items: center; text-align: center; border-radius: 18px; background: #eaf1fb; cursor: pointer; user-select: none; font-weight: 900; color: #4b6381; padding: 18px;
    }
    #reactionBox.waiting { background: #ffb3b3; color: #7d1414; }
    #reactionBox.go { background: #6ee7a8; color: #064d2a; }

    .rps-row { display: flex; gap: 10px; flex-wrap: wrap; }
    .rps { flex: 1; min-width: 95px; font-size: 32px; padding: 14px; border: 0; border-radius: 16px; background: white; cursor: pointer; box-shadow: 0 8px 18px rgba(13,58,130,.08); }

    .avoid-zone { position: relative; height: 210px; border-radius: 18px; background: #eef6ff; overflow: hidden; }
    #avoidBtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 0; border-radius: 14px; background: var(--red); color: white; padding: 14px 18px; font-weight: 900; cursor: pointer; transition: left .09s, top .09s; }

    .memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .memory-card { aspect-ratio: 1; border: 0; border-radius: 14px; background: var(--blue); color: transparent; font-size: 30px; cursor: pointer; transition: .2s; }
    .memory-card.flipped, .memory-card.matched { background: white; color: initial; transform: rotateY(180deg); box-shadow: 0 7px 20px rgba(13,58,130,.09); }
    .memory-card.matched { background: #eafff4; }

    .quiz-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 18px; margin-top: 22px; }
    .quiz-sidebar .category-btn { width: 100%; text-align: left; margin-bottom: 10px; }
    .quiz-box { min-height: 440px; }
    .quiz-question { font-size: clamp(28px,4vw,46px); font-weight: 950; letter-spacing: -.04em; margin-bottom: 24px; }
    .answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .answer { min-height: 74px; border: 1px solid var(--border); border-radius: 18px; background: #f7faff; padding: 16px; text-align: left; font-weight: 850; cursor: pointer; color: #315078; }
    .answer:hover { background: #eaf3ff; }
    .answer.correct { background: #dffff0; border-color: #8de0b5; color: #07552d; }
    .answer.wrong { background: #ffe1e1; border-color: #ffabab; color: #7e1515; }
    .quiz-feedback { min-height: 54px; margin: 16px 0; color: #526c8c; font-weight: 800; }

    .doodle-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; margin-top: 22px; }
    .tool-panel { align-self: start; }
    .tool-group { margin-bottom: 18px; }
    .tool-group label { display: block; font-size: 13px; font-weight: 900; color: #5b7191; margin-bottom: 8px; }
    .tool-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .color-dot { width: 38px; height: 38px; border: 4px solid white; box-shadow: 0 0 0 1px rgba(0,0,0,.08); border-radius: 50%; cursor: pointer; }
    .color-dot.active { box-shadow: 0 0 0 3px var(--blue); }
    input[type="range"] { width: 100%; }
    #doodleCanvas { width: 100%; height: 540px; background: white; border-radius: 24px; box-shadow: var(--shadow); touch-action: none; display: block; }

    .studio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
    .generator-output {
      margin-top: 15px; padding: 18px; border-radius: 18px; background: #f2f7ff; min-height: 100px; font-size: 20px; line-height: 1.45; font-weight: 850; color: #315078;
    }
    .mood-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
    .mood-cell { min-height: 96px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; font-weight: 950; cursor: pointer; transition: .2s; }
    .mood-cell:hover { transform: rotate(2deg) scale(1.02); }

    .fake-inbox { display: grid; gap: 10px; margin-top: 15px; }
    .email { border: 1px solid var(--border); background: white; padding: 13px; border-radius: 15px; cursor: pointer; }
    .email.unread { border-left: 5px solid var(--blue); }
    .email strong { display: block; margin-bottom: 4px; }
    .email span { color: #6b7f9e; font-size: 13px; }

    .fortune {
      border-radius: 26px; min-height: 240px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 30% 20%, #8d78ff, #261956); color: white; padding: 24px; position: relative; overflow: hidden;
    }
    .fortune:before, .fortune:after { content:"✦"; position:absolute; opacity:.3; font-size:80px; }
    .fortune:before { left: 7%; top: 4%; } .fortune:after { right: 6%; bottom: -9%; }
    .fortune-text { position: relative; z-index: 1; font-size: 26px; font-weight: 950; max-width: 500px; }

    .achievement-drawer {
      position: fixed; right: 18px; bottom: 18px; z-index: 200; width: min(360px, calc(100vw - 36px)); pointer-events: none;
    }
    .toast { background: var(--ink); color: white; border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 45px rgba(5,20,50,.3); margin-top: 10px; transform: translateY(18px); opacity: 0; animation: toast .35s forwards; }
    .toast b { display: block; color: var(--yellow); }
    @keyframes toast { to { transform: none; opacity: 1; } }

    .modal {
      position: fixed; inset: 0; background: rgba(7,20,45,.55); z-index: 500; display: none; place-items: center; padding: 20px; backdrop-filter: blur(8px);
    }
    .modal.show { display: grid; }
    .modal-card { width: min(620px,100%); background: white; border-radius: 28px; padding: 26px; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
    .modal-card h3 { margin: 0 0 10px; font-size: 34px; letter-spacing: -.04em; }
    .modal-card p { color: #607897; line-height: 1.55; }

    .secret-panel { margin-top: 35px; padding: 24px; border-radius: 26px; background: repeating-linear-gradient(45deg,#101e37,#101e37 12px,#142746 12px,#142746 24px); color: white; text-align: center; }
    .secret-code { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
    .key { width: 45px; height: 45px; border: 0; border-radius: 12px; background: white; color: var(--ink); font-weight: 1000; cursor: pointer; }

    footer {
      max-width: 1220px; margin: 0 auto; padding: 10px 20px 44px; color: #7084a1; font-size: 13px; display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap;
    }

    .konami {
      position: fixed; inset: 0; z-index: 1000; pointer-events: none; display:none; overflow:hidden;
      background: rgba(8,102,255,.94); color:white; place-items:center; text-align:center;
    }
    .konami.show { display:grid; animation: pageIn .3s; }
    .konami h2 { font-size: clamp(54px, 10vw, 130px); margin:0; letter-spacing:-.07em; }
    .confetti { position: absolute; width: 12px; height: 18px; background: white; top:-30px; animation: fall 3s linear forwards; }
    @keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

    .tiny { font-size: 12px; color: #7e91aa; }
    .center { text-align: center; }
    .stack { display: grid; gap: 12px; }
    .spacer { height: 28px; }
    .pill { display:inline-flex; align-items:center; gap:7px; border-radius:999px; padding:7px 10px; background:#edf5ff; color:#4f698b; font-size:12px; font-weight:900; }

    @media (max-width: 900px) {
      .hero, .dashboard, .quiz-layout, .doodle-layout { grid-template-columns: 1fr; }
      .hero { min-height: unset; padding-top: 35px; }
      .hero-toy { min-height: 430px; }
      .card-grid { grid-template-columns: 1fr 1fr; }
      .studio-grid, .arcade-grid { grid-template-columns: 1fr; }
      .tool-panel { order: 2; }
      #doodleCanvas { height: 430px; }
    }

    @media (max-width: 660px) {
      .nav { align-items:flex-start; flex-wrap:wrap; }
      .brand { width:100%; }
      .navlinks { justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; width:calc(100% - 55px); padding-bottom:3px; }
      .nav-btn { white-space:nowrap; }
      .card-grid { grid-template-columns: 1fr; }
      .answers { grid-template-columns: 1fr; }
      .stat-grid { grid-template-columns: 1fr; }
      .mood-board { grid-template-columns: repeat(2,1fr); }
      .float-chip { font-size:12px; }
      .hero h1 { font-size: 58px; }
      .mega-b { width: 175px; height:175px; font-size:115px; border-radius:42px; }
      #doodleCanvas { height: 360px; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
    }

    /* Shared links */
    /* Contact section stays accessible beneath every playground page. */
    .contact-section {
      max-width: 1220px;
      margin: 0 auto;
      padding: 28px 20px 80px;
      display: grid;
      grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
      align-items: start;
      gap: clamp(24px, 5vw, 72px);
      scroll-margin-top: 110px;
    }
    .contact-intro { padding-top: 18px; }
    .contact-intro h2 { margin: 12px 0 20px; font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -.055em; }
    .contact-intro > p { max-width: 440px; color: #526c8c; font-size: 18px; line-height: 1.7; }
    .contact-email-card { margin-top: 28px; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
    .contact-email-label { display: block; margin-bottom: 8px; color: #526c8c; font-size: 14px; }
    .contact-email-card a { color: #0757d8; font-weight: 800; overflow-wrap: anywhere; text-underline-offset: 4px; }
    .contact-socials { margin-top: 26px; }
    .contact-socials h3 { margin: 0 0 12px; color: var(--ink); font-size: 16px; }
    .social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .social-links a { min-height: 48px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #0757d8; background: #fff; border: 1px solid #b3c8e6; border-radius: 14px; text-decoration: none; font-size: 15px; font-weight: 800; }
    .social-links a:hover { background: #e7f0ff; border-color: var(--blue); }
    .footer-socials { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
    .footer-socials a { display: inline-flex; align-items: center; min-height: 44px; color: #315078; font-weight: 750; text-underline-offset: 4px; }
    .footer-socials a:hover { color: #0757d8; }
    .social-links a:focus-visible, .footer-socials a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
    .social-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .contact-form { display: grid; gap: 18px; padding: clamp(22px, 4vw, 36px); min-width: 0; }
    .contact-form .field label { color: var(--ink); font-size: 14px; }
    .contact-form .field label span { color: #526c8c; font-weight: 500; }
    .contact-form .field input, .contact-form .field textarea { width: 100%; border: 1px solid #b3c8e6; background: #f7faff; border-radius: 15px; padding: 13px 14px; color: var(--ink); font-size: 16px; }
    .contact-form .field textarea { display: block; resize: vertical; min-height: 150px; line-height: 1.6; }
    .contact-form .field textarea::placeholder { color: #526c8c; }
    .contact-form .field input:focus, .contact-form .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 2px; background: white; box-shadow: none; }
    .contact-form .contact-honeypot { display: none; }
    .contact-form-note, .contact-provider { margin: 0; color: #526c8c; font-size: 13px; line-height: 1.6; }
    .contact-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; }
    .contact-provider { text-align: center; font-size: 12px; }
    .contact-provider a { text-underline-offset: 3px; }
    .contact-section a:focus-visible, .contact-section button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
    @media (max-width: 760px) {
      .contact-section { grid-template-columns: 1fr; padding-bottom: 52px; scroll-margin-top: 160px; }
      .contact-intro { padding-top: 0; }
      .contact-intro > p { max-width: none; }
      .contact-email-card { margin-top: 20px; }
    }

    .nav-link { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

    /* Backend test page */
    .testing-page { min-height: 100vh; }
    .testing-shell { max-width: 980px; margin: 0 auto; padding: 52px 20px 80px; }
    .testing-hero { margin-bottom: 24px; }
    .testing-hero h1 { margin: 8px 0 12px; font-size: clamp(44px, 7vw, 78px); line-height: .95; letter-spacing: -.06em; }
    .testing-hero p { max-width: 720px; color: #607897; font-size: 18px; line-height: 1.6; }
    .backend-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; align-items: start; }
    .backend-card h2 { margin-top: 0; letter-spacing: -.03em; }
    .backend-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
    .status-dot { width: 10px; height: 10px; border-radius: 50%; background: #a2afc0; box-shadow: 0 0 0 5px rgba(162,175,192,.13); }
    .status-dot.connected { background: var(--green); box-shadow: 0 0 0 5px rgba(36,209,126,.14); }
    .status-dot.error { background: var(--red); box-shadow: 0 0 0 5px rgba(255,91,91,.14); }
    .backend-status-text { color: #607897; font-weight: 800; font-size: 14px; }
    .form-stack { display: grid; gap: 14px; }
    .field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 900; color: #526c8c; }
    .field input { width: 100%; border: 1px solid var(--border); background: #f7faff; border-radius: 15px; padding: 13px 14px; color: var(--ink); outline: none; }
    .field input:focus { border-color: rgba(8,102,255,.5); box-shadow: 0 0 0 4px rgba(8,102,255,.08); background: white; }
    .backend-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
    .backend-message { min-height: 24px; margin-top: 12px; color: #607897; font-size: 14px; font-weight: 750; }
    .records-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .records-head h2 { margin: 0; }
    .client-list { display: grid; gap: 10px; min-height: 80px; }
    .client { padding: 15px 16px; border-radius: 16px; background: #f5f9ff; border: 1px solid rgba(8,102,255,.10); }
    .client strong { display: block; margin-bottom: 4px; }
    .client span { color: #6b7f9e; font-size: 14px; }
    .empty-state { padding: 24px; border-radius: 18px; text-align: center; color: #7589a5; background: #f7faff; border: 1px dashed rgba(8,102,255,.22); }
    .code-note { margin-top: 16px; padding: 14px; border-radius: 14px; background: #0a1833; color: #dbe9ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }

    @media (max-width: 760px) {
      .backend-grid { grid-template-columns: 1fr; }
      .testing-shell { padding-top: 34px; }
    }

