/* CPA app-owned short-answer headings and actions. Never change question text. */
@media screen {
  #screen-study#screen-study.short-study-mode #probMeta {
    font-family:var(--ui-font, "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif) !important;
    font-size:16px !important;
    font-weight:700 !important;
    line-height:1.5 !important;
    letter-spacing:normal !important;
    color:#202a36 !important;
    max-width:none !important;
    padding:14px 30px 12px !important;
    border-bottom:1px solid #e1e5ea !important;
  }
  #screen-study#screen-study.short-study-mode .sa-section-label {
    font-family:var(--ui-font, "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif) !important;
    font-size:15px !important;
    font-weight:700 !important;
    line-height:1.5 !important;
    letter-spacing:normal !important;
    color:#202a36 !important;
  }
  #screen-study#screen-study.short-study-mode .cpa-short-flow-actions .study-mini-nav-btn {
    font-family:var(--ui-font, "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif) !important;
    font-size:15px !important;
    font-weight:600 !important;
    line-height:1.4 !important;
    letter-spacing:normal !important;
  }
  @media (min-width:641px) {
    #screen-study#screen-study.short-study-mode {
      min-height:0 !important;
      padding-bottom:24px !important;
    }
    #screen-study#screen-study.short-study-mode .study-mini-nav.cpa-short-flow-actions {
      position:static !important;
      inset:auto !important;
      transform:none !important;
      display:flex !important;
      align-items:center !important;
      justify-content:flex-end !important;
      gap:12px !important;
      width:min(920px, calc(100vw - 32px)) !important;
      max-width:none !important;
      margin:12px auto 0 !important;
      padding:0 !important;
      border:0 !important;
      border-radius:0 !important;
      background:transparent !important;
      box-shadow:none !important;
      box-sizing:border-box !important;
      pointer-events:auto !important;
    }
    #screen-study#screen-study.short-study-mode .cpa-short-flow-actions .study-mini-nav-btn {
      position:static !important;
      transform:none !important;
      width:auto !important;
      min-width:96px !important;
      min-height:44px !important;
      height:44px !important;
      margin:0 !important;
      padding:0 20px !important;
      border-radius:4px !important;
      box-shadow:none !important;
      white-space:nowrap !important;
    }
  }
}
@media screen {
  #screen-study#screen-study.short-study-mode .study-paper-box.active.short-mode > .prob-text > .sa-section-label {
    position:absolute !important; width:1px !important; height:1px !important; margin:-1px !important;
    padding:0 !important; border:0 !important; overflow:hidden !important;
    clip-path:inset(50%) !important; white-space:nowrap !important;
  }
  #screen-study#screen-study.short-study-mode .study-paper-box.active.short-mode { padding-bottom:16px !important; }
  #screen-study#screen-study.short-study-mode .sa-result-area { padding-bottom:16px !important; }
  #screen-study#screen-study.short-study-mode .sa-result-title-row { justify-content:flex-start !important; align-items:center !important; gap:8px !important; }
  #screen-study#screen-study.short-study-mode .sa-result-state { font-size:12px !important; font-weight:600 !important; line-height:1.4 !important; }
  #screen-study#screen-study.short-study-mode .sa-result-summary { font-size:15px !important; font-weight:700 !important; }
  #screen-study#screen-study.short-study-mode .sa-result-head.is-review .sa-result-summary { color:#9b2c1f !important; }
  #screen-study#screen-study.short-study-mode .sa-result-corrections { border-bottom:0 !important; padding-bottom:0 !important; font-size:14px !important; font-weight:400 !important; color:#4b5868 !important; }
  #screen-study#screen-study.short-study-mode :is(#studyCounter,#studyProgressRight,.sa-result-summary) { font-variant-numeric:tabular-nums; }
  #screen-study#screen-study.short-study-mode :is(#prevBtn,#nextBtn)::after { content:none !important; }
  #screen-study#screen-study.short-study-mode .cpa-short-flow-actions .study-mini-nav-btn {
    position:static !important; transform:none !important; margin:0 !important;
    background:#fff !important; color:#202a36 !important; border:1px solid #cbd3dd !important;
    border-radius:4px !important; box-shadow:none !important; white-space:nowrap !important;
  }
  #screen-study#screen-study.short-study-mode .cpa-short-flow-actions #nextBtn.short-mode-action { background:#2451bf !important; border-color:#2451bf !important; color:#fff !important; }
  #screen-study#screen-study.short-study-mode .cpa-short-flow-actions #nextBtn.short-mode-action:hover { background:#1c419d !important; }
  #screen-study#screen-study.short-study-mode .cpa-short-flow-actions #prevBtn:disabled { opacity:1 !important; color:#606b78 !important; background:#fff !important; }
  #screen-study#screen-study.short-study-mode :is(.study-mini-nav-btn,.sa-section-label,#probMeta):focus-visible { outline:2px solid #2451bf !important; outline-offset:2px !important; }
  #screen-study#screen-study.short-study-mode .prob-text :is(input,select,textarea) { scroll-margin-bottom:96px; }
  #screen-study#screen-study.short-study-mode .prob-text :is(input,select,textarea):focus-visible { outline:2px solid #2451bf !important; outline-offset:2px !important; }
  #screen-study#screen-study.short-study-mode .study-progress-wrap { height:auto !important; min-height:0 !important; margin-bottom:20px !important; }
  #screen-study#screen-study.short-study-mode .study-progress-row { align-items:end !important; }
  #screen-study#screen-study.short-study-mode #studyQuestionCard { margin-top:0 !important; }
  @media (max-width:640px) {
    #screen-study#screen-study.short-study-mode { min-height:0 !important; padding-bottom:0 !important; }
    #screen-study#screen-study.short-study-mode .study-progress-wrap { margin-bottom:12px !important; }
    #screen-study#screen-study.short-study-mode #probMeta { padding:14px 18px 12px !important; }
    #screen-study#screen-study.short-study-mode .study-mini-nav.cpa-short-flow-actions {
      position:sticky !important; inset:auto 0 0 !important; bottom:0 !important; transform:none !important;
      display:grid !important; grid-template-columns:1fr 2fr !important; gap:8px !important;
      width:100% !important; max-width:none !important; margin:12px 0 0 !important; box-sizing:border-box !important;
      padding:8px 12px calc(8px + env(safe-area-inset-bottom)) !important;
      background:#eef1f4 !important; border:0 !important; border-top:1px solid #dce1e7 !important;
      border-radius:0 !important; box-shadow:none !important; z-index:40 !important;
    }
    #screen-study#screen-study.short-study-mode .cpa-short-flow-actions .study-mini-nav-btn { width:100% !important; min-width:0 !important; height:48px !important; min-height:48px !important; }
  }
}
@media print {
  #screen-study .cpa-short-flow-actions { display:none !important; }
}

