    :root{
      --bg: #f5f5f7;
      --card: rgba(255,255,255,0.92);
      --text: #1d1d1f;
      --muted: #6e6e73;
      --accent: #0071e3;
      --danger: #ff3b30;
      --good: #34c759;
      --shadow: 0 20px 40px rgba(0,0,0,0.08);
      --radius: 18px;
    }
    *{ box-sizing:border-box; }
    html, body { height: 100%; }
    body{
      margin:0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
      background:
        radial-gradient(1200px 600px at 20% -10%, rgba(0,113,227,0.16), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(52,199,89,0.14), transparent 55%),
        var(--bg);
      color: var(--text);
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    /* 顶部栏（轻量版，避免复制全站导航） */
    .topbar{
      position: fixed;
      top:0; left:0; right:0;
      height: 60px;
      z-index: 1200;
      background: rgba(255,255,255,0.82);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .topbar-inner{
      max-width: 1200px;
      height: 60px;
      margin: 0 auto;
      padding: 0 16px;
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 12px;
    }
    .brand{
      display:flex;
      flex-direction: column;
      min-width: 0;
    }
    .brand a{
      text-decoration:none;
      color: var(--text);
      font-weight: 700;
      font-size: 16px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.1;
    }
    .brand span{
      font-size: 10px;
      color: #444;
      letter-spacing: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.1;
    }
    .top-actions{
      display:flex;
      align-items:center;
      gap: 10px;
      flex: 0 0 auto;
    }
    .pill{
      display:inline-flex;
      align-items:center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,0.08);
      background: rgba(255,255,255,0.72);
      color: #111;
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      transition: transform .18s ease, background .18s ease, border-color .18s ease;
      cursor: pointer;
      user-select:none;
    }
    .pill:hover{ transform: translateY(-1px); border-color: rgba(0,0,0,0.14); }
    .pill.primary{ background: rgba(0,113,227,0.12); border-color: rgba(0,113,227,0.25); color: #0b3c76; }
    .pill.danger{ background: rgba(255,59,48,0.10); border-color: rgba(255,59,48,0.22); color: #8a1b15; }
    .pill:active{ transform: translateY(0); }

    .page{
      max-width: 1200px;
      margin: 0 auto;
      padding: 92px 16px 28px;
    }
    .hero{
      display:flex;
      align-items:flex-end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }
    .hero h1{
      margin:0;
      font-size: 34px;
      letter-spacing: -0.02em;
      line-height: 1.1;
    }
    .hero p{
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
      max-width: 720px;
      line-height: 1.5;
    }
    .layout{
      display:grid;
      grid-template-columns: 1.05fr 1.25fr;
      gap: 16px;
      align-items: start;
    }
    .card{
      background: var(--card);
      border: 1px solid rgba(0,0,0,0.06);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;
    }
    .card-inner{ padding: 16px; }
    .meta{
      display:grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-top: 12px;
    }
    .stat{
      background: rgba(255,255,255,0.74);
      border: 1px solid rgba(0,0,0,0.06);
      border-radius: 14px;
      padding: 10px 12px;
    }
    .stat .k{ font-size: 12px; color: var(--muted); }
    .stat .v{ font-size: 18px; font-weight: 800; margin-top: 4px; }

    .rules{
      margin: 0;
      padding-left: 18px;
      color: #2c2c2e;
      line-height: 1.6;
      font-size: 14px;
    }
    .tips{
      margin-top: 12px;
      border-radius: 14px;
      border: 1px solid rgba(0,0,0,0.06);
      background: rgba(0,0,0,0.03);
      padding: 12px;
    }
    .tips .t-title{
      font-size: 12px;
      color: var(--muted);
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    .tips .t-body{
      margin:0;
      font-size: 14px;
      line-height: 1.6;
    }

    .game-wrap{
      position: relative;
    }
    .game-canvas-wrap{
      position: relative;
    }
    .mode-switch-bar.mode-switch-top{
      margin-bottom: 8px;
    }
    .hud{
      position:absolute;
      top: 12px;
      left: 12px;
      right: 12px;
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 10px;
      pointer-events:none;
    }
    .hud .badge{
      pointer-events:none;
      display:inline-flex;
      align-items:center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,0.76);
      border: 1px solid rgba(0,0,0,0.06);
      box-shadow: 0 12px 30px rgba(0,0,0,0.06);
      font-size: 12px;
      color: #222;
      backdrop-filter: blur(14px);
    }
    .hud .badge strong{ font-size: 13px; }
    .hud-right{
      display:flex;
      gap: 8px;
      pointer-events:auto;
    }
    .hud-btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width: 38px;
      height: 38px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,0.08);
      background: rgba(255,255,255,0.76);
      cursor:pointer;
      transition: transform .15s ease, border-color .15s ease;
    }
    .hud-btn:hover{ transform: translateY(-1px); border-color: rgba(0,0,0,0.14); }
    .hud-btn:active{ transform: translateY(0); }

    .mode-switch-bar{
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px 0 14px;
      gap: 10px;
    }
    .mode-switch-bar .mode-btn{
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 12px 20px;
      font-size: 15px;
      font-weight: 700;
      border-radius: 14px;
      border: 2px solid rgba(0,113,227,0.35);
      background: rgba(0,113,227,0.12);
      color: #0b3c76;
      cursor: pointer;
      transition: transform .15s ease, background .15s ease, border-color .15s ease;
      box-shadow: 0 4px 16px rgba(0,113,227,0.15);
    }
    .mode-switch-bar .mode-btn:hover{
      transform: translateY(-2px);
      background: rgba(0,113,227,0.18);
      border-color: rgba(0,113,227,0.5);
    }
    .mode-switch-bar .mode-btn i{ font-size: 16px; }
    .mode-switch-bar .mode-hint{
      font-size: 13px;
      color: var(--muted);
    }

    canvas{
      width: 100%;
      height: 520px;
      display:block;
      background:
        radial-gradient(900px 520px at 10% 0%, rgba(0,113,227,0.16), transparent 55%),
        radial-gradient(720px 480px at 90% 20%, rgba(52,199,89,0.12), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.08));
      border-radius: var(--radius);
      border: 1px solid rgba(0,0,0,0.06);
      box-shadow: var(--shadow);
      touch-action: none; /* pointer控制时避免页面滚动 */
    }

    .overlay{
      position:absolute;
      inset: 0;
      display:flex;
      align-items:center;
      justify-content:center;
      padding: 18px;
      background: rgba(0,0,0,0.35);
      backdrop-filter: blur(6px);
      opacity: 0;
      pointer-events:none;
      transition: opacity .18s ease;
    }
    .overlay.show{
      opacity: 1;
      pointer-events:auto;
    }
    .modal{
      width: min(520px, 100%);
      background: rgba(255,255,255,0.92);
      border-radius: 20px;
      border: 1px solid rgba(0,0,0,0.08);
      box-shadow: 0 30px 70px rgba(0,0,0,0.25);
      overflow:hidden;
    }
    .modal-head{
      padding: 14px 16px;
      border-bottom: 1px solid rgba(0,0,0,0.06);
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 10px;
    }
    .modal-head h2{
      margin:0;
      font-size: 16px;
      letter-spacing: -0.01em;
    }
    .modal-body{ padding: 16px; }
    .modal-body p{ margin: 8px 0; color: #2c2c2e; line-height: 1.6; }
    .modal-actions{
      display:flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 12px;
    }

    .touch-controls{
      display:none;
      gap: 10px;
      justify-content:center;
      margin-top: 10px;
    }
    .touch-controls .touch-btn{
      width: 54px;
      height: 44px;
      border-radius: 14px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.82);
      box-shadow: 0 16px 30px rgba(0,0,0,0.08);
      font-size: 18px;
      cursor:pointer;
      user-select:none;
      -webkit-tap-highlight-color: transparent;
    }
    .touch-controls .touch-btn:active{
      transform: translateY(1px);
    }

    footer{
      margin-top: 18px;
      color: var(--muted);
      font-size: 12px;
      text-align:center;
      padding: 12px 0 6px;
    }

    @media (max-width: 980px){
      .layout{ grid-template-columns: 1fr; }
      canvas{ height: 520px; }
    }
    @media (max-width: 640px){
      .hero h1{ font-size: 28px; }
      canvas{ height: 460px; }
      .touch-controls{ display:flex; }
      .top-actions .pill .txt{ display:none; }
    }
