/* ==========================================================================
   JLPT.css - JLPT 模块样式（二级导航沿用项目通用样式，参照 Grammar.css）
   ========================================================================== */

/* 1. 容器 */
.jlpt-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: #fafafa;
    width: 100%;
    position: relative;
}

.jlpt-fixed-header {
    position: relative;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* 2. 二级导航 */
.jlpt-sub-nav-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 58px;
    background: #fff !important;
    padding: 0 0 0 24px !important;
    box-sizing: border-box;
    z-index: 6000;
}

.jlpt-sub-nav-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
    z-index: 25;
}

.jlpt-sub-nav-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 58px;
    background: #fff;
    z-index: 20;
}

.jlpt-sub-nav-bar {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 20px !important;
    padding: 0 10px !important;
    height: 64px !important;
    overflow-x: auto;
    align-items: center;
    scroll-behavior: smooth;
}

.jlpt-sub-nav-bar::-webkit-scrollbar {
    display: none;
}

.jlpt-sub-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 2px !important;
    gap: 1px !important;
    min-width: 56px;
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.jlpt-sub-icon {
    width: 28px !important;
    height: 28px !important;
    color: rgba(29, 29, 31, 0.88) !important;
    stroke: currentColor !important;
    fill: none;
}

.jlpt-sub-label {
    font-size: 13px !important;
    font-weight: 500;
    color: rgba(29, 29, 31, 0.55) !important;
    margin-top: -1px !important;
    white-space: nowrap;
}

.jlpt-sub-item:hover:not(.active) .jlpt-sub-label {
    color: #0066cc !important;
}

.jlpt-sub-item.active .jlpt-sub-label {
    color: rgba(29, 29, 31, 0.88) !important;
    text-shadow: 0.4px 0 0 currentColor;
}

.jlpt-sub-item.active .jlpt-sub-icon {
    color: rgba(29, 29, 31, 0.88) !important;
}

/* VIP 模块锁标：仅未解锁（vipOnly 且非 VIP）时渲染，角标定位依赖 item 的 position */
.jlpt-sub-item {
    position: relative;
}

.jlpt-sub-item .jlpt-sub-lock {
    position: absolute;
    top: 1px;
    right: 3px;
    width: 11px;
    height: 11px;
    stroke: #b8860b;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* VIP 未解锁视觉：图标与文字淡化提示 */
.jlpt-sub-item.vip-locked .jlpt-sub-icon {
    opacity: 0.45;
}

.jlpt-sub-item.vip-locked .jlpt-sub-label {
    color: rgba(29, 29, 31, 0.35) !important;
}

/* VIP 门禁弹层 */
.jlpt-vip-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.jlpt-vip-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 22px 28px 18px;
    width: 320px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.jlpt-vip-dialog-lock {
    width: 34px;
    height: 34px;
    stroke: #b8860b;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jlpt-vip-dialog-title {
    margin: 10px 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
}

.jlpt-vip-dialog-desc {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(29, 29, 31, 0.65);
}

.jlpt-vip-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.jlpt-vip-btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: #1d1d1f;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.jlpt-vip-btn.primary {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.jlpt-vip-btn:hover {
    filter: brightness(0.96);
}

/* 3. 内容滚动区 */
.jlpt-content-scroll-area {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0;
    padding: 24px 28px 40px;
}

.jlpt-content-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.jlpt-content-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.jlpt-content-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* 4. 详情头 */
.jlpt-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.jlpt-detail-header {
    margin-bottom: 28px;
}

.jlpt-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px;
}

.jlpt-detail-desc {
    font-size: 14px;
    color: #86868b;
    line-height: 1.6;
    margin: 0;
}

/* 标题行内的级别单选（N1 / N2 / N3），与「请选择模拟考试的级别」同行 */
.jlpt-mock-level-radios {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-left: 16px;
    vertical-align: middle;
    font-size: 16px;
    font-weight: 500;
}

.jlpt-mock-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #1d1d1f;
}

.jlpt-mock-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1d1d1f;
    cursor: pointer;
}

