:root { --study-ink:#4d4453; --study-soft:rgba(77,68,83,.58); --study-faint:rgba(111,87,115,.13); --study-line:rgba(103,82,108,.18); --study-paper:rgba(255,253,252,.66); --study-accent:#987394; }
.study-body { color:var(--study-ink); }
.study-atmosphere { position:fixed; }
.study-shell { position:relative; z-index:1; width:min(1420px,calc(100% - 96px)); min-height:75vh; margin:0 auto; padding:80px 0 120px; }
.study-heading { display:flex; justify-content:space-between; align-items:end; gap:50px; padding-bottom:55px; border-bottom:1px solid var(--study-line); }
.study-heading p,.study-kicker,.study-view-heading p { margin:0; color:rgba(128,96,128,.67); font-size:8px; letter-spacing:3.2px; }
.study-heading h1 { margin:18px 0 10px; font-size:clamp(58px,7vw,100px); font-weight:400; line-height:.95; letter-spacing:-2px; }
.study-heading > div > span { color:var(--study-soft); font-size:12px; letter-spacing:3px; text-transform:uppercase; }
.study-philosophy { max-width:330px; padding-bottom:7px; color:var(--study-soft)!important; font-size:13px!important; line-height:2; letter-spacing:2px!important; text-align:right; }
.study-index { display:grid; grid-template-columns:repeat(6,1fr); margin:0 0 76px; border-bottom:1px solid var(--study-line); }
.study-index button { min-height:76px; padding:0 18px; border:0; border-right:1px solid var(--study-faint); background:transparent; color:rgba(77,68,83,.48); font:inherit; font-size:9px; letter-spacing:2.1px; cursor:pointer; transition:.22s ease; }
.study-index button:last-child { border-right:0; }.study-index button span { margin-right:12px; color:rgba(146,109,143,.52); font-size:7px; }
.study-index button:hover,.study-index button[aria-current="page"] { color:var(--study-ink); background:rgba(255,255,255,.22); }
.study-status { padding:28px 0; color:var(--study-soft); font-size:10px; letter-spacing:1.5px; }
.study-view { animation:study-arrive .36s ease both; } @keyframes study-arrive { from{opacity:0;transform:translateY(6px)} }
.study-view-heading { display:flex; align-items:end; justify-content:space-between; gap:30px; margin-bottom:46px; }
.study-view-heading h2 { margin:14px 0 0; font-size:clamp(36px,4vw,57px); font-weight:400; }
button { font-family:inherit; }
.study-primary,.study-secondary,.study-text-button { min-height:44px; padding:0 23px; border:1px solid rgba(126,94,126,.25); background:rgba(255,253,252,.48); color:rgba(91,67,92,.78); font-size:8px; letter-spacing:2px; cursor:pointer; }
.study-primary:hover,.study-secondary:hover { border-color:rgba(126,94,126,.48); background:rgba(255,253,252,.8); }
.study-text-button { padding:0; border:0; background:none; }
.study-month-preview { display:grid; grid-template-columns:1fr auto; min-height:270px; padding:50px clamp(30px,5vw,72px); border-block:1px solid var(--study-line); background:linear-gradient(120deg,rgba(255,253,252,.62),rgba(240,232,242,.28)); }
.study-month-preview h2 { margin:17px 0 0; font-size:38px; font-weight:400; letter-spacing:3px; }
.study-month-stars { grid-column:1/-1; display:grid; grid-template-columns:repeat(31,1fr); align-items:end; gap:clamp(3px,.8vw,12px); min-height:100px; margin-top:25px; }
.study-month-stars button { position:relative; min-width:0; height:70px; border:0; background:none; color:rgba(142,108,141,.25); cursor:pointer; }
.study-month-stars button::after { content:"✦"; position:absolute; left:50%; bottom:calc(var(--density,0) * 11px); font-size:calc(5px + var(--density,0) * 2px); opacity:calc(.18 + var(--density,0) * .18); transform:translateX(-50%); }
.study-month-stars button:hover::after { opacity:.9; }.study-month-stars small { position:absolute; inset:auto 0 0; font-size:6px; color:rgba(77,68,83,.35); }
.study-dashboard { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; margin-top:62px; background:var(--study-line); border:1px solid var(--study-line); }
.study-dashboard-card { min-height:250px; padding:38px; border:0; background:rgba(252,249,250,.72); color:inherit; text-align:left; cursor:pointer; }
.study-dashboard-card:hover { background:rgba(255,253,252,.9); }.study-dashboard-card .index { color:rgba(145,108,141,.5); font-size:7px; letter-spacing:2px; }
.study-dashboard-card h3 { margin:28px 0 12px; font-size:22px; font-weight:400; letter-spacing:2px; }.study-dashboard-card strong { font-size:35px; font-weight:400; }.study-dashboard-card p { color:var(--study-soft); font-size:10px; line-height:2; }
.study-calendar-actions { display:flex; gap:8px; }.study-calendar-actions button,.study-view-switch button,.study-filter-row button { min-height:38px; padding:0 14px; border:0; background:none; color:var(--study-soft); font-size:8px; letter-spacing:1.7px; cursor:pointer; }
.study-calendar-title { margin:-18px 0 24px; font-size:20px; font-weight:400; letter-spacing:3px; }
.study-calendar-week,.study-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); }.study-calendar-week span { padding:12px; color:rgba(94,78,99,.45); font-size:7px; letter-spacing:1.6px; text-align:center; }
.study-calendar-grid { border-top:1px solid var(--study-line); border-left:1px solid var(--study-line); }
.study-calendar-day { position:relative; min-height:108px; padding:15px; border:0; border-right:1px solid var(--study-line); border-bottom:1px solid var(--study-line); background:rgba(255,253,252,.34); color:var(--study-soft); text-align:left; cursor:pointer; }
.study-calendar-day.other { opacity:.3; }.study-calendar-day.selected { background:rgba(243,232,243,.62); }.study-calendar-day.today .day-number { color:var(--study-accent); }
.study-calendar-day .day-number { font-size:9px; }.study-calendar-day .day-stars { display:flex; flex-wrap:wrap; gap:3px; margin-top:24px; color:rgba(153,111,148,.7); font-size:6px; }
.study-day-log { margin-top:52px; padding:42px 0; border-top:1px solid var(--study-line); }.study-timeline { margin-top:28px; }
.study-timeline-item { display:grid; grid-template-columns:90px 180px 1fr; gap:26px; padding:22px 0; border-bottom:1px solid var(--study-faint); color:inherit; text-decoration:none; }.study-timeline-item time,.study-timeline-item em { color:var(--study-soft); font-size:8px; font-style:normal; letter-spacing:1.6px; }.study-timeline-item strong { font-size:14px; font-weight:400; }
.study-filter-row { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:30px; }.study-filter-row button { border-bottom:1px solid transparent; }.study-filter-row button.active { color:var(--study-ink); border-color:rgba(145,108,141,.55); }
.study-record-list { border-top:1px solid var(--study-line); }.study-record { display:grid; grid-template-columns:90px minmax(0,1fr) 160px; gap:30px; width:100%; padding:30px 0; border:0; border-bottom:1px solid var(--study-line); background:none; color:inherit; text-align:left; cursor:pointer; }
.study-record:hover h3 { color:var(--study-accent); }.study-record-index { color:rgba(145,108,141,.55); font-size:8px; letter-spacing:2px; }.study-record h3 { margin:0 0 8px; font-size:21px; font-weight:400; }.study-record p { margin:0;color:var(--study-soft);font-size:10px;line-height:1.8; }.study-record-meta { text-align:right; font-size:8px!important; letter-spacing:1.5px; }
.study-detail { margin-top:34px; padding:clamp(28px,4vw,56px); border:1px solid var(--study-line); background:var(--study-paper); }
.study-detail-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:35px; }.study-detail-toolbar h3 { margin:0; font-size:30px; font-weight:400; }.study-action-row { display:flex; flex-wrap:wrap; gap:10px; }
.study-back-button { display:inline-flex; align-items:center; min-height:44px; margin:0 0 28px; }
.study-paper-workspace { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,.65fr); gap:28px; }.study-paper-reader { min-height:650px; max-height:calc(100vh - 125px); overflow:auto; border:1px solid var(--study-line); background:rgba(255,255,255,.45); }.study-paper-reader iframe,.study-paper-reader>img { width:100%; height:650px; border:0; object-fit:contain; }.study-pdf-document { display:grid; gap:18px; padding:18px; }.study-pdf-document figure { margin:0; padding:0 0 12px; border-bottom:1px solid var(--study-line); }.study-pdf-document canvas { display:block; width:100%; height:auto; background:#fff; }.study-pdf-document figcaption { padding-top:9px; color:var(--study-soft); font-size:7px; letter-spacing:1.5px; text-align:right; }.study-pdf-loading { padding:45px; color:var(--study-soft); font-size:9px; letter-spacing:1.5px; text-align:center; }
.study-answer-panel { position:sticky; top:95px; align-self:start; padding:30px; border:1px solid var(--study-line); background:rgba(255,253,252,.92); }.study-question-count { margin:0 0 18px; text-align:center; font-size:25px; letter-spacing:2px; }.study-current-question { margin:0 0 12px; color:var(--study-soft); font-size:11px; letter-spacing:1.5px; text-align:center; }.study-answer-options { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }.study-answer-options button { aspect-ratio:1; border:1px solid var(--study-line); background:none; color:inherit; font-size:15px; cursor:pointer; }.study-answer-options button.active { background:rgba(220,202,221,.55); border-color:rgba(143,103,140,.5); }
.study-answer-nav { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }.study-answer-nav button,.study-mini-actions button { min-height:42px; border:1px solid var(--study-line); background:none; color:var(--study-soft); font-size:8px; letter-spacing:1.5px; cursor:pointer; }.study-mini-actions { display:grid; gap:8px; margin-top:20px; }
.study-answer-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(55px,1fr)); gap:7px; margin-top:25px; }.study-answer-grid button { min-height:44px; border:1px solid var(--study-line); background:none; color:inherit; font-size:9px; }.study-answer-grid button.answered { background:rgba(225,211,226,.48); }.study-answer-grid button.flagged { border-color:#b79072; }
.study-result-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; margin:30px 0; background:var(--study-line); }.study-result-summary div { padding:27px;background:rgba(255,255,255,.55); }.study-result-summary strong { display:block;font-size:29px;font-weight:400; }.study-result-list label { display:grid; grid-template-columns:40px 1fr auto; gap:20px; padding:15px 0; border-bottom:1px solid var(--study-faint); }
.study-browse-bar { margin-bottom:35px; }.study-view-switch { display:flex; justify-content:flex-end; }.study-mistake-index { width:100%; border-collapse:collapse; }.study-mistake-index th,.study-mistake-index td { padding:17px 12px; border-bottom:1px solid var(--study-line); font-size:10px; text-align:left; }.study-mistake-index th { color:var(--study-soft);font-size:7px;letter-spacing:1.7px; }.study-mistake-index tr[data-id] { cursor:pointer; }
.study-mistake-card { max-width:850px; margin:0 auto; padding:clamp(28px,5vw,65px); border:1px solid var(--study-line); background:var(--study-paper); }.study-mistake-card h3 { font-size:30px;font-weight:400; }.study-question-media { position:relative; overflow:hidden; min-height:180px; margin:30px 0; background:rgba(236,229,237,.4); }.study-question-media img { width:100%;display:block; }.study-answer-reveal { display:grid; grid-template-columns:1fr 1fr; gap:20px; }.study-answer-reveal div { padding:20px;border-top:1px solid var(--study-line); }.study-answer-reveal span { display:block;color:var(--study-soft);font-size:7px;letter-spacing:1.8px; }.study-answer-reveal strong { display:block;margin-top:10px;font-size:23px;font-weight:400; }
.study-mistake-reason { display:grid; gap:15px; margin:28px 0; padding-top:24px; border-top:1px solid var(--study-line); }.study-reason-presets { display:flex; flex-wrap:wrap; gap:8px; }.study-reason-presets button { min-height:36px; padding:0 13px; border:1px solid var(--study-line); background:rgba(255,255,255,.38); color:var(--study-soft); font:inherit; font-size:9px; cursor:pointer; }.study-mistake-reason textarea { box-sizing:border-box; width:100%; min-height:110px; padding:14px; border:1px solid var(--study-line); border-radius:0; background:rgba(255,255,255,.45); color:inherit; font:inherit; line-height:1.8; resize:vertical; }.study-reason-save-row { display:flex; align-items:center; justify-content:flex-end; gap:16px; min-height:44px; }.study-reason-save-row span { margin-right:auto; color:var(--study-soft); font-size:9px; }.study-mistake-reason-readonly { white-space:pre-wrap; line-height:1.9; }
.study-revision-section { margin:0; padding:28px 0; border-top:1px solid var(--study-line); }.study-revision-section h4 { margin:13px 0 18px; font-size:21px; font-weight:400; }.study-revision-copy { margin:0; color:var(--study-ink); font-size:13px; line-height:2; white-space:pre-wrap; overflow-wrap:anywhere; }.study-revision-priorities { margin:18px 0 0; padding-left:20px; color:var(--study-soft); font-size:11px; line-height:1.9; }
.study-answer-grid label { display:grid; grid-template-columns:1fr 58px; align-items:center; min-height:44px; padding:0 10px; border:1px solid var(--study-line); color:var(--study-soft); font-size:9px; }.study-answer-grid select { min-height:34px; border:0; border-left:1px solid var(--study-line); background:transparent; color:inherit; text-align:center; }
.study-note-list { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }.study-note { min-height:230px;padding:34px;border:1px solid var(--study-line);background:var(--study-paper); }.study-note h3 { margin:18px 0;font-size:22px;font-weight:400; }.study-note p { color:var(--study-soft);font-size:12px;line-height:2;white-space:pre-wrap; }.study-note footer { display:flex;justify-content:space-between;margin-top:25px;color:var(--study-soft);font-size:8px; }
.study-empty { padding:65px 10px; color:var(--study-soft); font-size:11px; line-height:2; text-align:center; }.study-error { color:#8b6268; }
.study-dialog { width:min(760px,calc(100% - 34px)); max-height:calc(100dvh - 40px); padding:0; overflow:auto; border:1px solid rgba(116,88,118,.25); background:#faf7fa; color:var(--study-ink); box-shadow:0 28px 80px rgba(65,52,69,.18); }.study-dialog::backdrop { background:rgba(70,60,73,.16);backdrop-filter:blur(3px); }.study-dialog form>header,.study-dialog>div>header { display:flex;justify-content:space-between;align-items:start;padding:34px 38px 24px;border-bottom:1px solid var(--study-line); }.study-dialog h2 { margin:12px 0 0;font-size:30px;font-weight:400; }.study-dialog-close { width:44px;height:44px;border:0;background:none;color:var(--study-soft);font-size:25px;cursor:pointer; }.study-form { display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:35px 38px; }.study-field { display:grid;gap:9px; }.study-field.full { grid-column:1/-1; }.study-field label { color:var(--study-soft);font-size:8px;letter-spacing:2px; }.study-field input,.study-field select,.study-field textarea { width:100%;min-height:45px;padding:10px 2px;border:0;border-bottom:1px solid var(--study-line);border-radius:0;background:transparent;color:inherit;font:inherit;font-size:13px; }.study-field textarea { min-height:130px;line-height:1.8;resize:vertical; }.study-field input:focus,.study-field select:focus,.study-field textarea:focus { outline:2px solid rgba(151,112,148,.22);outline-offset:3px; }.study-dialog form>footer { display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:20px 38px 32px; }.study-dialog form>footer p { flex:1;margin:0;color:var(--study-soft);font-size:9px; }.study-sheet { width:min(1050px,calc(100% - 34px)); }.study-sheet-content { padding:38px; }
.study-shenlun-layout { display:grid;grid-template-columns:1fr 1fr;gap:25px; }.study-material,.study-answer-editor { min-height:520px;padding:30px;border:1px solid var(--study-line);background:rgba(255,255,255,.35); }.study-answer-editor textarea { width:100%;min-height:350px;padding:20px;border:0;background:rgba(255,255,255,.42);font:inherit;line-height:2;resize:vertical; }.study-character-count { text-align:right;color:var(--study-soft);font-size:9px; }.study-character-count.over { color:#9a626d; }.study-review-section { margin-top:22px;padding:24px;border-top:1px solid var(--study-line); }.study-review-section h4 { font-size:10px;letter-spacing:2px; }.study-review-section li { margin:12px 0;color:var(--study-soft);font-size:11px;line-height:1.8; }
.study-crop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.study-crop-controls input {
    width: 70px;
    min-height: 40px;
    border: 1px solid var(--study-line);
    background: transparent;
    text-align: center;
}

/*
 * 外层负责滚动。
 * PDF 和选择框本身不再各自滚动。
 */
#study-crop-scroll {
    position: relative;
    width: 100%;
    max-height: 65vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    border: 1px solid var(--study-line);
    background: white;
}

/*
 * stage 只是 PDF + selection 的共同坐标层。
 * 它自己绝对不能滚动。
 */
.study-crop-stage {
    position: relative;
    width: max-content;
    min-width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    background: white;
    touch-action: pan-x pan-y;
}

/*
 * PDF / 图片保持自己的实际比例。
 */
.study-crop-stage canvas,
.study-crop-stage img {
    display: block;
    max-width: none;
    height: auto;
}

/*
 * 选择框与 PDF 共用同一个 stage。
 */
.study-crop-selection {
    position: absolute;
    z-index: 10;
    box-sizing: border-box;
    border: 2px solid rgba(139, 93, 134, .95);
    background: rgba(220, 190, 218, .18);
    pointer-events: none;
}

/*
 * 进入框选模式时才禁止浏览手势。
 */
.study-crop-stage.is-selecting {
    touch-action: none;
    cursor: crosshair;
}

@media (max-width: 900px) {
    #study-crop-scroll {
        max-height: 62dvh;
        overflow: auto;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .study-crop-stage {
        touch-action: pan-x pan-y;
    }

    .study-crop-stage.is-selecting {
        touch-action: none;
    }
}
.study-mobile-dock { display:none; }
@media (max-width:900px) {
 .study-shell{width:calc(100% - 40px);padding:48px 0 90px}.study-heading{display:block;padding-bottom:38px}.study-heading h1{font-size:58px}.study-philosophy{margin:30px 0 0;text-align:left}.study-index{grid-template-columns:repeat(3,1fr);margin-bottom:55px}.study-index button{min-height:58px;padding:0 8px}.study-index button span{display:none}.study-dashboard{grid-template-columns:1fr 1fr}.study-dashboard-card{min-height:190px;padding:26px}.study-month-preview{padding:34px 25px}.study-month-stars{gap:1px}.study-calendar-day{min-height:67px;padding:8px}.study-calendar-day .day-stars{margin-top:13px}.study-timeline-item{grid-template-columns:65px 1fr}.study-timeline-item strong{grid-column:2}.study-record{grid-template-columns:50px 1fr;gap:15px}.study-record-meta{grid-column:2;text-align:left}.study-paper-workspace{display:block}.study-paper-reader{min-height:calc(100dvh - 250px);max-height:calc(100dvh - 185px);padding-bottom:calc(82px + env(safe-area-inset-bottom))}.study-paper-reader iframe,.study-paper-reader>img{height:calc(100dvh - 250px)}.study-answer-panel{display:none}.study-mobile-dock{position:fixed;z-index:8500;left:0;right:0;bottom:0;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;padding:7px 12px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--study-line);background:rgba(250,247,250,.94);backdrop-filter:blur(13px)}.study-mobile-dock>button{min-height:48px;border:0;background:none}.study-mobile-answer-center{display:grid;gap:3px}.study-mobile-answer-center .study-current-question{margin:0;font-size:9px}.study-mobile-dock .study-answer-options{grid-template-columns:repeat(4,48px);justify-content:center}.study-note-list{grid-template-columns:1fr}.study-shenlun-layout{display:block}.study-material,.study-answer-editor{min-height:0;margin-bottom:16px}.study-form{grid-template-columns:1fr;padding:28px 22px}.study-field.full{grid-column:auto}.study-dialog form>header{padding:28px 22px 20px}.study-dialog form>footer{padding:18px 22px 26px;flex-wrap:wrap}.study-result-summary{grid-template-columns:1fr}.study-mistake-index th:nth-child(3),.study-mistake-index td:nth-child(3){display:none}
}
@media(max-width:520px){.study-shell{width:calc(100% - 28px)}.study-dashboard{grid-template-columns:1fr}.study-month-preview{display:block}.study-month-preview .study-text-button{margin-top:25px}.study-month-stars{grid-template-columns:repeat(16,1fr)}.study-view-heading{align-items:start}.study-calendar-week span{font-size:5px;padding:8px 0}.study-calendar-day{min-height:55px}.study-calendar-day .day-stars{margin-top:8px}.study-answer-reveal{grid-template-columns:1fr}.study-index{grid-template-columns:repeat(2,1fr)}}
@media(prefers-reduced-motion:reduce){.study-view{animation:none}.study-atmosphere *{animation:none!important}}

/* =========================================================
   SHENLUN
   PDF QUESTION / ANSWER REGION CAPTURE
   ========================================================= */

.study-shenlun-picker-field {
    padding-top: 8px;
}


.study-shenlun-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 14px 0 4px;

    border-bottom: 1px solid var(--study-line);
}


