/* Number drill. Mobile first (360px), rem-based so 200% text still fits, tokens from app.css. */
body.cbt-app main#app>.cbt-start:has(>.drill){width:min(760px,calc(100% - 32px));margin:20px auto 40px;padding:0;border:0;background:transparent;box-shadow:none}
.drill{display:grid;gap:14px;color:var(--ink)}
.drill h1,.drill h2,.drill h3{letter-spacing:-.03em;margin:0}
.drill h2{font-size:1.15rem}.drill h3{font-size:1rem;margin-top:14px;color:var(--navy)}
.drill-muted{color:var(--muted);margin:0;font-size:.94rem;line-height:1.55}
.drill-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.drill-head .cbt-eyebrow{flex-basis:100%;margin:0!important}
.drill-head h1{font-size:clamp(1.5rem,5vw,2.1rem);line-height:1.25}
.drill-dday{padding:4px 10px;border-radius:999px;background:var(--navy);color:#fff;font-weight:700;font-size:.9rem;font-variant-numeric:tabular-nums}
.drill-sync{margin:0;padding:8px 12px;border-radius:10px;background:var(--blue-tint);color:var(--blue-dark);font-size:.9rem}
.drill section{padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}
.drill-today{display:grid;gap:10px;border-color:#bdd5fb!important;background:linear-gradient(120deg,#fff 0%,#eff6ff 100%)!important}
.drill-today h2{font-size:1.3rem}
.drill-note{margin:0;padding:8px 10px;border-left:3px solid var(--blue);background:#fff;font-size:.92rem}
.drill-meter{height:10px;border-radius:999px;background:#dfe8f6;overflow:hidden}.drill-meter span{display:block;height:100%;background:var(--blue)}
.drill-count{margin:0;font-weight:700;font-variant-numeric:tabular-nums}
.drill .drill-big{width:100%;min-height:56px;font-size:1.08rem;border-radius:12px}
.drill .drill-link{min-height:44px;border:0;background:transparent;color:var(--blue-dark);text-decoration:underline;padding:6px 4px;font-weight:600}
.drill-resume{display:grid;gap:10px;border-color:var(--blue)!important}
.drill-resume p{margin:0;font-weight:700}
.drill-stages{list-style:none;margin:0 0 8px;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.drill-stages li{display:grid;gap:2px;padding:8px 4px;border-radius:10px;background:#f4f7fc;text-align:center}
.drill-stages span{font-size:.78rem;color:var(--muted);word-break:keep-all}.drill-stages strong{font-size:1.2rem;font-variant-numeric:tabular-nums}
.drill-stage-weak{background:#fff1f1!important}.drill-stage-weak strong{color:#b32a35}
.drill-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.drill-row>div{display:grid;gap:4px;min-width:0}
.drill-row button{flex:none}
@media(max-width:559px){.drill-row{flex-direction:column;align-items:stretch}.drill-row button{min-height:48px}}
.drill-sets{border:1px solid var(--line);border-radius:16px;background:#fff;padding:0 18px}
.drill-sets>summary{min-height:56px;display:flex;align-items:center;font-weight:700;cursor:pointer}
.drill-sets[open]{padding-bottom:16px}
.drill-setlist{list-style:none;margin:0;padding:0}
.drill-setlist li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.drill-setlist li>div{display:grid;gap:2px;min-width:0}.drill-setlist span{font-size:.84rem;color:var(--muted)}
/* question */
.drill-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.9rem;color:var(--muted);font-variant-numeric:tabular-nums}
.drill .drill-stop{min-height:40px;padding:6px 12px;font-size:.9rem}
.drill-q{display:grid;gap:10px;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:#fff}
.drill-q.is-correct{border-color:#3b8424}.drill-q.is-wrong{border-color:#b32a35}
.drill-qhead{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
.drill-format{margin:0;justify-self:start;padding:5px 14px;border-radius:999px;background:var(--navy);color:#fff;font-size:1.05rem;font-weight:800;letter-spacing:.02em}
.drill-badges{display:flex;flex-wrap:wrap;gap:6px}.drill-badges:empty{display:none}
.drill-badge{display:inline-block;padding:3px 8px;border-radius:6px;background:var(--blue-tint);color:var(--blue-dark);font-size:.8rem;font-weight:700}
.drill-meta{margin:0;color:var(--muted);font-size:.86rem}
.drill-prompt{font-size:clamp(1.2rem,4.6vw,1.5rem);line-height:1.6;font-weight:700;outline:none;word-break:keep-all;overflow-wrap:anywhere}
.drill-blank{display:inline-block;min-width:3.2em;border-bottom:3px solid var(--blue);color:transparent;text-align:center}
.drill-pair .drill-blank{min-width:2.4em;border-bottom-width:2px}
.drill-fill{padding:0 1px;border-radius:3px;background:#e8f5e1;color:#1f5f10} /* no visible gap before the unit: 89.995%, 7R */
.drill-feedback{display:grid;gap:8px;align-content:start}
.drill-feedback p{margin:0}
.drill-verdict{font-size:1.2rem;font-weight:800}.is-correct .drill-verdict{color:#2f6f1c}.is-wrong .drill-verdict{color:#b32a35}
.drill-answer{font-weight:700}
.drill-warn{padding:8px 10px;border-radius:8px;background:#fff1f1;color:#8b2330;font-weight:700}
.drill-trap{padding:8px 10px;border-radius:8px;background:#fff7ec;color:#5c4127}.drill-trap s{color:#8a7a6b}.drill-trap strong{font-size:1.1em}
.drill-pair{font-size:.95rem;line-height:1.55}
.drill-fb-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.drill .drill-next{min-height:52px;padding:10px 22px;font-size:1.05rem;border-radius:12px}
.drill-reports{display:flex;flex-wrap:wrap;gap:4px}
.drill-options{display:grid;gap:10px}
.drill .drill-option{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 14px;text-align:left;font-size:1.1rem;border-radius:12px}
.drill-option b{display:inline-grid;place-items:center;width:1.8em;height:1.8em;border-radius:50%;background:#eef2f8;font-size:.9rem;flex:none}
.drill .drill-option.is-answer{border-color:#3b8424;background:#eef8e8;opacity:1}
.drill .drill-option.is-chosen{border-color:#b32a35;background:#fff1f1;opacity:1}
.drill-typed{display:grid;gap:10px}
.drill-display{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:52px;padding:8px 14px;border:2px solid var(--blue);border-radius:12px;background:#f8fbff;font-size:1.6rem;font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.drill-display em{font-style:normal;font-size:1.1rem;padding:4px 10px;border-radius:8px;background:var(--navy);color:#fff}
.drill-keypad{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.drill .drill-keypad button{min-height:48px;font-size:1.3rem;border-radius:10px;padding:2px}
.drill .drill-keypad .drill-key-wide{grid-column:span 2}
.drill .drill-bottom{width:100%;min-height:52px;font-size:1.1rem;border-radius:12px}
#drill-input:empty::before{content:attr(data-placeholder);font-size:.9rem;font-weight:500;color:var(--muted)}
/* drop, checkpoint, sheet */
.drill-drop h2{font-size:1rem}
.drill-compare{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:12px;background:#fff}
.drill-compare li{padding:10px 12px;line-height:1.6}.drill-compare li+li{border-top:1px solid var(--line)}
.drill-sheet .drill-compare{margin-bottom:10px}
.drill-checkpoint{padding:22px 18px;border:1px solid var(--line);border-radius:18px;background:#fff}
.drill-checkpoint h1{font-size:1.35rem;line-height:1.4}
.drill-extra{margin:0;padding-left:1.1em;color:var(--muted);line-height:1.7}
.drill-checkpoint-actions{display:grid;gap:8px}
.drill-dialog{max-width:min(420px,calc(100% - 32px));border:0;border-radius:16px;padding:20px}
.drill-dialog::backdrop{background:rgba(19,35,71,.45)}
.drill-dialog h2{margin:0 0 6px;font-size:1.2rem}.drill-dialog .actions{display:grid;gap:8px;margin-top:14px}
.drill-dialog button{min-height:48px}
@media(min-width:760px){
  .drill-options{grid-template-columns:1fr 1fr}
  .drill-keypad{max-width:420px;justify-self:center;width:100%}
  .drill-display{max-width:420px;justify-self:center;width:100%}
  .drill-checkpoint-actions{display:flex}
}
/* Focus mode while a card is on screen: slim site bar, no nav/footer/dev banner. */
body.drill-focus .cbt-header{min-height:0;padding:8px 16px}
body.drill-focus .cbt-header>strong,body.drill-focus .cbt-header #account,body.drill-focus #environment,body.drill-focus .cbt-site-footer{display:none}
body.drill-focus .cbt-header>a:first-child{font-size:17px}
body.drill-focus{padding-bottom:0}
body.drill-focus main#app>.cbt-start:has(>.drill){margin:8px auto 12px}
body.drill-focus .drill{gap:8px}
body.drill-focus .drill-prompt{font-size:clamp(1.12rem,4.4vw,1.4rem);line-height:1.5}
/* 학습 모드 / 암기 모드 picker and 암기 모드 results (requirements J) */
.drill-mode{display:grid;gap:8px;padding:12px!important}
.drill-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:12px;background:#eef2f8}
.drill-mode-switch button{min-height:44px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:700;font-size:1rem}
.drill-mode-switch button[aria-pressed="true"]{background:#fff;color:var(--navy);box-shadow:0 1px 3px rgba(20,40,80,.18)}
.drill-results{padding:20px 16px;border:1px solid var(--line);border-radius:18px;background:#fff}
.drill-results .cbt-eyebrow{margin:0!important}
.drill-results h1{font-size:1.35rem;line-height:1.4}
.drill-score{margin:0;font-size:1.1rem;font-weight:700;font-variant-numeric:tabular-nums}
.drill-resultlist{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.drill-result{display:grid;gap:6px;padding:12px;border:1px solid #f1c9cd;border-left:4px solid #c8414d;border-radius:12px;background:#fffafa}
.drill-result p{margin:0}.drill-result .drill-badge{justify-self:start}
.drill-prompt-sm{font-size:1rem;line-height:1.6;word-break:keep-all}
.drill-pairs{display:grid;gap:6px}.drill-pairs .drill-compare{font-size:.94rem}
.drill-results-actions{display:grid;gap:8px}
@media(min-width:560px){.drill-results-actions{display:flex}}
/* Long prompts (r5: up to 156 chars) and short screens (360x640): keep the prompt, answer box,
   keypad and the bottom button on one screen. */
body.drill-focus .drill-prompt-long{font-size:clamp(1.02rem,4vw,1.25rem);line-height:1.45}
body.drill-focus .drill-prompt-xlong{font-size:clamp(.95rem,3.7vw,1.15rem);line-height:1.42}
@media(max-height:700px){
  body.drill-focus .drill-q{gap:7px;padding:10px 14px}
  body.drill-focus .drill-format{padding:3px 12px;font-size:.95rem}
  body.drill-focus .drill-meta{font-size:.8rem}
  body.drill-focus .drill-topbar{font-size:.85rem}
  body.drill-focus .drill .drill-stop{min-height:36px;padding:4px 10px}
  body.drill-focus .drill-display{min-height:46px;padding:4px 12px;font-size:1.45rem}
  body.drill-focus .drill-keypad{gap:5px}
  body.drill-focus .drill .drill-keypad button{min-height:44px;font-size:1.2rem}
  body.drill-focus .drill .drill-bottom{min-height:48px}
  body.drill-focus .drill .drill-option{min-height:50px;padding:8px 12px;font-size:1.02rem}
  body.drill-focus .drill-options{gap:8px}
  body.drill-focus .drill-feedback{gap:6px}
  body.drill-focus .drill-pair{font-size:.82rem;line-height:1.4}
  body.drill-focus .drill-ref-label{font-size:.74rem}
  body.drill-focus .drill-trap,body.drill-focus .drill-warn{padding:6px 9px}
}
/* first-visit QA follow-ups */
body.drill-guard .drill-options,body.drill-guard .drill-keypad,body.drill-guard .drill-bottom,body.drill-guard .drill-results-actions{pointer-events:none}
.drill-ref{padding:4px 10px;border-left:3px solid var(--line);color:var(--muted);font-size:.86rem;line-height:1.45}
.drill-ref .drill-fill{background:transparent;color:var(--ink);font-weight:700;padding:0}
.drill-ref-label{display:block;font-size:.78rem;font-weight:700;color:var(--muted)}
.drill-stage-weak button{display:grid;gap:2px;width:100%;min-height:0;padding:0;border:0;background:transparent;text-align:center;cursor:pointer;color:inherit}
.drill-stage-weak button strong{text-decoration:underline;text-underline-offset:3px}
.drill-display.is-empty-warn{border-color:#b32a35;background:#fff5f5}
.drill-display.is-empty-warn #drill-input:empty::before{color:#b32a35;font-weight:700}
/* first-visit QA 2 */
.drill .drill-keypad button[aria-disabled="true"]{opacity:.35;background:#f2f4f8;cursor:not-allowed}
.drill-sheet-rev{display:block;margin-top:2px;font-size:.84rem;color:var(--muted)}
.drill-sheet-group{border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 12px}
.drill-sheet-group>summary{min-height:48px;display:flex;align-items:center;gap:8px;font-weight:700;cursor:pointer}
.drill-sheet-group[open]{padding-bottom:12px}
.drill-sheet-group .drill-compare{margin-bottom:8px}
/* first-visit QA 3 */
.drill-topbar>span{min-width:0}
.drill .drill-stop{white-space:nowrap;flex:none}
.drill-ref .drill-pair{margin:2px 0 0}
.drill-sheet-search{width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;font:inherit}
.drill-subject>li:first-child strong{color:var(--navy);font-size:1.02rem}
.drill-entry-resume{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px;padding:12px;border:1px solid var(--blue);border-radius:12px}
.drill-chapter{margin-top:10px;padding:0!important;border:0!important;background:transparent!important}
.drill-chapter-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;padding:8px 0;border-top:2px solid var(--line)}
.drill-chapter-head h3{margin:0!important}
.drill-chapter .drill-setlist li{padding-left:10px}
/* r7 unit names are long: keep the card's 과목·장 line to one line while solving */
body.drill-focus .drill-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 0}
.drill-q{grid-template-columns:minmax(0,1fr)}
.drill-q>*{min-width:0}
/* first-visit QA 4 */
.drill-setlist button,.drill-chapter-head button,.drill-row>button{white-space:nowrap}
.drill-topbar>span{overflow-wrap:anywhere}
.drill .drill-fb-actions{margin-top:14px;justify-content:center}
.drill-autonext{font-size:.85rem}
.drill-reasons{display:grid;gap:6px;margin:10px 0 0;padding:0;border:0}
.drill-reasons label{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 12px;border:1px solid var(--line);border-radius:10px}
.drill-dialog button[disabled]{opacity:.45}
/* first-visit QA 5 */
.drill-again-line{margin:-4px 0 0;font-size:.82rem;color:var(--muted)}
.drill-set-actions{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex:none}
.drill-set-actions .drill-link{min-height:32px;padding:2px 4px;font-size:.85rem;white-space:nowrap}
.drill-family{display:grid;gap:4px;margin-bottom:10px}
.drill-family>.drill-link{justify-self:end;min-height:36px}
.drill-ime{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}
.drill-kbhint{font-size:.8rem;margin:-4px 0 0}
/* first-visit QA 6 */
.drill-family[hidden],.drill-sheet-group[hidden]{display:none!important}
.drill-keynote{margin:0;font-size:.85rem;color:#8b2330;font-weight:600}
.drill-cleared{margin:0}
.drill-badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drill .drill-link:disabled{color:var(--muted,#8a8f98);text-decoration:none;cursor:default;opacity:.55}
/* short locks shown, not silent (QA 8 하4) */
.drill button[data-lock],.drill-dialog button[data-lock]{opacity:.55;cursor:default}
.drill-dialog label:has(input[data-lock]){opacity:.55}
.drill-left{display:grid;gap:6px}
.drill-left .drill-badge{margin-left:4px}
.drill-set-today{margin:0;font-weight:600}
/* 0.7 s tap lock on a new card, shown instead of silent (operator 2026-09-26) */
.drill .drill-options,.drill .drill-keypad,.drill .drill-bottom,.drill .drill-results-actions{transition:opacity .12s ease-out}
body.drill-guard .drill-options,body.drill-guard .drill-keypad,body.drill-guard .drill-bottom,body.drill-guard .drill-results-actions{opacity:.6}
.drill-locked [data-action="drill-start"],.drill-locked [data-action="drill-start-related"]{opacity:.45}
.drill-limit{margin:0 0 12px}
