
  #ecg-practice-modes { --ecg-bg:light-dark(#f5f8fc,#131a27); --ecg-panel:light-dark(#fff,#1e293a); --ecg-text:light-dark(#172a43,#edf4ff); --ecg-muted:light-dark(#4d617a,#b4c5dc); --ecg-line:light-dark(#d9e4f0,#394963); --ecg-primary:light-dark(#175fa8,#8dc4ff); --ecg-primary-text:light-dark(#fff,#0e2541); --ecg-tint:light-dark(#e8f3ff,#263e5d); --ecg-ok:light-dark(#146143,#89e0b4); --ecg-error:light-dark(#8d382d,#ffb3a5); }
  #ecg-practice-modes .ecg-stage { padding: 14px; }
  #ecg-practice-modes .ecg-phone { box-sizing:border-box; max-width:420px; min-height:620px; margin:auto; background:var(--ecg-bg); color:var(--ecg-text); border:1px solid var(--ecg-line); border-radius:22px; overflow:hidden; display:flex; flex-direction:column; font:15px/1.4 system-ui,sans-serif; }
  #ecg-practice-modes h2, #ecg-practice-modes h3, #ecg-practice-modes p { margin:0; }
  #ecg-practice-modes h2 { font-size:23px; line-height:1.15; }
  #ecg-practice-modes h3 { font-size:18px; }
  #ecg-practice-modes .ecg-header { background:var(--ecg-panel); min-height:60px; display:flex; align-items:center; gap:12px; padding:8px 16px; border-bottom:1px solid var(--ecg-line); }
  #ecg-practice-modes .ecg-header b { flex:1; font-size:17px; }
  #ecg-practice-modes .ecg-content { flex:1; display:grid; align-content:start; gap:14px; padding:16px; }
  #ecg-practice-modes .ecg-footer { display:flex; justify-content:space-around; gap:8px; padding:12px 8px; background:var(--ecg-panel); border-top:1px solid var(--ecg-line); color:var(--ecg-muted); font-size:13px; }
  #ecg-practice-modes .ecg-footer b { color:var(--ecg-primary); }
  #ecg-practice-modes .ecg-group { display:grid; gap:8px; }
  #ecg-practice-modes .ecg-panel { border:1px solid var(--ecg-line); background:var(--ecg-panel); padding:14px; border-radius:14px; display:grid; gap:8px; }
  #ecg-practice-modes .ecg-hero { border-radius:15px; padding:15px; background:var(--ecg-tint); display:grid; gap:8px; }
  #ecg-practice-modes .ecg-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  #ecg-practice-modes .ecg-row > span:last-child { margin-inline-start:auto; }
  #ecg-practice-modes .ecg-muted { color:var(--ecg-muted); font-size:13px; }
  #ecg-practice-modes .ecg-count { font-size:37px; font-weight:700; line-height:1; }
  #ecg-practice-modes .ecg-label { color:var(--ecg-primary); font-weight:700; font-size:12px; letter-spacing:.07em; text-transform:uppercase; }
  #ecg-practice-modes button, #ecg-practice-modes input { font:inherit; min-height:44px; box-sizing:border-box; }
  #ecg-practice-modes button { cursor:pointer; background:var(--ecg-panel); color:var(--ecg-text); border:1px solid var(--ecg-line); border-radius:10px; padding:8px 12px; }
  #ecg-practice-modes button[aria-pressed="true"] { border-color:var(--ecg-primary); background:var(--ecg-tint); }
  #ecg-practice-modes button.ecg-action { background:var(--ecg-primary); color:var(--ecg-primary-text); border-color:transparent; font-weight:700; }
  #ecg-practice-modes button:disabled { opacity:.55; cursor:default; }
  #ecg-practice-modes .ecg-choice { text-align:start; }
  #ecg-practice-modes button.ecg-answer-right { opacity:1; color:var(--ecg-ok); border-color:var(--ecg-ok); background:light-dark(#e9f8ed,#17392f); font-weight:650; }
  #ecg-practice-modes button.ecg-answer-wrong { opacity:1; color:var(--ecg-error); border-color:var(--ecg-error); background:light-dark(#fcefea,#422b2c); font-weight:650; }
  #ecg-practice-modes .ecg-answer-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  #ecg-practice-modes .ecg-explanation-note { display:grid; gap:8px; padding:3px 0 3px 14px; border-inline-start:3px solid var(--ecg-primary); }
  #ecg-practice-modes .ecg-explanation-sheet { display:grid; gap:12px; margin:0 -16px -16px; padding:16px; border-block-start:1px solid var(--ecg-line); border-radius:16px 16px 0 0; background:var(--ecg-panel); }
  #ecg-practice-modes .ecg-sr { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  #ecg-practice-modes .ecg-steps { display:grid; gap:6px; padding:0; list-style:none; margin:0; }
  #ecg-practice-modes .ecg-steps button { width:100%; text-align:start; display:flex; justify-content:space-between; gap:8px; }
  #ecg-practice-modes .ecg-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  #ecg-practice-modes .ecg-grid button { padding:6px 0; }
  #ecg-practice-modes .ecg-meter { height:7px; border-radius:10px; background:var(--ecg-line); overflow:hidden; }
  #ecg-practice-modes .ecg-meter span { display:block; height:100%; background:var(--ecg-primary); }
  #ecg-practice-modes .ecg-ok { color:var(--ecg-ok); }
  #ecg-practice-modes .ecg-error { color:var(--ecg-error); }
  #ecg-practice-modes .ecg-result-detail summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
  #ecg-practice-modes .ecg-result-detail[open] summary { color:var(--ecg-primary); }
  #ecg-practice-modes table { border-collapse:collapse; width:100%; }
  #ecg-practice-modes td { border-bottom:1px solid var(--ecg-line); padding:8px 0; }
  #ecg-practice-modes td:last-child { text-align:end; }
  #ecg-practice-modes input { width:100%; padding:8px; border:1px solid var(--ecg-line); border-radius:9px; background:var(--ecg-panel); color:var(--ecg-text); }
  @media(max-width:400px) { #ecg-practice-modes .ecg-stage {padding:6px} #ecg-practice-modes .ecg-content {padding:12px} #ecg-practice-modes .ecg-explanation-sheet {margin:0 -12px -12px;padding:12px} }

.practice-mode-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.practice-mode-tabs button[aria-selected=true]{background:#1a63a7;color:#fff}
