/* 紧凑阅读：只作用于正在答题的页面；保留原组件、题文与保存逻辑。 */
@layer debater-visual-system {
  html body app-judge-profile-test:has(.question-stage) .judge-test-shell {
    padding: 90px 24px 20px !important;
    min-height: 100svh !important;
    background: var(--dv-surface, #211c18) !important;
  }
  html[data-debater-wallpaper][data-wallpaper-tone] body app-judge-profile-test:has(.question-stage) .judge-test-shell { background: var(--dv-surface, #211c18) !important; }
  html body app-judge-profile-test:has(.question-stage) .judge-test-wrap {
    display: block !important;
    position: relative;
    width: min(1120px, 100%) !important;
    margin: 0 auto !important;
  }
  html body app-judge-profile-test:has(.question-stage) .judge-masthead {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    height: 44px !important;
    width: 40%;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  html body app-judge-profile-test:has(.question-stage) .back-link {
    position: static !important;
    order: -1;
    min-height: 44px;
    padding: 8px 10px !important;
    margin: 0 !important;
    font-size: 12px !important;
    white-space: nowrap;
  }
  html body app-judge-profile-test:has(.question-stage) .seal {
    width: 32px !important; height: 36px !important;
    flex: none; font-size: 22px !important;
  }
  html body app-judge-profile-test:has(.question-stage) h1 {
    margin: 0 !important; font-size: 24px !important; line-height: 1.3 !important;
  }
  html body app-judge-profile-test:has(.question-stage) :is(.eyebrow, .subtitle) { display: none !important; }
  /* 保留 stage 的实体盒子：现有键盘增强会检查其可见矩形。 */
  html body app-judge-profile-test .question-stage { display: block !important; position: static !important; max-width: none !important; margin: 0 !important; }
  html body app-judge-profile-test .progress-head {
    position: absolute !important;
    top: 0; left: calc(40% + 20px); right: 0;
    align-items: center !important;
    min-height: 22px !important;
    height: 22px !important;
    gap: 8px !important;
    margin: 0 !important; padding: 0 !important;
    font-size: 13px !important;
  }
  html body app-judge-profile-test .progress-meta { gap: 10px !important; flex-wrap: wrap; }
  html body app-judge-profile-test .progress-row {
    position: absolute !important;
    top: 30px; left: calc(40% + 20px); right: 0;
    height: 14px;
    margin: 0 !important; padding: 0 !important;
  }
  html body app-judge-profile-test .progress-track { height: 5px !important; }
  html body app-judge-profile-test .question-card {
    min-height: 0 !important;
    padding: 12px 18px !important;
    margin: 0 !important;
    border: 1px solid var(--dv-line, #4b4035) !important;
    border-radius: 8px !important;
    background: var(--dv-surface, #211c18) !important;
  }
  html body app-judge-profile-test .case-brief {
    padding: 0 !important; margin: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important;
  }
  html body app-judge-profile-test :is(.topic-line, .topic-chip) {
    padding: 0 0 8px !important; margin: 0 0 8px !important;
    font-size: 13px !important; line-height: 1.5 !important;
    border-bottom: 1px solid var(--dv-line, #4b4035) !important;
  }
  html body app-judge-profile-test .case-text.jp-quote-enhanced { margin: 0 !important; }
  html body app-judge-profile-test .jp-quote { padding: 10px 14px !important; }
  html body app-judge-profile-test .jp-quote-kicker { margin: 0 0 6px !important; line-height: 1.4 !important; }
  html body app-judge-profile-test .jp-quote-turns { gap: 7px !important; }
  html body app-judge-profile-test .jp-quote-turn { border: 0 !important; padding: 0 !important; }
  html body app-judge-profile-test .jp-quote-turn-meta { margin-bottom: 2px !important; gap: 4px 8px !important; }
  html body app-judge-profile-test .jp-quote-speaker { font-size: 12.5px !important; line-height: 1.4 !important; }
  html body app-judge-profile-test .jp-quote-words { font-size: 15.5px !important; line-height: 1.6 !important; }
  html body app-judge-profile-test .jp-quote-source {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
    margin-top: 7px !important; padding-top: 6px !important;
  }
  html body app-judge-profile-test .jp-quote-match { flex: 1 1 auto; margin: 0 !important; font-size: 11px !important; line-height: 1.5 !important; }
  html body app-judge-profile-test .jp-quote-video { margin: 0 !important; font-size: 11px !important; }
  html body app-judge-profile-test .jp-quote-source-details > summary { padding: 3px 0 !important; font-size: 11px !important; }
  html body app-judge-profile-test .jp-quote-source:has(details[open]) { display: block; }
  html body app-judge-profile-test .question-card h2 {
    margin: 10px 0 8px !important;
    font-size: 21px !important; line-height: 1.5 !important;
    font-weight: 500 !important; letter-spacing: normal !important;
    text-align: left !important;
  }
  html body app-judge-profile-test .scale-layout { display: flex !important; flex-direction: column !important; gap: 8px !important; padding: 0 !important; margin: 0 !important; }
  html body app-judge-profile-test .scale-anchor-pair {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    align-items: start !important; gap: 14px !important;
    padding: 6px 12px !important;
    border: 1px solid var(--dv-line, #4b4035) !important; border-radius: 6px !important;
  }
  html body app-judge-profile-test .scale-anchor { display: block !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  html body app-judge-profile-test :is(.scale-anchor-badge, .scale-anchor-divider) { display: none !important; }
  html body app-judge-profile-test .scale-anchor-high { border-left: 1px solid var(--dv-line, #4b4035) !important; padding-left: 14px !important; }
  html body app-judge-profile-test .scale-anchor p { margin: 0 !important; font-size: 14px !important; line-height: 1.5 !important; }
  html body app-judge-profile-test .scale-choice-zone { display: block !important; width: 100% !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  html body app-judge-profile-test .scale-options { display: grid !important; grid-template-columns: repeat(7, minmax(44px, 1fr)) !important; gap: 0 !important; margin: 0 !important; }
  html body app-judge-profile-test .scale-options button { min-width: 44px !important; min-height: 46px !important; height: 46px !important; padding: 4px 8px !important; border-radius: 6px !important; font-size: 16px !important; transform: none !important; }
  html body app-judge-profile-test .scale-segments { margin: 4px 0 0 !important; }
  html body app-judge-profile-test .segment { padding-top: 3px !important; font-size: 11px !important; line-height: 1.4 !important; letter-spacing: 0 !important; }
  html body app-judge-profile-test .scenario-options { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  html body app-judge-profile-test .scenario-options button { min-height: 48px !important; padding: 8px 12px !important; gap: 8px !important; border-radius: 6px !important; font-size: 14.5px !important; }
  html body app-judge-profile-test .scenario-options button b { width: 24px !important; height: 24px !important; }
  html body app-judge-profile-test .scenario-options button span { line-height: 1.5 !important; }
  html body app-judge-profile-test .question-actions { gap: 8px !important; margin: 8px 0 0 !important; padding: 4px 0 0 !important; border: 0 !important; }
  html body app-judge-profile-test .question-actions button { min-height: 44px !important; padding: 8px 14px !important; font-size: 13px !important; }
  html body app-judge-profile-test .auto-advance-hint { font-size: 12px !important; line-height: 1.5 !important; color: var(--dv-muted, #b1a494) !important; }
  html body:has(app-judge-profile-test .question-stage) .debater-global-footer { padding-block: 18px !important; }
  html[data-debater-wallpaper][data-wallpaper-tone] body:has(app-judge-profile-test .question-stage) #debater-function-wallpaper { display: none !important; }

  @media (max-width: 980px) {
    html body app-judge-profile-test:has(.question-stage) .judge-masthead { width: 100%; margin-bottom: 6px !important; }
    html body app-judge-profile-test .progress-head { position: static !important; margin-bottom: 6px !important; }
    html body app-judge-profile-test .progress-row { position: static !important; margin-bottom: 8px !important; }
  }
  @media (max-width: 720px) {
    html body app-judge-profile-test:has(.question-stage) .judge-test-shell { padding: 78px 12px 14px !important; }
    html body app-judge-profile-test:has(.question-stage) .judge-masthead { gap: 8px !important; }
    html body app-judge-profile-test:has(.question-stage) h1 { font-size: 21px !important; }
    html body app-judge-profile-test:has(.question-stage) .seal { width: 28px !important; height: 32px !important; font-size: 20px !important; }
    html body app-judge-profile-test .progress-head { font-size: 12px !important; }
    html body app-judge-profile-test .progress-row { height: 10px; }
    html body app-judge-profile-test .progress-meta { gap: 4px 8px !important; }
    html body app-judge-profile-test .question-card { padding: 10px 12px !important; }
    html body app-judge-profile-test .jp-quote { padding: 8px 10px !important; }
    html body app-judge-profile-test .jp-quote-words { font-size: 15px !important; }
    /* 仅长材料区滚动；题干、选项与原始来源不被裁切或改写。 */
    html body app-judge-profile-test .jp-quote-turns { max-height: clamp(96px, calc(100svh - 700px), 220px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding-right: 4px; }
    html body app-judge-profile-test .jp-quote-turns:focus-visible { outline: 2px solid var(--dv-accent, #ef8475); outline-offset: 2px; }
    html body app-judge-profile-test .question-card:has(.scenario-options) .jp-quote-turns { max-height: clamp(80px, calc(100svh - 748px), 180px); }
    html body app-judge-profile-test .jp-quote-source { gap: 4px 12px; }
    /* 题目与完整出处已分别展示；手机收起重复的整行赛事标题。 */
    html body app-judge-profile-test .jp-quote-match { display: none !important; }
    html body app-judge-profile-test .question-card h2 { font-size: 19px !important; line-height: 1.5 !important; margin: 8px 0 !important; }
    html body app-judge-profile-test .scale-anchor-pair { gap: 10px !important; padding: 6px 8px !important; }
    html body app-judge-profile-test .scale-anchor-high { padding-left: 10px !important; }
    html body app-judge-profile-test .scale-anchor p { font-size: 13.5px !important; }
    html body app-judge-profile-test .scale-options button { padding-inline: 2px !important; }
    html body app-judge-profile-test .scenario-options button { display: grid !important; grid-template-columns: 16px 1fr; gap: 6px !important; padding: 8px !important; }
    html body app-judge-profile-test .scenario-options button b { width: auto !important; height: auto !important; border: 0 !important; }
    html body app-judge-profile-test .option-check { display: none !important; }
    html body app-judge-profile-test .question-actions { grid-template-columns: 1fr 1fr !important; }
    html body app-judge-profile-test .auto-advance-hint { grid-column: 1 / -1; grid-row: 2; text-align: center !important; }
  }
  @media (max-width: 360px) {
    html body app-judge-profile-test:has(.question-stage) .judge-test-shell { padding-inline: 6px !important; }
    html body app-judge-profile-test:has(.question-stage) h1 { font-size: 18px !important; }
    html body app-judge-profile-test:has(.question-stage) .back-link { padding-inline: 6px !important; font-size: 11px !important; }
    html body app-judge-profile-test .question-card { padding-inline: 6px !important; }
    html body app-judge-profile-test .scale-options { grid-template-columns: repeat(4, minmax(44px, 1fr)) !important; gap: 4px !important; }
    html body app-judge-profile-test .scenario-options { grid-template-columns: 1fr !important; }
  }
}
