
  * { 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, #161e2b 0%, #24384f 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    justify-content: safe center;
    min-height: 100vh; min-height: 100svh; padding: 12px 12px 4px; user-select: none;
  }
  .panel {
    position: relative;
    --tw: 60px;            /* 试管宽度，由 JS 的 fit() 覆写 */
    --per-row: 6;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px; padding: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
  }
  .topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
  .stat {
    flex: 1; background: rgba(255,255,255,.07); border-radius: 10px;
    padding: 4px 8px; text-align: center; color: #fff; min-width: 0;
  }
  .stat small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 1px; opacity: .55; }
  .stat span { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
  #mute-btn {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; padding: 0;
    background: rgba(255,255,255,.07); border: none; color: #fff;
    font-size: 17px; cursor: pointer;
  }
  .tubes {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
    gap: 8px; margin: 0 auto;
    width: calc(var(--per-row) * (var(--tw) + 8px) - 8px);
  }
  .tube {
    position: relative; flex: 0 0 auto;
    width: var(--tw); height: calc(var(--tw) * 3.3);
    display: flex; flex-direction: column-reverse; padding: 3px;
    border: 2px solid rgba(255,255,255,.22);
    border-top: none;
    border-radius: 6px 6px 20px 20px;
    background: rgba(255,255,255,.04);
    cursor: pointer;
    transition: transform .16s cubic-bezier(.3,.75,.4,1), border-color .16s;
  }
  .tube.sel { transform: translateY(-10px); border-color: rgba(255,255,255,.6); }
  .tube.done { border-color: rgba(120,235,160,.75); box-shadow: 0 0 0 2px rgba(120,235,160,.22); }
  .tube.nope { animation: nope .3s ease; }
  @keyframes nope { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
  .slot { flex: 1 1 0; min-height: 0; transition: background .18s ease; }
  .slot:first-child { border-radius: 0 0 17px 17px; }
  .slot.pop { animation: pop .22s ease; }
  @keyframes pop { 0%{transform:scale(.6);opacity:.35} 100%{transform:scale(1);opacity:1} }
  .actions { display: flex; gap: 8px; margin-top: 14px; }
  .actions button {
    flex: 1; min-height: 48px; border-radius: 12px; border: none; cursor: pointer;
    font-size: 15px; font-weight: 800; letter-spacing: 1px; font-family: inherit;
    transition: transform .12s ease;
  }
  .actions button:active { transform: scale(.96); }
  .actions button:disabled { opacity: .4; cursor: default; }
  .btn-primary { background: #4a90ff; color: #fff; box-shadow: 0 4px 0 #2a63bd; }
  .btn-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
  .overlay {
    position: absolute; inset: 0; border-radius: 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; text-align: center; padding: 18px;
    background: rgba(12, 22, 34, .84); backdrop-filter: blur(3px); color: #fff; z-index: 6;
  }
  .hidden { display: none !important; }
  .over-title { font-size: 22px; font-weight: 800; letter-spacing: 2px; }
  .over-sub { font-size: 13px; opacity: .78; line-height: 1.65; }
  .stars { font-size: 30px; letter-spacing: 4px; }
  .final-line { font-size: 15px; font-weight: 700; }
  .final-line b { font-size: 22px; }
  .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) } }
  .over-btns { display: flex; gap: 8px; margin-top: 6px; width: 100%; }
  .over-btns button {
    flex: 1; min-height: 48px; border-radius: 12px; border: none; cursor: pointer;
    font-size: 15px; font-weight: 800; font-family: inherit;
  }
  .icon-big { font-size: 40px; }
  #stuck {
    margin-top: 10px; font-size: 12px; font-weight: 700; color: #ffd76e;
    text-align: center; min-height: 16px;
  }
  /* 没有提示时整块塌掉，别白占 26px 纵向（这正是手机横屏最缺的） */
  #stuck:empty { display: none; }
  .footer {
    margin-top: 10px; color: rgba(255,255,255,.5); font-size: 12px;
    text-align: center; line-height: 1.9; max-width: 460px;
  }
  .footer a { color: rgba(255,255,255,.78); text-decoration: none; display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; }
  .footer a:hover { color: #ffd76e; }
  /* 手机横屏(视口高 ≤560px)纵向极紧:试管高度只剩 83px → 管宽被压到 25px,点不准。
     这里挖的都是「不是触控目标」的横向浪费:footer 被 max-width:460px 折成 2~3 行是最肥的一块,
     放开就能省 ~54px。顶栏只压小块文字与内边距,mute 键是触控目标,尺寸不动。 */
  @media (orientation: landscape) and (max-height: 560px) {
    .panel { padding: 10px; }
    .footer { max-width: none; }
    .topbar { gap: 6px; margin-bottom: 6px; }
    .stat { padding: 1px 6px; }
    .stat small { font-size: 8px; }
    .stat span { font-size: 13px; }
    #stuck { margin-top: 6px; }
    .actions { margin-top: 6px; }
    .actions button { min-height: 44px; }      /* 仍满足触控目标 ≥44px */
  }

#btn-start { margin-top:6px; padding:12px 28px; }
