:root {
  --ink: #132b25;
  --muted: #65766f;
  --line: #dce6e0;
  --paper: #f8faf7;
  --surface: #fff;
  --green: #106a4b;
  --green-bright: #0c9b67;
  --green-soft: #e7f6ec;
  --yellow: #f9cd70;
  --red: #c65449;
  --red-soft: #fff0ee;
  --shadow: 0 16px 40px rgba(12, 50, 35, .07);
  --round: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #68bb90; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: not-allowed; }
svg { flex-shrink: 0; }
a { color: var(--green); }
.wrap { max-width: 1180px; margin: auto; padding: 0 26px; }
.topbar { min-height: 77px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.topbar .wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 790; letter-spacing: -.035em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brandmark { height: 38px; width: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #126442; font-weight: 850; font-size: 20px; box-shadow: inset -8px -8px 0 #104d38; }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.topbar-note { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .10em; border-radius: 100px; padding: 8px 11px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.tag.on-dark { background: rgba(147, 230, 178, .13); border: 1px solid rgba(191, 242, 204, .16); color: #9eebba; }
.btn { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 49px; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 735; line-height: 1.3; transition: transform .16s, background .16s, border-color .16s; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: #0c583e; }
.btn.light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.light:hover { background: #f7fbf8; border-color: #afc5b9; }
.btn.ghost { color: var(--green); background: transparent; }
.btn.hero-btn { background: var(--yellow); color: #173329; }
.btn.hero-btn:hover { background: #ffdc92; }
.btn.full { width: 100%; }
.mini-link { display: inline-flex; align-items: center; gap: 5px; padding: 7px 0; background: none; border: none; color: var(--green); font-size: 13px; font-weight: 700; }
.confirm-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(9, 32, 24, .68); display: grid; place-items: center; padding: 20px; }
.confirm-card { width: min(100%, 440px); border-radius: 20px; background: #fff; padding: 31px; box-shadow: 0 28px 70px rgba(0, 0, 0, .25); }
.confirm-card h2 { font-size: 24px; letter-spacing: -.035em; line-height: 1.2; margin: 16px 0 12px; }
.confirm-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
@media (max-width: 510px) { .confirm-card { padding: 25px 20px; } .confirm-actions .btn { flex: 1; } }
.hero { overflow: hidden; position: relative; background: #112d23; color: #fff; }
.hero:before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 32%, rgba(49, 155, 93, .24), transparent 42%), linear-gradient(105deg, transparent 50%, rgba(132, 210, 160, .04)); pointer-events: none; }
.hero-layout { position: relative; display: grid; grid-template-columns: 1.03fr .97fr; gap: 45px; padding-top: 78px; padding-bottom: 88px; align-items: center; }
.hero h1 { font-size: clamp(44px, 5.0vw, 67px); max-width: 680px; line-height: 1.06; letter-spacing: -.06em; margin: 25px 0 22px; font-weight: 830; }
.hero h1 em { font-style: normal; color: #aee8bc; }
.hero-copy { font-size: 17px; color: #c6d8cc; max-width: 490px; line-height: 1.75; margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.hero-under { font-size: 12px; color: #a9c6b4; margin-top: 16px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 22px; padding: 24px 0 0; margin-top: 32px; border-top: 1px solid rgba(255,255,255,.13); }
.hero-fact { display: flex; gap: 9px; align-items: center; font-size: 13px; color: #d9eadf; }
.hero-fact strong { color: #fff; }
.save-panel { margin-top: 18px; padding: 16px; max-width: 560px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; border-radius: 15px; border: 1px solid rgba(190,236,205,.25); background: rgba(225,255,231,.08); }
.save-panel-info { min-width: 100%; display: flex; gap: 4px; flex-direction: column; }
.save-panel-info strong { color: #fff; font-size: 14px; }
.save-panel-info span { color: #b8d4c1; font-size: 12px; }
.btn.resume { background: #bdebc4; color: #143725; min-height: 42px; }
.mini-link.light-text { color: #c5ebd0; }
.sheet-stage { padding: 20px; perspective: 900px; }
.sheet-window { position: relative; background: #f7fbf7; border-radius: 16px; border: 1px solid #bdd9c7; box-shadow: 0 28px 60px rgba(0, 0, 0, .25); overflow: hidden; color: #25392e; transform: rotate(-3deg); }
.sheet-top { background: #dfece2; height: 45px; display: flex; align-items: center; gap: 7px; padding: 0 17px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #97bfa7; }
.sheet-label { font-size: 11px; margin-left: 12px; font-weight: 720; color: #3c6650; }
.sheet-ribbon { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #d9e8dd; padding: 10px 16px; font-size: 10px; color: #668273; }
.sheet-ribbon strong { color: #135e40; border-bottom: 2px solid #13734a; padding-bottom: 5px; }
.grid-mock { display: grid; grid-template-columns: 28px 1.05fr 1fr 1fr .95fr; font-size: 11px; }
.grid-cell { padding: 11px 8px; min-height: 40px; border-right: 1px solid #e2eae4; border-bottom: 1px solid #e2eae4; background: #fff; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-cell.headcol, .grid-cell.rowcol { background: #e9f0e9; color: #6a8673; text-align: center; font-weight: 650; }
.grid-cell.tablehead { background: #ccead6; color: #155a40; font-weight: 770; }
.grid-cell.left { text-align: left; }
.grid-cell.active { box-shadow: inset 0 0 0 2px #169e63; background: #f0fff6; }
.float-score { position: absolute; right: -8px; bottom: 30px; border-radius: 15px; background: #fff; color: var(--ink); padding: 12px 17px; box-shadow: 0 14px 35px rgba(0,0,0,.23); transform: rotate(4deg); display: flex; align-items: center; gap: 12px; }
.float-score .score-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #d8f7e4; color: #0c7a4b; font-size: 21px; font-weight: 850; }
.float-score strong { display: block; font-size: 13px; }
.float-score small { color: var(--muted); }
.benefits { position: relative; margin-top: -28px; z-index: 2; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.benefit { background: #fff; padding: 25px 27px; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 14px 34px rgba(10, 46, 32, .05); }
.benefit .circle { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 18px; margin-bottom: 18px; }
.benefit strong { font-size: 14px; }
.benefit p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.section { padding-top: 78px; padding-bottom: 80px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.eyebrow { display: inline-block; color: var(--green); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.section-head h2, .section h2 { font-size: clamp(27px,3.2vw,38px); letter-spacing: -.05em; line-height: 1.2; margin: 10px 0; }
.section-head p { color: var(--muted); max-width: 540px; margin: 0; font-size: 14px; }
.topics { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; }
.topic { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 23px; }
.topic-num { color: #a0b7a7; font-size: 12px; font-weight: 750; }
.topic h3 { font-size: 16px; margin: 27px 0 8px; letter-spacing: -.025em; }
.topic p { font-size: 13px; line-height: 1.6; margin: 0; color: var(--muted); }
.footer { border-top: 1px solid var(--line); padding: 24px 0 30px; color: #718379; font-size: 12px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; }
.start-area { padding: 80px 0 105px; max-width: 690px; margin: 0 auto; }
.start-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 40px; }
.start-card h1 { font-size: 37px; line-height: 1.13; letter-spacing: -.05em; margin: 12px 0; }
.start-card p { color: var(--muted); margin: 0 0 28px; }
.field-label { display: block; font-weight: 725; font-size: 13px; margin: 0 0 9px; }
.field { width: 100%; padding: 14px 16px; min-height: 48px; border: 1px solid #cdded3; border-radius: 11px; background: #fff; color: var(--ink); outline: none; }
.field:focus { border-color: #2b9d6a; box-shadow: 0 0 0 3px rgba(42, 162, 107, .12); }
.field::placeholder { color: #a4b0a9; }
.difficulty-fieldset { border: 0; padding: 0; margin: 25px 0 0; min-width: 0; }
.difficulty-fieldset legend { color: #254936; font-size: 15px; font-weight: 780; margin-bottom: 13px; }
.difficulty-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.difficulty-option { display: block; cursor: pointer; position: relative; }
.difficulty-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.difficulty-card { display: flex; flex-direction: column; min-height: 155px; gap: 8px; border: 1.5px solid #d6e4d9; border-radius: 13px; padding: 15px 13px; background: #fbfdfb; transition: background .15s,border .15s,box-shadow .15s; }
.difficulty-card strong { font-size: 18px; color: #1b4b33; }
.difficulty-card small { font-size: 13px; line-height: 1.45; color: #62786a; }
.difficulty-card em { margin-top: auto; font-style: normal; color: #397857; font-size: 12px; font-weight: 730; }
.difficulty-option input:checked + .difficulty-card { background: #e8f7eb; border-color: #228556; box-shadow: inset 0 0 0 1px #228556; }
.difficulty-option input:focus-visible + .difficulty-card { outline: 3px solid #8acc9b; outline-offset: 3px; }
.difficulty-option:hover .difficulty-card { border-color: #74b98a; }
.skill-syllabus { background: #f5faf6; border: 1px solid #d3e6d9; border-radius: 14px; margin: 17px 0 0; padding: 19px 21px 15px; }
.syllabus-heading h2 { margin: 6px 0; color: #183f2b; font-size: 18px; letter-spacing: -.035em; }
.syllabus-heading p { color: #537361; font-size: 13px; line-height: 1.5; margin: 0; }
.syllabus-list { list-style: none; padding: 0; margin: 13px 0 9px; display: grid; gap: 9px; }
.syllabus-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; font-weight: 630; color: #244b35; }
.syllabus-list li span { color: #148351; font-weight: 800; }
.skill-syllabus .syllabus-note { font-size: 11px; line-height: 1.55; color: #657d6c; margin: 14px 0 0; }
.start-note { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin: 22px 0; line-height: 1.5; }
.privacy-consent { border-top: 1px solid #d8e4da; padding: 13px 0 0; margin: 8px 0 19px; }
.privacy-consent strong { display: block; color: #24553a; font-size: 13px; line-height: 1.45; font-weight: 760; }
.privacy-consent p { font-size: 12px; line-height: 1.55; color: #587568; margin: 7px 0 0; }
.small-statline { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.small-statline span { background: #eef5ef; color: #466956; border-radius: 50px; font-size: 12px; font-weight: 650; padding: 7px 12px; }
.test-shell { display: grid; grid-template-columns: 246px minmax(0,1fr); gap: 24px; padding-top: 32px; padding-bottom: 70px; align-items: start; }
.test-sidebar { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 23px; position: sticky; top: 18px; }
.sidebar-small { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 760; color: var(--muted); }
.sidebar-name { font-weight: 790; font-size: 20px; letter-spacing: -.035em; margin: 5px 0 17px; overflow-wrap: anywhere; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.progress-track { height: 8px; background: #e5efe8; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green-bright); border-radius: inherit; transition: width .2s; }
.question-map { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 21px; }
.map-num { background: #f4f8f4; color: #586e61; border: 1px solid #e2eae2; height: 40px; border-radius: 10px; font-size: 13px; font-weight: 760; }
.map-num.active { box-shadow: inset 0 0 0 2px #0c6d4b; color: #0c6d4b; background: #fff; border-color: #0c6d4b; }
.map-num.answered:not(.active) { background: #ddf5e5; border-color: #b8dfc5; color: #147346; }
.sidebar-key { display: flex; flex-direction: column; gap: 9px; font-size: 12px; color: var(--muted); margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.keyline { display: flex; align-items: center; gap: 9px; }
.key-dot { display: inline-block; height: 9px; width: 9px; background: #ddf5e5; border: 1px solid #90c5a1; border-radius: 3px; }
.key-dot.empty { background: #edf2ed; border-color: #d8e3d8; }
.timer-row { display: flex; justify-content: space-between; margin: 22px 0 4px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 12px; }
.timer-row strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.save-exit { margin-top: 15px; }
.saved-note { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quiz-main { min-width: 0; }
.exam-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 14px; margin: 4px 0 21px; }
.exam-title { font-size: 24px; font-weight: 815; letter-spacing: -.04em; margin: 3px 0; }
.exam-head p { margin: 0; font-size: 12px; color: var(--muted); }
.question-panel { padding: 38px 40px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 27px rgba(14, 57, 38, .035); }
.q-kicker { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.q-kicker .tag { font-size: 10px; }
.q-kicker .tag.skill-area-tag { max-width: 100%; white-space: normal; line-height: 1.4; }
.q-count { color: var(--muted); font-size: 12px; font-weight: 670; }
.q-title { font-size: clamp(23px,3vw,31px); font-weight: 815; line-height: 1.23; letter-spacing: -.045em; margin: 0 0 17px; }
.q-body { font-size: 14px; color: #52675b; line-height: 1.75; max-width: 760px; }
.q-body strong { color: #2a4835; }
.q-body p { margin-top: 0; }
.q-body ul { padding-left: 20px; margin: 0 0 22px; }
.q-body li { margin-bottom: 5px; }
.answer-label { display: block; color: #456150; font-size: 11px; font-weight: 810; text-transform: uppercase; letter-spacing: .1em; margin: 27px 0 13px; }
.options { display: grid; gap: 11px; }
.option { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 18px; background: #fff; border: 1px solid #dbe6de; border-radius: 12px; font-size: 14px; line-height: 1.5; transition: border .13s, background .13s; width: 100%; color: var(--ink); }
.option:hover { background: #f8fbf8; border-color: #99c4a7; }
.option.selected { border-color: #167d52; background: #eef9f1; box-shadow: inset 0 0 0 1px #167d52; }
.option-bubble { display: inline-grid; flex-shrink: 0; place-items: center; border-radius: 50%; height: 23px; width: 23px; border: 1px solid #b6c7bb; color: #789184; font-size: 11px; font-weight: 850; }
.option.selected .option-bubble { background: var(--green); color: #fff; border-color: var(--green); }
.options-icons { grid-template-columns: repeat(2,minmax(0,1fr)); }
.option.image-option { min-height: 105px; position: relative; align-items: center; justify-content: center; padding: 16px; }
.option.image-option .option-bubble { position: absolute; top: 10px; left: 12px; }
.option.image-option .icon-choice { width: 61px; height: 61px; padding: 9px; border-radius: 12px; }
.formula-entry { width: 100%; min-height: 78px; border: 1px solid #bfcfc4; border-radius: 12px; background: #fdfefd; color: #183b2c; padding: 20px; resize: vertical; line-height: 1.5; font: 15px/1.6 "Cascadia Code", Consolas, ui-monospace, monospace; }
.formula-entry:focus { border-color: var(--green-bright); outline: 3px solid rgba(23, 158, 101, .12); }
.formula-entry::placeholder { color: #a1ada4; }
.assist-code-status, .assist-result-note { padding: 13px 16px; background: #f0eaff; border: 1px solid #d6c7f7; border-radius: 10px; color: #4f377b; font-size: 13px; line-height: 1.6; }
.assist-code-status { margin: 20px 0 0; }
.assist-code-status[hidden] { display: none; }
.assist-result-note { margin: 0 0 30px; }
.formula-help { color: #7c8c81; font-size: 12px; margin-top: 10px; }
.worksheet { margin: 23px 0 24px; border-radius: 12px; border: 1px solid #cee2d2; overflow: auto; background: #fff; }
.worksheet table { border-collapse: collapse; font-size: 12px; width: 100%; min-width: 550px; }
.worksheet th, .worksheet td { padding: 9px 10px; text-align: left; white-space: nowrap; border-right: 1px solid #e5ede7; border-bottom: 1px solid #e5ede7; }
.worksheet thead th { background: #e4f2e8; color: #1d6547; font-weight: 790; }
.worksheet tbody th { background: #f0f5f0; font-weight: 650; color: #829589; text-align: center; }
.worksheet tbody tr:last-child td, .worksheet tbody tr:last-child th { border-bottom: none; }
.worksheet th:last-child, .worksheet td:last-child { border-right: none; }
.worksheet .blank-cell { color: #a8b8a9; font-style: italic; }
.formula-helpers { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.formula-helpers span { border: 1px solid #d4e4d8; background: #f6faf7; font: 12px "Cascadia Code", Consolas, monospace; color: #42634f; padding: 7px 10px; border-radius: 7px; }
.output-entry { min-height: 0; height: 58px; resize: none; }
.icon-choice { display: inline-flex; width: 43px; height: 43px; padding: 6px; border: 1px solid #d9e6dc; border-radius: 9px; background: #f4faf6; color: #236e4d; flex-shrink: 0; }
.icon-choice svg { width: 100%; height: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.spreadsheet-label { margin: 23px 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #27573e; font-size: 13px; font-weight: 750; }
.spreadsheet-label span { color: #6c8575; font-size: 12px; font-weight: 500; }
.sheet-formula-bar { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid #cbded1; border-radius: 11px; background: #f5faf6; }
.sheet-address { min-width: 34px; text-align: center; color: #1f6847; font: 750 14px Consolas, ui-monospace, monospace; }
.sheet-fx { color: #619277; font: italic 700 15px Georgia, serif; padding: 0 7px; border-left: 1px solid #cbded1; }
.sheet-bar-input { flex: 1; min-width: 0; border: 1px solid transparent; padding: 10px; border-radius: 6px; background: #fff; color: #1b5134; font: 14px Consolas, ui-monospace, monospace; }
.sheet-bar-input:focus, .sheet-cell-input:focus { outline: 2px solid #167d52; outline-offset: -2px; }
.formula-signature { display: flex; flex-wrap: wrap; gap: 0; align-items: baseline; background: #fff; color: #354b3b; border: 1px solid #cad8ce; box-shadow: 0 5px 18px rgba(23,65,40,.09); border-radius: 8px; padding: 9px 12px; margin-top: 5px; font: 12px/1.75 Consolas,ui-monospace,monospace; overflow-wrap: anywhere; }
.formula-signature[hidden], .sheet-reference-legend[hidden] { display: none; }
.formula-signature strong { margin-right: 3px; color: #135d3a; font-weight: 850; }
.formula-signature .signature-active { color: #0a5f3f; font-weight: 900; background: #daf3e5; border-radius: 3px; padding: 0 2px; }
.formula-signature .signature-separator { color: #87978a; white-space: pre; }
.sheet-reference-legend { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 0; }
.sheet-reference-legend span { display: inline-flex; border: 1px solid var(--ref-stroke); background: var(--ref-fill); color: #28453a; border-radius: 5px; padding: 2px 7px; font: 11px/1.6 Consolas,ui-monospace,monospace; }
.sheet-jump { white-space: nowrap; padding: 10px 12px; font-size: 12px; }
.worksheet.sheet-grid-wrap { width: 100%; margin: 9px 0 10px; overflow: auto; border: 1px solid #c9dccc; border-radius: 10px; }
.worksheet .sheet-table { table-layout: fixed; min-width: 1520px; width: 1520px; border-collapse: separate; border-spacing: 0; }
.sheet-table th, .sheet-table td { padding: 7px 9px; width: 110px; height: 34px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; background: white; }
.sheet-table th:first-child, .sheet-table .sheet-row-number { width: 39px; min-width: 39px; position: sticky; left: 0; z-index: 2; background: #eff6f1; }
.sheet-table thead th { text-align: center; background: #e7f2e9; position: sticky; top: 0; z-index: 3; }
.sheet-table thead th:first-child { z-index: 4; }
.sheet-table .sheet-header { background: #f2f8f4; color: #315b41; font-weight: 800; }
.sheet-table .sheet-empty { background: #fcfdfc; }
.sheet-table td[data-cell] { cursor: cell; }
.sheet-table td[data-cell]:not(.sheet-target) { user-select: none; }
.sheet-table td[data-cell]:focus-visible { outline: 2px solid #147950; outline-offset: -3px; }
.sheet-table td.sheet-selected { background: #fff0bb; box-shadow: inset 0 0 0 2px #cc881c; }
.sheet-table td.sheet-reference { background: var(--ref-fill); box-shadow: inset 0 0 0 2px var(--ref-stroke); }
.sheet-table td.sheet-range-current { outline: 2px solid #2a80c3; outline-offset: -2px; }
.sheet-table td.sheet-range-current:not(.sheet-reference) { background: #e4f2ff; }
.sheet-table .sheet-target { background: #e1f5e5; padding: 2px; box-shadow: inset 0 0 0 2px #168453; overflow: visible; }
.sheet-table .sheet-target.sheet-selected { box-shadow: inset 0 0 0 3px #168453; }
.sheet-cell-input { border: 0; background: transparent; width: 100%; padding: 8px 5px; color: #104c2f; font: 13px Consolas, ui-monospace, monospace; min-width: 100%; }
.sheet-instruction { font-size: 12px; line-height: 1.6; color: #5f7969; margin: 0 0 13px; }
.output-formula-bar { align-items: stretch; }
.output-formula { display: flex; align-items: center; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 10px 12px; background: #fff; border-radius: 6px; color: #244f39; font: 14px Consolas, ui-monospace, monospace; flex: 1; }
.worksheet.output-worksheet .sheet-table { min-width: 530px; width: 530px; }
.output-worksheet .sheet-table th, .output-worksheet .sheet-table td { width: 98px; }
.output-worksheet .sheet-table th:first-child, .output-worksheet .sheet-table .sheet-row-number { width: 40px; min-width: 40px; }
.output-worksheet .sheet-target input { min-width: 0; padding: 8px 5px; font-size: 12px; }
@media (max-width: 510px) { .sheet-jump { padding: 10px 7px; } .sheet-formula-bar { gap: 3px; } .spreadsheet-label { flex-wrap: wrap; } }
@media (max-width: 510px) { .option.image-option { min-height: 92px; } .formula-signature { font-size: 11px; } }
@media (max-width: 550px) { .difficulty-options { grid-template-columns: 1fr; } .difficulty-card { min-height: 0; padding: 14px 16px; } .difficulty-card em { margin-top: 0; } }
.pivot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 24px; }
.pivot-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; }
.pivot-item label { display: block; margin-bottom: 8px; font-weight: 720; font-size: 12px; color: #456150; }
.pivot-item select { width: 100%; padding: 12px; border: 1px solid #cdded3; border-radius: 8px; color: var(--ink); background: #fff; }
.q-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 22px; }
.q-bottom .right { display: flex; gap: 10px; flex-wrap: wrap; }
.q-bottom .btn { min-width: 118px; }
.q-footnote { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.results-shell { max-width: 930px; margin: 0 auto; padding-top: 42px; padding-bottom: 90px; }
.result-hero { background: #153729; color: #fff; border-radius: 23px; padding: 38px 45px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.result-hero { position: relative; overflow: hidden; isolation: isolate; }
.result-hero > * { position: relative; z-index: 1; }
.result-letter-grade { font-size: 70px !important; line-height: .95 !important; color: #dcffb7; }
.result-grade-note { margin-top: 18px; font-size: 12px; line-height: 1.6; color: #cce7d1; }
.result-grade-note strong { font-size: 21px; color: #d6ffbd; margin: 0 5px; }
.skill-breakdown { background: #fff; border: 1px solid #d9e7dd; border-radius: 16px; padding: 25px 27px; margin: 25px 0 30px; }
.skill-breakdown-head h2 { font-size: 21px; letter-spacing: -.035em; margin: 5px 0 8px; }
.skill-breakdown-head p { font-size: 12px; color: #617767; line-height: 1.5; margin: 0 0 20px; }
.skill-breakdown-list { display: grid; gap: 15px; }
.skill-breakdown-row > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.skill-breakdown-row strong { color: #264d35; font-size: 12px; line-height: 1.5; }
.skill-breakdown-row div > span { white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; color: #607b69; }
.skill-breakdown-track { height: 8px; border-radius: 999px; background: #e5efe8; overflow: hidden; }
.skill-breakdown-track span { display: block; height: 100%; background: #209567; border-radius: inherit; }
.results-sync-status { font-size: 13px; color: #527160; background: #eff8f0; border: 1px solid #d2e7d8; border-radius: 10px; padding: 12px 16px; margin: -15px 0 30px; }
.results-sync-status .mini-link { display: inline; margin-left: 5px; }
.celebration-sky { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; z-index: 9999; pointer-events: none; }
.celebration-sky span { position: absolute; left: var(--x); top: -48px; opacity: 0; font-size: clamp(22px,3vw,34px); filter: drop-shadow(0 2px 3px rgba(0,0,0,.16)); animation: celebrate-rain var(--travel) linear var(--delay) 1 forwards; }
@keyframes celebrate-rain { 0% { opacity: 0; transform: translate3d(0,-6vh,0) rotate(-25deg); } 8% { opacity: 1; } 84% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--drift),112vh,0) rotate(620deg); } }
@media (prefers-reduced-motion: reduce) { .celebration-sky { display: none; } }
.result-hero h1 { margin: 8px 0 13px; font-size: 36px; letter-spacing: -.045em; line-height: 1.2; }
.result-hero p { max-width: 510px; color: #c8decf; margin: 0; font-size: 14px; line-height: 1.7; }
.score-ring { width: 162px; height: 162px; background: conic-gradient(#b9e89e var(--progress),rgba(255,255,255,.17) 0); border-radius: 50%; display: grid; place-items: center; }
.score-ring-inner { border-radius: 50%; background: #153729; height: 133px; width: 133px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring strong { line-height: 1; font-size: 41px; letter-spacing: -.06em; }
.score-ring span { font-size: 12px; color: #9ebaa8; margin-top: 7px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 34px; }
.result-section { font-size: 21px; letter-spacing: -.04em; margin: 36px 0 18px; }
.result-list { display: grid; gap: 13px; }
.result-item { border-radius: 14px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.result-summary { list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 20px; cursor: pointer; }
.result-summary::-webkit-details-marker { display: none; }
.result-summary:focus-visible { outline: 3px solid #93cfa4; outline-offset: -3px; }
.result-main { display: flex; gap: 12px; align-items: center; }
.status-icon { width: 35px; height: 35px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 850; flex-shrink: 0; }
.status-icon.no { background: var(--red-soft); color: var(--red); }
.status-icon.partial { background: #fff5dc; color: #ae7626; }
.result-main strong { display: block; font-size: 14px; }
.result-main small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.result-side { display: flex; align-items: center; gap: 13px; font-size: 12px; font-weight: 790; white-space: nowrap; }
.result-details { border-top: 1px solid var(--line); padding: 19px 22px 23px 68px; font-size: 13px; line-height: 1.8; color: #4e6758; }
.result-details strong { color: #1f4834; }
.result-details code { font: 12px/1.6 "Cascadia Code",Consolas,monospace; border-radius: 5px; padding: 3px 6px; color: #195b3d; background: #ecf7f0; overflow-wrap: anywhere; }
.result-details .answer-value { margin-bottom: 10px; }
.learning-box { border: 1px solid #bcdac6; background: #eff8f0; border-radius: 15px; padding: 24px 27px; margin-top: 25px; }
.learning-box h3 { margin: 0 0 8px; font-size: 17px; }
.learning-box p { color: #476451; margin: 0; font-size: 13px; line-height: 1.65; }
.loading-fallback { max-width: 540px; margin: 100px auto; padding: 25px; color: var(--muted); text-align: center; }

@media (max-width: 1000px) {
  .hero-layout { gap: 6px; }
  .sheet-stage { padding: 5px; }
  .float-score { right: 0; bottom: 7px; }
  .topics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 17px; }
  .topbar { min-height: 68px; }
  .topbar-note { display: none; }
  .hero-layout { grid-template-columns: 1fr; padding-top: 50px; padding-bottom: 62px; }
  .hero h1 { font-size: clamp(39px,10vw,54px); }
  .hero-copy { font-size: 15px; }
  .sheet-stage { margin: 18px auto 0; max-width: 490px; width: 100%; }
  .benefits { grid-template-columns: 1fr; margin-top: -10px; }
  .benefit { display: grid; grid-template-columns: 38px 1fr; column-gap: 17px; padding: 18px; }
  .benefit .circle { grid-row: span 2; margin: 0; }
  .benefit strong { align-self: end; }
  .benefit p { margin-top: 3px; }
  .section { padding-top: 55px; padding-bottom: 55px; }
  .test-shell { display: block; padding-top: 20px; }
  .test-sidebar { position: static; margin-bottom: 18px; padding: 19px; }
  .question-map { grid-template-columns: repeat(12, minmax(35px, 1fr)); overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .sidebar-key, .timer-row { display: none; }
  .question-panel { padding: 27px 22px; }
  .result-hero { grid-template-columns: 1fr; text-align: center; padding: 30px 24px; }
  .result-hero p { margin: auto; }
  .score-ring { margin: auto; }
  .result-details { padding-left: 20px; }
}
@media (max-width: 510px) {
  .topics { grid-template-columns: 1fr; }
  .start-area { padding: 42px 0 65px; }
  .start-card { padding: 27px 22px; }
  .start-card h1 { font-size: 31px; }
  .hero-facts { gap: 13px; }
  .sheet-stage { padding: 0 0 20px; }
  .float-score { transform: rotate(1deg); }
  .pivot-grid { grid-template-columns: 1fr; }
  .q-bottom { flex-wrap: wrap; }
  .q-bottom .right { width: 100%; }
  .q-bottom .right .btn { flex: 1; }
  .footer .wrap { display: block; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
