.answer-page { --sidebar: 224px; }
.answer-page .sidebar { border-color: #e9eee9; }
.answer-side-note { display: flex; align-items: center; gap: 10px; padding: 48px 8px 24px; }
.answer-side-note img { flex-shrink: 0; }
.answer-side-note p { color: #607666; font-size: 12px; line-height: 1.8; }
.answer-topbar { height: 70px; padding: 0 36px; }
.answer-back { display: inline-flex; gap: 10px; align-items: center; color: #526a5a; }
.answer-back svg { width: 17px; height: 17px; transform: rotate(180deg); }
.top-subject { border-left: 1px solid #e2eae3; padding-left: 16px; color: #5d7264; font-size: 12px; }
.answer-main { max-width: 1160px; padding: 30px 36px 52px; margin: auto; }
.session-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.session-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.session-eyebrow { color: #657c6c; font-size: 12px; margin-bottom: 5px; }
.session-heading h1 { font-size: 25px; font-weight: 700; line-height: 1.5; }
.mode-switch { display: flex; padding: 4px; gap: 4px; background: #f2f6f1; border: 1px solid #e7ede4; border-radius: 8px; flex-shrink: 0; }
.mode-switch button { padding: 8px 14px; font-size: 13px; border-radius: 5px; color: #63746a; min-height: 36px; }
.mode-switch button[aria-pressed="true"] { background: #fff; color: #236b3b; box-shadow: 0 1px 4px #21442a12; font-weight: 650; }
.session-progress { display: flex; align-items: center; gap: 14px; margin: 22px 0 30px; font-size: 12px; color: #5d7465; }
.session-progress progress { appearance: none; border: 0; background: #eaf2e7; color: #36bc5d; border-radius: 3px; height: 5px; width: 160px; overflow: hidden; }
progress::-webkit-progress-bar { background: #eaf2e7; }
progress::-webkit-progress-value { background: #36bc5d; border-radius: 3px; transition: width .2s; }
progress::-moz-progress-bar { background: #36bc5d; }
.answer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 36px; align-items: start; }
.answer-column { min-width: 0; }
.question-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.question-context { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #607365; font-size: 12px; }
.type-label { background: #edf7e9; padding: 3px 8px; color: #397044; border-radius: 4px; font-weight: 600; }
.question-position { color: #7a887f; font-variant-numeric: tabular-nums; }
.question-tools { display: flex; gap: 3px; flex-shrink: 0; }
.question-tools .icon-button { color: #617867; }
#save-question[aria-pressed="true"] { background: #fff1c2; color: #8a6715; }
#save-question[aria-pressed="true"] svg { fill: #ffe5a0; }
#question-heading { font-size: 19px; line-height: 1.95; font-weight: 400; color: #263b2f; margin: 18px 0 24px; overflow-wrap: anywhere; }
#question-options { padding: 0; border: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.answer-choice { position: relative; display: grid; grid-template-columns: 33px minmax(0, 1fr) 20px; align-items: center; gap: 13px; padding: 14px 16px; min-height: 66px; border: 1px solid #dfe7df; border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s; }
.answer-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.answer-choice .option-key { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 6px; background: #f2f5f1; font-size: 15px; font-weight: 650; color: #506457; }
.answer-choice .option-text { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.option-state { width: 20px; height: 20px; }
.option-state svg { width: 19px; height: 19px; }
.answer-choice:hover:not(.locked) { border-color: #99cfa4; background: #f7fcf4; }
.answer-choice:has(input:focus-visible) { outline: 2px solid #198442; outline-offset: 3px; }
.answer-choice.selected { border-color: #35b85b; background: #eefbec; box-shadow: inset 0 0 0 1px #35b85b; }
.answer-choice.selected .option-key { color: #1a6533; background: #d8f5ce; }
.answer-choice.locked { cursor: default; }
.answer-choice.is-correct { border-color: var(--answer-correct-border); background: var(--answer-correct-surface); }
.answer-choice.is-correct .option-key { color: #fff; background: #2e914c; }
.answer-choice.is-correct .option-state { color: #268443; }
.answer-choice.is-wrong { border-color: var(--answer-wrong-border); background: var(--answer-wrong-surface); box-shadow: none; }
.answer-choice.is-wrong .option-key { color: #983e30; background: #f9ddd4; }
.answer-choice.is-wrong .option-state { color: #b35844; }
.answer-actions { display: flex; gap: 12px; align-items: center; padding: 20px 0; margin-top: 7px; }
.previous-button { display: grid; place-items: center; width: 42px; height: 44px; border: 1px solid #dfe8df; border-radius: 7px; color: #546d5b; flex-shrink: 0; }
.previous-button svg { transform: rotate(180deg); width: 17px; height: 17px; }
.previous-button:hover:not(:disabled) { background: #f0f8ec; }
.previous-button:disabled { opacity: .35; cursor: default; }
.selection-status { color: #5c7465; font-size: 12px; margin-right: auto; }
.explanation-button { font-size: 12px; color: #326e42; padding: 10px 5px; white-space: nowrap; }
.explanation-button:hover { color: #174d28; text-decoration: underline; }
.answer-actions > .check-button { margin-left: auto; }
.check-button { display: inline-flex; gap: 10px; justify-content: center; align-items: center; min-width: 145px; min-height: 46px; padding: 10px 21px; background: var(--answer-action); color: var(--answer-action-ink); border: 1px solid var(--answer-action-border); border-bottom-width: 3px; border-radius: 8px; font-size: 14px; font-weight: 650; }
.check-button:hover:not(:disabled) { background: var(--answer-action-hover); }
.check-button:active:not(:disabled) { transform: translateY(1px); }
.check-button:disabled { background: #edf2e9; border-color: #e1e8dc; color: #85917f; cursor: default; }
.check-button svg { width: 18px; height: 18px; }
.answer-card { border-left: 1px solid #e7eee6; padding-left: 25px; position: sticky; top: 25px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 20px; }
.card-heading h2 { font-size: 15px; font-weight: 650; }
.card-heading > span { font-size: 12px; color: #718374; }
.question-map { display: grid; grid-template-columns: repeat(3, 42px); gap: 10px; }
.card-pagination { display: flex; align-items: center; gap: 4px; margin-top: 16px; }
.card-pagination select { flex: 1; min-width: 0; width: 80px; min-height: 36px; border: 1px solid #dfe6dc; background: #fff; color: #36563f; border-radius: 6px; font: inherit; font-size: 12px; }
.card-pagination .icon-button { width: 30px; }
.card-page-back svg { transform: rotate(180deg); }
.card-pagination button:disabled { opacity: .4; cursor: default; }
.group-note { color: #617368; font-size: 12px; line-height: 1.7; margin: -10px 0 24px; }
.map-cell { position: relative; width: 42px; height: 42px; background: #f6f8f4; border: 1px solid #dfe6dc; border-radius: 7px; font-size: 13px; color: #5e7063; font-variant-numeric: tabular-nums; }
.map-cell[aria-current="true"] { outline: 2px solid #4c8b59; outline-offset: 3px; font-weight: 650; }
.map-cell.correct { background: #dff5d8; border-color: #8ec988; color: #306539; }
.map-cell.wrong { background: #ffede5; border-color: #dcac97; color: #9b5843; }
.map-cell.saved::after { content: ''; position: absolute; width: 6px; height: 6px; right: 4px; top: 4px; background: #e4a727; border-radius: 50%; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 10px; color: #5e7263; margin: 20px 0 24px; }
.map-legend span { display: inline-flex; gap: 5px; align-items: center; }
.map-legend i { width: 7px; height: 7px; border: 1px solid #d6ded0; background: #f3f6ef; border-radius: 2px; }
.map-legend .correct-dot { background: #a6d697; border-color: #a6d697; }
.map-legend .wrong-dot { background: #eeb9a0; border-color: #eeb9a0; }
.session-stats { margin: 0; border-top: 1px solid #edf1e9; padding-top: 14px; font-size: 12px; }
.session-stats div { display: flex; justify-content: space-between; margin: 12px 0; gap: 10px; }
.session-stats dt { color: #6b7b70; }
.session-stats dd { margin: 0; color: #36563f; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-button { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: #45634d; font-size: 12px; }
.summary-button svg { width: 14px; height: 14px; }
.restart-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 0; color: #526b59; font-size: 12px; }
.restart-button svg { width: 16px; height: 16px; }
.restart-button:hover { color: #206b35; }
.header-restart { min-width: 100px; padding: 8px 12px; background: #edf9e8; color: #256e38; border: 1px solid #b0d7a8; border-radius: 7px; font-weight: 600; white-space: nowrap; }
.header-restart:hover { background: #def2d5; border-color: #76b56d; }
.quiet-encouragement { font-size: 12px; line-height: 1.9; color: #647959; margin-top: 26px; }
#card-toggle, #card-close, #action-card-toggle { display: none; }
.answer-review { padding-top: 8px; }
.answer-result { border-left: 3px solid #56b966; background: #f0f9ed; padding: 16px 19px; display: flex; align-items: center; gap: 13px; }
.answer-result.incorrect { border-color: #dcaa78; background: #fff8ed; }
.answer-result img { width: 46px; height: 46px; flex-shrink: 0; }
.answer-result h3 { font-size: 17px; font-weight: 650; margin: 0 0 4px; }
.answer-result p { color: #55725a; font-size: 13px; line-height: 1.7; }
.review-section { margin-top: 27px; }
.review-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; font-weight: 650; }
.review-section h3 svg { color: #499653; width: 18px; height: 18px; }
.review-section p { font-size: 15px; line-height: 2; color: #405749; margin: 10px 0; }
.option-analysis { margin: 0; }
.option-analysis > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 13px; padding: 12px 0; border-bottom: 1px solid #edf1eb; }
.option-analysis dt { width: 28px; height: 28px; border-radius: 5px; background: #f0f4ed; display: grid; place-items: center; font-size: 13px; color: #617463; font-weight: 650; }
.option-analysis dd { margin: 0; font-size: 14px; color: #4b6051; line-height: 1.9; }
.option-analysis .correct dt { background: #dbf2d2; color: #287043; }
.pitfall { border-left: 3px solid #e5c267; padding-left: 17px; }
.review-section ul { padding-left: 20px; color: #48614e; font-size: 14px; line-height: 1.95; }
.review-next { display: flex; justify-content: flex-end; padding-top: 25px; }
.answer-footnote { border-top: 1px solid #e9eee6; padding: 19px 0; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; font-size: 11px; color: #70806f; }
.answer-footnote a { font-size: 12px; }
.collection-intro { margin: 18px 0; font-size: 14px; color: #55705e; }
.collection-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 20px; margin-top: 22px; }
.summary-actions { margin: 12px 0 18px; justify-content: flex-start; }
.restart-description { font-size: 15px; color: #526b5a; line-height: 1.9; margin: 8px 0 28px; }
.cancel-button { border: 1px solid #dce6d9; border-radius: 7px; color: #4d6655; min-height: 46px; padding: 10px 18px; font-size: 14px; }
.cancel-button:hover { background: #f4f8f0; }
.collection-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px 3px; border-bottom: 1px solid #eaf0e6; }
.collection-row > span:first-child { color: #6a7c6a; font-size: 12px; flex-shrink: 0; }
.collection-row strong { font-size: 14px; font-weight: 550; line-height: 1.7; flex: 1; }
.collection-row small { white-space: nowrap; color: #4e7859; font-size: 11px; }
.collection-row small.wrong { color: #a15e41; }
.collection-empty { padding: 28px 0 8px; text-align: center; }
.collection-empty p { color: #627763; font-size: 14px; line-height: 1.8; margin-bottom: 22px; }
.summary-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid #e8eee3; }
.summary-totals strong { display: block; font-size: 24px; color: #315d3f; }
.summary-totals span { font-size: 12px; color: #6a7b67; }
.answer-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 10px 18px; background: #254e32; color: white; border-radius: 7px; font-size: 13px; max-width: calc(100% - 32px); }
@media (max-width: 1199px) {
  .answer-page { --sidebar: 196px; }
  .answer-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .answer-main { max-width: 850px; padding: 27px 28px 40px; }
  .answer-topbar { padding: 0 28px; }
  #card-toggle { display: inline-flex; margin-left: auto; font-size: 12px; min-height: 32px; }
  #action-card-toggle { display: inline-flex; width: 36px; height: 44px; flex-shrink: 0; color: #4b7058; }
  .answer-card { display: none; position: static; border: 0; padding: 0 0 25px; margin-bottom: 25px; border-bottom: 1px solid #e3ebdf; }
  .answer-card.is-open { display: block; grid-row: 1; }
  #card-close { display: inline-flex; margin-left: auto; }
  .card-heading { margin: 0 0 15px; justify-content: flex-start; }
  .session-stats { display: flex; gap: 30px; margin-top: 15px; }
  .session-stats div { gap: 10px; }
  .map-legend { margin: 18px 0 5px; }
  .summary-button { width: auto; gap: 15px; margin-top: 5px; }
  .quiet-encouragement { display: none; }
  .session-heading { gap: 15px; }
  .session-heading h1 { font-size: 23px; }
  .mode-switch button { padding: 7px 10px; font-size: 12px; }
  #question-heading { font-size: 18px; }
}
.answer-page.is-collapsed { --sidebar: 76px; }
.answer-page.is-collapsed .answer-side-note { display: none; }
@media (max-width: 839px) {
  .answer-page { --sidebar: 76px; }
  .answer-side-note { display: none; }
  .answer-page.nav-expanded { --sidebar: 224px; }
}
@media (max-width: 699px) {
  .answer-page { --sidebar: 0px; }
  .answer-topbar { height: 60px; padding: 0 18px; }
  .top-subject { display: none; }
  .answer-main { padding: 21px 20px 30px; }
  .session-heading { flex-direction: column; align-items: stretch; gap: 17px; }
  .session-heading h1 { font-size: 22px; }
  .session-tools { justify-content: space-between; gap: 8px; }
  .header-restart { padding: 8px 10px; gap: 6px; }
  .mode-switch { align-self: flex-start; }
  .mode-switch button { min-height: 32px; padding: 5px 15px; }
  .session-progress { margin: 16px 0 21px; gap: 10px; }
  .session-progress progress { width: 85px; }
  .question-context { gap: 8px; font-size: 11px; }
  .question-position { display: none; }
  .question-tools .icon-button { width: 32px; height: 34px; }
  #question-heading { font-size: 17px; line-height: 1.95; margin: 15px 0 22px; }
  .answer-choice { grid-template-columns: 29px minmax(0, 1fr) 17px; padding: 12px 11px; gap: 10px; min-height: 65px; }
  .answer-choice .option-key { width: 29px; height: 31px; font-size: 14px; }
  .answer-choice .option-text { font-size: 14px; line-height: 1.85; }
  .option-state { width: 17px; height: 17px; }
  .answer-actions { position: sticky; bottom: 0; background: #fffffffa; padding: 13px 0 max(13px, env(safe-area-inset-bottom)); gap: 9px; border-top: 1px solid #edf1e9; z-index: 3; margin-top: 20px; }
  .selection-status { font-size: 11px; }
  .check-button { min-width: 122px; min-height: 45px; padding: 9px 14px; font-size: 13px; gap: 7px; }
  .previous-button { width: 36px; }
  .explanation-button { font-size: 12px; padding: 10px 0; }
  .answer-review { padding-top: 14px; }
  .answer-result { padding: 15px 13px; gap: 10px; }
  .answer-result h3 { font-size: 16px; }
  .answer-result p { font-size: 12px; }
  .review-section p { font-size: 14px; }
  .answer-card .session-stats { gap: 20px; }
  .review-next { padding-bottom: 12px; }
}
@media (max-width: 359px) {
  .answer-main { padding-left: 14px; padding-right: 14px; }
  .check-button { min-width: 111px; padding-left: 11px; padding-right: 11px; }
  .answer-actions { gap: 7px; }
  .selection-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .collection-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .answer-side-note { display: none; }
}

.storage-status { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.storage-warning { color: #8c511c; background: #fff6dd; padding: 10px 12px; border-radius: 6px; }
.practice-status { padding: 40px 0; line-height: 1.8; color: var(--muted); }
.review-next { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.question-tools .icon-button, #card-close, .answer-topbar .icon-button, .card-pagination .icon-button { width: 44px; height: 44px; }
.previous-button, #action-card-toggle { width: 44px; height: 44px; }
.question-map { grid-template-columns: repeat(3, 44px); }
.map-cell { width: 44px; height: 44px; }
.card-pagination select { min-height: 44px; }
.mode-switch button, .header-restart, #card-toggle, .explanation-button { min-height: 44px; }
.option-analysis dd, .review-section ul { font-size: 15px; }
.answer-footnote { font-size: 12px; }

#feedback-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; }
#feedback-dialog .dialog-header { gap: 12px; }
#feedback-dialog .dialog-header h2 { font-size: 21px; }
#feedback-dialog .icon-button { width: 44px; height: 44px; }
.feedback-location { color: #66766b; font-size: 12px; margin: 12px 0 5px; }
.feedback-question { font-size: 15px; line-height: 1.8; font-weight: 600; overflow-wrap: anywhere; }
.feedback-channel-status { margin-top: 12px; color: #785512; font-size: 13px; }
#feedback-form label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 600; }
#feedback-form select, #feedback-form textarea { display: block; width: 100%; max-width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cbd7cc; border-radius: 6px; background: white; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.7; }
#feedback-form select { min-height: 44px; }
#feedback-form textarea { resize: vertical; min-height: 112px; }
#feedback-form textarea::placeholder { color: #6d7a71; }
#feedback-form :is(select, textarea, summary):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.feedback-draft-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; color: #647269; font-size: 12px; }
#feedback-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
#feedback-preview { margin-top: 8px; }
#feedback-preview summary { min-height: 44px; padding: 11px 0; font-size: 13px; color: #346344; cursor: pointer; }
#feedback-preview textarea { font-size: 13px; background: #fafcf9; }
.feedback-result { min-height: 24px; margin: 8px 0; color: #326442; font-size: 13px; }
.feedback-actions { display: flex; justify-content: flex-end; }
@media (max-width: 699px) {
  .review-section p { font-size: 15px; }
  .answer-actions { gap: 6px; }
  .answer-actions .previous-button, #action-card-toggle { width: 44px; height: 44px; }
  .answer-actions .check-button { min-width: 104px; padding-left: 8px; padding-right: 8px; }
  .selection-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #feedback-dialog { padding: 18px; }
  #feedback-form select, #feedback-form textarea, #feedback-preview textarea { font-size: 16px; }
  .feedback-actions .check-button { width: 100%; }
}
body[data-public-question]:not(.practice-ready) #practice-workspace button,
body[data-public-question]:not(.practice-ready) .session-tools,
body[data-public-question]:not(.practice-ready) .answer-actions,
body[data-public-question]:not(.practice-ready) .session-stats,
body[data-public-question]:not(.practice-ready) .map-legend { display: none; }
.public-explanation > summary { cursor: pointer; padding: 16px 0; color: var(--text, #222); font-weight: 650; }
.public-explanation[open] > summary { border-bottom: 1px solid #e6e9e6; }