/* CPA-only selection helpers. Keep inline paper metrics and native answer fields intact. */
@media screen {
  #screen-study .cpa-repeat-note { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-left:12px; font:400 13px/1.5 "Pretendard Variable",Pretendard,"Noto Sans KR",system-ui,sans-serif; letter-spacing:normal; color:#606b78; vertical-align:middle; }
  #screen-study .cpa-repeat-label { padding:2px 6px; border:1px solid #cbd3dd; border-radius:3px; font-weight:600; color:#4b5868; }
  #screen-study#screen-study.short-study-mode .sa-order-chip,
  #screen-study#screen-study.short-study-mode .sa-order-reset { min-height:44px !important; min-width:44px !important; }
  .cpa-choice-picker-layer { position:fixed; inset:0; z-index:20000; background:rgba(17,24,39,.08); }
  .cpa-choice-picker { position:fixed; box-sizing:border-box; width:min(360px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:16px; background:#fff; color:#202a36; border:1px solid #aeb8c6; border-radius:6px; box-shadow:0 8px 24px rgba(17,24,39,.16); font:400 15px/1.5 "Pretendard Variable",Pretendard,"Noto Sans KR",system-ui,sans-serif; }
  .cpa-choice-picker-title { font-size:15px; font-weight:700; margin-bottom:12px; }
  .cpa-choice-picker-options { display:grid; gap:8px; }
  .cpa-choice-picker button { box-sizing:border-box; min-height:44px; padding:10px 14px; border:1px solid #cbd3dd; border-radius:4px; background:#fff; color:#202a36; font:600 15px/1.5 "Pretendard Variable",Pretendard,"Noto Sans KR",system-ui,sans-serif; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
  .cpa-choice-picker-option[aria-pressed="true"] { border-color:#2451bf; background:#edf2ff; color:#2451bf; }
  .cpa-choice-picker button:focus-visible { outline:2px solid #2451bf; outline-offset:2px; }
  .cpa-choice-picker button:disabled { color:#737e8d; cursor:default; }
  .cpa-choice-picker-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; border-top:1px solid #e1e5ea; padding-top:12px; }
  @media (max-width:640px) {
    #screen-study .cpa-repeat-note { display:flex; margin:6px 0 0; }
    .cpa-choice-picker { left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); width:auto; max-height:calc(100dvh - 24px - env(safe-area-inset-bottom)); }
    .cpa-choice-picker button { min-height:48px; }
  }
}
@media print { .cpa-choice-picker-layer, #screen-study .cpa-repeat-note { display:none !important; } }
