/* SIHUMLAB_WORKSPACE_DESIGN
 * Screen furniture only. Never target :root, unscoped body/.app, #screen-study,
 * question/choice/answer content, or shared typography variables here.
 * The exam paper and print layout are intentionally outside this stylesheet.
 */
@media screen {
  /* Only the named workspace screens flatten their containing frame.
   * The selector stops matching when study, results or public pages open. */
  body:has(> .app > :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-signup, #screen-pyojeom).active) {
    background: #fff !important;
  }
  .app:has(> :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-signup, #screen-pyojeom).active) {
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    background: transparent !important; min-height: 0 !important;
  }
  :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-signup, #screen-pyojeom) {
    --page-content-width: 100%;
    width: 100% !important; max-width: 900px !important;
    padding: 16px 32px 32px !important; margin-inline: auto !important;
    min-height: 0 !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; background: transparent !important;
  }
  :is(#screen-sets, #screen-sets-sub, #screen-stats) > :is(.study-header, .page-title, .subject-category-grid, #subSetsList, #statsPeriodChips, #statsOverview, #statsHeatmap, #statsBySubject, #statsWeak, #statsRecent) {
    width: 100% !important; max-width: 100% !important; margin-inline: 0 !important;
  }
  :is(#screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-pyojeom) > .study-header {
    padding: 0 !important; margin-bottom: 0 !important; min-height: 44px;
    border: 0 !important; background: transparent !important;
  }
  :is(#screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-pyojeom) .study-header .back-btn {
    margin-left: 0 !important; padding-left: 0 !important; min-height: 44px;
  }
  #screen-sets-sub .study-header { flex-wrap: wrap; gap: 8px 20px; }
  #screen-sets-sub .study-header .page-title { margin: 0 !important; min-width: 0; }
  :is(#screen-sets, #screen-sets-sub) > .subject-category-grid { padding-bottom: 0 !important; }
  :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats,
      #screen-history, #screen-saved, #screen-weak, #screen-signup) {
    color: #202a36;
  }
  :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats,
      #screen-history, #screen-saved, #screen-weak, #screen-signup,
      #modal-login, #modal-session, #modal-resume) :focus-visible {
    outline: 2px solid #2451bf !important;
    outline-offset: 3px;
  }

  /* A quiet home desk: one primary action, one secondary action, real activity. */
  #screen-main .home-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    max-width: 900px !important;
    padding: 0 !important;
    margin-inline: auto;
    background: transparent;
  }
  #screen-main .home-wrap > * { grid-column: 1 / -1; min-width: 0; }
  #screen-main .main-topbar { margin: 0 0 8px !important; }
  #screen-main .user-badge { min-height: 44px; font-size: 14px !important; padding: 8px 14px !important; }
  #screen-main .user-badge.logged-in { background: #fff !important; color: #4b5868 !important; border: 1px solid #cbd3dd !important; font-weight: 500 !important; }
  #screen-main .user-badge.logged-in:hover { background: #f3f6fa !important; border-color: #9aa8ba !important; }
  #screen-main .home-header { margin: 0 0 28px !important; padding: 8px 0 0 !important; }
  #screen-main .home-greet { color: #606b78 !important; font-size: 15px !important; line-height: 1.6; }
  #screen-main .home-dday { margin-top: 8px !important; gap: 10px; flex-wrap: wrap; }
  #screen-main .home-dday-label { color: #202a36 !important; font-size: clamp(20px, 2.3vw, 26px) !important; font-weight: 750; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; white-space: normal !important; }
  #screen-main .home-dday-num { color: #52677f !important; font-size: 19px !important; font-weight: 650 !important; line-height: 1.5; font-variant-numeric: tabular-nums; }
  #screen-main .home-wrap > .home-primary-btn {
    grid-column: auto;
    width: 100%; min-width: 0; min-height: 58px;
    margin: 0 !important; padding: 15px 18px !important;
    border-radius: 4px !important; box-shadow: none !important;
    font-size: 17px !important; font-weight: 650; line-height: 1.5;
    transition: background-color .15s, border-color .15s;
    transform: none !important;
  }
  #screen-main .home-wrap > .home-primary-btn:first-of-type { background: #2451bf !important; color: #fff !important; border: 1px solid #2451bf !important; }
  #screen-main .home-wrap > .home-primary-btn:not(:first-of-type) { background: #fff !important; color: #2451bf !important; border: 1px solid #bbc8df !important; }
  #screen-main .home-wrap > .home-primary-btn:first-of-type:hover { background: #1c419d !important; }
  #screen-main .home-wrap > .home-primary-btn:not(:first-of-type):hover { background: #f1f5fc !important; }
  #screen-main .home-today-card {
    margin: 28px 0 0 !important; padding: 20px 0 !important;
    border: 0 !important; border-top: 1px solid #dce1e7 !important;
    border-bottom: 1px solid #dce1e7 !important; background: #fff !important;
    border-radius: 0 !important; box-shadow: none !important;
  }
  #screen-main .home-today-title { color: #4b5868 !important; font-size: 14px !important; margin-bottom: 16px !important; }
  #screen-main .home-today-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0; }
  #screen-main .home-today-stat { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; min-width: 0; padding: 4px 8px !important; border: 0 !important; }
  #screen-main .home-today-stat + .home-today-stat { border-top: 0 !important; border-left: 1px solid #e1e6ed !important; }
  #screen-main .home-today-val { color: #202a36 !important; font-size: 28px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
  #screen-main .home-today-label { color: #596574 !important; font-size: 13px !important; margin-top: 4px; }
  #screen-main .home-menu-list { gap: 0 !important; margin-top: 0 !important; border-bottom: 1px solid #dce1e7; }
  #screen-main :is(.home-menu-btn, .home-advanced-card) {
    min-width: 0; min-height: 64px; margin: 0 !important;
    padding: 14px 12px !important; border: 0 !important;
    border-radius: 0 !important; background: #fff !important;
    box-shadow: none !important; color: #303d4c !important;
    font-size: 15px !important; transform: none !important;
  }
  #screen-main :is(.home-menu-btn, .home-advanced-card):hover { background: #f3f6fa !important; }
  #screen-main :is(.home-menu-icon, .home-advanced-icon) { color: #52677f !important; background: transparent !important; }
  #screen-main .home-advanced-label { font-size: 15px !important; }
  #screen-main .home-resume-card { margin: 20px 0 0 !important; padding: 16px 18px !important; border: 1px solid #c4d2e7 !important; border-left: 3px solid #2451bf !important; background: #f5f8fd !important; }
  #screen-main .home-resume-title { font-size: 16px !important; white-space: normal !important; overflow-wrap: anywhere; }
  #screen-main .home-resume-meta { font-size: 13px !important; line-height: 1.65; }
  #screen-main .home-secondary-btn { min-height: 52px; font-size: 16px !important; border-radius: 4px !important; box-shadow: none !important; }
  #screen-main .home-reco-card { padding: 16px 0 !important; border: 0 !important; border-bottom: 1px solid #dce1e7 !important; background: #fff !important; border-radius: 0 !important; box-shadow: none !important; }
  #screen-main .home-reco-icon { background: transparent !important; color: #52677f !important; }

  /* Subject names remain readable, including long Korean course names. */
  :is(#screen-sets, #screen-sets-sub) .page-title { margin: 16px 0 24px !important; font-size: 26px !important; line-height: 1.4; }
  :is(#screen-sets, #screen-sets-sub) :is(.cat-group, .cat-group-section) { border: 0 !important; border-top: 2px solid #34465e !important; border-bottom: 1px solid #dce1e7 !important; background: #fff !important; border-radius: 0 !important; box-shadow: none !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-header { padding: 18px 12px !important; gap: 10px; display: flex !important; text-align: left !important; }
  :is(#screen-sets, #screen-sets-sub) :is(.cat-group-icon, .cat-subject-pill-icon) { display: none !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-header > :is(div, .cat-group-name) { min-width: 0; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-header > :is(.cat-group-arrow, .category-arrow) { margin-left: auto !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-name { font-size: 17px !important; line-height: 1.5; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-meta { font-size: 13px !important; line-height: 1.6; }
  :is(#screen-sets, #screen-sets-sub) .cat-group-subjects { gap: 0 !important; padding: 0 12px !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-subject-pill {
    min-height: 56px; padding: 12px 4px !important;
    border: 0 !important; border-bottom: 1px solid #e6eaf0 !important;
    border-radius: 0 !important; background: #fff !important;
    font-size: 15px !important; line-height: 1.55;
    display: flex !important; justify-content: flex-start !important; align-items: center !important;
    text-align: left !important; gap: 8px !important; color: #303d4c !important;
  }
  :is(#screen-sets, #screen-sets-sub) .cat-subject-pill:last-child { border-bottom: 0 !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-subject-pill:not(.cat-subject-pill--disabled):hover { background: #f2f6fc !important; }
  :is(#screen-sets, #screen-sets-sub) .cat-subject-pill-name { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
  :is(#screen-sets, #screen-sets-sub) :is(.cat-subject-pill-count, .cat-subject-pill-status) { font-size: 12px !important; line-height: 1.6; padding: 2px 6px; margin-left: auto !important; flex-shrink: 0; color: #606b78 !important; background: transparent !important; border: 0 !important; font-weight: 500 !important; text-align: right; }
  :is(#screen-sets, #screen-sets-sub) .cat-subject-pill--disabled { opacity: 1 !important; color: #68727e !important; }
  :is(#screen-sets, #screen-sets-sub) :is(.chip, .exam-stage-btn) { min-height: 44px; font-size: 14px !important; }

  /* Named dialogs share a bounded, scrollable surface; the exam is unaffected. */
  :is(#modal-login, #modal-session, #modal-resume, #modal-advanced-settings,
      #modal-delete-confirm, #modal-report, #modal-selective, #modal-copyright,
      #modal-ox-cfg, #modal-ox-custom, #modal-ox-subj-config, #modal-bar-config,
      #modal-all-confirm, #modal-pyo-confirm, #modal-id-verify, #modal-idverify-result,
      #modal-more-actions) .modal {
    width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px) !important;
    overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid #cbd3dd; padding: 28px !important;
    border-radius: 6px !important; background: #fff;
  }
  :is(#modal-login, #modal-session, #modal-resume, #modal-advanced-settings,
      #modal-delete-confirm, #modal-report, #modal-selective, #modal-copyright,
      #modal-ox-cfg, #modal-ox-custom, #modal-ox-subj-config, #modal-bar-config,
      #modal-all-confirm, #modal-pyo-confirm, #modal-id-verify, #modal-idverify-result,
      #modal-more-actions) .modal-title { font-size: 22px !important; line-height: 1.4; }
  :is(#modal-login, #modal-session, #modal-resume, #modal-advanced-settings,
      #modal-delete-confirm, #modal-report, #modal-selective, #modal-copyright,
      #modal-ox-cfg, #modal-ox-custom, #modal-ox-subj-config, #modal-bar-config,
      #modal-all-confirm, #modal-pyo-confirm, #modal-id-verify, #modal-idverify-result,
      #modal-more-actions) :is(.chip, .btn, .google-btn, .login-btn) { min-height: 44px; font-size: 14px !important; border-radius: 4px !important; }
  :is(#modal-login, #screen-signup) :is(input[type="email"], input[type="password"], input[type="text"]) { min-height: 48px; font-size: 16px !important; border: 1px solid #aebaca; border-radius: 4px !important; }
  #modal-session .chip { white-space: normal; line-height: 1.5; padding: 9px 12px; }
  :is(#modal-login, #modal-session, #modal-resume) .modal-actions { gap: 10px; }
  #modal-session .label-sm { font-size: 14px !important; color: #4b5868; line-height: 1.6; }
  #modal-session .config-section { margin-bottom: 22px; }
  #modal-session .chip-group { gap: 8px; flex-wrap: wrap; }
  #modal-session .chip.selected { border-color: #2451bf !important; background: #edf3ff !important; color: #1c419d !important; }
  #modal-session .config-hint { font-size: 13px !important; line-height: 1.7; }
  #modal-session #advancedToggleRow { min-height: 44px; box-sizing: border-box; padding-block: 10px; }
  #modal-session .btn-stack { margin-inline: -28px !important; padding-inline: 28px !important; }
  #modal-login #rememberRow { flex-wrap: wrap; gap: 10px 14px !important; }
  #modal-login #rememberRow :is(label, button) { min-height: 36px; display: inline-flex; align-items: center; font-size: 14px !important; }

  /* Previously separate screens follow the same title and navigation rhythm. */
  :is(#screen-saved, #screen-ox, #screen-pyojeom) > :is(.page-title, .study-header, #savedCountText, #savedProblemsList, .saved-bottom-action, #oxPickerGrid, .adapt-wrap) {
    width: 100% !important; max-width: 100% !important; margin-inline: 0 !important;
  }
  :is(#screen-ox, #screen-pyojeom) .page-title {
    font-size: 26px !important; line-height: 1.4; margin-block: 16px 24px !important;
    flex-wrap: wrap; overflow-wrap: anywhere;
  }
  :is(#screen-saved, #screen-ox, #screen-pyojeom) :focus-visible,
  :is(#modal-advanced-settings, #modal-delete-confirm, #modal-report, #modal-selective,
      #modal-ox-cfg, #modal-ox-custom, #modal-ox-subj-config, #modal-bar-config) :focus-visible {
    outline: 2px solid #2451bf !important; outline-offset: 3px;
  }
  #screen-saved [hidden] { display: none !important; }
  #screen-saved .saved-empty { padding: 24px 0 !important; border: 0 !important; border-block: 1px solid #dce1e7 !important; border-radius: 0 !important; background: transparent !important; text-align: left; line-height: 1.75; }
  #screen-saved .saved-item { border-radius: 4px !important; box-shadow: none !important; }
  #screen-saved .saved-item-top > :first-child { min-width: 0; overflow-wrap: anywhere; }
  #screen-saved .saved-item-top button { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  #screen-saved .saved-start-btn { min-height: 48px; border-radius: 4px !important; font-size: 15px; line-height: 1.5; }
  #screen-ox #oxMoreBtn { min-width: 44px; min-height: 44px; }
  #screen-ox .ox-pick-btn { min-height: 58px; margin: 0 !important; padding: 16px 4px !important; border: 0 !important; border-bottom: 1px solid #dce1e7 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; font-size: 15px !important; line-height: 1.6; }
  #screen-ox .ox-pick-btn:hover { background: #f3f6fa !important; }
  #screen-ox .ox-pick-btn > :first-child { min-width: 0; overflow-wrap: anywhere; }
  #screen-ox .ox-mode-tabs { gap: 8px; flex-wrap: wrap; }
  #screen-ox :is(.ox-mode-tab, .bar-year-chip, .ox-year-actions button) { min-height: 44px; border-radius: 4px !important; line-height: 1.5; }
  #screen-ox .ox-year-actions { flex-wrap: wrap; }
  #screen-ox .cat-group-section { border: 0 !important; border-top: 2px solid #34465e !important; border-bottom: 1px solid #dce1e7 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
  #screen-ox .cat-group-header { padding: 18px 12px !important; text-align: left !important; }
  #screen-ox .cat-group-icon { display: none !important; }
  #screen-ox .cat-group-subjects { padding-inline: 12px !important; gap: 0 !important; }
  #screen-ox .cat-subject-pill { min-height: 56px; padding: 12px 4px !important; border: 0 !important; border-bottom: 1px solid #e6eaf0 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; text-align: left !important; justify-content: flex-start !important; line-height: 1.55; }
  #screen-ox .cat-subject-pill-name { min-width: 0; white-space: normal !important; overflow-wrap: anywhere; }
  #screen-ox .cat-subject-pill-count { margin-left: auto; flex-shrink: 0; background: transparent !important; color: #606b78 !important; }
  #screen-pyojeom .page-title > button { min-height: 44px; font-size: 14px !important; }
  #screen-signup .su-wrap { padding: 0 0 32px !important; }
  #screen-signup .su-top { padding-top: 0; }
  #screen-signup .su-back { min-height: 44px; padding-left: 0; }
  #screen-signup .su-h { font-size: 26px; line-height: 1.4; }
  #screen-signup :is(.su-subt, .su-label) { font-size: 14px; line-height: 1.65; }
  #screen-signup :is(.su-step-pill, .su-agree-all, .su-agree, .su-cta, .su-ghost, .su-verify) { border-radius: 4px !important; box-shadow: none !important; }
  #screen-signup .su-agree-row { min-height: 44px; }
  #screen-signup .su-agree-row :is(a, .sl-linkbtn) { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 6px; }
  #modal-advanced-settings :is(.advanced-stage-card, .advanced-setting-card) { border-radius: 4px !important; box-shadow: none !important; padding: 16px !important; }
  #modal-advanced-settings :is(.advanced-stage-main, .advanced-setting-main) { min-width: 0; }
  #modal-advanced-settings .advanced-stage-meta { line-height: 1.65; overflow-wrap: anywhere; }
  #modal-advanced-settings .btn-row { display: flex; justify-content: flex-end; }
  #modal-advanced-settings .btn-row .btn { width: auto; min-width: 96px; flex: 0 0 auto; }
  #modal-report :is(textarea, input:not([type="hidden"])) { max-width: 100%; box-sizing: border-box; font-size: 16px !important; }
  :is(#modal-report, #modal-delete-confirm, #modal-selective) .modal-sub { line-height: 1.7; overflow-wrap: anywhere; }
  #screen-result .result-title { line-height: 1.4; }
  #screen-result #resultBtns { gap: 10px; }
  #screen-result #resultBtns .btn { min-height: 48px; border-radius: 4px !important; white-space: normal; line-height: 1.5; }
  :is(#localSaveNotice, #cloudSyncNotice) { box-sizing: border-box; max-width: 900px; margin: 12px auto; padding: 14px 20px; border: 1px solid #d3b080; border-left: 3px solid #99641b !important; border-radius: 4px; background: #fffaf0 !important; color: #593c12; font: 14px/1.65 system-ui, sans-serif; }
  :is(#localSaveNotice, #cloudSyncNotice) button { min-height: 44px; padding: 8px 16px; border: 1px solid #99641b; border-radius: 4px; background: #fff; color: #593c12; font: inherit; cursor: pointer; }
  :is(#localSaveNotice, #cloudSyncNotice) button:focus-visible { outline: 2px solid #2451bf; outline-offset: 3px; }

  /* Summaries and lists use the same reading rhythm as the course catalog. */
  :is(#screen-stats, #screen-history, #screen-saved, #screen-weak) .page-title { font-size: 26px !important; line-height: 1.4; margin-block: 16px 24px !important; }
  :is(#screen-stats, #screen-history, #screen-saved, #screen-weak) .section-title { font-size: 17px !important; margin-block: 24px 12px; }
  :is(#screen-stats, #screen-history, #screen-saved, #screen-weak) :is(.subject-stat-item, .recent-item, .history-item, .saved-item, .weak-item) { padding: 16px !important; border-color: #dce1e7 !important; border-radius: 4px !important; box-shadow: none !important; }
  :is(#screen-stats, #screen-history, #screen-saved, #screen-weak) :is(.chip, .filter-btn) { min-height: 44px; font-size: 14px !important; }
  #screen-stats .period-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  #screen-stats .period-chip { height: auto !important; min-height: 44px; padding: 9px 14px !important; font-size: 14px !important; line-height: 1.5; border-radius: 4px !important; }
  #screen-stats [hidden] { display: none !important; }
  #screen-stats .stats-empty { padding: 28px 0 20px; border-top: 1px solid #dce1e7; margin-top: 20px; }
  #screen-stats .stats-empty-title { margin: 0 0 10px; font-size: 20px; font-weight: 650; line-height: 1.5; color: #202a36; }
  #screen-stats .stats-empty-description { margin: 0; font-size: 15px; line-height: 1.75; color: #606b78; }
  #screen-stats .stats-section-note { padding: 0 0 16px; color: #606b78; font-size: 14px; line-height: 1.7; }
  #screen-stats .stats-start-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 22px; min-height: 48px; padding: 11px 20px; border: 1px solid #2451bf; border-radius: 4px; background: #2451bf; color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
  #screen-stats .stats-start-btn:hover { background: #1c419d; }
  #screen-stats .stats-period-note { margin: 20px 0; padding: 14px 0; border-block: 1px solid #dce1e7; color: #606b78; font-size: 14px; line-height: 1.7; }
  #screen-stats .stat-grid { gap: 0 !important; padding: 20px 0; border-block: 1px solid #dce1e7; margin-block: 20px !important; }
  #screen-stats .stat-card { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 8px 16px !important; background: transparent !important; }
  #screen-stats .stat-card + .stat-card { border-left: 1px solid #e1e6ed !important; }
  #screen-stats .stat-card-value { color: #202a36 !important; font-size: 26px !important; font-variant-numeric: tabular-nums; }
  #screen-stats #statsHeatmap { margin-block: 24px !important; }
  #screen-stats #statsHeatmap .section-header { justify-content: flex-start !important; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
  #screen-stats #statsHeatmap .section-title { margin: 0 !important; }
  #screen-stats #statsHeatmap .heatmap-meta { font-size: 13px; color: #606b78; }
  #screen-stats .heatmap-grid { gap: 5px; padding: 0; }
  #screen-stats .heatmap-col { gap: 5px; }
  #screen-stats .heatmap-cell { width: 16px; height: 16px; border-radius: 2px; }
  #screen-stats .heatmap-legend { justify-content: flex-start; margin-top: 10px; }

  @media (max-width: 640px) {
    :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats, #screen-saved, #screen-ox, #screen-signup, #screen-pyojeom) { padding: 16px 20px 28px !important; }
    #screen-main .home-wrap { padding: 0 !important; column-gap: 10px; }
    #screen-stats .stat-card { padding: 10px 12px !important; }
    #screen-stats .stat-card:nth-child(3) { border-left: 0 !important; }
    #screen-main .home-header { margin-bottom: 22px !important; }
    #screen-main .home-wrap > .home-primary-btn { font-size: 16px !important; padding: 14px 8px !important; gap: 8px; }
    #screen-main .home-today-val { font-size: 24px !important; }
    #screen-main .home-today-label { font-size: 12px !important; }
    #screen-main :is(.home-menu-btn, .home-advanced-card) { padding: 14px 8px !important; font-size: 14px !important; }
    #screen-main .home-advanced-label { font-size: 14px !important; }
    :is(#modal-login, #modal-session, #modal-resume, #modal-advanced-settings,
        #modal-delete-confirm, #modal-report, #modal-selective, #modal-copyright,
        #modal-ox-cfg, #modal-ox-custom, #modal-ox-subj-config, #modal-bar-config,
        #modal-all-confirm, #modal-pyo-confirm, #modal-id-verify, #modal-idverify-result,
        #modal-more-actions) .modal { padding: 24px 18px !important; }
    #modal-session .btn-stack { margin-inline: -18px !important; padding-inline: 18px !important; }
  }
  @media (max-width: 360px) {
    #screen-main .home-wrap > .home-primary-btn { grid-column: 1 / -1; }
    #screen-main .home-wrap > .home-primary-btn + .home-primary-btn { margin-top: 10px !important; }
    #screen-main .home-menu-list { grid-template-columns: 1fr !important; }
    #screen-main .home-today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 16px; }
    #screen-main .home-today-stat:nth-child(3) { border-left: 0 !important; }
    #screen-main :is(.home-menu-btn, .home-advanced-card) { min-height: 48px; }
  }
  @media (prefers-reduced-motion: reduce) {
    :is(#screen-main, #screen-sets, #screen-sets-sub, #screen-stats,
        #screen-history, #screen-saved, #screen-weak, #screen-signup,
        #modal-login, #modal-session, #modal-resume) * {
      animation: none !important; transition: none !important; scroll-behavior: auto !important;
    }
  }
}
@media print {
  #localSaveNotice, #cloudSyncNotice { display: none !important; }
}
