/* 共用阅读材料面板与分屏样式 */
.question-material { box-sizing: border-box; min-width: 0; max-width: 100%; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid #dbe7f4; border-radius: .85rem; background: #f5f9fd; color: #334155; font-weight: 400; text-align: left; transition: padding .18s ease; }
.question-material-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.question-material.is-collapsed { padding: .6rem .9rem; }
.question-material.is-collapsed .question-material-head { margin-bottom: 0; }
.question-material.is-collapsed .question-material-body { display: none; }
.question-material-title-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; cursor: pointer; min-width: 0; }
.question-material-title { color: #264c73; font-size: .8125rem; font-weight: 700; display: inline-flex; align-items: center; }
.question-material-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .72rem; font-weight: 600; }
.question-material-hint { color: #64748b; font-size: .75rem; }
.question-material-actions { display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.qm-btn { padding: 2px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #475569; font-size: .72rem; font-weight: 600; line-height: 1.4; cursor: pointer; transition: all .15s; }
.qm-btn:hover { border-color: #60a5fa; color: #1d4ed8; background: #eff6ff; }

.question-material-body { max-width: 100%; overflow-x: auto; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .9375rem; line-height: 1.85; -webkit-overflow-scrolling: touch; }
.question-material-body p { margin: 0 0 .55em; }
.question-material-body table, .question-stem-text table, .analysis-body table { width: max-content; min-width: 100%; max-width: none; border-collapse: collapse; white-space: normal; font-size: .875rem; margin: .5rem 0; }
.question-material-body td, .question-material-body th, .question-stem-text td, .question-stem-text th, .analysis-body td, .analysis-body th { border: 1px solid #cbd5e1; padding: .45rem .65rem; }
.question-material-body th, .question-stem-text th, .analysis-body th { background: #e7eff8; font-weight: 600; }
.question-material-body img { display: block; max-width: 100%; height: auto; margin: .75rem 0; cursor: zoom-in; border-radius: .5rem; }
.question-material-body pre { max-width: 100%; overflow-x: auto; white-space: pre; font-size: .875rem; }

/* 单题模式桌面端左右分栏（>=1024px 左文右题独立滚动；<1024px 顶部吸顶抽屉） */
.cultural-split-layout { display: flex; flex-direction: column; gap: 1rem; }
.cultural-split-layout > .question-material.is-split-pane { margin-bottom: 0; position: sticky; top: 3.6rem; z-index: 25; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.cultural-split-layout > .question-material.is-split-pane .question-material-body { max-height: 36vh; padding-right: 4px; }
@media (min-width: 1024px) {
    .cultural-split-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
    .cultural-split-layout > .question-material.is-split-pane { position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); display: flex; flex-direction: column; }
    .cultural-split-layout > .question-material.is-split-pane .question-material-body { max-height: calc(100vh - 9.5rem); flex: 1; }
    .cultural-split-layout > .question-card { margin-bottom: 0; }
}
@media (max-width: 480px) { .question-material { padding: .7rem .8rem; } }

/* 文化课富文本语义样式：加点字、居中标题、右对齐落款、辨音下划线 */
.q-dot {
    font-style: normal;
    text-emphasis: filled dot #0f172a;
    text-emphasis-position: under right;
    -webkit-text-emphasis: filled dot #0f172a;
    -webkit-text-emphasis-position: under right;
}
.q-center { text-align: center; font-weight: 600; margin: .4em 0 !important; }
.q-right { text-align: right; margin: .35em 0 !important; color: #475569; }
.question-stem-text u, .question-option-text u, .question-material-body u { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* 完形填空空位高亮与七选五对话实时回填 */
.q-cloze-blank { display: inline-block; min-width: 2.3em; padding: 0 .35em; margin: 0 2px; border-bottom: 1.5px solid #64748b; color: #334155; font-weight: 600; text-align: center; border-radius: 4px 4px 0 0; transition: all .18s; }
.q-cloze-blank.is-active { background: #fef08a; border-bottom: 2.5px solid #2563eb; color: #1d4ed8; font-weight: 800; box-shadow: 0 0 0 2px rgba(37, 99, 235, .15); }
.q-dialogue-slot { display: inline-block; padding: 1px 8px; margin: 0 3px; border-bottom: 1.5px dashed #94a3b8; border-radius: 6px; background: #fff; color: #64748b; font-size: .88em; }
.q-dialogue-slot.is-filled { border: 1px solid #93c5fd; background: #eff6ff; color: #1e3a8a; font-weight: 500; }
.q-dialogue-slot.is-filled strong { color: #2563eb; margin-right: 2px; }

/* 无外部依赖的数学公式精致排版 (.q-math) */
.q-math {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1px;
    font-family: "Cambria Math", "Times New Roman", "STIX Two Math", "Songti SC", serif;
    font-size: 1.04em;
    line-height: 1.35;
    padding: 0 2px;
    vertical-align: middle;
}
.q-math-block { display: flex; justify-content: center; width: 100%; margin: .55rem 0; padding: .4rem .5rem; overflow-x: auto; font-size: 1.08em; }
.q-math sup, .q-math sub { font-size: .74em; line-height: 1; }
.q-math-fn, .q-math-rm { font-style: normal; font-family: "Times New Roman", "PingFang SC", sans-serif; }
.q-math-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; font-size: .92em; line-height: 1.15; }
.q-math-num { padding: 0 4px 1px; border-bottom: 1.2px solid currentColor; text-align: center; width: 100%; }
.q-math-den { padding: 1px 4px 0; text-align: center; width: 100%; }
.q-math-sqrt { display: inline-flex; align-items: stretch; vertical-align: middle; margin: 0 1px; }
.q-math-root { font-size: .65em; margin-right: -2px; align-self: flex-start; transform: translateY(-2px); }
.q-math-rad { font-size: 1.08em; line-height: 1; padding-top: 1px; font-family: serif; }
.q-math-radicand { border-top: 1.2px solid currentColor; padding: 1px 3px 0 2px; }
.q-math-vec, .q-math-bar { position: relative; display: inline-block; padding-top: 2px; border-top: 1.2px solid currentColor; line-height: 1.05; margin: 0 1px; }
.q-math-vec::after { content: "›"; position: absolute; right: -2px; top: -7px; font-size: .72em; font-weight: 700; line-height: 1; }
.q-math-cases { display: inline-flex; align-items: center; vertical-align: middle; margin: 2px 4px; }
.q-math-brace { font-size: 2.1em; font-weight: 300; line-height: 1; margin-right: 4px; font-family: serif; }
.q-math-cases-rows { display: inline-flex; flex-direction: column; gap: 3px; text-align: left; }
.q-math-case-row { display: flex; gap: 10px; align-items: baseline; }

/* 主观题作文工作台补充样式（不依赖运行时 Tailwind JIT） */
.essay-progress-track { height: 6px; width: 100%; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.essay-progress-bar { height: 100%; background: #a855f7; border-radius: 999px; transition: width .28s ease, background-color .28s ease; }
.essay-progress-bar.is-ok { background: #10b981; }
.essay-textarea-lg { min-height: 14.5rem; }
.essay-textarea-md { min-height: 10.5rem; }
