
  * { 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, #2a1a12 0%, #4a2f1c 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; background: #1d1209;
    /* 画布 480×640：宽度同时受可用高度反推约束，否则矮视口下 wrap 被压扁、
       底部溢出被 overflow:hidden 裁掉，滚也滚不到。0.75 = 480/640 */
    width: min(480px, 100%, max(200px, calc((100vh - 180px) * 0.75)));
    width: min(480px, 100%, max(200px, calc((100svh - 180px) * 0.75)));
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
  }
  canvas { display: block; width: 100%; height: auto; }
  .hud {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 12px 14px; pointer-events: none;
  }
  .hud-item {
    background: rgba(29, 18, 9, .82); border-radius: 10px; padding: 6px 12px;
    color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 1px;
  }
  .hud-item small { font-weight: 600; opacity: .6; font-size: 10px; letter-spacing: 1px; display: block; }
  #mute-btn {
    position: absolute; top: 58px; right: 12px;
    background: rgba(29,18,9,.82); border-radius: 10px;
    width: 44px; height: 44px; font-size: 18px; padding: 0; color: #fff;
    cursor: pointer; z-index: 5; border: none;
  }
  .overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; text-align: center; padding: 20px;
    background: rgba(29, 18, 9, .86); backdrop-filter: blur(3px); color: #fff;
  }
  .hidden { display: none !important; }
  .title { font-size: 31px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
  .title .sub { display: block; font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: 4px; margin-top: 4px; }
  .icon-big { font-size: 52px; animation: float 2s ease-in-out infinite; }
  @keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
  .tip { font-size: 14px; opacity: .92; line-height: 1.75; }
  .tip b { color: #ffd76e; }
  .best { font-size: 13px; opacity: .7; }
  .score-final { font-size: 48px; font-weight: 800; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
  .medal { font-size: 34px; }
  .over-title { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
  .over-reason { font-size: 13px; opacity: .8; }
  .btn-row { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
  button {
    border: none; border-radius: 12px; padding: 12px 24px; min-height: 44px;
    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: #ff8a3d; color: #3a1d05; box-shadow: 0 5px 0 #b85a15; }
  .btn-primary:active { box-shadow: 0 2px 0 #b85a15; }
  .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) } }
  .footer {
    margin-top: 14px; color: rgba(255,255,255,.55); font-size: 12px;
    text-align: center; line-height: 1.9; max-width: 480px;
  }
  .footer a { color: rgba(255,255,255,.8); text-decoration: none; display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; }
  .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}}