    :root {
      color-scheme: light;
      --navy: #0b1f33;
      --navy-2: #132f49;
      --ink: #16202b;
      --muted: #657382;
      --line: #dce3e8;
      --paper: #f4f6f7;
      --white: #fff;
      --amber: #f4b63e;
      --amber-soft: #fff4d9;
      --blue: #1769aa;
      --blue-soft: #e8f2fb;
      --green: #1b7a55;
      --green-soft: #e9f7f1;
      --red: #b43b42;
      --red-soft: #fff0f1;
      --shadow: 0 18px 54px rgba(11,31,51,.10);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
    body { min-height: 100vh; }
    button, input { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible { outline: 3px solid rgba(244,182,62,.55); outline-offset: 2px; }

    .app { min-height: 100vh; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
    .sidebar {
      position: sticky; top: 0; height: 100vh; overflow-y: auto;
      padding: 28px 22px 22px; color: white;
      background:
        linear-gradient(160deg, rgba(255,255,255,.05), transparent 30%),
        var(--navy);
    }
    .brand { display: flex; gap: 13px; align-items: center; margin-bottom: 30px; }
    .brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: var(--amber); color: var(--navy); font-weight: 900; font-size: 20px; box-shadow: 0 9px 25px rgba(244,182,62,.22); }
    .brand-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
    .brand-sub { margin-top: 2px; color: #9eb1c2; font-size: 12px; }

    .score-card { padding: 18px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.055); }
    .score-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .accuracy { font-size: 34px; font-weight: 850; letter-spacing: -.05em; }
    .accuracy-label { color: #9eb1c2; font-size: 12px; }
    .road-ring { --value: 0deg; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--amber) var(--value), rgba(255,255,255,.11) 0); }
    .road-ring::after { content: ""; width: 39px; height: 39px; border-radius: 50%; background: var(--navy-2); }
    .score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
    .score-metric { border-top: 1px solid rgba(255,255,255,.10); padding-top: 12px; }
    .score-metric strong { display: block; font-size: 16px; }
    .score-metric span { color: #9eb1c2; font-size: 11px; }

    .side-label { margin: 27px 10px 9px; color: #7890a5; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
    .mode-list { display: grid; gap: 7px; }
    .mode-button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 0; border-radius: 12px; background: transparent; color: #c9d4dd; text-align: left; font-weight: 650; }
    .mode-button:hover { background: rgba(255,255,255,.06); }
    .mode-button.active { color: white; background: rgba(244,182,62,.14); box-shadow: inset 3px 0 var(--amber); }
    .mode-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 13px; }
    .mode-button.active .mode-icon { color: var(--navy); background: var(--amber); }
    .mode-count { margin-left: auto; min-width: 27px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: #aac0d0; text-align: center; font-size: 11px; }

    .side-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .ghost-dark { padding: 9px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: transparent; color: #b8c7d2; font-size: 12px; }
    .ghost-dark:hover { border-color: rgba(255,255,255,.28); color: white; }
    .sidebar-note { margin-top: 19px; color: #7890a5; font-size: 11px; line-height: 1.6; }

    .workspace { min-width: 0; }
    .topbar { height: 76px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(244,246,247,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
    .mode-heading { min-width: 0; }
    .mode-heading h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
    .mode-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
    .jump-wrap { display: flex; align-items: center; gap: 9px; }
    .topbar-actions { display: flex; align-items: center; gap: 14px; }
    .exam-timer { display: none; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 11px; background: var(--navy); color: white; font-variant-numeric: tabular-nums; font-weight: 850; letter-spacing: .04em; }
    .exam-timer.show { display: flex; }
    .exam-timer.warning { background: var(--red); animation: timerPulse 1.4s ease-in-out infinite; }
    @keyframes timerPulse { 50% { box-shadow: 0 0 0 5px rgba(180,59,66,.14); } }
    .jump-wrap label { color: var(--muted); font-size: 13px; }
    .jump-input { width: 92px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
    .small-button { padding: 9px 12px; border: 0; border-radius: 10px; background: var(--navy); color: white; font-weight: 750; }
    .small-button:hover { background: var(--navy-2); }

    .content { width: min(940px, calc(100% - 56px)); margin: 0 auto; padding: 31px 0 52px; }
    .session-row { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
    .wrong-mode-switch { display: none; width: fit-content; margin: 0 0 15px auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
    .wrong-mode-switch.show { display: flex; }
    .wrong-mode-button { padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
    .wrong-mode-button.active { background: var(--navy); color: white; }
    .progress-track { height: 7px; flex: 1; overflow: hidden; border-radius: 99px; background: #dfe5e8; }
    .progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--amber), #e9962f); transition: width .28s ease; }
    .progress-text { color: var(--muted); font-size: 12px; white-space: nowrap; }

    .question-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
    .lane-stripe { height: 6px; background: repeating-linear-gradient(90deg, var(--amber) 0 58px, transparent 58px 83px), var(--navy); }
    .question-body { padding: 31px 34px 25px; }
    .question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
    .question-number { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); font-weight: 850; }
    .question-number::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
    .badges { display: flex; align-items: center; gap: 7px; }
    .badge { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: #eef2f4; font-size: 11px; font-weight: 750; }
    .question-text { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(21px, 2.25vw, 28px); line-height: 1.43; letter-spacing: -.012em; }
    .question-image-wrap { margin: 23px 0 2px; display: grid; gap: 12px; }
    .question-image { display: block; max-width: min(100%, 760px); max-height: 340px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: #f7f8f8; }

    .options { margin-top: 27px; display: grid; gap: 11px; }
    .option { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) 24px; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: white; color: var(--ink); text-align: left; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
    .option:not(:disabled):hover { transform: translateY(-1px); border-color: #9bb2c3; background: #fbfcfc; }
    .option-key { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #eef2f4; color: var(--navy); font-weight: 850; }
    .option-text { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.45; }
    .option-mark { color: transparent; font-weight: 900; }
    .option.correct { border-color: #7fc0a7; background: var(--green-soft); }
    .option.correct .option-key { background: var(--green); color: white; }
    .option.correct .option-mark { color: var(--green); }
    .option.wrong { border-color: #e29ba0; background: var(--red-soft); }
    .option.wrong .option-key { background: var(--red); color: white; }
    .option.wrong .option-mark { color: var(--red); }
    .option.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
    .option.selected .option-key { background: var(--blue); color: white; }
    .option:disabled { cursor: default; opacity: 1; }

    .feedback { display: none; margin-top: 18px; padding: 15px 17px; border-radius: 14px; line-height: 1.45; }
    .feedback.show { display: flex; align-items: flex-start; gap: 12px; }
    .feedback.correct { background: var(--green-soft); color: #145e42; }
    .feedback.wrong { background: var(--red-soft); color: #913037; }
    .feedback-symbol { font-size: 21px; font-weight: 900; line-height: 1; }
    .feedback strong { display: block; margin-bottom: 3px; }
    .master-button { margin: 11px 0 0; padding: 8px 11px; border: 1px solid currentColor; border-radius: 9px; background: transparent; color: inherit; font-weight: 750; }

    .card-footer { min-height: 76px; padding: 14px 23px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: #fbfcfc; }
    .footer-group { display: flex; gap: 9px; }
    .nav-button { min-width: 102px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font-weight: 760; }
    .nav-button:hover:not(:disabled) { border-color: #9bb2c3; }
    .nav-button.primary { border-color: var(--navy); background: var(--navy); color: white; }
    .nav-button.primary:hover:not(:disabled) { background: var(--navy-2); }
    .nav-button.danger-button { border-color: #e29ba0; background: var(--red-soft); color: var(--red); }
    .nav-button.danger-button:hover:not(:disabled) { border-color: var(--red); background: #ffe4e6; }
    .nav-button:disabled { cursor: not-allowed; opacity: .42; }
    .redo-button { padding: 10px 13px; border: 0; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 750; }
    .shortcut { color: #8a959e; font-size: 11px; }

    .empty { display: none; padding: 72px 30px; text-align: center; }
    .empty.show { display: block; }
    .empty-icon { width: 66px; height: 66px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 20px; background: var(--green-soft); color: var(--green); font-size: 28px; font-weight: 900; }
    .empty h2 { margin: 0 0 8px; }
    .empty p { margin: 0 auto 22px; max-width: 450px; color: var(--muted); line-height: 1.6; }
    .exam-panel { display: none; padding: 52px 34px 58px; text-align: center; }
    .exam-panel.show { display: block; }
    .exam-emblem { width: 72px; height: 72px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 22px; background: var(--amber-soft); color: #9a6100; font-size: 27px; font-weight: 900; }
    .exam-panel h2 { margin: 0 0 9px; font-size: 28px; letter-spacing: -.03em; }
    .exam-panel > p { max-width: 560px; margin: 0 auto; color: var(--muted); line-height: 1.65; }
    .exam-metrics { width: min(520px, 100%); margin: 28px auto; display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #f8fafb; }
    .exam-metric { padding: 17px 10px; border-right: 1px solid var(--line); }
    .exam-metric:last-child { border-right: 0; }
    .exam-metric strong { display: block; color: var(--navy); font-size: 22px; }
    .exam-metric span { color: var(--muted); font-size: 12px; }
    .exam-result-score { margin: 10px 0 3px; color: var(--navy); font-size: 68px; line-height: 1; font-weight: 900; letter-spacing: -.06em; }
    .exam-result-score.pass { color: var(--green); }
    .exam-result-score.fail { color: var(--red); }
    .exam-panel-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
    .group-grid { width: min(660px, 100%); margin: 28px auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .group-button { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); text-align: left; font-weight: 800; }
    .group-button:hover { border-color: var(--blue); background: var(--blue-soft); }
    .group-button span { color: var(--muted); font-size: 12px; font-weight: 600; }
    .exam-sheet-summary { margin: 14px 0 18px; color: var(--muted); font-size: 13px; }
    .answer-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
    .answer-cell { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 12px; font-weight: 750; }
    .answer-cell.answered { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
    .answer-cell.current { box-shadow: 0 0 0 2px var(--amber); }
    .exam-footer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

    .modal-backdrop { position: fixed; inset: 0; z-index: 30; display: none; place-items: center; padding: 22px; background: rgba(6,18,29,.58); }
    .modal-backdrop.show { display: grid; }
    .modal { width: min(520px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 25px; border-radius: 20px; background: white; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
    .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
    .modal h2 { margin: 0; font-size: 20px; }
    .close-button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #eef2f4; color: var(--ink); font-size: 20px; }
    .modal p { color: var(--muted); line-height: 1.65; }
    .data-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
    .data-button { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: white; font-weight: 750; }
    .data-button:hover { border-color: #9bb2c3; }
    .danger { color: var(--red); }
    .modal-footnote { padding-top: 15px; border-top: 1px solid var(--line); font-size: 12px; }
    .hidden-input { display: none; }
    .toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 12px 16px; border-radius: 11px; background: var(--navy); color: white; box-shadow: 0 12px 34px rgba(11,31,51,.24); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s ease; }
    .toast.show { transform: translateY(0); opacity: 1; }

    @media (max-width: 840px) {
      .app { grid-template-columns: 1fr; }
      .sidebar { position: relative; height: auto; overflow: visible; padding: 18px 18px 16px; }
      .brand { margin-bottom: 15px; }
      .score-card { display: none; }
      .side-label { display: none; }
      .mode-list { display: flex; overflow-x: auto; padding-bottom: 4px; }
      .mode-button { min-width: 112px; justify-content: center; padding: 10px 8px; }
      .mode-icon, .mode-count { display: none; }
      .side-actions { position: absolute; top: 20px; right: 18px; margin: 0; display: flex; }
      .sidebar-note { display: none; }
      .topbar { position: relative; height: auto; padding: 18px 22px; flex-wrap: wrap; }
      .topbar-actions { margin-left: auto; }
      .content { width: min(100% - 28px, 940px); padding-top: 21px; }
    }
    @media (max-width: 560px) {
      .brand-sub { display: none; }
      .brand-mark { width: 38px; height: 38px; }
      .brand-title { font-size: 16px; }
      .side-actions .ghost-dark:first-child { display: none; }
      .mode-list { gap: 4px; }
      .mode-button { font-size: 12px; }
      .topbar { align-items: flex-end; }
      .jump-wrap label { display: none; }
      .question-body { padding: 24px 18px 21px; }
      .question-meta { align-items: flex-start; }
      .badges { flex-wrap: wrap; justify-content: flex-end; }
      .option { grid-template-columns: 36px minmax(0,1fr) 18px; gap: 10px; padding: 12px; }
      .option-key { width: 34px; height: 34px; }
      .option-text { font-size: 16px; }
      .card-footer { padding: 13px; }
      .shortcut { display: none; }
      .nav-button { min-width: 0; }
      .data-actions { grid-template-columns: 1fr; }
      .exam-panel { padding: 38px 18px 44px; }
      .exam-metrics { grid-template-columns: 1fr; }
      .exam-metric { border-right: 0; border-bottom: 1px solid var(--line); }
      .exam-metric:last-child { border-bottom: 0; }
      .answer-grid { grid-template-columns: repeat(5, 1fr); }
      .group-grid { grid-template-columns: 1fr; }
      .wrong-mode-switch { width: 100%; margin-left: 0; }
      .wrong-mode-button { flex: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    }
