    /* ===================================================================== */
    /* 1. BIẾN MÀU CHỦ ĐẠO & THIẾT LẬP TOÀN TRANG                            */
    /* ===================================================================== */
    :root {
      --bg: #050a1a;
      --fg: #cfe3ff;
      --dim: #7389b0;
      --gold: #ffd36b;
      --top-note: #8aa6d6;
      color-scheme: dark;
      box-sizing: border-box;
    }

    *, *::before, *::after {
      box-sizing: inherit;
    }

    html, body {
      height: 100%;
      height: 100dvh;
      margin: 0;
      background: var(--bg);
      overflow: hidden;
    }

    body {
      font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
      color: var(--fg);
    }

    /* Canvas hiển thị cây thông 3D ASCII toàn màn hình */
    #c {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      touch-action: none;
      cursor: default;
      z-index: 1;
      -webkit-user-select: none;
      user-select: none;
    }

       #tt {
      position: fixed;
      top: calc(env(safe-area-inset-top, 0px) + 10px);
      font-size: 11px;
      line-height: 1.4;
      color: var(--top-note);
      pointer-events: none;
      z-index: 10;
    }

    #tt {
      right: max(14px, env(safe-area-inset-right, 0px) + 10px);
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    /* Tên hiển thị người dùng / tiêu đề chính giữa phía trên */
    #name {
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      top: calc(env(safe-area-inset-top, 0px) + 34px);
      text-align: center;
      font-size: clamp(14px, 4.5vw, 18px);
      font-weight: 700;
      letter-spacing: 0.06em;
      color: var(--gold);
      text-shadow: 0 0 10px #ffcf4a99, 0 0 22px #ffcf4a44;
      cursor: pointer;
      animation: nm 3.2s ease-in-out infinite;
      white-space: nowrap;
      max-width: 92vw;
      overflow: hidden;
      text-overflow: ellipsis;
      padding: 4px 10px;
      border-radius: 8px;
      transition: background 0.2s;
      z-index: 20;
    }

    #name:hover {
      background: #101b3a88;
    }

    @keyframes nm {
      50% {
        text-shadow: 0 0 14px #ffcf4acc, 0 0 30px #ffcf4a66;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      #name {
        animation: none;
      }
    }

    /* Bảng thông số kỹ thuật (góc xoay, số đèn, số ký tự, FPS) góc trái dưới */
    #hud {
      position: fixed;
      left: max(14px, env(safe-area-inset-left, 0px) + 12px);
      bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
      font-size: 11px;
      line-height: 1.5;
      color: var(--dim);
      pointer-events: none;
      z-index: 10;
    }

    #hud b {
      color: var(--fg);
      font-weight: 400;
    }

    /* Chữ ký Dev góc phải dưới */
    #dev-credit {
      position: fixed;
      right: max(14px, env(safe-area-inset-right, 0px) + 12px);
      bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
      font-size: 12.5px;
      line-height: 1.5;
      text-align: right;
      pointer-events: none;
      z-index: 15;
      max-width: 340px;
      text-shadow: 0 2px 6px rgba(3, 6, 26, 0.95);
    }

    #dev-credit .dc-role {
      color: #52f0ff;
      font-weight: 700;
    }

    #dev-credit .dc-name {
      color: #ffd36b;
      font-weight: 700;
      text-shadow: 0 0 10px #ffd36b55, 0 2px 6px rgba(3, 6, 26, 0.95);
    }

    #dev-credit .dc-wish {
      color: #4ef57b;
      font-weight: 600;
    }

    /* Thanh nút bấm điều khiển hiệu ứng phía dưới */
    #bar {
      display: flex;
      gap: 6px;
      justify-content: center;
      flex-wrap: wrap;
    }

    button {
      font: inherit;
      font-size: 11px;
      color: var(--fg);
      background: #101b3a;
      border: 1px solid #2a3b70;
      border-radius: 999px;
      padding: 6px 10px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    button[aria-pressed="true"] {
      background: #1d2f63;
      border-color: var(--gold);
      color: var(--gold);
    }

    button:focus-visible {
      outline: 2px solid var(--gold);
      outline-offset: 2px;
    }

