.home-stage, .workspace-stage { position: relative; height: 100%; min-height: 0; padding: 14px 40px 18px; }
.home-stage { display: flex; align-items: center; }
.home-sheet { position: relative; z-index: 2; display: flex; width: min(940px, 86%); height: min(100%, 700px); min-height: 0; flex-direction: column; padding: clamp(52px, 7vh, 68px) 112px 68px; background: transparent var(--image2-answer-desktop) center / 100% 100% no-repeat; }
.home-title { max-width: 620px; margin-bottom: 20px; font-size: clamp(43px, 5.2vw, 66px); line-height: 1.13; font-weight: 680; }
.home-lead { max-width: 570px; margin-bottom: 31px; color: var(--ink-soft); font-size: 17px; }
.home-art { position: absolute; z-index: 3; right: -20px; bottom: 0; width: 38%; pointer-events: none; }
.home-art .cat-portrait { width: 390px; margin: 0 auto; }
.quiet-entries { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 0; margin-top: auto; border-top: 1px solid rgba(61, 54, 43, 0.18); }
.quiet-entries button { min-width: 0; border: 0; padding: 18px 20px 18px 0; color: var(--ink); background: transparent; text-align: left; }
.quiet-entries button:nth-child(2) { padding-left: 20px; border-left: 1px solid var(--line); }
.quiet-entries button:nth-child(3) { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); column-gap: 20px; border-top: 1px solid var(--line); padding: 17px 0 20px; }
.quiet-entries button:nth-child(3) span { align-self: center; }
.quiet-entries strong, .quiet-entries span { display: block; }
.quiet-entries strong { margin-bottom: 5px; font-size: 14px; }
.quiet-entries span { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.quiet-entries button:hover strong { color: var(--brand); }

.workspace-stage { display: flex; align-items: center; justify-content: center; }
.practice-sheet, .note-sheet, .form-sheet, .map-sheet, .report-sheet { position: relative; z-index: 2; width: min(960px, 86%); height: 100%; min-height: 0; max-height: 790px; padding: clamp(46px, 7vh, 72px) 98px clamp(42px, 6vh, 70px); overflow: auto; background-repeat: no-repeat; background-position: center; background-size: 100% 100%; scrollbar-width: thin; }
.practice-sheet { background-image: var(--image2-answer-desktop); }
.note-sheet { background-image: var(--image2-feedback-desktop); }
.form-sheet { width: min(1080px, 96%); max-height: 760px; padding: 0; overflow: auto; background-image: var(--image2-folder-desktop); }
.map-sheet { background-image: var(--image2-clue-desktop); }
.report-sheet { background-image: var(--image2-report); }
.sheet-meta { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--ink-soft); font-size: 12px; }
.practice-question { max-width: 720px; margin: 5px 0 20px; font-size: clamp(28px, 3vw, 38px); line-height: 1.34; font-weight: 650; }
.answer-box { min-height: clamp(120px, 18vh, 170px); font-size: 16px; line-height: 1.75; }
.workspace-cat { position: absolute; z-index: 3; pointer-events: none; }
.workspace-cat.listening { right: -24px; bottom: 12px; width: 300px; }
.workspace-cat.complete { right: -5px; bottom: 8px; width: 280px; }
.workspace-cat.material { top: 42px; right: 62px; width: 142px; }
.form-fields { margin-top: 36px; }
.material-folder-spread {
  /* 资料夹素材 2000×1500 的可写区：左页约 9%–47%，右页约 53%–91%。
     这里的间距跟随图片边界，而不是按浏览器宽度平均分栏。 */
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  column-gap: 7%;
  padding: 8.2% 6.5% 9.4% 11%;
}
.material-folder-page { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; }
.material-folder-left { position: relative; padding-right: 4px; padding-bottom: 26px; }
.material-folder-left > .room-label {
  width: 118px;
  margin: 0 0 12px 8px;
  padding: 0;
  line-height: 1.25;
  text-align: center;
}
.material-folder-left .form-field { padding: 10px 12px; background: rgba(255, 253, 248, 0.6); box-shadow: inset 0 0 0 1px rgba(110, 85, 38, 0.12); }
.material-folder-left .privacy-notice { flex-shrink: 0; max-height: 63px; margin-bottom: 40px; padding: 10px 12px 0; overflow: hidden; background: transparent; box-shadow: none; }
.material-folder-right { padding-top: clamp(72px, 9vh, 92px); padding-right: 26px; padding-bottom: 26px; padding-left: 16px; color: #173b73; }
.form-sheet .section-title { max-width: 100%; margin-bottom: 9px; font-size: clamp(26px, 2.1vw, 32px); line-height: 1.3; }
.form-sheet .section-intro { max-width: 380px; font-size: 14px; line-height: 1.65; }
.form-sheet .form-field { margin-top: 23px; }
.form-sheet .text-area { min-height: clamp(112px, 17vh, 164px); max-height: 190px; background: rgba(255, 253, 248, 0.28); resize: none; }
.form-sheet .small-copy { margin: 7px 0 0; font-size: 12px; }
.form-sheet .privacy-notice { margin-top: auto; padding-top: 10px; }
.form-sheet .privacy-notice strong { font-size: 12px; }
.form-sheet .privacy-notice p { margin-top: 3px; font-size: 11px; line-height: 1.5; }
.material-folder-right .field-label { display: inline-block; margin-bottom: 10px; padding: 0; color: #173b73; }
.material-folder-right .text-area { color: #173b73; border-color: rgba(23, 59, 115, 0.3); background: transparent; box-shadow: none; }
.material-folder-right .form-field { width: auto; max-width: 100%; }
.material-folder-right .text-area { min-height: clamp(190px, 28vh, 245px); max-height: 260px; }
.material-folder-right .text-area::placeholder { color: rgba(23, 59, 115, 0.7); }
.material-folder-right .form-actions { margin-top: auto; }
.material-folder-right .notice { margin: 10px 0 0; }

.feedback-note { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.78fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px 8%; min-height: 280px; margin-top: 18px; }
.feedback-note section { padding: 8px 3px; border: 0; }
.feedback-note section:first-child { grid-row: span 2; padding-right: 10%; }
.feedback-note h2 { margin-bottom: 7px; font-size: 16px; font-weight: 680; }
.feedback-note p { margin-bottom: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.feedback-note section:first-child h2 { color: #416a4c; }
.feedback-note section:nth-child(2) h2 { color: #8b5e31; }
.feedback-note section:nth-child(3) h2 { color: var(--brand-dark); }

.insight-groups { margin-top: 38px; }
.insight-group { display: grid; grid-template-columns: 165px minmax(0,1fr); gap: 28px; padding: 25px 0; border-top: 1px solid var(--line); }
.insight-group > h2 { margin: 2px 0 0; font-size: 15px; font-weight: 680; }
.insight-group.strength > h2 { color: #416a4c; }
.insight-group.suggestion > h2, .insight-group.gap > h2 { color: #8b5e31; }
.insight-group.advice > h2 { color: var(--brand-dark); }
.insight-lines { display: grid; gap: 19px; }
.insight-line h3 { margin-bottom: 4px; font-size: 15px; }
.insight-line p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.map-sheet > .room-label, .map-sheet > .section-title, .map-sheet > .section-intro { max-width: 53%; color: #fff; text-shadow: 0 1px 1px rgba(10, 40, 87, 0.25); }
.map-sheet .room-label { color: rgba(255, 255, 255, 0.9); }
.map-sheet .insight-groups, .report-sheet .insight-groups { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.75fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px 9%; min-height: 240px; margin-top: 18px; }
.map-sheet .insight-group, .report-sheet .insight-group { display: block; padding: 5px 2px; border: 0; }
.map-sheet .insight-group:first-child, .report-sheet .insight-group:first-child { grid-row: span 2; padding-right: 8%; }
.map-sheet .insight-group.strength, .report-sheet .insight-group:nth-child(2) { color: #fff; }
.map-sheet .insight-group.strength h2, .map-sheet .insight-group.strength h3, .map-sheet .insight-group.strength p, .report-sheet .insight-group:nth-child(2) h2, .report-sheet .insight-group:nth-child(2) h3, .report-sheet .insight-group:nth-child(2) p { color: #fff; }
.map-sheet .insight-group p, .report-sheet .insight-group p { color: rgba(37, 42, 50, 0.8); }
.map-sheet .insight-lines, .report-sheet .insight-lines { gap: 8px; }
.map-sheet .insight-line h3, .report-sheet .insight-line h3 { font-size: 14px; }
.map-sheet .insight-line p, .report-sheet .insight-line p { font-size: 12px; line-height: 1.5; }
.report-sheet > .room-label, .report-sheet > .section-title, .report-sheet > .section-intro { max-width: 48%; }
.report-sheet .insight-groups { margin-top: 18px; }
.history-sheet { width: min(1080px, 96%); height: 100%; min-height: 0; max-height: 760px; margin: 0 auto; padding: 0; overflow: hidden; background: transparent var(--image2-history) center / 100% 100% no-repeat; }
.history-spread {
  /* 笔记本素材同样按双页内纸边界定位，中央装订线不参与内容列。 */
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  column-gap: 8%;
  padding: 8.2% 9% 9.4% 12.5%;
}
.history-index-page, .history-detail-page { min-width: 0; min-height: 0; }
.history-index-page { display: flex; flex-direction: column; overflow: hidden; padding-right: 6px; }
.history-heading-panel { height: 126px; min-height: 126px; padding: 12px 14px 10px; overflow: hidden; }
.history-heading-panel > .room-label { width: max-content; margin-bottom: 14px; margin-left: auto; text-align: right; }
.history-heading-panel .section-title { margin-bottom: 8px; }
.history-heading-panel .section-intro { margin-bottom: 0; }
.history-index-intro { max-width: calc(100% - 28px); margin: 30px 14px 0; padding: 0 14px; }
.history-index-page .section-title { max-width: 100%; margin-bottom: 8px; font-size: clamp(26px, 2vw, 30px); line-height: 1.25; }
.history-index-page .section-intro { font-size: 14px; line-height: 1.65; }
.history-detail-page { position: relative; display: flex; flex-direction: column; padding-top: 58px; padding-right: 20px; padding-bottom: 46px; padding-left: 20px; }
.history-cat { position: absolute; top: -36px; right: 14px; width: 145px; height: 138px; overflow: hidden; }
.history-cat .cat-portrait { width: 150px; }
.history-list { min-height: 0; margin-top: 18px; margin-bottom: 30px; padding: 8px 14px 10px; overflow: auto; scrollbar-width: thin; }
.history-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(61, 54, 43, 0.18); }
.history-item h2 { display: -webkit-box; margin: 5px 0 3px; overflow: hidden; font-size: 15px; line-height: 1.38; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-item p { max-width: 360px; margin: 0; color: var(--ink-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { color: var(--ink-faint); font-size: 12px; }
.history-empty-copy { margin-top: 38px; padding-top: 24px; border-top: 1px solid rgba(61, 54, 43, 0.18); }
.history-empty-copy p { margin-bottom: 8px; font-size: 15px; }
.history-next-step { max-width: 380px; }
.history-next-heading { min-height: 112px; max-width: 270px; overflow: hidden; padding: 10px 0 8px; }
.history-next-heading .room-label { margin-bottom: 12px; }
.history-next-step .history-next-heading h2 { margin-bottom: 0; font-size: 22px; line-height: 1.35; }
.history-next-step h2 { margin-bottom: 10px; font-size: 25px; line-height: 1.35; }
.history-next-step > p:not(.room-label) { margin-top: 18px; margin-bottom: 22px; color: #454b55; font-size: 14px; }
.history-detail-page .privacy-notice { margin-top: auto; padding-top: 12px; }
.history-detail-page .privacy-notice p { color: #4f5660; font-size: 11px; line-height: 1.5; }
.history-data-actions { margin-top: 0; padding-top: 0; }
.history-data-actions .button-danger { max-width: 100%; padding: 6px 8px; font-size: 11px; line-height: 1.25; white-space: nowrap; }

@media (max-width: 940px) and (min-width: 621px) {
  .home-stage, .workspace-stage { padding-right: 0; padding-left: 0; }
  .home-sheet, .practice-sheet, .note-sheet, .form-sheet, .map-sheet, .report-sheet { width: 88%; padding-right: 72px; padding-left: 72px; }
  .material-folder-spread, .history-spread { column-gap: 8%; padding-right: 11%; padding-left: 11%; }
  .home-art { right: -30px; width: 40%; }
  .workspace-cat { right: -35px !important; width: 230px !important; }
  .workspace-cat.material { top: 45px; right: 42px !important; width: 120px !important; }
  .quiet-entries span { display: none; }
  .quiet-entries button:nth-child(3) { display: block; }
}

@media (min-width: 621px) and (max-height: 760px) {
  .workspace-stage { padding-top: 0; padding-bottom: 0; }
  .home-title { margin-bottom: 12px; font-size: 48px; }
  .home-lead { margin-bottom: 18px; font-size: 15px; }
  .home-sheet { padding-top: 70px; padding-bottom: 58px; }
  .quiet-entries { margin-top: auto; }
  .quiet-entries button { padding-top: 13px; padding-bottom: 15px; }
  .quiet-entries button:nth-child(3) { padding-top: 13px; padding-bottom: 18px; }
  .section-title { font-size: 34px; }
  .practice-sheet, .note-sheet, .map-sheet, .report-sheet { padding: 40px 78px 34px; }
  .practice-question { margin-bottom: 16px; font-size: 28px; }
  .answer-box { min-height: 112px; }
  .form-actions { margin-top: 18px; }
  .note-sheet .feedback-note { min-height: 245px; margin-top: 14px; }
  .map-sheet .insight-groups, .report-sheet .insight-groups { min-height: 218px; margin-top: 14px; }
  .map-sheet .section-title { font-size: 28px; }
  .report-sheet .section-title { max-width: 48%; font-size: 24px; }
  .report-sheet .insight-groups { min-height: 180px; }
  .report-sheet .form-actions { margin-top: 8px; }
  .material-folder-spread { padding-top: 8%; padding-right: 6.5%; padding-bottom: 9%; padding-left: 11%; }
  .material-folder-right { padding-top: 62px; }
  .form-sheet .section-title { font-size: 26px; }
  .form-sheet .text-area { min-height: 90px; max-height: 120px; }
  .material-folder-right .text-area { min-height: 190px; max-height: 210px; }
  .form-sheet .privacy-notice p { font-size: 9px; line-height: 1.3; }
  /* 图片纸张的可写底线早于透明背景盒子的底线，操作区必须留在折角上方。 */
  /* 素材的纸张底线比透明背景盒子更高；这两个锚点跟随纸张安全底线收口，避免内容落到桌面纹理上。 */
  .material-folder-left .privacy-notice { margin-top: 8px; margin-bottom: 40px; position: static; }
  .material-folder-right .form-actions { margin-bottom: 0; position: static; }
  .history-spread { padding-top: 8%; padding-right: 9%; padding-bottom: 9%; padding-left: 12.5%; }
  .history-index-page .section-title { font-size: 30px; }
  /* 右页顶部已有一块深色标题纸，标题组必须落在这块纸的安全区内。 */
  .history-detail-page { padding-top: 34px; padding-bottom: 42px; }
  /* 右上角猫咪占用固定插画区，标题在其左侧主动换行，禁止文字钻到插画下面。 */
  .history-next-step { max-width: 330px; }
  .history-next-heading { min-height: 96px; max-width: 250px; }
  .history-next-step .history-next-heading h2 { font-size: 20px; }
  .history-next-step h2 { margin-bottom: 8px; font-size: 22px; line-height: 1.28; }
  .history-next-step > p:not(.room-label) { margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
  .history-detail-page .privacy-notice { padding-top: 8px; }
  .history-detail-page .privacy-notice p { font-size: 10px; line-height: 1.4; }
  .history-data-actions .button-danger { font-size: 10px; }
}

/* 素材坐标修正：左上折角不是标题下方的普通行，而是独立的封面折角区域。 */
@media (min-width: 621px) {
  .material-folder-left { overflow: visible; }
  .material-folder-left > .room-label {
    position: absolute;
    top: -50px;
    left: -38px;
    z-index: 1;
    width: 88px;
    margin: 0;
    text-align: center;
  }
  /* 删除折角标签后仍保留上一版的内容起始线，避免左页整体上移。 */
  .material-folder-left > .section-title { margin-top: 40px; }
}
