
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { height: 100%; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(160deg, #1a2a3a 0%, #2d4a5e 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    justify-content: safe center;
    min-height: 100vh; min-height: 100svh; padding: 12px; user-select: none; touch-action: none;
  }
  .wrap {
    position: relative;
    /* 画布 440×480：宽度必须同时受「可用高度」反推约束，否则窄高视口(手机竖屏/笔记本)里
       wrap 被 flex 压扁、画布溢出被 overflow:hidden 裁掉，底部玩法区整个掉出屏幕。
       .917 ≈ 440/480 */
    width: min(440px, 100%, max(200px, calc((100vh - 130px) * .917)));
    width: min(440px, 100%, max(200px, calc((100svh - 130px) * .917)));
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
  }
  canvas { display: block; width: 100%; height: auto; }
  .hud {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; pointer-events: none;
  }
  .hud-item {
    background: rgba(15, 30, 40, .55); border-radius: 10px; padding: 6px 12px;
    color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 1px;
  }
  .hud-item small { font-weight: 600; opacity: .65; font-size: 10px; letter-spacing: 1px; display: block; }
  #mute-btn {
    position: absolute; top: 56px; right: 12px;
    background: rgba(255,255,255,.2); border-radius: 10px;
    width: 40px; height: 40px; font-size: 18px; padding: 0;
    cursor: pointer; z-index: 5; box-shadow: none; border: none;
  }
  .overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; text-align: center; padding: 24px;
    background: rgba(15, 30, 40, .55); backdrop-filter: blur(3px); color: #fff;
  }
  .hidden { display: none !important; }
  .title { font-size: 40px; font-weight: 800; letter-spacing: 3px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
  .title .sub { display: block; font-size: 13px; font-weight: 600; opacity: .75; letter-spacing: 5px; margin-top: 4px; }
  .icon-big { font-size: 64px; animation: float 2s ease-in-out infinite; }
  @keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
  .tip { font-size: 15px; opacity: .9; line-height: 1.7; }
  .tip b { color: #ffd76e; }
  .best { font-size: 13px; opacity: .7; }
  .score-final { font-size: 56px; font-weight: 800; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
  .medal { font-size: 40px; }
  .btn-row { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
  button {
    border: none; border-radius: 12px; padding: 12px 26px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease; font-family: inherit;
  }
  button:active { transform: scale(.95); }
  .btn-primary { background: #ff9f1c; color: #fff; box-shadow: 0 5px 0 #c47a0e; }
  .btn-primary:active { box-shadow: 0 2px 0 #c47a0e; }
  .btn-ghost { background: rgba(255,255,255,.15); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
  .btn-ghost:active { box-shadow: 0 2px 0 rgba(0,0,0,.25); }
  .new-record {
    background: #ffd76e; color: #5a3e00; font-size: 12px; font-weight: 800;
    padding: 4px 14px; border-radius: 999px; animation: pulse 1s ease-in-out infinite;
  }
  @keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.08) } }
  .paused-tag {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(15,30,40,.75); color: #fff; font-weight: 800; letter-spacing: 3px;
    padding: 12px 30px; border-radius: 12px; z-index: 4;
  }
  .footer {
    margin-top: 16px; color: rgba(255,255,255,.55); font-size: 12px;
    text-align: center; line-height: 1.8;
  }
  .footer a { color: rgba(255,255,255,.8); text-decoration: none; }
  .footer a:hover { color: #ffd76e; }

.footer{font-size:11px;margin-top:8px}button:focus-visible{outline:3px solid #d9ff8e;outline-offset:3px}@media(prefers-reduced-motion:reduce){*{animation:none!important}}