/* ==========================================================================
   5. 模拟考试内容区：考试题目构成表
   ========================================================================== */
.jlpt-mock-exam {
    max-width: 900px;
    margin: 0 auto;
}

/* 快速进入：右上角浮动面板（按钮在上、级别单选在下），主按钮沿用项目深红 CTA（同 .btn-signin #d60017） */
.jlpt-mock-quick {
    float: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin: -10px 0 12px 24px;
}

.jlpt-mock-quick-btn {
    padding: 3px 22px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background-color: #d60017;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.jlpt-mock-quick-btn:hover {
    background-color: #f52d48;
}

.jlpt-mock-quick-btn:active {
    transform: translateY(1px);
}

.jlpt-mock-quick-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(29, 29, 31, 0.85);
    cursor: pointer;
    user-select: none;
}

.jlpt-mock-quick-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d60017;
    cursor: pointer;
}

/* 浮动面板高度超过首节内容时，分隔线不被浮起元素缩短 */
.jlpt-mock-divider {
    clear: both;
}

/* 小节标题与级别切换同行排列 */
.jlpt-mock-h3-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.jlpt-mock-h3-row .jlpt-mock-h3 {
    margin-bottom: 0;
}

/* 级别切换（N1 / N2 / N3）：同款五十音页胶囊开关（灰底轨道 + 白底滑动块） */
.jlpt-mock-level-tabs {
    display: inline-flex;
    background: rgba(118, 118, 128, 0.12);
    border-radius: 4px;
    padding: 2px;
}

.jlpt-mock-level-tab {
    padding: 2px 24px;
    border: none;
    background: transparent;
    border-radius: 3px;
    font-size: 13px;
    line-height: 20px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s;
}

.jlpt-mock-level-tab:hover:not(.active) {
    color: #0066cc;
}

.jlpt-mock-level-tab.active {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* 表格容器与表格 */
.jlpt-mock-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

.jlpt-mock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #1d1d1f;
}

.jlpt-mock-table th,
.jlpt-mock-table td {
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
    line-height: 1.6;
}

.jlpt-mock-table thead th {
    background: #f5f5f7;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.jlpt-mock-table .col-section { width: 150px; }
.jlpt-mock-table .col-category { width: 70px; }
.jlpt-mock-table .col-type { width: 200px; }
.jlpt-mock-table .col-count { width: 76px; }

/* 合并单元格列（考试科目 / 分类）居中 */
.jlpt-tbl-section,
.jlpt-tbl-category {
    text-align: center;
    font-weight: 600;
    background: #fafafa;
}

.jlpt-tbl-time {
    display: block;
    font-weight: 400;
    color: #86868b;
    font-size: 12px;
    margin-top: 4px;
}

/* 题型列内的题号 */
.jlpt-tbl-no {
    display: inline-block;
    min-width: 20px;
    margin-right: 6px;
    color: #86868b;
}

.jlpt-tbl-count {
    text-align: center;
}

/* 备注 */
.jlpt-mock-note {
    font-size: 12px;
    color: #86868b;
    margin-top: 10px;
    line-height: 1.6;
}

/* ==========================================================================
   考前广播：模拟考试「开始」按钮 + 全屏覆盖层 + 日文逐字符两色高亮
   ========================================================================== */

/* 1. 页面底部三个级别开始按钮：同一行三等分，沿用项目主按钮深红风格（同 .btn-signin #d60017） */
.jlpt-mock-start-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    flex-wrap: nowrap;
    padding: 12px 32px 40px;
}

.jlpt-mock-start-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 16px 12px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background-color: #d60017;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.jlpt-mock-start-btn:hover {
    background-color: #f52d48;
    opacity: 0.9;
}

.jlpt-mock-start-btn:active {
    transform: translateY(1px);
}

/* 1.5 开始考试确认弹窗：面板与文字按项目卡片规范（白底浅描边圆角12，正文 rgba(29,29,31,.85)） */
.jlpt-mock-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.jlpt-mock-confirm-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 32px 40px 28px;
}

.jlpt-mock-confirm-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #8e8e93;
    cursor: pointer;
}