.study-shenlun-picker-row span {
    color: var(--study-soft);

    font-size: 10px;

    letter-spacing: 1px;
}


.study-shenlun-region-list {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    min-height: 30px;

    margin: 0 0 16px;
}


.study-shenlun-region-list > p {
    margin: 4px 0;

    color: var(--study-soft);

    font-size: 9px;
}


.study-shenlun-region-chip {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px 10px;

    border: 1px solid var(--study-line);

    background: rgba(
        255,
        253,
        252,
        .68
    );

    font-size: 8px;

    letter-spacing: 1.2px;
}


.study-shenlun-region-chip button {
    border: 0;

    background: none;

    color: var(--study-soft);

    font-size: 7px;

    letter-spacing: 1px;

    cursor: pointer;
}


.study-shenlun-selector-footer {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 18px;
}


.study-shenlun-region-stack {
    display: grid;

    gap: 16px;

    margin-top: 22px;
}


.study-shenlun-region-stack figure {
    margin: 0;

    border: 1px solid var(--study-line);

    background: #fff;
}


.study-shenlun-region-stack img {
    display: block;

    width: 100%;

    height: auto;
}


.study-shenlun-region-stack figcaption {
    padding: 9px 12px;

    color: var(--study-soft);

    font-size: 7px;

    letter-spacing: 1.5px;

    text-align: right;
}


