/* Random practice is a separate route, with the same calm study-room palette. */
#random-view{min-width:0}
.random-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:25px}
.random-intro>div{min-width:0}
.random-heading{margin:0}
.random-intro .subtitle{line-height:1.8;word-break:keep-all}
.random-setup-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,.85fr);gap:25px;align-items:start}
.random-settings{padding:29px}
.random-setting-section+.random-setting-section{border-top:1px solid var(--line);margin-top:26px;padding-top:25px}
.random-step-heading{display:flex;gap:11px;align-items:flex-start;margin-bottom:17px}
.random-step-number{width:25px;height:25px;flex-shrink:0;display:grid;place-items:center;background:var(--soft);border-radius:50%;color:var(--accent);font-size:10px;line-height:1;margin-top:1px}
.random-step-heading h2{margin:0;font-size:15px;font-weight:700;letter-spacing:-.025em}
.random-step-heading p{font-size:11px;color:var(--muted);margin:4px 0 0;word-break:keep-all}
.random-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.random-subject{display:flex;flex-direction:column;gap:5px;text-align:left;min-width:0;min-height:135px;border:1px solid var(--line);border-radius:12px;background:#fcfdf9;padding:17px;color:var(--ink)}
.random-subject:hover:not(:disabled){border-color:#adbfac;background:#f5f8f1}
.random-subject[aria-pressed=true]{border-color:var(--accent);background:var(--soft);box-shadow:0 0 0 1px var(--accent)}
.random-subject-top{display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0;width:100%}
.random-subject-name{font-size:17px;font-weight:700;letter-spacing:-.03em;overflow-wrap:anywhere}
.random-choice-check{font-size:12px;display:grid;place-items:center;width:20px;height:20px;border:1px solid #dbe3d8;border-radius:50%;flex-shrink:0;color:transparent;background:#fff}
.random-subject[aria-pressed=true] .random-choice-check{color:#fff;background:var(--accent);border-color:var(--accent)}
.random-subject-count{font-size:12px;color:var(--accent)}
.random-subject-meta{font-size:10px;color:var(--muted);margin-top:auto;padding-top:11px;word-break:keep-all}
.random-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.random-count{border:1px solid var(--line);border-radius:9px;background:#fff;min-height:44px;padding:9px 5px;font-size:12px;color:var(--muted);white-space:nowrap}
.random-count:hover,.random-count[aria-pressed=true]{background:var(--soft);color:var(--accent);border-color:#a4b9a0}
.random-count[aria-pressed=true]{font-weight:750;border-color:var(--accent)}
.random-pools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.random-pool{padding:12px;min-height:87px;display:flex;flex-direction:column;gap:9px;text-align:left;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);min-width:0}
.random-pool:hover,.random-pool[aria-pressed=true]{background:var(--soft);border-color:#a4b9a0}
.random-pool[aria-pressed=true]{border-color:var(--accent)}
.random-pool-label{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-width:0}
.random-pool-label strong{font-size:12px;font-weight:650;word-break:keep-all}
.random-pool-label>span{font-size:10px;color:var(--accent)}
.random-pool-description{font-size:10px;color:var(--muted);word-break:keep-all}
.random-setup-footer{border-top:1px solid var(--line);padding-top:24px;margin-top:27px}
.random-draw-summary{display:grid;gap:5px;margin-bottom:17px}
.random-draw-summary strong{font-size:13px;font-weight:650}
.random-draw-summary>span{font-size:11px;line-height:1.8;color:var(--muted);word-break:keep-all}
.random-start{width:100%;min-height:49px;font-size:14px}
.random-guide{padding:27px 7px 15px 5px}
.random-guide-eyebrow{margin:0 0 13px;color:var(--accent);font-size:11px;letter-spacing:-.01em}
.random-guide h2{font-size:23px;letter-spacing:-.045em;line-height:1.65;margin:0 0 15px;white-space:pre-line;font-weight:650;word-break:keep-all}
.random-guide-description{font-size:12px;color:var(--muted);line-height:1.9;margin:0;word-break:keep-all}
.random-guide-list{list-style:none;counter-reset:random-guide;padding:0;margin:29px 0 27px;display:grid;gap:20px}
.random-guide-list li{position:relative;padding-left:28px;counter-increment:random-guide}
.random-guide-list li:before{content:counter(random-guide);position:absolute;left:0;top:1px;color:#819578;font-size:11px;border-bottom:1px solid #b8c9af;line-height:1.5;width:15px;text-align:center}
.random-guide-list strong{display:block;font-size:12px;font-weight:650;margin-bottom:4px}
.random-guide-list span{display:block;font-size:11px;color:var(--muted);line-height:1.8;word-break:keep-all}
.random-guide-note{padding:17px;border:1px solid #dce5d4;background:#eef3e8;border-radius:12px}
.random-guide-note strong{font-size:12px;font-weight:650}
.random-guide-note p{font-size:11px;line-height:1.9;color:#6f8069;margin:6px 0 0;word-break:keep-all}
.random-notice{padding:12px 15px;margin:0 0 20px;border-left:3px solid #b7c9a7;border-radius:0 8px 8px 0;background:#eef3e8;font-size:12px;line-height:1.8;color:var(--accent)}
.random-resume{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px;border:1px solid #d6e2cd;border-radius:12px;background:#eef3e8;margin-bottom:23px}
.random-resume>div{display:grid;gap:4px;min-width:0}
.random-resume strong{font-size:13px;font-weight:650}
.random-resume span{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.random-resume .ghost{font-size:12px;flex-shrink:0}
.random-muted{font-size:13px;color:var(--muted);grid-column:1/-1;line-height:1.8}
.random-progress-card{margin-bottom:20px;padding:17px 21px;border:1px solid var(--line);border-radius:12px;background:white}
.random-progress-info{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:11px}
.random-progress-info strong{font-size:21px;letter-spacing:-.03em}
.random-progress-info div>span{font-size:12px;color:var(--muted)}
.random-progress-done{font-size:11px;color:var(--muted)}
.random-progress{display:block;appearance:none;width:100%;height:5px;border:0;border-radius:10px;background:#edf1e9;accent-color:var(--accent);overflow:hidden}
.random-progress::-webkit-progress-bar{background:#edf1e9;border-radius:10px}
.random-progress::-webkit-progress-value{background:#7f9a73;border-radius:10px}
.random-progress::-moz-progress-bar{background:#7f9a73;border-radius:10px}
.random-question-card{min-width:0}
.random-question-card .card-top{align-items:flex-start}
.random-question-card .chips{min-width:0}
.random-question-card .chip{overflow-wrap:anywhere}
.random-original-number{letter-spacing:0;font-size:11px}
.random-question-figure{margin:0 0 22px}
.random-question-figure img{max-width:100%;max-height:360px;display:block;margin:auto;object-fit:contain}
.random-question-figure figcaption{font-size:11px;color:var(--muted);margin-top:8px}
.random-answer-actions{margin-top:22px;display:grid;gap:9px}
.random-submit{width:100%;font-size:13px}
.random-question-status{font-size:11px;color:var(--muted);margin:0}
.random-options .option{cursor:pointer}
.random-options .option:has(input:disabled){cursor:default}
.random-explanation .ex-head{gap:15px}
.random-explanation .ex-head>span{text-align:right}
.random-session-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:22px}
.random-session-actions .primary{font-size:13px;min-width:150px}
.random-number-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding-top:23px;margin-top:26px;margin-bottom:12px}
.random-number-heading h2{font-size:12px;font-weight:650;margin:0;color:var(--muted)}
.random-text-button{border:0;background:none;color:var(--accent);font-size:12px;padding:7px 0;min-height:36px;text-align:left;text-decoration:underline;text-underline-offset:4px}
.random-question-nav{display:flex;flex-wrap:wrap;gap:8px;max-height:185px;overflow-y:auto;padding:4px 3px}
.random-question-nav .qnav{flex-shrink:0}
.random-session-note{font-size:10px;color:var(--muted);margin:16px 0 0;line-height:1.9;word-break:keep-all}
.random-result-card{text-align:center;padding:40px 30px 33px;max-width:760px;margin:0 auto}
.random-result-eyebrow{font-size:11px;color:var(--accent);margin:0 0 12px}
.random-result-card h2{font-size:24px;font-weight:650;letter-spacing:-.04em;line-height:1.6;margin:0 0 9px;word-break:keep-all}
.random-result-description{font-size:13px;line-height:1.9;color:var(--muted);margin:0;word-break:keep-all}
.random-result-score{display:grid;gap:3px;margin:29px auto 26px}
.random-result-score strong{font-size:49px;color:var(--accent);letter-spacing:-.05em;line-height:1.3;font-weight:650}
.random-result-score span{font-size:11px;color:var(--muted)}
.random-result-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 30px;padding:20px 0;background:#f7f9f3;border-radius:11px}
.random-result-stats>div+div{border-left:1px solid var(--line)}
.random-result-stats dt{font-size:11px;color:var(--muted);margin-bottom:3px}
.random-result-stats dd{font-size:24px;font-weight:650;letter-spacing:-.04em;margin:0}
.random-result-stats .is-correct dd{color:var(--accent)}
.random-result-stats .is-wrong dd{color:var(--wrong)}
.random-result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.random-result-actions button{font-size:13px;min-height:48px}
.random-result-hint{font-size:11px;color:var(--muted);margin:16px 0 0}
.random-result-footer{text-align:center;margin-top:20px}
@media(max-width:1100px){
  .random-setup-layout{grid-template-columns:minmax(0,1fr)}
  .random-guide{padding:25px;background:#eef3e8;border:1px solid #dce5d4;border-radius:14px}
  .random-guide h2{font-size:21px;white-space:normal}
  .random-guide-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0 0}
  .random-guide-note{margin-top:22px;border-left:0;border-right:0;border-bottom:0;border-radius:0;padding:16px 0 0;background:transparent}
}
@media(max-width:740px){
  .topbar{flex-wrap:wrap;row-gap:8px}
  .topbar .pill{margin-left:auto}
  .section-nav{flex-wrap:wrap}
  .random-intro{align-items:flex-start;gap:12px;margin-bottom:21px}
  .random-intro .ghost{padding:9px 11px;min-height:42px;font-size:11px}
  .random-intro .subtitle{font-size:12px}
  .random-setup-layout{gap:20px}
  .random-settings{padding:23px 18px}
  .random-step-heading{gap:9px;margin-bottom:15px}
  .random-step-heading h2{font-size:14px}
  .random-step-heading p{font-size:10px;line-height:1.8}
  .random-subjects{gap:10px}
  .random-subject{padding:14px 12px;min-height:130px}
  .random-subject-name{font-size:16px}
  .random-subject-count{font-size:11px}
  .random-subject-meta{font-size:10px}
  .random-choice-check{width:17px;height:17px;font-size:10px}
  .random-counts{gap:6px}
  .random-count{font-size:11px;padding:9px 3px}
  .random-pools{grid-template-columns:minmax(0,1fr);gap:8px}
  .random-pool{min-height:67px;gap:5px;padding:11px 13px}
  .random-pool-label{flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
  .random-pool-description{font-size:10px}
  .random-pool-label strong{font-size:12px}
  .random-setting-section+.random-setting-section{margin-top:23px;padding-top:23px}
  .random-setup-footer{margin-top:24px;padding-top:22px}
  .random-guide{padding:23px 20px}
  .random-guide h2{font-size:21px;white-space:pre-line}
  .random-guide-list{grid-template-columns:minmax(0,1fr);gap:18px}
  .random-guide-note p{font-size:10px}
  .random-progress-card{padding:13px 16px;margin-bottom:16px}
  .random-resume{flex-direction:column;align-items:flex-start;gap:12px;padding:17px;margin-bottom:20px}
  .random-resume .ghost{font-size:11px;min-height:42px}
  .random-progress-info{margin-bottom:9px}
  .random-progress-info strong{font-size:20px}
  .random-progress-info div>span,.random-progress-done{font-size:10px}
  .random-original-number{font-size:10px}
  .random-answer-actions{margin-top:20px}
  .random-question-status{font-size:10px}
  .random-session-actions .ghost{font-size:12px;padding:10px 13px}
  .random-session-actions .primary{font-size:12px;padding:11px 17px;min-width:135px}
  .random-number-heading{margin-top:22px;padding-top:17px;gap:10px}
  .random-number-heading h2,.random-text-button{font-size:11px}
  .random-question-nav{gap:8px}
  .random-question-nav .qnav{width:38px;height:38px}
  .random-session-note{font-size:10px}
  .random-result-card{padding:30px 18px 27px}
  .random-result-card h2{font-size:21px}
  .random-result-description{font-size:12px}
  .random-result-score{margin:24px auto}
  .random-result-score strong{font-size:44px}
  .random-result-stats{padding:17px 0;margin-bottom:23px}
  .random-result-stats dt{font-size:10px}
  .random-result-stats dd{font-size:22px}
  .random-result-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .random-result-actions button{width:100%;font-size:12px}
}
@media(max-width:360px){
  .random-settings{padding:21px 14px}
  .random-subjects{grid-template-columns:minmax(0,1fr)}
  .random-subject{min-height:110px}
  .random-subject-name{font-size:15px}
  .random-count{font-size:10px}
}
