/* typing-speed.css — 跟打式打字測速共用樣式（中文/英文測速兩頁共用） */
/* 控制列 */
.ctrl{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end;margin:4px 0 12px}
.ctrl .fld{display:flex;flex-direction:column;gap:5px;min-width:0}
.ctrl label{font-size:12px;color:var(--muted);font-weight:600}
.seg{display:inline-flex;flex-wrap:wrap;border:1px solid var(--hair);border-radius:11px;padding:3px;background:var(--glass);gap:2px}
.seg button{border:0;background:transparent;color:var(--muted);font-size:13px;font-weight:600;padding:7px 12px;border-radius:8px;cursor:pointer;font-family:inherit;min-height:38px;touch-action:manipulation}
.seg button[aria-pressed="true"]{background:linear-gradient(180deg,var(--gold1),var(--gold3));color:#3a2c05}
.btn{border:0;border-radius:11px;font-size:15px;font-weight:700;font-family:inherit;cursor:pointer;min-height:44px;padding:0 20px;touch-action:manipulation;background:linear-gradient(180deg,var(--gold1),var(--gold3));color:#3a2c05}
.btn.ghost{background:var(--glass-strong);color:var(--ink);border:1px solid var(--hair);font-weight:600}
.btn:disabled{opacity:.5;cursor:default}
/* HUD */
.hud{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.hud .st{flex:1;min-width:76px;background:var(--glass);border:1px solid var(--hair-soft);border-radius:11px;padding:8px 10px;text-align:center}
.hud .st .k{font-size:11px;color:var(--muted)}
.hud .st .v{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--ink)}
.hud .st.time .v{color:#5b8def}
.hud .st.speed .v{color:var(--gold-text)}
/* 範文區 */
.passage{position:relative;border:1px solid var(--hair);border-radius:16px;background:var(--track);
  padding:16px 18px;font-size:20px;line-height:2;letter-spacing:.03em;color:var(--muted);
  max-height:clamp(200px,38vh,360px);overflow-y:auto;box-shadow:inset 0 2px 18px rgba(0,0,0,.14);white-space:pre-wrap;word-break:normal;overflow-wrap:break-word}
.passage:empty{display:none}
.passage .ok{color:#3f9b52}
.passage .pend{color:var(--muted);opacity:.85}
.passage .miss{color:#e08a1e;text-decoration:underline dotted 1.5px;text-underline-offset:3px}
.passage .ins{color:#d64545;background:rgba(214,69,69,.15);border-radius:3px}
.passage .cur{background:linear-gradient(180deg,var(--gold1),var(--gold3));color:#3a2c05;border-radius:3px;box-shadow:0 0 0 1px var(--gold2)}
.stage-hint{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;color:var(--muted);font-size:15px;padding:34px 20px;border:1px dashed var(--hair);border-radius:16px;background:var(--glass)}
.stage-hint b{color:var(--ink);font-size:18px}
/* 輸入 */
.type-row{margin-top:12px}
.type-row textarea{width:100%;min-height:90px;border:2px solid var(--hair);background:var(--glass-strong);color:var(--ink);
  border-radius:12px;padding:12px 14px;font-size:20px;line-height:1.7;font-family:inherit;outline:none;font-weight:500;resize:vertical;box-sizing:border-box}
.type-row textarea:focus{border-color:var(--gold3);box-shadow:0 0 0 3px rgba(245,197,66,.18)}
.type-row textarea:disabled{opacity:.6}
.type-row textarea.nope{border-color:#c0392b;box-shadow:0 0 0 3px rgba(214,69,69,.18)}
.typo-note{font-size:12px;color:var(--muted);margin:6px 2px 0}
.mobile-note{display:none;font-size:13px;color:#b0562a;background:rgba(214,110,60,.1);border:1px solid rgba(214,110,60,.28);border-radius:10px;padding:9px 12px;margin:0 0 12px}
@media(pointer:coarse){.mobile-note{display:block}}
/* 結算 */
.result{margin-top:16px;border:1px solid var(--hair);border-radius:16px;background:var(--glass);padding:20px 16px;text-align:center;display:none}
.result.show{display:block}
.result .rtitle{font-size:15px;color:var(--muted);font-weight:600}
.result .big{display:flex;justify-content:center;gap:28px;flex-wrap:wrap;margin:6px 0 4px}
.result .big .n{font-size:52px;font-weight:900;line-height:1.05;color:var(--gold-text);font-variant-numeric:tabular-nums}
.result .big .n small{font-size:18px;font-weight:700;color:var(--muted)}
.result .big .n.acc{color:#3f9b52}
.result .big .cap{font-size:12px;color:var(--muted);font-weight:600;margin-top:2px}
.result .brk{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:14px 0 4px}
.result .brk .c{background:var(--glass-strong);border:1px solid var(--hair-soft);border-radius:10px;padding:8px 12px;min-width:86px}
.result .brk .c .k{font-size:11px;color:var(--muted)}
.result .brk .c .v{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums}
.result .best{font-size:13px;color:var(--muted);margin-top:10px}
.result .persona{font-size:15px;color:var(--ink);margin:14px 0 2px}
.result .persona b{color:var(--gold-text);font-size:17px}
.result .goal{font-size:14px;font-weight:700;color:#3f9b52;margin:4px 0}
.result .compare{font-size:13px;color:var(--muted);margin:2px 0}
/* 可分享成績卡（固定深藍金，確保匯出圖不受主題影響） */
.sharecard{width:340px;box-sizing:border-box;margin:16px auto 4px;border-radius:18px;padding:20px 22px;
  background:linear-gradient(155deg,#243049,#0F1626);border:1px solid rgba(245,197,66,.28);
  box-shadow:0 10px 30px -12px rgba(0,0,0,.5);text-align:center;color:#EAF0FB}
.sharecard .sc-top{font-size:13px;font-weight:700;letter-spacing:.04em;color:#F5C542}
.sharecard .sc-row{display:flex;justify-content:center;gap:26px;margin:12px 0 6px}
.sharecard .sc-cell{display:flex;flex-direction:column}
.sharecard .sc-cell b{font-size:42px;font-weight:900;line-height:1;color:#FCE38A;font-variant-numeric:tabular-nums}
.sharecard .sc-cell span{font-size:12px;color:#9fb0cc;margin-top:4px}
.sharecard .sc-persona{display:inline-block;margin-top:6px;padding:4px 14px;border-radius:999px;
  background:rgba(245,197,66,.16);color:#F5C542;font-weight:800;font-size:15px}
.sharecard .sc-meta{font-size:12px;color:#9fb0cc;margin-top:8px}
.sharecard .sc-url{font-size:11px;color:#7f90ad;margin-top:10px;letter-spacing:.03em}
.share-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:14px}