.study-shenlun-region-empty {
    margin-top: 22px;

    padding: 28px;

    border: 1px dashed var(--study-line);

    color: var(--study-soft);

    font-size: 10px;

    text-align: center;
}


.study-shenlun-reference {
    margin-top: 25px;

    padding: 30px;

    border: 1px solid var(--study-line);

    background: rgba(
        255,
        255,
        255,
        .32
    );
}


.study-shenlun-reference-heading {
    display: flex;

    justify-content: space-between;

    align-items: end;

    gap: 20px;
}


.study-shenlun-reference h4 {
    margin: 10px 0 0;

    font-size: 20px;

    font-weight: 400;
}


@media (max-width: 900px) {

    .study-shenlun-picker-row {
        align-items: stretch;

        flex-direction: column;
    }


    .study-shenlun-picker-row .study-secondary {
        width: 100%;
    }


    .study-shenlun-selector-footer {
        display: grid;

        grid-template-columns:
            1fr
            1fr;
    }
}

/* =========================================================
   FIX: dialog footer CANCEL button
   .study-dialog-close is also used by the top-right × button,
   so restore normal secondary-button styles inside the footer.
   ========================================================= */

.study-dialog form > footer .study-dialog-close {
    width: auto;
    height: 44px;
    min-height: 44px;

    padding: 0 23px;

    border: 1px solid rgba(126, 94, 126, .25);
    background: rgba(255, 253, 252, .48);

    color: rgba(91, 67, 92, .78);

    font-size: 8px;
    line-height: 1;
    letter-spacing: 2px;

    white-space: nowrap;
    flex: 0 0 auto;
}