.jlpt-mock-confirm-close:hover {
    color: #1d1d1f;
}

.jlpt-mock-confirm-intro {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.jlpt-mock-confirm-tips {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    color: rgba(29, 29, 31, 0.85);
}

.jlpt-mock-confirm-tips li {
    margin-bottom: 8px;
    line-height: 1.75;
}

.jlpt-mock-confirm-btns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
}

.jlpt-mock-confirm-cancel {
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.jlpt-mock-confirm-cancel:hover {
    color: #0066cc;
    border-color: #0066cc;
}

.jlpt-mock-confirm-go {
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #d60017;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.jlpt-mock-confirm-go:hover {
    background-color: #f52d48;
    opacity: 0.9;
}

/* 2. 全屏承载层（广播+答题页共用）：全屏只在进入广播时请求一次，流程内保持不交接 */
.jlpt-flow-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #f7f8fa;
}

/* 2.1 广播覆盖层（占满地址栏以下整个视口） */
.jlpt-announce-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.jlpt-announce-panel {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px 8px 20px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
}

.jlpt-announce-close {
    position: absolute;
    top: 8px;
    right: 14px;
    width: 32px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: #e6e8eb;
    color: #333;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s ease;
}

.jlpt-announce-close:hover {
    background: #d5d9de;
}

/* 临时调试：跳过按钮（底部居中，置于锁定蒙版之上），流程联调完成后删除 */
.jlpt-announce-skip {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 4;
    padding: 6px 24px;
    font-size: 13px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    cursor: pointer;
}

.jlpt-announce-skip:hover {
    background: rgba(0, 0, 0, 0.65);
}

/* 3. 主体：左半试题封面 + 右半广播文本流，各占一半（顶部留白避开关闭按钮，整体上移） */
.jlpt-announce-main {
    flex: 1;
    display: flex;
    gap: 6px;
    min-height: 0;
    margin-top: 12px;
}

.jlpt-announce-cover {
    flex: 1 1 50%;
    min-width: 0;
    background: #f2f6ee;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.jlpt-announce-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.jlpt-announce-textside {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 4. 正文：连续文本流，全部内容共用一个背景（无逐句卡片/圆角框），自动滚动；隐藏滚动条（播放时随高亮自动跟进） */
.jlpt-announce-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    box-sizing: border-box;
}

.jlpt-announce-body::-webkit-scrollbar {
    display: none;
}

.jlpt-announce-sentence {
    margin-bottom: 22px;
}

.jlpt-announce-ja {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

.jlpt-announce-tr {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 7. 日文逐字符两色高亮：未读浅灰，已读深色 */
.ja-ch {
    color: #c6cbd2;
    transition: color 0.12s linear;
}

.ja-ch.read {
    color: #1a1a1a;
}

/* 已读完整句：整句保持深色 */
.jlpt-announce-sentence.done .ja-ch {
    color: #1a1a1a;
}

/* 8. 广播结束后的锁定蒙版：覆盖整个面板，仅关闭按钮可操作 */
.jlpt-announce-lock {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.jlpt-announce-countwrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 240px;
}

/* 外圈：每秒自转一周，弧长随 5 秒倒计时线性消失 */
.jlpt-announce-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: jlpt-ring-spin 1s linear infinite;
}

.jlpt-announce-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 6;
}

.jlpt-announce-ring-arc {
    fill: none;
    stroke: #fff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 578.1;
    stroke-dashoffset: 0;
    animation: jlpt-ring-vanish 5s linear forwards;
}

@keyframes jlpt-ring-spin {
    to { transform: rotate(360deg); }
}

@keyframes jlpt-ring-vanish {
    to { stroke-dashoffset: 578.1; }
}