.study-dialog form > footer .study-dialog-close:hover {
    border-color: rgba(126, 94, 126, .48);
    background: rgba(255, 253, 252, .8);
}

/* 防止 footer 内按钮互相挤压 */
.study-dialog form > footer {
    min-width: 0;
}

.study-dialog form > footer > button {
    flex-shrink: 0;
}

/* Mobile aptitude controls stay below the scrollable paper and reuse its answer state. */
@media (max-width: 900px) {
    .study-paper-reader {
        padding-bottom: 0;
    }

    .study-mobile-dock {
        position: relative;
        z-index: auto;
        inset: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        width: 100%;
        margin-top: 18px;
        padding: 18px 16px;
        box-sizing: border-box;
        border: 1px solid var(--study-line);
        border-radius: 14px;
        background: rgba(250, 247, 250, .86);
        backdrop-filter: none;
    }

    .study-mobile-answer-center {
        display: grid;
        gap: 13px;
        min-width: 0;
    }

    .study-mobile-answer-center .study-current-question {
        margin: 0;
        color: var(--study-ink);
        font-size: 12px;
        letter-spacing: .12em;
    }

    .study-mobile-dock .study-answer-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
    }

    .study-mobile-dock .study-answer-options button {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        aspect-ratio: auto;
        border: 1px solid rgba(132, 102, 137, .24);
        border-radius: 10px;
        background: rgba(255, 255, 255, .48);
        color: var(--study-ink);
        touch-action: manipulation;
    }

    .study-mobile-dock .study-answer-options button.active {
        border-color: rgba(132, 92, 135, .62);
        background: rgba(218, 197, 222, .68);
        color: #57445f;
    }

    .study-mobile-answer-nav {
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }

    .study-mobile-answer-nav button {
        width: 64px;
        min-height: 44px;
        border: 0;
        border-top: 1px solid rgba(132, 102, 137, .2);
        background: transparent;
        color: var(--study-soft);
        font-size: 24px;
        touch-action: manipulation;
    }

    .study-mobile-answer-nav button:disabled,
    .study-mobile-dock .study-answer-options button:disabled {
        opacity: .38;
    }
}

/* Phone-only PDF fit-width rules. Tablet and desktop keep the existing reader. */
@media (max-width: 520px) {
    .study-pdf-document {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr);
    }

    .study-pdf-document figure {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .study-pdf-document canvas {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .study-mistake-reason textarea {
        min-height: 130px;
        scroll-margin-bottom: 110px;
    }

    .study-reason-save-row {
        align-items: stretch;
        flex-direction: column;
    }

    .study-reason-save-row .study-primary {
        width: 100%;
        min-height: 46px;
    }
}