.jlpt-announce-count {
    color: #fff;
    font-size: 144px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.jlpt-announce-gotext {
    color: #fff;
    font-size: 66px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* 9. 答题页：全屏覆盖层，左半试题页 + 右半答题卡（答题卡内容后续实现，暂留白） */
.jlpt-answer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #f7f8fa;
    display: flex;
}

.jlpt-answer-panel {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px 8px 20px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
}

/* 主体：左半试题页 + 右半答题卡，各占一半（顶部留白避开关闭按钮，与广播页一致） */
.jlpt-answer-main {
    flex: 1;
    display: flex;
    gap: 6px;
    min-height: 0;
    margin-top: 12px;
}

.jlpt-answer-paper {
    flex: 1 1 60%;
    min-width: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jlpt-answer-paper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 纸面容器：单色纸底、纵向滚动阅读（整页缩放版字太小，应用户要求恢复滚动） */
.jlpt-paper-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 2px 14px 14px;
    background: #fbfaf6;
}

.jlpt-paper-sheet {
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "Songti SC", serif;
    color: #000;
}

/* 套卷切换页签（多套卷时显示于左栏顶部） */
.jlpt-paper-sets {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.jlpt-paper-settab {
    padding: 3px 14px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 999px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.jlpt-paper-settab.active {
    background: #d60017;
    border-color: #d60017;
    color: #fff;
}

/* 纸质考卷排版（临时结构文件预览）：无卡片、单色纸面、选项横排；字号紧凑以减少滚动 */
.jlpt-q-part {
    margin: 0 0 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.jlpt-q-sec-head {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.7;
    text-indent: 0;
}

.jlpt-q-sec-no {
    margin-right: 6px;
    font-weight: 700;
}

.jlpt-q-passage-line {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.8;
}

.jlpt-q-item {
    margin: 0 0 6.5px;
}

.jlpt-q-stem {
    margin: 0 0 1.5px;
    font-size: 15.5px;
    line-height: 1.7;
}

/* 题号仿纸面方框编号 */
.jlpt-q-no {
    display: inline-block;
    min-width: 20px;
    margin-right: 5px;
    padding: 0 3px;
    border: 1px solid #444;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

/* 选项横排一行（仿纸面 1～4 列） */
.jlpt-q-opts {
    display: flex;
    margin: 0 0 2px;
    padding-left: 26px;
}

.jlpt-q-opt {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.6;
}

/* 答题卡区域：N1 解答用紙网页版，3 页纵向滚动（左试题 60% / 右答题卡 40%） */
.jlpt-answer-sheet {
    flex: 1 1 40%;
    min-width: 0;
    background: #e9e7e2;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jlpt-as-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* 解答用紙填满右栏区域：页与页之间无间隔，仅以横线分页 */
.jlpt-as-page {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px 6px;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #a7a9ac;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "PingFang SC", sans-serif;
    color: #231f20;
}

.jlpt-as-page:last-child {
    border-bottom: none;
}

/* 官方表头三行：試験名 / N1 / 科目 */
.jlpt-as-exam {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.jlpt-as-level {
    margin: 2px 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.1;
}

.jlpt-as-subject {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 填写格旗帜提示：挂在填写格内、垂直居中（名前格靠左、受験番号格靠右）；hover 显示提示框 */
.jlpt-as-tipwrap {
    position: absolute;
    top: 50%;
    left: 24%;
    transform: translate(-50%, -50%);
    line-height: 0;
    z-index: 21;
}

.jlpt-as-blank.col .jlpt-as-tipwrap {
    left: 50%;
    right: auto;
}

.jlpt-as-tipicon {
    cursor: help;
}

.jlpt-as-tipbox {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    width: max-content;
    /* 答题卡右栏约占视口 40%，名前框从其中线附近起算，19vw 保证提示框不被栏右缘裁切 */
    max-width: min(340px, 19vw);
    padding: 6px 10px;
    border: 1px solid #d8c98a;
    border-radius: 4px;
    background: #fffbe8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 11px;
    line-height: 1.6;
    color: #5a4a1a;
}

.jlpt-as-tipwrap:hover .jlpt-as-tipbox {
    display: block;
}

/* 受験番号旗靠右，提示框改为向左展开，避免顶破栏右缘 */
.jlpt-as-blank.col .jlpt-as-tipbox {
    left: auto;
    right: 0;
}

.jlpt-as-fields {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.jlpt-as-field {
    flex: 1;
    min-width: 0;
    display: flex;
    border: 1px solid #333;
}

/* 标签列：日文/英文两行（照纸面原样），不收缩 */
.jlpt-as-field > span:first-child {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-right: 1px solid #333;
    font-size: 10.5px;
    line-height: 1.5;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
}

/* 填写格：留白；旗帜角标的定位基准 */
.jlpt-as-blank {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 2px 6px;
    user-select: none;
}

/* 受験番号格：窄列 */
.jlpt-as-blank.col {
    flex: 0 0 42px;
    padding: 2px 2px;
}

.jlpt-as-noteshead {
    margin: 0 0 2px;
    font-size: 10.5px;
}

/* 注意区块：整框（同官方解答用紙，框住标题/条文/涂改例） */
.jlpt-as-notebox {
    border: 1px solid #333;
    padding: 6px 8px 2px;
    margin-bottom: 6px;
}

.jlpt-as-notes {
    margin: 0 0 6px;
    padding-left: 16px;
    font-size: 10.5px;
    line-height: 1.6;
}

/* 注意条文の番号（1. 2. 3. …）：比正文收小 */
.jlpt-as-notes li::marker {
    font-size: 7px;
}

/* 注意条文の英文行 */
.jlpt-as-notes li em {
    display: block;
    font-style: normal;
    font-size: 9px;
    color: #555;
}

/* 注 4「マークれい」：日文与英文同一行（同官方） */
.jlpt-as-notes li.inl em {
    display: inline;
}

.jlpt-as-markex {
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 10.5px;
}

.jlpt-as-notebox .jlpt-as-markex {
    margin-bottom: 2px;
}

/* 涂改例图形（svg 竖椭圆组） */
svg.mkex {
    vertical-align: middle;
    margin: 0 1px;
}

.jlpt-as-markex th,
.jlpt-as-markex td {
    border: 1px solid #333;
    padding: 2px 10px;
    text-align: center;
}

.jlpt-as-markex td.ok {
    font-size: 13px;
}

/* 涂改区：每行 2 列，问题块按题号顺序从左到右排列 */
.jlpt-as-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

.jlpt-as-block {
    min-width: 0;
}

.jlpt-as-sec {
    grid-column: 1 / -1;
    margin: 4px 0 6px;
    font-size: 11.5px;
    font-weight: 700;
}

/* 表头行与题行共用表格线（负 margin 合并相邻边框） */
.jlpt-as-head,
.jlpt-as-row {
    border: 1px solid #333;
    margin-top: -1px;
}

.jlpt-as-head {
    margin-left: 0;
    margin-right: 0;
    padding: 5px 0;
    text-align: center;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.9em;
}

/* 大問表頭の振り仮名（もんだい） */
.jlpt-as-ruby {
    display: block;
    font-style: normal;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1;
}

.jlpt-as-row {
    display: flex;
    align-items: stretch;
}

.jlpt-as-no {
    flex: 0 0 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #333;
    padding: 2px 1px;
    font-size: 19px;
    line-height: 1;
}

.jlpt-as-no b {
    font-weight: 700;
}

.jlpt-as-no em {
    font-style: normal;
    font-size: 10px;
}

.jlpt-as-opts {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 3px;
    padding: 2px 4px;
    /* 椭圆列之间的竖线（同官方答题卡），位于四等分位、两端无线 */
    background-image:
        linear-gradient(90deg, #333 1px, rgba(0, 0, 0, 0) 1px),
        linear-gradient(90deg, #333 1px, rgba(0, 0, 0, 0) 1px),
        linear-gradient(90deg, #333 1px, rgba(0, 0, 0, 0) 1px);
    background-size: 1px 100%;
    background-position: 25% 0, 50% 0, 75% 0;
    background-repeat: no-repeat;
}

/* 选项椭圆（N4 答题卡为横屏版面，椭圆竖高横窄）：点击涂黑，再点取消 */
.jlpt-as-opt {
    width: 17px;
    height: 24px;
    padding: 0;
    border: 1px solid #3d3c3d;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.jlpt-as-opt i {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #3d3c3d;
}

.jlpt-as-opt:not(.fixed):hover {
    border-color: #111;
    background: #ececec;
}

.jlpt-as-opt.marked {
    background: #231f20;
    border-color: #231f20;
}

.jlpt-as-opt.marked i {
    color: #fff;
    opacity: 0.85;
}

.jlpt-as-opt.fixed {
    cursor: default;
}

.jlpt-as-foot {
    margin: 8px 0 0;
    text-align: right;
    font-family: "Franklin Gothic Book", "Arial", sans-serif;
    font-style: italic;
    font-size: 11px;
    color: #231f20;
}

/* 7. 真·全屏（Fullscreen API）：承载层自身即不透明背景，无需 :fullscreen 钩子 */

/* ============================================================
   考前注意事项子页（jlpt-notes）
   ============================================================ */
.jlpt-notes {
    padding: 0 8px 48px;
}

.jlpt-notes-level-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.jlpt-notes-level-tab {
    padding: 6px 20px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(29, 29, 31, 0.6);
    transition: all 0.2s;
}

.jlpt-notes-level-tab:hover:not(.active) {
    color: #0066cc;
    border-color: #0066cc;
}

.jlpt-notes-level-tab.active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}

.jlpt-notes-panel {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 28px 36px 32px;
}

.jlpt-notes-guidelines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jlpt-notes-guidelines li {
    position: relative;
    padding-left: 16px;
    margin: 6px 0;
    color: rgba(29, 29, 31, 0.85);
    font-size: 15px;
    line-height: 1.75;
}

.jlpt-notes-guidelines li::before {
    content: '·';
    position: absolute;
    left: 2px;
    font-weight: 700;
}

.jlpt-notes-time {
    margin: 4px 0 8px 16px;
}

.jlpt-notes-time-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin: 4px 0;
    font-size: 15px;
    color: rgba(29, 29, 31, 0.85);
}

.jlpt-notes-time-value {
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.jlpt-notes-h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
}

.jlpt-notes-scoring-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin: 4px 0 4px 16px;
    font-size: 15px;
    color: rgba(29, 29, 31, 0.85);
}

.jlpt-notes-scoring-formula {
    font-variant-numeric: tabular-nums;
}

.jlpt-notes-footnote {
    margin: 10px 0 0;
    font-size: 12px;
    color: rgba(29, 29, 31, 0.45);
}

.jlpt-notes-rule {
    margin: 4px 0 14px;
    font-size: 14px;
    color: rgba(29, 29, 31, 0.7);
    line-height: 1.75;
    text-indent: 2em;
}

.jlpt-notes-table-wrap {
    overflow-x: auto;
}

.jlpt-notes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: center;
}

.jlpt-notes-table th,
.jlpt-notes-table td {
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 8px 6px;
}

.jlpt-notes-table thead th {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(29, 29, 31, 0.85);
    font-weight: 600;
}

.jlpt-notes-table tbody td {
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}

.jlpt-notes-table thead th {
    white-space: normal;
}
/* ============================================================
   模拟考试页分节结构（功能目的 / 用法与规则 / 题型结构说明 / 考前注意事项）
   ============================================================ */
.jlpt-mock-section {
    margin: 0 0 4px;
}

.jlpt-mock-h3 {
    margin: 4px 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1f;
}

.jlpt-mock-divider {
    border: none;
    border-top: 1px dashed rgba(0, 0, 0, 0.25);
    margin: 22px 0;
}

.jlpt-mock-purpose {
    margin: 0;
    padding-left: 20px;
    color: rgba(29, 29, 31, 0.85);
    font-size: 15px;
    line-height: 1.75;
}

.jlpt-mock-rules-p {
    margin: 6px 0;
    color: rgba(29, 29, 31, 0.85);
    font-size: 15px;
    line-height: 1.75;
}

.jlpt-mock-warn {
    margin: 10px 0 0;
    padding: 10px 14px;
    border-left: 4px solid #d93025;
    background: rgba(217, 48, 37, 0.06);
    color: #b3261e;
    font-size: 14px;
    line-height: 1.7;
    border-radius: 4px;
}
