/* static/css/dashboard_row_keyboard.css */
.dash-tbl .dash-row-detail-action {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: left;
    white-space: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.dash-tbl .dash-row-detail-action:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.dash-tbl .dash-row-detail-action.dash-private-bid-title-cell {
    display: flex;
}

.dash-tbl th.col-rate {
    position: relative;
    white-space: nowrap;
}

.dash-rate-help {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    padding: 0;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    background: #fff;
    color: #475569;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    cursor: help;
    vertical-align: middle;
}

.dash-rate-tooltip {
    position: fixed;
    width: min(300px, calc(100vw - 36px));
    padding: 9px 11px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .24);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
}

.dash-rate-help:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .dash-rate-help {
        width: 44px;
        height: 44px;
        line-height: 42px;
    }
}

/* static/css/detail_history_loading.css */
/* Stable async states for organization/company history dialogs. */
.org-history-dialog {
    position: relative;
}

.org-history-stable-state {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #64748b;
    text-align: center;
}

.org-history-stable-state.is-loading::before,
.company-history-partners-placeholder::before {
    width: 22px;
    height: 22px;
    border: 3px solid #cbd5e1;
    border-top-color: #1769aa;
    border-radius: 50%;
    content: "";
    animation: detail-history-spin 0.8s linear infinite;
}

.org-history-stable-state button,
.org-history-detail-pending button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #9fc5df;
    border-radius: 7px;
    background: #ffffff;
    color: #15577f;
    font-weight: 800;
    cursor: pointer;
}

.org-history-detail-pending {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    text-align: center;
}

.org-history-detail-pending.is-loading::before {
    width: 28px;
    height: 28px;
    border: 3px solid #cbd5e1;
    border-top-color: #1769aa;
    border-radius: 50%;
    content: "";
    animation: detail-history-spin 0.8s linear infinite;
}

.company-history-partners-placeholder {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 14px;
    border: 1px solid #dbe5ee;
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
}

.oh-consortium-slot {
    display: inline-flex;
    min-width: 28px;
    min-height: 22px;
    align-items: center;
}

@keyframes detail-history-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    .org-history-stable-state {
        min-height: 200px;
    }

    .org-history-detail-pending {
        padding-right: 18px;
        padding-left: 18px;
    }
}

/* static/css/search_filter_accessibility.css */
/* Search-filter dialog semantics and touch targets. */
#searchFilterDialog .filter-section-header {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    appearance: none;
}

#searchFilterDialog .filter-section-header-main {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

#searchFilterDialog :is(button, input, select):focus-visible,
#filterSaveDialog :is(button, input, select):focus-visible,
#licenseDialog :is(button, input, select):focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    outline-offset: 2px;
}

/* D1-4: 현재 목록의 조건과 상태별 전체 집계를 결과 화면에서 구분한다. */
#resultsSection .results-scope-note {
    margin: 2px 0 0;
    color: var(--text-secondary, #536174);
    font-size: 0.72rem;
    line-height: 1.4;
    white-space: normal;
}

#resultsSection .results-aggregate-scope {
    grid-column: 1 / -1;
    padding: 8px;
    margin: 0;
    border-radius: 6px;
    background: var(--bg-secondary, #f0f4f8);
}

#resultsSection .results-applied-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 4px;
}

#resultsSection .results-applied-filter-chips[hidden] {
    display: none;
}

#resultsSection .results-license-chip,
#resultsSection .results-unsaved-filter-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border: 1px solid var(--border-color, #d8e0e9);
    border-radius: 8px;
    background: var(--bg-secondary, #f0f4f8);
    color: var(--text-primary, #172033);
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#resultsSection .results-license-chip > span {
    min-width: 0;
    padding: 4px 0 4px 8px;
}

#resultsSection .results-unsaved-filter-chip {
    padding: 6px 8px;
    border-style: dashed;
    background: transparent;
    color: var(--text-secondary, #536174);
}

#resultsSection .results-license-remove {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 1.15rem;
    cursor: pointer;
}

#resultsSection .results-license-remove:focus-visible {
    outline: 2px solid var(--accent-color, #1769aa);
    outline-offset: -3px;
}

@media (max-width: 767px) {
    #searchFilterDialog button,
    #searchFilterDialog select,
    #searchFilterDialog input[type="text"],
    #searchFilterDialog input[type="search"] {
        min-height: 44px;
        box-sizing: border-box;
    }

    #searchFilterDialog .sfd-close-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    #searchFilterDialog .filter-section-header,
    #searchFilterDialog .region-chip,
    #searchFilterDialog .data-type-chip,
    #searchFilterDialog #districtPanel label {
        min-height: 44px;
        box-sizing: border-box;
    }

    #searchFilterDialog .sfd-footer button {
        min-width: 44px;
    }

    #searchFilterDialog .sfd-body {
        overscroll-behavior: contain;
    }

    #filterSaveDialog button,
    #filterSaveDialog input[type="text"],
    #licenseDialog button,
    #licenseDialog input[type="text"],
    #licenseDialog input[type="search"] {
        min-height: 44px;
        box-sizing: border-box;
    }

    #filterSaveDialog .fsd-close-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    #filterSaveDialog .fsd-alert-toggle,
    #licenseDialog :is(.license-select-all-btn, .license-switch, .license-choice-item) {
        min-height: 44px;
        box-sizing: border-box;
    }
}

/* UIFIX-5: use the existing dark palette only for result explanations/chips. */
html[data-theme="dark"] #resultsSection .results-scope-note,
html[data-theme="dark"] #resultsSection .results-unsaved-filter-chip {
    color: var(--color-text-secondary, #bdc9d8);
}

html[data-theme="dark"] #resultsSection .results-aggregate-scope,
html[data-theme="dark"] #resultsSection .results-license-chip {
    background: var(--color-surface-soft, #111a29);
}

html[data-theme="dark"] #resultsSection .results-license-chip {
    color: var(--color-text, #e7eef8);
}

html[data-theme="dark"] #resultsSection .results-license-chip,
html[data-theme="dark"] #resultsSection .results-unsaved-filter-chip {
    border-color: var(--color-border, rgba(143, 160, 181, 0.24));
}

/* static/css/public_onboarding_cta.css */
/* Public onboarding controls stay easy to tap without changing the fixed main menu. */
@media (max-width: 767px) {
    #closedBetaNotice #closedBetaLoginBtn,
    #closedBetaNotice #closedBetaSupportBtn,
    #homePrivateBidCreateAction.home-search-create-link {
        min-width: 44px;
        min-height: 44px;
    }

    #closedBetaNotice #closedBetaLoginBtn,
    #closedBetaNotice #closedBetaSupportBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* The public auth modal is another first-entry surface, not part of the fixed menu. */
    #authModal button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Keep every signup wizard action comfortably tappable without enlarging its copy. */
    #signupWizardOverlay .sw-btn,
    #signupWizardOverlay .sw-password-toggle {
        min-height: 44px;
    }

    #signupWizardOverlay .sw-password-toggle {
        min-width: 44px;
    }

    /* Keep the fixed footer inside short landscape viewports while the step body scrolls. */
    #signupWizardOverlay .sw-body {
        min-height: 0;
    }

    #signupWizardOverlay .sw-header,
    #signupWizardOverlay .sw-footer {
        flex: 0 0 auto;
    }

    #signupWizardOverlay .sw-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        inline-size: 44px;
        block-size: 44px;
        min-inline-size: 44px;
        min-block-size: 44px;
        padding: 0;
        box-sizing: border-box;
    }

    #signupWizardOverlay .sw-input {
        min-height: 44px;
    }
}

/* static/css/auth_form_feedback.css */
#authModal .auth-form-status {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.45;
}

#authModal .auth-form-status.hidden {
    display: none !important;
}

#authModal .auth-form-status.auth-form-status-error {
    border-color: #f5b7b1;
    background: #fff5f5;
    color: #a61b1b;
}

#authModal .auth-form-status.auth-form-status-success {
    border-color: #9fd5b0;
    background: #f0fff4;
    color: #176b35;
}

#authModal .auth-form [aria-invalid="true"] {
    border-color: #c53030;
    box-shadow: 0 0 0 2px rgba(197, 48, 48, 0.14);
}

@media (max-width: 767px) {
    #authModal .auth-form input:not([type="hidden"]),
    #authModal .auth-form select {
        min-height: 44px;
    }
}

/* static/css/consult_access.css */
/* AI 상담의 모바일 조작 계약. 기본 시각 밀도는 유지하고 실제 hit area만 보강한다. */
@media (max-width: 767px) {
    #consultOverlay .consult-overlay-btn,
    #consultOverlay .consult-quick-btn,
    #consultOverlay .consult-suggestion-btn,
    #consultOverlay .consult-send-btn,
    #consultOverlay #consultInput {
        box-sizing: border-box;
        min-height: 44px;
    }

    #consultOverlay .consult-overlay-btn,
    #consultOverlay .consult-quick-btn,
    #consultOverlay .consult-suggestion-btn,
    #consultOverlay .consult-send-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #consultOverlay .consult-close-btn {
        min-width: 44px;
        padding: 4px 10px;
    }

    #consultOverlay #consultInput {
        width: 100%;
    }
}

/* D2-14: the same conversation layout at each width on web and app. */
body.unified-page #consultOverlay {
    top: max(var(--app-overlay-safe-top, 0px), var(--consult-header-bottom, 0px)) !important;
    padding: 8px 16px 16px;
}

#consultOverlay .consult-overlay-panel {
    max-height: calc(var(--app-visual-viewport-height, 100dvh)
        - var(--consult-header-bottom, 0px) - var(--app-dialog-safe-bottom, 0px) - 24px) !important;
    animation: none;
}

/* Override the shared sheet's height only to reserve the header as well. */
:root body #consultOverlay .consult-overlay-panel.app-bottom-sheet {
    max-height: calc(var(--app-sheet-visible-height, 100dvh)
        - max(0px, var(--consult-header-bottom, 0px) - var(--app-visual-viewport-offset-top, 0px))
        - max(0px, var(--app-dialog-safe-bottom, 0px) - var(--app-sheet-keyboard-inset, 0px)) - 8px) !important;
    overflow: hidden;
    animation: none;
}

#consultOverlay .consult-messages {
    min-height: 0;
    overflow-x: hidden;
}

#consultOverlay .consult-message {
    min-width: 0;
}

#consultOverlay .consult-message .bubble {
    box-sizing: border-box;
    width: fit-content;
    min-width: 0;
    max-width: 82%;
    overflow-wrap: anywhere;
}

#consultOverlay .consult-message.user .bubble {
    white-space: pre-wrap;
}

#consultOverlay .bubble > :first-child { margin-top: 0; }
#consultOverlay .bubble > :last-child { margin-bottom: 0; }
#consultOverlay .bubble p { margin: 0 0 8px; }
#consultOverlay .bubble :is(h1, h2, h3, h4, h5, h6) {
    margin: 12px 0 6px;
    font-size: 1em;
    line-height: 1.4;
}
#consultOverlay .bubble :is(ul, ol) { margin: 6px 0; padding-left: 1.4em; }
#consultOverlay .bubble pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    padding: 8px;
    border-radius: 6px;
    background: var(--color-bg-secondary, #e2e8f0);
}
#consultOverlay .bubble code { font-size: 0.9em; }
#consultOverlay .bubble blockquote {
    margin: 8px 0;
    padding-left: 10px;
    border-left: 3px solid currentColor;
}
#consultOverlay .bubble a { color: inherit; text-decoration: underline; }
#consultOverlay .consult-result-message { box-sizing: border-box; }
#consultOverlay .consult-result-card { min-width: 0; overflow-wrap: anywhere; }
#consultOverlay .consult-result-card-top { flex-wrap: wrap; }
#consultOverlay .consult-result-action { min-height: 44px; }
#consultOverlay .consult-input-row { min-width: 0; }
#consultOverlay #consultInput { min-width: 0; }

/* static/css/signup_purpose_compact.css */
/* Mobile signup purpose list: keep every option readable without a 1,600px first step. */
@media (max-width: 600px) {
    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"].sw-checklist {
        gap: 6px;
    }

    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"] .sw-option {
        min-height: 56px;
        padding: 8px 10px;
        align-items: center;
    }

    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"] .sw-option .sw-option-icon {
        margin-top: 0;
    }

    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"] .sw-option:not(.selected) .sw-option-desc {
        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }

    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"] .sw-option.selected {
        align-items: flex-start;
    }

    #signupWizardOverlay [aria-labelledby="swQuestion-purpose"] .sw-option.selected .sw-option-desc {
        display: block !important;
        -webkit-line-clamp: unset;
        overflow: visible;
    }
}

/* static/css/mobile_search_submit_touch.css */
/* Keep the result-dialog entry visible before the first search so users can
   understand where results will open. The explicit-search lifecycle enables
   the control only after a result or empty-result response is available. */
body.unified-page:not(.results-dialog-active) .search-section #infoPanelToggleBtn:disabled {
    display: inline-flex !important;
    opacity: 0.58;
    cursor: not-allowed;
}

/* Keep the enabled primary search action comfortably tappable on mobile.
   Closed-beta states keep the native button disabled and are intentionally excluded. */
@media (max-width: 767px) {
    body.unified-page:not(.results-dialog-active) .search-section #searchBtn:enabled {
        min-height: 44px !important;
    }

    /* The approved-user short-search trigger and its range choices are actions too. */
    body.unified-page:not(.results-dialog-active) .search-section .search-buttons #shortSearchToggleBtn:enabled {
        height: 44px !important;
        min-height: 44px !important;
    }

    body.unified-page:not(.results-dialog-active) .search-section .search-buttons #shortSearchMenu .short-search-option:enabled {
        height: 44px !important;
        min-height: 44px !important;
    }
}

/* static/css/privacy_touch_targets.css */
/* Public footer actions: keep the typography compact while making each link easy to tap. */
@media (max-width: 767px) {
    body.unified-page:not(.results-dialog-active) .service-footer-contact,
    body.unified-page:not(.results-dialog-active) .service-footer-links {
        align-items: center;
    }

    body.unified-page:not(.results-dialog-active) .service-footer-contact a,
    body.unified-page:not(.results-dialog-active) .service-footer-links a {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }
}

/* static/css/pwa_install_guide.css */
/* PWA installation guide: the single style owner for every supported caller. */
.pwa-guide-overlay {
    --pwa-guide-safe-top: max(var(--app-overlay-safe-top, 0px), env(safe-area-inset-top, 0px));
    --pwa-guide-safe-bottom: max(var(--app-dialog-safe-bottom, 0px), env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: var(--pwa-guide-safe-top);
    right: 0;
    bottom: var(--pwa-guide-safe-bottom);
    left: 0;
    z-index: var(--z-popup, 20000);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.pwa-guide-dialog,
.pwa-guide-dialog * {
    box-sizing: border-box;
}

.pwa-guide-dialog {
    width: 100%;
    max-width: 500px;
    max-height: min(
        86dvh,
        calc(100dvh - var(--pwa-guide-safe-top) - var(--pwa-guide-safe-bottom) - 24px)
    );
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    background: #1a1a2e;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.pwa-guide-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #2a2a4a;
    background: #1a1a2e;
}

.pwa-guide-header h3 {
    min-width: 0;
    margin: 0;
    color: #e0e0ff;
    font-size: 1.02rem;
}

.pwa-guide-close {
    flex: 0 0 auto;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: #a8a8c0;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-guide-close:hover,
.pwa-guide-close:focus-visible {
    color: #fff;
}

.pwa-guide-close:focus-visible,
.pwa-guide-tab:focus-visible,
.pwa-guide-install-btn:focus-visible,
.pwa-guide-ok:focus-visible {
    outline: 3px solid rgba(79, 195, 247, 0.65);
    outline-offset: 2px;
}

.pwa-guide-intro {
    min-width: 0;
    padding: 12px 18px 2px;
    color: #a8a8c0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.pwa-guide-intro p {
    margin: 0;
}

.pwa-guide-android-summary {
    padding: 4px 0 6px;
}

.pwa-guide-android-summary strong {
    display: block;
    color: #f8fafc;
    font-size: 1rem;
}

.pwa-guide-android-summary p {
    margin: 5px 0 0;
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.55;
}

.pwa-guide-tabs {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow: visible;
    padding: 10px 18px 0;
    border-bottom: 1px solid #2a2a4a;
}

.pwa-guide-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 6px;
    border: 1px solid #2a2a4a;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #22233a;
    color: #9090a8;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
    line-height: 1.3;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.pwa-guide-tab:hover {
    background: #2a2a44;
    color: #c0c0d8;
}

.pwa-guide-tab-active {
    position: relative;
    top: 1px;
    border-color: #4fc3f7;
    border-bottom-color: #1a1a2e;
    background: #1a1a2e;
    color: #4fc3f7;
    font-weight: 600;
}

.pwa-guide-body {
    min-width: 0;
    padding: 18px;
    overflow: visible;
}

.pwa-guide-steps {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.pwa-guide-steps li {
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 8px 0;
    color: #d8d8e8;
    font-size: 0.9rem;
    line-height: 1.55;
}

.pwa-guide-step-n {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4fc3f7;
    color: #0a0a18;
    font-size: 0.78rem;
    font-weight: 700;
}

.pwa-guide-step-t {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.pwa-guide-step-t b {
    color: #fff;
}

.pwa-guide-note {
    margin: 6px 0 10px;
    padding: 8px 10px;
    border-left: 3px solid #4a4a66;
    border-radius: 4px;
    background: #22223a;
    color: #8888a0;
    overflow-wrap: anywhere;
    font-size: 0.78rem;
    line-height: 1.5;
}

.pwa-guide-install-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: #0a0a18;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.pwa-guide-body > .pwa-guide-install-btn:first-child {
    min-height: 52px;
    margin: 0 0 14px;
    font-size: 1rem;
}

.pwa-guide-next-label {
    margin: 0 0 4px;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
}

.pwa-guide-install-btn:disabled {
    background: #2a2a44;
    color: #666;
    cursor: not-allowed;
}

.pwa-guide-install-hint {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.8;
}

.pwa-guide-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 18px 14px;
    border-top: 1px solid #2a2a4a;
    flex-wrap: wrap;
}

.pwa-guide-hide-label {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    color: #a8a8c0;
    font-size: 0.78rem;
    cursor: pointer;
}

.pwa-guide-hide-label input {
    accent-color: #4fc3f7;
}

.pwa-guide-ok {
    min-width: 72px;
    min-height: 44px;
    margin-left: auto;
    padding: 7px 18px;
    border: 0;
    border-radius: 6px;
    background: #4fc3f7;
    color: #0a0a18;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.pwa-guide-ok:hover {
    background: #29b6f6;
}

body.mobile-shell-open #pwaGuideOverlay,
body.mobile-shell-open .pwa-guide-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    .pwa-guide-overlay {
        padding: 8px;
    }

    .pwa-guide-dialog {
        max-width: calc(100vw - 16px);
        max-height: calc(
            100dvh - var(--pwa-guide-safe-top) - var(--pwa-guide-safe-bottom) - 16px
        );
        border-radius: min(12px, 2.5vw);
    }

    .pwa-guide-header {
        padding: 8px 10px 6px 14px;
    }

    .pwa-guide-intro {
        padding: 8px 14px 0;
    }

    .pwa-guide-tabs {
        gap: 3px;
        padding: 6px 12px 0;
    }

    .pwa-guide-tab {
        min-height: 44px;
        padding: 7px 3px;
        font-size: 0.76rem;
    }

    .pwa-guide-body {
        padding: 12px 14px;
    }

    .pwa-guide-footer {
        align-items: stretch;
        padding: 10px 14px 14px;
    }

    .pwa-guide-hide-label {
        flex: 1 1 calc(50% - 5px);
    }

    .pwa-guide-ok {
        flex: 1 0 100%;
        margin-left: 0;
    }
}

/* static/css/news_comments.css */
.news-item {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
}

.news-item:focus-visible {
    outline: 3px solid #7ab7e4;
    outline-offset: -2px;
}

.news-item-source > span {
    display: block;
}

.news-dialog-summary-section {
    border-bottom: 1px solid #dbe4ef;
    padding-bottom: 14px;
}

.news-dialog-overlay {
    box-sizing: border-box;
    overflow: hidden;
}

.news-dialog-overlay[hidden] {
    display: none !important;
}

.news-dialog {
    box-sizing: border-box;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.news-dialog-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.news-dialog-comments:empty,
.news-dialog-comments[hidden] {
    display: none;
}

.news-comments {
    background: #fff;
    border-top: 1px solid #dbe4ef;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    min-height: 280px;
    padding-top: 18px;
}

.news-comments-title {
    color: #172033;
    font-size: 1.04rem;
    margin: 0;
}

.news-comments-subtitle {
    color: #667789;
    font-size: .8rem;
    line-height: 1.45;
    margin: 4px 0 12px;
}

.news-comments-boundary {
    background: transparent;
    border: 0;
    color: #3d5268;
    font-size: .74rem;
    margin: 6px 0 2px;
    padding: 0;
}

.news-comments-notice,
.news-comments-status,
.news-comments-empty {
    color: #596b7d;
    font-size: .78rem;
    line-height: 1.5;
    margin: 8px 0;
}

.news-comments-notice {
    font-size: .7rem;
    margin: 2px 0 12px;
}

.news-comments-status.is-error,
.news-comments-action-status {
    color: #b42318;
}

.news-comment-create-form,
.news-comments-action-form {
    display: grid;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
}

.news-comment-create-form {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.news-comment-create-form .news-comments-field-label {
    font-size: 0;
    grid-column: 1;
    grid-row: 1;
}

.news-comment-composer-controls {
    align-items: center;
    display: contents;
}

.news-comments-field-label {
    color: #26384a;
    display: grid;
    font-size: .82rem;
    font-weight: 700;
    gap: 6px;
}

.news-comments-textarea,
.news-comments-select {
    background: #f7f8fa;
    border: 1px solid #d8dee6;
    border-radius: 18px;
    box-sizing: border-box;
    color: #172033;
    font: inherit;
    min-height: 42px;
    padding: 9px 10px;
    width: 100%;
}

.news-comments-textarea {
    min-height: 84px;
    resize: vertical;
}

.news-comment-create-form .news-comments-textarea {
    max-height: 120px;
    min-height: 44px;
    overflow-y: auto;
    resize: none;
}

.news-comments-check {
    color: #42576b;
    font-size: .8rem;
}

.news-comment-create-form .news-comments-check {
    grid-column: 1 / -1;
    grid-row: 2;
}

.news-comment-composer {
    align-items: flex-start;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid #e7ebf0;
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding: 12px 0 4px;
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.news-comment-composer.is-guest {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    justify-content: space-between;
    padding: 12px;
}

.news-comment-login-copy {
    color: #526579;
    font-size: .8rem;
    line-height: 1.45;
    margin: 0;
}

.news-comments-list,
.news-comment-replies {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-comment {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    padding: 14px 0 0;
    position: relative;
}

.news-comment-avatar {
    align-items: center;
    background: #e7efff;
    border-radius: 50%;
    color: #295fb4;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: .86rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    user-select: none;
    width: 38px;
}

.news-comment-composer-avatar {
    flex-basis: 34px;
    height: 34px;
    width: 34px;
}

.news-comment-main {
    flex: 1 1 auto;
    min-width: 0;
}

.news-comment-bubble {
    background: transparent;
    border-radius: 0;
    box-sizing: border-box;
    display: block;
    max-width: min(100%, 640px);
    padding: 0;
}

.news-comment-replies {
    border-left: 2px solid #e1e6ec;
    margin: 6px 0 0 10px;
    padding-left: 18px;
}

.news-comment-replies:empty {
    display: none;
}

.news-comment-reply {
    padding-top: 10px;
}

.news-comment-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.news-comment-author {
    color: #203246;
    font-size: .84rem;
}

.news-comment-state {
    background: #edf2f7;
    border-radius: 999px;
    color: #506176;
    font-size: .68rem;
    padding: 2px 7px;
}

.news-comment-state.state-restored {
    background: #e8f7ef;
    color: #17633c;
}

.news-comment-state.state-temporarily_hidden,
.news-comment-state.state-copyright_hidden,
.news-comment-state.state-moderation_removed {
    background: #fff3df;
    color: #8a4d0f;
}

.news-comment-time {
    color: #75879a;
    font-size: .7rem;
}

.news-comment-body {
    color: #26384a;
    font-size: .86rem;
    line-height: 1.55;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.news-comment-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 26px;
    padding: 2px 0 0;
}

.news-comment-actions,
.news-comments-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.news-comments-primary,
.news-comments-secondary,
.news-comments-more,
.news-comment-action,
.news-comments-action-close {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    min-height: 36px;
    padding: 7px 12px;
}

.news-comments-primary {
    background: #1769d1;
    color: #fff;
    font-weight: 700;
}

.news-comment-create-form .news-comments-primary {
    align-items: center;
    display: inline-flex;
    font-size: 1.25rem;
    grid-column: 2;
    grid-row: 1;
    height: 44px;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    width: 44px;
}

.news-comments-secondary,
.news-comments-more {
    background: #edf3f8;
    color: #24506e;
}

.news-comment-action {
    background: transparent;
    color: #526579;
    min-height: 28px;
    padding: 3px 5px;
}

.news-comment-action.is-danger {
    color: #a12622;
}

.news-comments-primary:focus-visible,
.news-comments-secondary:focus-visible,
.news-comments-more:focus-visible,
.news-comment-action:focus-visible,
.news-comments-action-close:focus-visible,
.news-comments-textarea:focus-visible,
.news-comments-select:focus-visible {
    outline: 3px solid #7ab7e4;
    outline-offset: 2px;
}

.news-comments-textarea:focus-visible,
.news-comments-select:focus-visible {
    background: #fff;
}

.news-comments-action-overlay {
    align-items: center;
    background: rgba(13, 24, 40, .68);
    display: flex;
    inset: 0;
    justify-content: center;
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    position: fixed;
    z-index: var(--z-modal, 30000);
}

.news-comments-action-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    box-sizing: border-box;
    color: #172033;
    max-height: min(82dvh, 620px);
    overflow: auto;
    padding: 18px;
    width: min(92vw, 480px);
}

.news-comments-action-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.news-comments-action-title {
    font-size: 1rem;
    margin: 0;
}

.news-comments-action-close {
    background: transparent;
    color: #526478;
}

@media (max-width: 600px) {
    .news-dialog-overlay {
        align-items: stretch;
        background: #f3f6fa;
        justify-content: stretch;
        padding: 0;
    }

    .news-dialog {
        background: #fff;
        border-radius: 0;
        box-shadow: none;
        color: #1c2d40;
        height: 100%;
        max-height: none;
        max-width: none;
        padding: 0;
        transform: none;
        width: 100%;
    }

    .news-dialog-header {
        background: rgba(255, 255, 255, .98);
        border-bottom: 1px solid #dce5ef;
        box-sizing: border-box;
        justify-content: flex-start;
        margin: 0;
        min-height: 56px;
        padding: 6px 12px;
        position: sticky;
        top: 0;
    }

    .news-dialog-category {
        background: transparent;
        color: #14283d;
        font-size: 0;
        font-weight: 700;
        left: 50%;
        padding: 0;
        position: absolute;
        transform: translateX(-50%);
    }

    .news-dialog-category::before {
        content: "뉴스";
        font-size: .95rem;
    }

    .news-dialog-close {
        align-items: center;
        color: #284a70;
        display: inline-flex;
        font-size: 0;
        height: 44px;
        justify-content: center;
        order: -1;
        padding: 0;
        width: 44px;
    }

    .news-dialog-close::before {
        content: "‹";
        font-size: 2.2rem;
        font-weight: 300;
        line-height: 1;
    }

    .news-dialog-summary-section {
        background: #fff;
        border-bottom: 1px solid #dce5ef;
        padding: 18px 16px 16px;
    }

    .news-dialog-title {
        color: #172b40;
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .news-dialog-body,
    .news-dialog-body.pending {
        background: transparent;
        border: 0;
        color: #32475d;
        font-size: .9rem;
        line-height: 1.72;
        margin: 0 0 12px;
        padding: 0;
    }

    .news-dialog-source {
        color: #6c7f91;
    }

    .news-dialog-actions {
        background: #fff;
        border-bottom: 1px solid #dce5ef;
        justify-content: flex-start;
        margin: 0;
        padding: 10px 16px;
    }

    .news-dialog-link {
        background: #eaf2fc;
        border-radius: 999px;
        color: #155ba9;
        font-size: .76rem;
        min-height: 44px;
    }

    .news-comments {
        background: #fff;
        border-top: 0;
        color: #1c2d40;
        margin: 0;
        min-height: calc(100dvh - 360px);
        padding: 16px 16px 0;
    }

    .news-comments-action-overlay {
        background: rgba(0, 0, 0, .74);
        color: #1c2d40;
        align-items: flex-end;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .news-comments-action-dialog {
        background: #fff;
        color: #1c2d40;
        max-height: calc(100dvh - env(safe-area-inset-top) - 18px);
        width: 100%;
    }
}

/* Public information cards remain available through the 767px mobile shell.
   Keep the three visible news-detail actions touchable in narrow landscape too,
   where the full-screen <=600px dialog treatment does not apply. */
@media (max-width: 767px) {
    .news-dialog-close,
    .news-dialog-link,
    .news-comments-primary {
        min-height: 44px;
    }

    .news-dialog-close {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-width: 44px;
    }
}

/* static/css/discussion_thread.css */
/* Shared discussion thread for news and notice detail comments. */
.discussion-thread {
    --thread-accent: #1769d1;
    --thread-accent-strong: #0f57b7;
    --thread-avatar-bg: #e8f1ff;
    --thread-border: #dce5ef;
    --thread-danger: #b42318;
    --thread-muted: #66788a;
    --thread-surface: #f5f8fc;
    --thread-text: #1c2d40;
    background: #fff;
    color: var(--thread-text);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.discussion-thread .discussion-thread__title {
    align-items: center;
    color: #14283d;
    display: flex;
    font-size: 1rem;
    gap: 7px;
    margin: 0;
}

.discussion-thread__subtitle,
.discussion-thread__context,
.discussion-thread__notice,
.discussion-thread__status,
.discussion-thread__empty {
    color: var(--thread-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.discussion-thread__subtitle {
    margin: 4px 0 7px;
}

.discussion-thread__context,
.discussion-thread__notice {
    margin: 2px 0;
}

.discussion-thread__context {
    border-left: 3px solid #86aee3;
    padding-left: 8px;
}

.discussion-thread__notice {
    font-size: .68rem;
}

.discussion-thread__status,
.discussion-thread__empty {
    margin: 10px 0;
}

.discussion-thread__status.is-error {
    color: var(--thread-danger);
}

.discussion-thread__list,
.discussion-thread__replies {
    list-style: none;
    margin: 0;
    padding: 0;
}

.discussion-thread .discussion-thread__list {
    border-top: 1px solid var(--thread-border);
    max-height: none;
    margin-top: 10px;
    margin-bottom: 0;
    overflow: visible;
}

.discussion-thread__item {
    align-items: flex-start;
    border-bottom: 1px solid #e9eef4;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 14px 0 12px;
    position: relative;
}

.discussion-thread__item:last-child {
    border-bottom: 0;
}

.discussion-thread__avatar {
    align-items: center;
    background: var(--thread-avatar-bg);
    border: 1px solid #d2e2fa;
    border-radius: 50%;
    color: var(--thread-accent-strong);
    display: inline-flex;
    flex: 0 0 36px;
    font-size: .82rem;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    user-select: none;
    width: 36px;
}

.discussion-thread__avatar.anonymous {
    background: #eef2f6;
    border-color: #dfe5eb;
    color: #637385;
}

.discussion-thread__main {
    flex: 1 1 auto;
    min-width: 0;
}

.discussion-thread__content {
    background: transparent;
    border-radius: 0;
    display: block;
    max-width: 100%;
    padding: 0;
}

.discussion-thread__header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.discussion-thread__author {
    color: #162b40;
    font-size: .84rem;
    font-style: normal;
    font-weight: 750;
}

.discussion-thread__body {
    color: #26394d;
    font-size: .87rem;
    line-height: 1.58;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.discussion-thread__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 27px;
    padding-top: 2px;
}

.discussion-thread__time {
    color: #7b8b9b;
    font-size: .7rem;
}

.discussion-thread__actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
}

.discussion-thread__action {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #5d7185;
    cursor: pointer;
    font: inherit;
    font-size: .71rem;
    min-height: 28px;
    padding: 3px 6px;
}

.discussion-thread__action:hover {
    background: #edf4fd;
    color: var(--thread-accent-strong);
}

.discussion-thread__action.is-danger {
    color: var(--thread-danger);
}

.discussion-thread__replies {
    border-left: 2px solid #cfdcea;
    margin: 4px 0 0 10px;
    padding-left: 16px;
}

.discussion-thread__replies:empty {
    display: none;
}

.discussion-thread__reply,
.discussion-thread__reply.depth-2,
.discussion-thread__reply.depth-3 {
    margin-left: 0;
    padding-left: 0;
    padding-top: 10px;
}

.discussion-thread__composer {
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--thread-border);
    bottom: 0;
    display: flex;
    gap: 9px;
    margin-top: auto;
    padding: 11px 0 4px;
    position: sticky;
    z-index: 3;
}

.discussion-thread__composer-avatar {
    flex-basis: 34px;
    height: 34px;
    width: 34px;
}

.discussion-thread__form,
.discussion-thread__composer-main {
    flex: 1 1 auto;
    min-width: 0;
}

.discussion-thread__form {
    align-items: center;
    display: grid;
    gap: 6px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.discussion-thread__input-wrap {
    font-size: 0;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.discussion-thread .discussion-thread__textarea {
    background: var(--thread-surface);
    border: 1px solid #d3dce7;
    border-radius: 22px;
    box-sizing: border-box;
    color: var(--thread-text);
    font: inherit;
    font-size: .9rem;
    line-height: 1.45;
    max-height: 120px;
    min-height: 44px;
    overflow-y: auto;
    padding: 10px 14px;
    resize: none;
    width: 100%;
}

.discussion-thread .discussion-thread__textarea:focus {
    background: #fff;
    border-color: var(--thread-accent);
    box-shadow: 0 0 0 3px rgba(23, 105, 209, .13);
    outline: 0;
}

.discussion-thread__controls {
    align-items: center;
    display: contents;
}

.discussion-thread .discussion-thread__anonymous {
    align-items: center;
    color: #65778a;
    display: flex;
    font-size: .7rem;
    gap: 4px;
    grid-column: 1;
    grid-row: 2;
}

.discussion-thread .discussion-thread__anonymous input {
    accent-color: var(--thread-accent);
}

.discussion-thread .comment-char-count {
    color: #7b8b9b;
    font-size: .68rem;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin-left: 0;
}

.discussion-thread .discussion-thread__submit {
    align-items: center;
    background: var(--thread-accent);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    height: 44px;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    width: 44px;
}

.discussion-thread .discussion-thread__submit:hover {
    background: var(--thread-accent-strong);
}

.discussion-thread .discussion-thread__action:focus-visible,
.discussion-thread .discussion-thread__submit:focus-visible,
.discussion-thread .discussion-thread__textarea:focus-visible {
    outline: 3px solid #7ab7e4;
    outline-offset: 2px;
}

.discussion-thread__guest {
    align-items: center;
    background: var(--thread-surface);
    border: 1px solid var(--thread-border);
    border-radius: 14px;
    justify-content: space-between;
    padding: 11px 12px;
}

.discussion-thread__count {
    background: #e7f0ff;
    border-radius: 999px;
    color: var(--thread-accent-strong);
    font-size: .68rem;
    font-weight: 800;
    padding: 2px 7px;
}

.discussion-thread .comment-history-box,
.discussion-thread .comment-reply-form-inner {
    background: var(--thread-surface);
    border: 1px solid var(--thread-border);
    border-radius: 12px;
    margin-top: 7px;
    padding: 9px 10px;
}

@media (max-width: 600px) {
    /* Opt-in only: the JS module applies a single internal scroll owner while
       AppDialogViewport follows the iOS visual viewport. */
    .discussion-thread-keyboard-viewport[data-app-keyboard-open="true"]
        .discussion-thread__composer {
        scroll-margin-bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 4;
    }

    .discussion-thread {
        min-height: 260px;
    }

    .discussion-thread__item {
        gap: 9px;
        padding: 13px 0 11px;
    }

    .discussion-thread__avatar {
        flex-basis: 34px;
        height: 34px;
        width: 34px;
    }

    .discussion-thread__replies {
        margin-left: 4px;
        padding-left: 13px;
    }

    .discussion-thread__composer {
        margin-left: -12px;
        margin-right: -12px;
        padding:
            9px 12px
            max(9px, env(safe-area-inset-bottom))
            12px;
    }

    .discussion-thread__textarea {
        font-size: 1rem;
    }
}

/* static/css/detail_async_layout.css */
/* 상세 카드에서 실제 응답을 기다리는 작은 슬롯만 안정화한다.
 * 댓글·통계·계약처럼 크기를 알 수 없는 섹션에는 빈 공간을 예약하지 않는다. */
#detailModal [data-detail-async-slot="attachments"] #detailAttachments {
    min-block-size: 46px;
}

#detailModal .detail-async-status {
    display: flex;
    align-items: center;
    min-block-size: 46px;
    padding: 10px 12px;
    box-sizing: border-box;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

#detailModal [data-detail-async-slot="attachments"][data-detail-async-state="loading"]
    .detail-async-status::before {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    content: "";
    animation: detail-async-slot-spin 0.8s linear infinite;
}

#detailModal #descriptionSection.private-bid-description-media .body-html figure.inline-media:not(.overlay-player-wrap):not([data-img-shapes]):not([data-vid-shapes]) > img,
#detailModal #descriptionSection.private-bid-description-media .body-html figure.inline-media:not(.overlay-player-wrap):not([data-img-shapes]):not([data-vid-shapes]) > video,
#detailModal .private-bid-dialog-media > img,
#detailModal .private-bid-dialog-media > video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #0f172a;
}

@keyframes detail-async-slot-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #detailModal [data-detail-async-slot="attachments"][data-detail-async-state="loading"]
        .detail-async-status::before {
        animation: none;
    }
}

/* 공고 상세는 홈과 내일거리에서 같은 크기와 스크롤 소유권을 사용한다.
 * 페이지별 다이얼로그 계약은 그대로 두고 공유 #detailModal만 결속한다. */
body:is(.unified-page, .private-bids-page) #detailModal > .modal-content {
    --app-dialog-preferred-max: calc(
        100dvh - var(--app-dialog-safe-bottom, 0px) - 70px
    );
    min-height: 0 !important;
    max-height: min(
        var(--app-dialog-preferred-max),
        var(--app-dialog-max-height)
    ) !important;
    box-sizing: border-box !important;
}

body:is(.unified-page, .private-bids-page)
    #detailModal > .modal-content > .modal-body {
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* 모바일 상세은 작은 중앙 카드가 아니라 안전영역 안의 전체 작업면을 사용한다.
 * 헤더와 작업 기록 진입은 고정하고 본문 하나만 스크롤 소유자가 된다. */
@media (max-width: 767px) {
    body:is(.unified-page, .private-bids-page) #detailModal.modal {
        align-items: stretch !important;
        padding: 8px !important;
        /* AppDialogViewport가 게시한 실제 가시 높이에서 현재 보이는 광고만
         * 차감한다. 광고가 숨겨지거나 landscape가 되면 예약값은 0으로
         * 돌아가므로 기존 전체 작업면을 그대로 사용한다. */
        height: calc(
            var(--app-dialog-viewport-height, 100dvh)
            - var(--app-bottom-reserved, 0px)
        ) !important;
    }

    body:is(.unified-page, .private-bids-page) #detailModal > .modal-content {
        display: flex;
        flex-direction: column;
        width: 100% !important;
        height: calc(
            var(--app-dialog-viewport-height, 100dvh)
            - var(--app-bottom-reserved, 0px)
            - 16px
        ) !important;
        min-height: calc(
            var(--app-dialog-viewport-height, 100dvh)
            - var(--app-bottom-reserved, 0px)
            - 16px
        ) !important;
        max-height: calc(
            var(--app-dialog-viewport-height, 100dvh)
            - var(--app-bottom-reserved, 0px)
            - 16px
        ) !important;
        margin: 0 !important;
        overflow: hidden !important;
        border-radius: min(12px, 2.5vw) !important;
    }

    body:is(.unified-page, .private-bids-page)
        #detailModal > .modal-content > .modal-header,
    body:is(.unified-page, .private-bids-page)
        #detailModal > .modal-content > .work-log-detail-entry {
        flex: 0 0 auto;
    }

    body:is(.unified-page, .private-bids-page)
        #detailModal > .modal-content > .modal-body {
        flex: 1 1 auto;
        min-height: 0 !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }
}

/* D2-13: 요약 → 기존 동작 → 한 줄 안내 → V4 정보 상자 순서.
 * 요약과 동작의 고정 트랙은 상세·참가자격 응답 전후 같은 높이를 쓴다. */
#detailModal .detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
}
#detailModal .detail-summary > div {
    min-width: 0;
    height: 44px;
}
#detailModal .detail-summary-label {
    display: block;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    color: #475569;
    white-space: nowrap;
}
#detailModal .detail-summary-label b {
    margin-left: 4px;
    color: inherit;
}
#detailModal .detail-summary strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    line-height: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#detailModal .detail-primary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: 64px;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}
#detailModal .detail-primary-actions > .action-btn {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 64px;
    margin: 0;
    padding: 4px 8px;
    align-items: center;
    justify-content: center;
    align-content: center;
    font-size: 14px;
    line-height: 20px;
}
#detailModal .detail-primary-actions > .collab { gap: 0; }
#detailModal .detail-primary-actions .collab-btn-title {
    font-size: 14px;
    line-height: 18px;
}
#detailModal .detail-primary-actions .collab-btn-desc {
    font-size: 12px;
    line-height: 16px;
}
#detailModal #detailLink { order: 1; }
#detailModal #privateBidChatBtn { order: 2; }
#detailModal #collabLobbyBtn { order: 3; }
#detailModal #collabListBtn { order: 4; }
#detailModal #shareBtn { order: 5; }
#detailModal #workLogDetailBtn { order: 6; }
#detailModal .detail-primary-actions > .work-log-shared-links {
    order: 8;
    grid-column: 1 / -1;
    min-width: 0;
    max-height: 64px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#detailModal #fiscalBtn { order: 7; }
#detailModal .detail-primary-actions > .work-log-shared-links:empty { display: none; }
#detailModal .detail-notice-slot {
    min-height: 32px;
    margin-bottom: 4px;
}
#detailModal .detail-notice-slot > div {
    box-sizing: border-box;
    margin: 0 !important;
    padding: 4px 10px !important;
    font-size: 14px !important;
    line-height: 22px !important;
}
#detailModal .detail-notice summary {
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#detailModal .detail-notice-content {
    padding: 8px 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
#detailModal .detail-org-wrap { min-width: 0; }
#detailModal #orgHistoryBtn {
    flex-shrink: 0;
    white-space: nowrap;
}
html[data-theme="dark"] #detailModal .detail-summary {
    background: #182334;
    border-color: #475569;
    color: #e2e8f0;
}
html[data-theme="dark"] #detailModal .detail-summary-label { color: #cbd5e1; }
@media (max-width: 767px) {
    #detailModal .detail-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #detailModal .detail-primary-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 보이는 동작만 순서대로 채우고, 빈 그룹의 아래 여백만 제거한다. */
#detailModal .detail-primary-actions[data-detail-action-rows] {
    align-items: start;
}
#detailModal .detail-primary-actions[data-detail-action-rows="empty"] {
    margin-bottom: 0;
}
#detailModal .detail-primary-actions > [hidden] {
    display: none !important;
}
@media (max-width: 767px) {
    /* 44px 접기/펼치기 영역 + 안내의 상하 패딩·테두리를 응답 전부터 예약한다. */
    #detailModal .detail-notice-slot {
        min-height: 54px;
    }
    #detailModal .detail-notice summary {
        box-sizing: border-box;
        min-height: 44px;
        padding-block: 11px;
    }
}

/* #450-100: adopted detail cards. Action order/targets stay actions-flow-v1. */
html body #detailModal.ui-flow {
    --flow-surface:#fff; --flow-border:#e3e6eb; --flow-text:#12151a; --flow-text-secondary:#4b5361;
}
html[data-theme="dark"] body #detailModal.ui-flow {
    --flow-surface:#14171b; --flow-border:#353b44; --flow-text:#eceef2; --flow-text-secondary:#a7aeba;
}
html body #detailModal.ui-flow > .modal-content { border-radius:8px; }
html body #detailModal.ui-flow > .modal-content > .modal-header { padding-block:8px; gap:8px; }
html body #detailModal.ui-flow #modalTitle { font-size:20px !important; line-height:1.4 !important; overflow-wrap:anywhere; }
html body #detailModal.ui-flow .detail-grid { gap:12px; align-items:start; }
html body #detailModal.ui-flow .detail-section { padding:12px; border-radius:8px; min-width:0; }
html body #detailModal.ui-flow .detail-section > h3 {
    display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:var(--section-header-height,28px);
    box-sizing:border-box; margin:0 0 8px; padding:0 0 4px; font-size:14px;
    line-height:20px; border-bottom:1px solid var(--flow-border);
}
html body #detailModal.ui-flow :is(.detail-item,.detail-content,.extra-info-list,.detail-org-wrap) { min-width:0; }
html body #detailModal.ui-flow .detail-item { gap:8px; padding-block:6px; line-height:1.5; }
html body #detailModal.ui-flow .detail-item > :is(span,div) { overflow-wrap:anywhere; min-width:0; }
html body #detailModal.ui-flow .detail-item > label { color:var(--flow-text-secondary); }
html body #detailModal.ui-flow :is(.attachments-list,.detail-source-actions) { gap:8px; }
html body #detailModal.ui-flow .attachment-item { min-width:0; border-color:var(--flow-border); background:var(--flow-surface); }
html body #detailModal.ui-flow .attachment-name { min-width:0; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:767px) {
    html body #detailModal.ui-flow #modalTitle { font-size:18px !important; }
    html body #detailModal.ui-flow .detail-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
    html body #detailModal.ui-flow .detail-section { padding:10px; }
}

/* static/css/work_log.css */
.work-log-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-child, 40000);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(9, 18, 42, .66);
    box-sizing: border-box;
}
.work-log-overlay[hidden] { display: none !important; }

.work-log-detail-entry {
    width: auto;
    min-height: 44px;
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.modal-actions > .work-log-detail-entry { margin: 0; }

.work-log-shared-links {
    display: grid;
    flex: 0 0 100%;
    width: 100%;
    gap: 8px;
}
.work-log-shared-links[hidden] { display: none !important; }
.work-log-shared-diary-btn {
    width: 100%;
    min-height: 44px;
    border-color: #a7d7b4;
    background: #f0fbf3;
    color: #17633a;
}

.work-log-private-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px clamp(16px, 3vw, 28px) 24px;
    border-top: 1px solid #dbe3ef;
    background: #fff;
}

.work-log-private-actions .work-log-detail-entry { margin: 0; }

.work-log-detail-entry:hover {
    background: #dbeafe;
}
.work-log-dialog {
    width: min(760px, 100%);
    height: min(820px, calc(100dvh - 36px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 22px;
    background: #f7f9fc;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .34);
    color: #17233b;
}
.work-log-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 16px 12px 20px;
    background: linear-gradient(135deg, #173a8f, #355bd4);
    color: #fff;
}
.work-log-header-copy { min-width: 0; }
.work-log-header h2 { margin: 0; font-size: 1.18rem; line-height: 1.35; }
.work-log-resource-title {
    margin: 3px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.work-log-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font: 700 1.5rem/1 system-ui, sans-serif;
    cursor: pointer;
}
.work-log-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px;
    scrollbar-gutter: stable;
}
.work-log-intro {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding: 13px 14px;
    border: 1px solid #bed2f4;
    border-radius: 13px;
    background: #eef5ff;
    color: #3e5673;
    font-size: .86rem;
    line-height: 1.5;
}
.work-log-intro strong { color: #1f4d9f; }
.work-log-status {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid #d9e2f2;
    border-radius: 12px;
    background: #fff;
    color: #486078;
    font-size: .86rem;
    box-sizing: border-box;
}
.work-log-status.is-error { border-color: #efb4b4; background: #fff4f4; color: #a52828; }
.work-log-loading-shell { min-height: 230px; display: grid; gap: 12px; }
.work-log-loading-shell[hidden] { display: none !important; }
.work-log-skeleton {
    min-height: 92px;
    border-radius: 16px;
    background: linear-gradient(90deg, #e8edf5 25%, #f7f9fc 45%, #e8edf5 65%);
    background-size: 220% 100%;
    animation: work-log-shimmer 1.2s linear infinite;
}
@keyframes work-log-shimmer { to { background-position: -220% 0; } }
.work-log-empty {
    min-height: 160px;
    display: grid;
    place-items: center;
    margin: 0 0 16px;
    padding: 22px;
    border: 1px dashed #bfcce0;
    border-radius: 16px;
    background: #fff;
    color: #61748b;
    text-align: center;
}
.work-log-timeline { display: grid; gap: 22px; margin: 0 0 18px; }
.work-log-entry {
    position: relative;
    margin: 0;
    padding: 20px;
    border: 1px solid #d8e2f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(24, 58, 120, .08);
}
.work-log-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 10px; }
.work-log-date-tag,
.work-log-time-tag,
.work-log-verify-tag {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 750;
    box-sizing: border-box;
}
.work-log-date-tag { background: #e8efff; color: #2455ba; }
.work-log-time-tag { background: #eef2f7; color: #53657a; }
.work-log-verify-tag { background: #e8f8ef; color: #167143; }
.work-log-verify-tag.is-declared { background: #fff4d8; color: #8b5e00; }
.work-log-author { margin-left: auto; color: #4d6078; font-size: .8rem; font-weight: 700; }
.work-log-entry-title {
    margin: 3px 0 12px;
    color: #17233b;
    font-size: clamp(1.08rem, 3vw, 1.3rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.work-log-content { margin: 0; color: #24334b; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-log-media-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
.work-log-media-grid img,
.work-log-media-grid video {
    width: 100%;
    max-height: 72dvh;
    display: block;
    border-radius: 13px;
    background: #111827;
    object-fit: contain;
}
.work-log-entry-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.work-log-entry-actions button,
.work-log-action {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #b9c8dc;
    border-radius: 11px;
    background: #fff;
    color: #29415f;
    font: 700 .86rem/1.2 system-ui, sans-serif;
    cursor: pointer;
    box-sizing: border-box;
}
.work-log-entry-actions button { min-height: 36px; padding: 6px 10px; }
.work-log-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d6e0ef;
    border-radius: 16px;
    background: #fff;
}
.work-log-card h3 { margin: 0 0 8px; font-size: 1rem; }
.work-log-card p { margin: 0 0 10px; color: #53667d; line-height: 1.55; }
.work-log-card input[type="text"],
.work-log-card textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #b9c8dc;
    border-radius: 12px;
    font: inherit;
    line-height: 1.55;
    box-sizing: border-box;
}
.work-log-card input[type="text"] { min-height: 48px; margin-bottom: 10px; }
.work-log-card textarea { min-height: 210px; resize: vertical; }
.work-log-card input[type="text"]:focus,
.work-log-card textarea:focus,
.work-log-close:focus-visible,
.work-log-action:focus-visible,
.work-log-entry-actions button:focus-visible { outline: 3px solid #f4b942; outline-offset: 2px; }
.work-log-upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.work-log-upload-label { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; }
.work-log-upload-label input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.work-log-upload-status { min-height: 24px; color: #52667f; font-size: .82rem; }
.work-log-preview { min-height: 0; }
.work-log-preview:empty { display: none; }
.work-log-submit { padding: 9px 16px; border-color: #3168d4; background: #3168d4; color: #fff; }
.work-log-cancel-edit[hidden] { display: none; }
.work-log-legal {
    padding: 12px;
    border-left: 4px solid #e4a827;
    border-radius: 8px;
    background: #fff8e6;
    color: #5e4a1d;
    font-size: .84rem;
    line-height: 1.55;
}
.work-log-legal-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0; }
.work-log-legal-links a { color: #275ebc; font-weight: 700; }
.work-log-consent { display: flex; align-items: flex-start; gap: 9px; min-height: 44px; margin-top: 10px; }
.work-log-consent input { width: 22px; height: 22px; margin-top: 2px; }
.work-log-sharing-card { border-color: #b9ddc4; background: #f7fcf8; }
.work-log-share-toggle[aria-pressed="true"] { border-color: #247148; background: #247148; color: #fff; }
.work-log-legal details { margin-top: 10px; }
.work-log-legal summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 750; }
body.work-log-open { overflow: hidden !important; }

@media (max-width: 767px) {
    .work-log-overlay {
        inset: var(--app-dialog-viewport-top, 0px) 0 auto;
        width: 100%;
        height: calc(
            var(--app-dialog-viewport-height, 100dvh)
            - var(--app-bottom-reserved, 0px)
        );
        padding: 0;
    }
    .work-log-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .work-log-header { padding-top: max(12px, env(safe-area-inset-top)); }
    .work-log-scroll { padding: 12px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
    .work-log-private-actions { padding: 12px 16px max(18px, env(safe-area-inset-bottom)); }
    .work-log-private-actions .work-log-detail-entry { width: 100%; }
    .work-log-entry { padding: 15px; }
    .work-log-entry-actions button,
    .work-log-action,
    .work-log-upload-label { min-height: 44px; }
    .work-log-legal-links a {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }
}

@media (max-width: 360px) {
    .work-log-author { width: 100%; margin-left: 0; }
}

/* static/css/bid_prediction_loading.css */
.wiz-bid-prediction-shell {
    position: relative;
    box-sizing: border-box;
    block-size: clamp(300px, 48vh, 420px);
    block-size: clamp(300px, 48dvh, 420px);
    margin-top: 12px;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    background: #fbfdff;
}

.wiz-bid-prediction-shell:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.wiz-bid-prediction-state {
    min-block-size: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 10px;
    text-align: center;
    color: #475569;
}

.wiz-bid-prediction-state strong {
    color: #1e3a5f;
    font-size: 0.92rem;
}

.wiz-bid-prediction-state > span:not(.wiz-bid-prediction-spinner) {
    max-width: 34rem;
    font-size: 0.8rem;
    line-height: 1.55;
}

.wiz-bid-prediction-spinner {
    inline-size: 34px;
    block-size: 34px;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wiz-bid-prediction-spin 0.8s linear infinite;
}

.wiz-bid-prediction-skeleton {
    inline-size: min(100%, 520px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.wiz-bid-prediction-skeleton i {
    display: block;
    block-size: 64px;
    border-radius: 8px;
    background: linear-gradient(100deg, #edf2f7 20%, #f8fafc 40%, #edf2f7 60%);
    background-size: 240% 100%;
    animation: wiz-bid-prediction-shimmer 1.3s ease-in-out infinite;
}

.wiz-bid-prediction-retry {
    min-inline-size: 96px;
    min-block-size: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

@keyframes wiz-bid-prediction-spin {
    to { transform: rotate(360deg); }
}

@keyframes wiz-bid-prediction-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@media (max-width: 767px) {
    .bwiz-overlay .bwiz-close,
    .bwiz-overlay .bwiz-btn {
        min-inline-size: 44px;
        min-block-size: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .wiz-bid-prediction-shell {
        block-size: clamp(260px, 46vh, 380px);
        block-size: clamp(260px, 46dvh, 380px);
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wiz-bid-prediction-spinner,
    .wiz-bid-prediction-skeleton i {
        animation: none;
    }
}

/* static/css/collab_search_detail_loading.css */
#collabSearchDetailModal .collab-search-detail-card[data-collab-search-detail-shell="1"] {
    width: min(920px, calc(100% - 24px));
    height: min(760px, calc(100dvh - 24px));
    min-height: 0;
    max-height: calc(100dvh - 24px) !important;
    margin: 0;
}

#collabSearchDetailModal .modal-header {
    flex: 0 0 auto;
    min-height: 64px;
    box-sizing: border-box;
}

#collabSearchDetailModal .modal-title-area {
    min-width: 0;
}

#collabSearchDetailTitle {
    display: -webkit-box;
    height: 2.6em;
    min-height: 2.6em;
    max-height: 2.6em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#collabSearchDetailModal .collab-search-header-actions {
    flex: 0 0 auto;
}

#collabSearchDetailModal .collab-search-header-actions > button,
#collabSearchDetailModal .collab-search-detail-state button {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

#collabSearchDetailBody.collab-search-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.collab-search-detail-state {
    width: 100%;
    min-height: 100%;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #64748b;
    text-align: center;
}

.collab-search-detail-state.is-error {
    color: #b91c1c;
}

.collab-search-detail-state-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 767px) {
    #collabSearchDetailModal .collab-search-detail-card[data-collab-search-detail-shell="1"] {
        width: 100%;
        height: var(--app-dialog-viewport-height, 100dvh);
        max-height: 100% !important;
        border-radius: 0;
    }

    #collabSearchDetailModal .modal-header {
        min-height: 64px;
        padding-top: 12px;
    }

    #collabSearchDetailModal .collab-search-header-actions {
        gap: 4px;
    }

    #collabSearchDetailModal .collab-header-btn {
        padding: 8px;
    }

    .collab-search-detail-state {
        padding-right: 18px;
        padding-left: 18px;
    }
}

/* static/css/bid_doc_workspace_loader.css */
.bdw-lazy-overlay[hidden] {
    display: none !important;
}

body.bdw-lazy-loading-open {
    overflow: hidden;
}

.bdw-lazy-overlay {
    position: fixed;
    inset: 0;
    z-index: 32000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(15, 23, 42, 0.48);
}

.bdw-lazy-dialog {
    box-sizing: border-box;
    width: min(100%, 420px);
    min-height: 190px;
    padding: 22px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.bdw-lazy-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
}

.bdw-lazy-status {
    min-height: 44px;
    margin: 14px 0 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
}

.bdw-lazy-placeholder {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.bdw-lazy-placeholder span {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #e8eef6;
}

.bdw-lazy-placeholder span:nth-child(2) {
    width: 76%;
}

.bdw-lazy-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.bdw-lazy-actions button {
    min-width: 72px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bdw-lazy-actions .bdw-lazy-retry {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.bdw-lazy-actions button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .bdw-lazy-dialog {
        width: 100%;
        padding: 20px;
    }
}

/* Keep inline zoom sizes on desktop; only preview controls gain mobile targets. */
@media (max-width: 767px) {
    #bdwOverlay :is(#bdwZoomOutBtn, #bdwZoomResetBtn, #bdwZoomInBtn) {
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
}

/* static/css/messenger_tabs_loader.css */
.messenger-tab-loader {
    box-sizing: border-box;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px 20px;
    color: #475569;
    text-align: center;
}

.messenger-tab-loader-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.45;
}

.messenger-tab-loader-status {
    min-height: 42px;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
}

.messenger-tab-loader-skeleton {
    width: min(100%, 280px);
    display: grid;
    gap: 8px;
}

.messenger-tab-loader-skeleton span {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #e8eef6;
}

.messenger-tab-loader-skeleton span:nth-child(2) {
    width: 78%;
}

.messenger-tab-loader-retry {
    min-width: 96px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #2563eb;
    border-radius: 9px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.messenger-tab-loader-retry:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .messenger-tab-loader {
        min-height: 280px;
    }
}

/* static/css/notice_popup_accessibility.css */
/* Notice popup accessibility and touch-target contract. */
#noticePopupOverlay:focus {
    outline: none;
}

#noticePopupOverlay .notice-popup-close,
#noticePopupOverlay .notice-popup-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#noticePopupOverlay .notice-popup-hide-label {
    min-height: 44px;
    padding-block: 2px;
}

#noticePopupOverlay .notice-popup-hide-label input {
    width: 24px;
    height: 24px;
    margin: 0;
    flex: 0 0 24px;
}

#noticePopupOverlay .notice-popup-close:focus-visible,
#noticePopupOverlay .notice-popup-btn:focus-visible,
#noticePopupOverlay .notice-popup-hide-label:focus-within {
    outline: 3px solid #7dd3fc;
    outline-offset: 2px;
}

#noticePopupOverlay .notice-popup-content img {
    max-width: 100% !important;
    height: auto !important;
}

#noticePopupOverlay .notice-popup-content pre,
#noticePopupOverlay .notice-popup-content code {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

#noticePopupOverlay .notice-popup-content pre {
    max-width: 100% !important;
    white-space: pre-wrap !important;
}

#noticePopupOverlay .notice-popup-content table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

#noticePopupOverlay .notice-popup-content th,
#noticePopupOverlay .notice-popup-content td {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

#noticePopupOverlay .notice-popup-content iframe {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    #noticePopupOverlay .notice-popup-content a[href] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* static/css/search_history_accessibility.css */
/* 최근 검색 메뉴의 입력 방식·로딩 상태·확인창 접근성 보강. */
#searchHistoryDropdown.search-history-dropdown-portal {
    z-index: var(--z-overlay, 10000) !important;
}

.search-history-scroll-shield {
    z-index: calc(var(--z-overlay, 10000) - 1);
}

#searchHistoryDropdown .search-history-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-block: 0;
    background: inherit;
}

#searchHistoryDropdown .search-history-header > span {
    flex: 1;
}

#searchHistoryDropdown .search-history-close {
    min-width: 44px;
    min-height: 44px;
    color: var(--color-text, #222) !important;
    font-size: 20px;
}

#searchHistoryDropdown .search-history-item {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
}

#searchHistoryDropdown .search-history-item > .sh-filters,
#searchHistoryDropdown .search-history-item > .sh-time {
    display: block;
}

#searchHistoryDropdown [role="menuitem"]:focus-visible,
.sh-confirm-overlay button:focus-visible {
    outline: 3px solid #1565c0;
    outline-offset: -3px;
}

#searchHistoryDropdown .search-history-loading {
    min-height: 88px;
    padding: 24px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 767px) {
    #searchHistoryDropdown .search-history-header > button,
    #searchHistoryDropdown .search-history-item,
    .sh-confirm-overlay .sh-confirm-actions > button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* static/css/info_tab_compact_visual.css */
/* Keep the three secondary four-way switches visually compact with a real 44px target. */
@media (max-width: 767px) {
    body.unified-page #infoCardsSection :is(
        #newsInfoTabs,
        #stockInfoTabs,
        #bidWorkTabs
    ) {
        display: inline-flex !important;
        grid-template-columns: none !important;
        align-items: center !important;
        justify-content: flex-start !important;
        justify-self: start;
        width: max-content !important;
        max-width: 100%;
        gap: 1px !important;
        height: 20px !important;
        min-height: 20px !important;
        overflow: visible !important;
    }

    body.unified-page #infoCardsSection :is(
        #newsInfoTabs,
        #stockInfoTabs,
        #bidWorkTabs
    ) .info-tab-btn {
        position: relative !important;
        isolation: isolate;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        padding: 0 !important;
        height: 20px !important;
        min-height: 20px !important;
        overflow: visible !important;
    }

    body.unified-page #infoCardsSection :is(
        #newsInfoTabs,
        #stockInfoTabs,
        #bidWorkTabs
    ) .info-tab-btn::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: min(30px, calc(100% - 6px));
        height: 18px;
        transform: translate(-50%, -50%);
        z-index: -1;
        border: 1px solid #d9e2ef;
        border-radius: 6px;
        background: #f8fafc;
        pointer-events: none;
    }

    body.unified-page #infoCardsSection :is(
        #newsInfoTabs,
        #stockInfoTabs,
        #bidWorkTabs
    ) .info-tab-btn:enabled {
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }

    body.unified-page #infoCardsSection :is(
        #newsCard,
        #stockCard,
        #bidWorkCard
    ) .info-card-header {
        margin-bottom: 11px !important;
    }

    body.unified-page #infoCardsSection :is(
        #newsInfoTabs,
        #stockInfoTabs,
        #bidWorkTabs
    ) .info-tab-btn:is(.active, [aria-selected="true"])::before {
        border-color: #2563eb;
        background: #eff6ff;
    }

    body.unified-page #infoCardsSection :is(
        #newsCard,
        #stockCard
    ) .info-card-pager {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
        height: 44px;
        min-height: 44px;
    }

    body.unified-page #infoCardsSection .info-card-pager-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #1d4ed8;
    }

    body.unified-page #infoCardsSection .info-card-pager-btn > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: 1px solid #cbd5e1;
        border-radius: 999px;
        background: #fff;
        font-size: 1.35rem;
        line-height: 1;
        pointer-events: none;
    }

    body.unified-page #infoCardsSection .info-card-pager-btn:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: -2px;
        border-radius: 8px;
    }

    body.unified-page #infoCardsSection .info-card-pager-btn:disabled {
        color: #94a3b8;
        opacity: 0.55;
    }

    body.unified-page #infoCardsSection .info-card-pager .info-card-indicator {
        min-width: 42px;
        text-align: center;
    }

}

/* static/css/info_card_loading_stability.css */
/* Reserve the final mobile card footprint before asynchronous content arrives. */
@media (max-width: 767px) {
    body.unified-page #infoCardsSection #mobileInfoPrimary > :is(
        #newsCard,
        #stockCard,
        #bidWorkCard
    ) {
        flex: 0 0 auto !important;
    }

    body.unified-page #infoCardsSection #newsContent.info-card-body {
        min-height: 133px !important;
    }

    body.unified-page #infoCardsSection #stockContent.info-card-body {
        min-height: 93px !important;
    }

    body.unified-page #infoCardsSection #bidWorkContent.info-card-body {
        min-height: 140px !important;
    }

    body.unified-page #infoCardsSection #bidWorkContent .bid-work-row {
        min-height: 44px !important;
        box-sizing: border-box;
    }

    body.unified-page #infoCardsSection .info-card-loading {
        display: grid;
        align-content: center;
        gap: 7px;
        min-height: inherit;
        padding: 8px 2px;
        box-sizing: border-box;
    }

    body.unified-page #infoCardsSection .info-card-loading-label {
        color: #64748b;
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1.2;
    }

    body.unified-page #infoCardsSection .info-card-loading-lines {
        display: grid;
        gap: 6px;
    }

    body.unified-page #infoCardsSection .info-card-loading-lines > span {
        display: block;
        width: 100%;
        height: 16px;
        border-radius: 6px;
        background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
        animation: info-card-loading-pulse 1.1s ease-in-out infinite alternate;
    }

    body.unified-page #infoCardsSection .info-card-loading-lines > span:nth-child(2) {
        width: 86%;
    }

    body.unified-page #infoCardsSection .info-card-loading-lines > span:nth-child(3) {
        width: 93%;
    }

    body.unified-page #infoCardsSection .info-card-loading--stock .info-card-loading-lines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    body.unified-page #infoCardsSection .info-card-loading--stock .info-card-loading-lines > span {
        width: 100%;
        height: 24px;
    }

    @keyframes info-card-loading-pulse {
        from { opacity: 0.52; }
        to { opacity: 1; }
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    body.unified-page #infoCardsSection .info-card-loading-lines > span {
        animation: none;
    }
}

/* static/css/weather_location_touch.css */
/* Keep the weather dialog opener separate from the nested location-menu button. */
body.unified-page #weatherCard.weather-card {
    cursor: default;
}

body.unified-page #weatherCardOpen.weather-card-open {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}

body.unified-page #weatherCardOpen.weather-card-open:focus-visible {
    outline: 3px solid #1565c0;
    outline-offset: -3px;
    border-radius: 10px;
}

/* The visible forecast row stays unchanged while a real button owns expansion. */
body.unified-page .weather-week-main {
    position: relative;
}

body.unified-page .weather-week-main.is-static {
    cursor: default;
}

body.unified-page .weather-week-toggle {
    position: absolute;
    inset: 0;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    min-width: 44px;
    height: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

body.unified-page .weather-week-toggle:focus-visible {
    outline: 3px solid #1565c0;
    outline-offset: -3px;
}

body.unified-page #weatherLocationPickerOverlay .weather-location-map-error {
    box-sizing: border-box;
    flex-direction: column;
    gap: 10px;
}

body.unified-page #weatherLocationPickerOverlay #weatherLocationMapRetryBtn {
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: #1565c0;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

/* Preserve the compact weather badge while exposing a reliable mobile target. */
@media (max-width: 767px) {
    body.unified-page #weatherRefreshLocationBtn.weather-refresh-location-btn {
        isolation: isolate;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 1px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.unified-page #weatherRefreshLocationBtn.weather-refresh-location-btn::before {
        content: "";
        position: absolute;
        inset: 0 auto auto 0;
        z-index: -1;
        width: 36px;
        height: 18px;
        border-right: 1px solid rgba(21, 101, 192, 0.25);
        border-bottom: 1px solid rgba(21, 101, 192, 0.25);
        border-radius: 0 0 7px 0;
        background: rgba(255, 255, 255, 0.86);
        box-shadow: 0 1px 4px rgba(21, 101, 192, 0.12);
        pointer-events: none;
    }

    body.unified-page #weatherRefreshLocationBtn.weather-refresh-location-btn:active::before {
        background: #e3f2fd;
    }

    body.unified-page #weatherRefreshLocationBtn.weather-refresh-location-btn > span {
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        height: 18px;
        line-height: 1;
    }

    body.unified-page #weatherRefreshLocationBtn.weather-refresh-location-btn > span:first-child {
        margin-left: 4px;
    }

    body.unified-page .weather-location-menu button[role="menuitem"] {
        min-height: 44px;
    }

    body.unified-page #weatherLocationPickerOverlay :is(
        #weatherLocationPickerClose,
        #weatherLocationSearchBtn,
        #weatherLocationCancelBtn,
        #weatherLocationConfirmBtn
    ) {
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    body.unified-page #weatherLocationPickerOverlay #weatherLocationSearchInput {
        height: 44px;
        min-height: 44px;
    }
}

@media (max-width: 767px) and (max-height: 480px) {
    body.unified-page #weatherLocationPickerOverlay .weather-location-picker {
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.unified-page #weatherLocationPickerOverlay .weather-location-map {
        height: 160px;
        min-height: 160px;
        flex: 0 0 160px;
    }
}

/* static/css/qna_dialog_accessibility.css */
/* QnA dialog mobile controls: keep text density while providing reliable touch targets. */
body.unified-page #qnaModal .qna-field-group {
    margin-bottom: 8px;
}

body.unified-page #qnaModal .qna-field-label {
    display: block;
    margin: 0 0 5px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

body.unified-page #qnaModal .qna-visibility-fieldset {
    min-inline-size: 0;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
}

body.unified-page #qnaModal .qna-visibility-fieldset > legend.qna-field-label {
    padding: 0;
}

body.unified-page #qnaModal .qna-visibility-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: #cbd5e1;
    font-size: 12px;
}

/* License cards retain their dark surface in both themes. */
body.unified-page #qnaModal .qna-license-date {
    color: #94a3b8 !important;
}

body.unified-page #qnaModal .qna-preview-file {
    max-width: calc(100% - 8px);
    box-sizing: border-box;
}

body.unified-page #qnaModal .qna-preview-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.unified-page #qnaModal.qna-detail-active > div {
    height: min(85vh, 680px);
    height: min(85dvh, 680px);
}

body.unified-page #qnaModal [data-qna-detail-state] {
    min-height: 100%;
    box-sizing: border-box;
}

body.unified-page #qnaModal .qna-detail-back {
    border: 0;
    background: transparent;
    color: #60a5fa;
    cursor: pointer;
    font-size: 13px;
}

body.unified-page #qnaModal .qna-detail-state-shell {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    box-sizing: border-box;
    color: #94a3b8;
    text-align: center;
}

body.unified-page #qnaModal .qna-detail-state-shell > strong {
    color: #e5e7eb;
    font-size: 15px;
}

body.unified-page #qnaModal .qna-detail-state-shell > span {
    margin-top: 8px;
    font-size: 12px;
}

body.unified-page #qnaModal .qna-detail-retry {
    min-width: 96px;
    min-height: 44px;
    margin-top: 16px;
    border: 1px solid var(--action-primary-bg);
    border-radius: 8px;
    background: var(--action-primary-bg);
    color: var(--action-primary-fg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

body.unified-page #qnaModal .qna-detail-skeleton {
    width: min(100%, 420px);
    margin-top: 20px;
}

body.unified-page #qnaModal .qna-detail-skeleton > i {
    display: block;
    height: 13px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #1e293b;
}

body.unified-page #qnaModal .qna-detail-skeleton > i:first-child {
    width: 72%;
    height: 18px;
    margin-top: 0;
}

body.unified-page #qnaModal .qna-detail-skeleton > i:nth-child(3) { width: 88%; }
body.unified-page #qnaModal .qna-detail-skeleton > i:nth-child(4) { width: 64%; }

@media (prefers-reduced-motion: no-preference) {
    body.unified-page #qnaModal .qna-detail-skeleton > i {
        animation: qna-detail-pulse 1.3s ease-in-out infinite alternate;
    }
}

@keyframes qna-detail-pulse {
    from { opacity: 0.55; }
    to { opacity: 1; }
}

@media (max-width: 767px) {
    /* Reserve the enlarged image control inside its own preview, away from neighbours. */
    body.unified-page #qnaModal .qna-preview-image {
        padding: 12px 18px 0 0;
        min-inline-size: 44px;
        min-block-size: 44px;
        box-sizing: border-box;
    }

    body.unified-page #qnaModal .qna-attachment-remove {
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 auto;
    }

    body.unified-page #qnaModal .qna-preview-image .qna-attachment-remove {
        top: 0 !important;
        right: 0 !important;
    }

    body.unified-page #qnaModal .qna-touch-action {
        min-width: 44px;
        min-height: 44px;
    }

    body.unified-page #qnaModal .qna-touch-field {
        min-height: 44px;
    }

    body.unified-page #qnaModal .qna-choice-touch {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Keep the row status readable beside long Korean titles on narrow screens. */
#qnaModal .qna-list-item > span:first-child { gap:8px; }
#qnaModal .qna-list-item > span:first-child > span:first-child { min-width:0; word-break:keep-all; overflow-wrap:break-word; }
#qnaModal .qna-list-item > span:first-child > span:last-child { flex-shrink:0; white-space:nowrap; }

/* static/css/notification_inbox_access.css */
.notif-inbox-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 30000);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(60px, env(safe-area-inset-top)) 12px 12px;
    background: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.notif-inbox-panel {
    width: min(100%, 480px);
    height: min(640px, calc(100vh - 80px));
    height: min(640px, calc(100dvh - 80px));
    min-height: min(460px, calc(100vh - 80px));
    min-height: min(460px, calc(100dvh - 80px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.notif-inbox-header {
    min-height: 56px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px 6px 16px;
    border-bottom: 1px solid #eee;
}

.notif-inbox-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.notif-inbox-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-inbox-panel .notif-action-btn,
.notif-icon-btn,
.notif-tab,
.notif-del-btn,
.notif-item-main {
    font: inherit;
}

.notif-inbox-panel .notif-action-btn,
.notif-icon-btn,
.notif-tab,
.notif-del-btn {
    min-width: 44px;
    min-height: 44px;
}

.notif-inbox-panel .notif-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #90caf9;
    border-radius: 8px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.notif-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #666;
    font-size: 1.45rem;
    cursor: pointer;
}

.notif-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    min-height: 44px;
    padding: 0 12px;
    overflow-x: auto;
    border-bottom: 1px solid #eee;
    scrollbar-width: thin;
}

.notif-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #777;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.notif-tab.active {
    border-bottom-color: #1976d2;
    color: #1565c0;
}

.notif-action-status {
    min-height: 28px;
    display: flex;
    flex: 0 0 28px;
    align-items: center;
    padding: 3px 16px;
    box-sizing: border-box;
    color: #475467;
    font-size: 0.75rem;
}

.notif-action-status[data-state="success"] { color: #067647; }
.notif-action-status[data-state="warning"] { color: #b54708; }
.notif-action-status[data-state="error"] { color: #b42318; }

/* inbox.js announces data-state; keep semantic colors above shared dark rules. */
html[data-theme="dark"] .notif-action-status {
    color: var(--color-text-secondary, #bdc9d8) !important;
}

html[data-theme="dark"] .notif-action-status[data-state="success"] {
    color: var(--color-success, #4ade80) !important;
}

html[data-theme="dark"] .notif-action-status[data-state="warning"] {
    color: var(--color-warning, #fbbf24) !important;
}

html[data-theme="dark"] .notif-action-status[data-state="error"] {
    color: var(--color-danger, #fb7185) !important;
}

.notif-inbox-panel .notif-action-btn:disabled,
.notif-del-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.notif-inbox-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.notif-loading-state,
.notif-state {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 20px;
    box-sizing: border-box;
    color: #667085;
    text-align: center;
}

.notif-loading-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 3px solid #dbeafe;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: notif-inbox-spin 0.8s linear infinite;
}

@keyframes notif-inbox-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .notif-loading-spinner { animation: none; }
}

.notif-skeleton-list {
    padding: 0 16px 16px;
}

.notif-skeleton-row {
    height: 72px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f2f4f7 25%, #f8fafc 50%, #f2f4f7 75%);
    background-size: 200% 100%;
    animation: notif-inbox-skeleton 1.2s ease-in-out infinite;
}

@keyframes notif-inbox-skeleton {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .notif-skeleton-row { animation: none; }
}

.notif-error-state {
    min-height: 100%;
    flex-direction: column;
}

.notif-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    min-height: 76px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.1s;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    border-left: 3px solid #1976d2;
    background: #f0f7ff;
}

.notif-item-main {
    min-width: 0;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    padding: 10px 8px 10px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.notif-title {
    font-size: 0.88rem;
    font-weight: 650;
}

.notif-body {
    display: -webkit-box;
    overflow: hidden;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notif-meta {
    color: #98a2b3;
    font-size: 0.7rem;
}

.notif-cat-badge {
    padding: 1px 6px;
    border-radius: 8px;
    color: #667085;
    font-size: 0.65rem;
}

.notif-del-btn {
    align-self: center;
    justify-self: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #98a2b3;
    font-size: 1.15rem;
    cursor: pointer;
}

.notif-inbox-panel .notif-action-btn:focus-visible,
.notif-icon-btn:focus-visible,
.notif-tab:focus-visible,
.notif-del-btn:focus-visible,
.notif-item-main:focus-visible {
    outline: 3px solid rgba(25, 118, 210, 0.35);
    outline-offset: -3px;
}

@media (max-width: 767px) {
    .notif-inbox-modal {
        align-items: stretch;
        padding: 0;
    }

    .notif-inbox-panel {
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        border-radius: 0;
    }

    .notif-inbox-header {
        min-height: calc(56px + env(safe-area-inset-top));
        padding-top: max(6px, env(safe-area-inset-top));
    }

    .notif-tabs {
        min-height: 44px;
    }
}

/* static/css/calendar_dialog_loading.css */
body.unified-page .cal-modal {
    position: relative;
    height: min(720px, calc(100vh - var(--app-dialog-safe-bottom, 0px) - 30px));
    height: min(720px, calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 30px));
    min-height: min(560px, calc(100vh - var(--app-dialog-safe-bottom, 0px) - 30px));
    min-height: min(560px, calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 30px));
}

body.unified-page .cal-loading-state {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
    color: #475569;
    text-align: center;
}

body.unified-page .cal-loading-state[hidden],
body.unified-page .cal-scroll[hidden] {
    display: none !important;
}

body.unified-page .cal-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: cal-loading-spin .8s linear infinite;
}

body.unified-page .cal-loading-skeleton {
    width: min(100%, 320px);
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

body.unified-page .cal-loading-skeleton > span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: cal-loading-shimmer 1.2s ease-in-out infinite;
}

body.unified-page .cal-loading-skeleton > span:nth-child(2) { width: 84%; }
body.unified-page .cal-loading-skeleton > span:nth-child(3) { width: 68%; }

body.unified-page .cal-retry-btn,
body.unified-page .cal-close-btn,
body.unified-page .cal-lunar-btn,
body.unified-page .cal-today-btn,
body.unified-page .cal-year-select,
body.unified-page .cal-add-schedule-btn {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
}

body.unified-page .cal-retry-btn {
    border: 1px solid #2563eb;
    border-radius: 9px;
    padding: 0 16px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

body.unified-page .cal-day-loading {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: .9rem;
}

body.unified-page .cal-cell[role="gridcell"]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

body.unified-page .cal-ev-item {
    gap: 4px;
    padding: 0;
    cursor: default;
}

body.unified-page .cal-ev-open {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

body.unified-page .cal-ev-open:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

body.unified-page .cal-ev-del {
    align-self: stretch;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
}

body.unified-page .sched-dialog-close:focus-visible,
body.unified-page .sched-dialog-cancel:focus-visible,
body.unified-page .sched-dialog .cal-form-save:focus-visible,
body.unified-page .sched-dialog input:focus-visible,
body.unified-page .sched-dialog textarea:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

body.unified-page .sched-dialog .cal-form-label {
    display: block;
    margin-bottom: 3px;
    color: #666;
    font-size: .85rem;
    font-weight: 600;
}

body.unified-page .sched-dialog-status {
    flex: 1 0 100%;
    min-width: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    color: #475569;
    font-size: .78rem;
    line-height: 1.3;
}

body.unified-page .sched-dialog-actions {
    flex-wrap: wrap;
}

body.unified-page .sched-dialog .cal-form-save {
    min-width: 96px;
}

body.unified-page .sched-dialog[aria-busy="true"] .cal-form-save {
    cursor: wait;
    opacity: .72;
}

body.unified-page .cal-event-list {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
}

@keyframes cal-loading-spin { to { transform: rotate(360deg); } }
@keyframes cal-loading-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
    body.unified-page .cal-loading-spinner,
    body.unified-page .cal-loading-skeleton > span { animation: none; }
}

@media (max-width: 600px) {
    body.unified-page .sched-dialog-close,
    body.unified-page .sched-dialog-cancel,
    body.unified-page .sched-dialog .cal-form-save,
    body.unified-page .sched-dialog input,
    body.unified-page .sched-dialog textarea {
        min-height: 44px;
        box-sizing: border-box;
    }

    body.unified-page .sched-dialog-close,
    body.unified-page .sched-dialog-cancel,
    body.unified-page .sched-dialog .cal-form-save {
        min-width: 44px;
    }

    body.unified-page .cal-modal {
        width: calc(100% - 16px);
        height: calc(100vh - var(--app-dialog-safe-bottom, 0px) - 16px);
        height: calc(var(--app-dialog-viewport-height, 100dvh) - var(--app-dialog-safe-bottom, 0px) - 16px);
        min-height: 0;
        max-height: calc(100vh - var(--app-dialog-safe-bottom, 0px) - 16px);
        max-height: calc(var(--app-dialog-viewport-height, 100dvh) - var(--app-dialog-safe-bottom, 0px) - 16px);
    }

    body.unified-page .cal-header {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: center;
        gap: 6px;
        padding: 8px;
    }

    body.unified-page .cal-title { grid-column: 1 / 4; }
    body.unified-page .cal-close-btn { grid-column: 4; grid-row: 1; justify-self: end; }
    body.unified-page .cal-lunar-btn,
    body.unified-page .cal-today-btn,
    body.unified-page .cal-year-select {
        width: 100%;
        min-width: 0;
        padding-left: 4px;
        padding-right: 4px;
    }

    body.unified-page .cal-event-list {
        height: 150px;
        min-height: 150px;
        max-height: 150px;
    }
}

@media (orientation: landscape) and (max-height: 650px) and (max-width: 1024px) {
    body.unified-page .sched-dialog-close,
    body.unified-page .sched-dialog-cancel,
    body.unified-page .sched-dialog .cal-form-save,
    body.unified-page .sched-dialog input,
    body.unified-page .sched-dialog textarea {
        min-height: 44px;
        box-sizing: border-box;
    }

    body.unified-page .sched-dialog-close,
    body.unified-page .sched-dialog-cancel,
    body.unified-page .sched-dialog .cal-form-save {
        min-width: 44px;
    }

    body.unified-page .cal-modal {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto minmax(0, 1fr) 100px;
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
        min-height: 0;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        overflow: hidden;
    }

    body.unified-page .cal-header {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 6px 8px;
        border-right: 0;
        border-bottom: 1px solid #eee;
    }

    body.unified-page .cal-title {
        min-width: 0;
    }

    body.unified-page .cal-legend {
        grid-column: 1;
        grid-row: 2;
        flex-direction: row;
        align-self: stretch;
        gap: 10px;
        padding: 4px 8px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }

    body.unified-page .cal-day-header {
        grid-column: 1;
        grid-row: 3;
    }

    body.unified-page .cal-scroll {
        grid-column: 1;
        grid-row: 4;
        min-height: 0;
    }

    body.unified-page .cal-event-list {
        grid-column: 1;
        grid-row: 5;
        height: 100px;
        min-height: 100px;
        max-height: 100px;
    }
}

/* static/css/weather_dialog_loading.css */
body.unified-page .weather-dialog {
    position: relative;
    height: min(720px, calc(100vh - var(--app-dialog-safe-bottom, 0px) - 40px));
    height: min(720px, calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 40px));
    min-height: min(560px, calc(100vh - var(--app-dialog-safe-bottom, 0px) - 40px));
    min-height: min(560px, calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 40px));
}

body.unified-page .weather-dialog-state {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    box-sizing: border-box;
    color: #475569;
    text-align: center;
}

body.unified-page .weather-dialog-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #dbeafe;
    border-top-color: #1565c0;
    border-radius: 50%;
    animation: weather-dialog-loading-spin .8s linear infinite;
}

body.unified-page .weather-dialog-skeleton {
    width: min(100%, 320px);
    display: grid;
    gap: 9px;
    margin-top: 8px;
}

body.unified-page .weather-dialog-skeleton > span {
    display: block;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: weather-dialog-loading-shimmer 1.2s ease-in-out infinite;
}

body.unified-page .weather-dialog-skeleton > span:nth-child(2) { width: 88%; }
body.unified-page .weather-dialog-skeleton > span:nth-child(3) { width: 74%; }
body.unified-page .weather-dialog-skeleton > span:nth-child(4) { width: 82%; }

body.unified-page .weather-dialog-close,
body.unified-page .weather-dialog-retry {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

body.unified-page .weather-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

body.unified-page .weather-dialog-retry {
    border: 1px solid #1565c0;
    border-radius: 9px;
    padding: 0 14px;
    background: #1565c0;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

body.unified-page .weather-dialog-body {
    min-height: 0;
}

@keyframes weather-dialog-loading-spin { to { transform: rotate(360deg); } }
@keyframes weather-dialog-loading-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
    body.unified-page .weather-dialog-spinner,
    body.unified-page .weather-dialog-skeleton > span {
        animation: none;
    }
}

@media (max-width: 600px) {
    body.unified-page .weather-dialog-overlay {
        padding: 8px;
    }

    body.unified-page .weather-dialog {
        width: calc(100% - 16px);
        height: calc(100vh - var(--app-dialog-safe-bottom, 0px) - 16px);
        height: calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 16px);
        min-height: 0;
        max-height: calc(100vh - var(--app-dialog-safe-bottom, 0px) - 16px);
        max-height: calc(100dvh - var(--app-dialog-safe-bottom, 0px) - 16px);
    }
}

@media (orientation: landscape) and (max-height: 650px) and (max-width: 1024px) {
    body.unified-page .weather-dialog {
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
        min-height: 0;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }
}

/* static/css/dash_more_dialog_loading.css */
/* Stable loading/error shell for the dashboard list dialog. */
@media (min-width: 768px) {
    body.unified-page .dash-more-panel {
        height: min(720px, 82vh);
        height: min(720px, 82dvh);
        min-height: min(420px, 82vh);
        min-height: min(420px, 82dvh);
    }
}

body.unified-page .dash-more-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
}

body.unified-page .dash-more-body {
    min-height: 0;
    position: relative;
}

body.unified-page .dash-more-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.unified-page .dash-more-state {
    box-sizing: border-box;
    width: 100%;
    min-height: 100%;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--color-text-secondary);
    text-align: center;
}

body.unified-page .dash-more-status {
    min-height: 24px;
    margin: 0;
    line-height: 1.5;
}

body.unified-page .dash-more-skeleton {
    width: min(720px, 88%);
    display: grid;
    gap: 12px;
}

body.unified-page .dash-more-skeleton span {
    display: block;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.14) 20%, rgba(148, 163, 184, 0.3) 50%, rgba(148, 163, 184, 0.14) 80%);
    background-size: 220% 100%;
    animation: dashMoreSkeleton 1.25s ease-in-out infinite;
}

body.unified-page .dash-more-skeleton span:nth-child(2),
body.unified-page .dash-more-skeleton span:nth-child(4) {
    width: 92%;
}

body.unified-page .dash-more-retry {
    min-width: 96px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--color-primary);
    border-radius: 9px;
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

body.unified-page .dash-more-retry:focus-visible,
body.unified-page .dash-more-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 42%, transparent);
    outline-offset: 2px;
}

@keyframes dashMoreSkeleton {
    from { background-position: 100% 0; }
    to { background-position: -120% 0; }
}

@media (max-width: 767px) {
    body.unified-page .dash-more-panel {
        --app-dialog-preferred-max: 82dvh;
        height: auto;
    }

    body.unified-page .dash-more-state {
        padding: 24px 16px;
    }

    body.unified-page .dash-more-skeleton {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.unified-page .dash-more-skeleton span {
        animation: none;
    }
}

/* Shared list totals align with the existing dialog header in every list. */
body.unified-page .dash-more-paging {
    box-sizing: border-box;
    padding: 12px var(--dialog-pad, 24px);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* The heading and primary exit stay outside the scrollable table. */
body.unified-page .dash-more-header-left { min-width:0;flex-wrap:wrap; }
body.unified-page .dash-more-close { flex:0 0 auto; }

/* static/css/ui_components.css */
/* 일이야 공용 레이아웃 클래스 v1 (LAYOUTREF, runs/design/layoutref/LAYOUT_REFERENCE.md B·D4)
   값은 ui_tokens.css. 기존 화면은 값 치환으로 정돈하고, 새로 만들거나 다시 쓰는 화면만 이 클래스를 쓴다.
   모든 페이지 CSS 뒤에 불러온다. */

/* ── 줄바꿈 (B7) ───────────────────────────────────────────────
   한국어는 어절 단위로 꺾는다. overflow-wrap:anywhere 는 그래도 넘치는 긴 낱말·URL만 끊고,
   한글의 최소 폭(min-content)을 지금과 같게 유지해 flex·표 칸 폭이 넓어지지 않게 한다.
   (anywhere 미지원 브라우저는 앞의 break-word 를 쓴다.) */
html {
    word-break: keep-all;
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
}

/* DES 15: 모바일 홈은 V4 그대로다. 소유자 결정(감사 M-4) 전까지 이 영역은 기존 줄바꿈을 유지한다.
   상단 아이콘 메뉴(header)는 메인 메뉴 계약 영역이라 모든 폭에서 기존 줄바꿈을 유지한다. */
header {
    word-break: normal;
    overflow-wrap: normal;
}

@media (max-width: 767px) {
    /* 모바일 홈 화면 영역 전체(메뉴·알림 안내·검색 줄·홈 모듈·광고). 그 위에 뜨는 대화상자는 제외하지 않는다. */
    body.unified-page :is(#appMenuRegion, #homeNoticeSlot, #searchBookmarkRow, #homeModules, #landscapeNoData, #appAdRegion, .service-footer) {
        word-break: normal;
        overflow-wrap: normal;
    }

    body.unified-page #homeModules #dashMoreDialog {
        word-break: keep-all;
        overflow-wrap: break-word;
        overflow-wrap: anywhere;
    }
}

/* 숫자+단위·날짜를 붙이고(33,000원, 365일), 한 줄 말줄임·두 줄 제한을 쓴다. */
.u-nowrap { white-space: nowrap; }
.u-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* ── 버튼 (B2·B3·B4) ─────────────────────────────────────────
   라벨은 한 줄이고 자르지 않는다. 모자라면 묶음을 다음 줄로 보내거나(데스크톱) 세로로 쌓는다(모바일). */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-sizing: border-box;
    height: var(--control-h-md);
    min-width: var(--control-min-w);
    padding: 0 var(--control-px-md);
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font: inherit;
    font-size: var(--control-fs-md);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    word-break: keep-all;
    text-decoration: none;
    cursor: pointer;
}
.ui-btn--sm { height: var(--control-h-sm); padding: 0 var(--control-px-sm); font-size: var(--control-fs-sm); gap: var(--space-1); }
.ui-btn--lg { height: var(--control-h-lg); padding: 0 var(--control-px-lg); font-size: var(--control-fs-lg); }
.ui-btn--primary { background: var(--action-primary-bg); border-color: var(--action-primary-bg); color: var(--action-primary-fg); }
.ui-btn--primary:hover { background: var(--action-primary-bg-hover); border-color: var(--action-primary-bg-hover); }
.ui-btn--secondary { background: var(--action-secondary-bg); border-color: var(--action-secondary-border); color: var(--action-secondary-fg); }
.ui-btn--tertiary { min-width: 0; padding-inline: var(--space-2); background: transparent; color: var(--action-tertiary-fg); }
.ui-btn--danger { background: var(--action-danger-bg); border-color: var(--action-danger-bg); color: var(--action-danger-fg); }
.ui-btn--block { display: flex; width: 100%; }
.ui-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ui-btn:disabled,
.ui-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ui-btn > svg { flex: none; width: var(--icon-size); height: var(--icon-size); }
.ui-btn--sm > svg { width: 16px; height: 16px; }
.ui-icon-btn { min-width: 0; inline-size: var(--icon-btn); block-size: var(--icon-btn); padding: 0; }

/* 보이는 크기는 그대로 두고 누르는 영역만 넓힌다 (B9) */
.ui-hit { position: relative; }
.ui-hit::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, var(--hit-min));
    height: max(100%, var(--hit-min));
    transform: translate(-50%, -50%);
}

/* ── 버튼 묶음·대화상자 머리·하단 (B5-1·B8·B12) ───────────────────
   DOM 순서는 [보조…][주]: 주 버튼이 오른쪽 끝이고 한 묶음에 주 버튼은 1개다.
   초기화·도움말처럼 성격이 다른 동작은 .ui-actions__start 로 왼쪽 끝에 뗀다. */
.ui-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-inline); }
.ui-actions--end { justify-content: flex-end; }
.ui-actions__start { margin-inline-end: auto; }
@media (max-width: 767px) {
    .ui-actions--fill > * { flex: 1 1 0; min-width: 0; height: var(--control-h-lg); }
    /* DOM [보조][주] → 화면에서는 주 버튼이 맨 위 */
    .ui-actions--stack { flex-direction: column-reverse; align-items: stretch; }
    .ui-actions--stack > * { width: 100%; height: var(--control-h-lg); }
}

.ui-dialog__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 56px;
    padding: 0 var(--space-2) 0 var(--dialog-pad);
}
.ui-dialog__title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--color-text, #1e293b);
    font-size: 18px;
    font-weight: 800;
    word-break: keep-all;
}
.ui-dialog__close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    inline-size: var(--icon-btn);
    block-size: var(--icon-btn);
    padding: 0;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--color-text-secondary, #64748b);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.ui-dialog__close:hover { background: rgba(100, 116, 139, 0.12); }
.ui-dialog__close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* LAYOUTREF batch 2: existing dialog close selectors use the shared values.
   These controls also have older responsive/inline declarations; only their
   shape is authoritative here. Modal headings retain their approved navy. */
body :is(.close-btn, .sfd-close-btn, .fsd-close-btn, .dialog-close,
    .modal-close, .dash-more-close, .cal-close-btn, .sched-dialog-close,
    .weather-dialog-close, .results-dialog-close-btn, .collab-close,
    .fiscal-dialog-close, .org-history-close, .related-companies-close,
    .notice-popup-close),
body #qnaModalCloseBtn {
    display: inline-flex !important;
    flex: 0 0 var(--icon-btn) !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    width: var(--icon-btn) !important;
    min-width: var(--icon-btn) !important;
    height: var(--icon-btn) !important;
    min-height: var(--icon-btn) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--radius-control) !important;
    background: transparent !important;
    color: var(--color-text-secondary, #64748b);
    font-size: var(--icon-size) !important;
    line-height: 1 !important;
    cursor: pointer;
}
body .modal-header :is(.close-btn, .modal-close),
body .license-panel-header .close-btn { color: #ffffff; }
body .fiscal-dialog-header .fiscal-dialog-close { color: #cbd5e1; }
body :is(.close-btn, .sfd-close-btn, .fsd-close-btn, .dialog-close,
    .modal-close, .dash-more-close, .cal-close-btn, .sched-dialog-close,
    .weather-dialog-close, .results-dialog-close-btn, .collab-close,
    .fiscal-dialog-close, .org-history-close, .related-companies-close,
    .notice-popup-close):hover,
body #qnaModalCloseBtn:hover {
    background: rgba(100, 116, 139, 0.12) !important;
    color: var(--color-text-secondary, #64748b);
    transform: none;
}
body .modal-header :is(.close-btn, .modal-close):hover,
body .license-panel-header .close-btn:hover { color: #ffffff; }
body :is(.close-btn, .sfd-close-btn, .fsd-close-btn, .dialog-close,
    .modal-close, .dash-more-close, .cal-close-btn, .sched-dialog-close,
    .weather-dialog-close, .results-dialog-close-btn, .collab-close,
    .fiscal-dialog-close, .org-history-close, .related-companies-close,
    .notice-popup-close):focus-visible,
body #qnaModalCloseBtn:focus-visible,
body.unified-page .results-dialog .results-sort-menu > .result-sort-option:focus-visible,
body.unified-page .results-dialog .results-related-company-btn:focus-visible,
body.unified-page .results-dialog .result-card:focus-visible,
#detailModal .action-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring) !important;
}

.ui-dialog__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: var(--gap-inline);
    padding: var(--space-3) var(--dialog-pad) calc(var(--space-3) + var(--app-dialog-safe-bottom, 0px));
    border-top: 1px solid var(--color-border, #e2e8f0);
    background: inherit;
}

/* 기존 공용 대화상자 하단 .modal-footer(요약·문서 보기)에는 지금까지 규칙이 없어
   버튼이 전체 폭으로 쌓이고 바탕이 브라우저 기본 회색이었다. 같은 규칙으로 정돈한다.
   [재변환(보조)][다운로드(주)]처럼 DOM 순서는 이미 보조→주다. */
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: var(--gap-inline);
    padding: var(--space-3) var(--dialog-pad);
    border-top: 1px solid var(--color-border, #e2e8f0);
}
.modal-footer > .action-btn {
    min-width: var(--control-min-w);
    min-height: var(--control-h-md);
    padding: 0 var(--control-px-md);
    border-radius: var(--radius-control);
    white-space: nowrap;
}
.modal-footer > .action-btn:not(.secondary) {
    border: 1px solid var(--action-primary-bg);
    background: var(--action-primary-bg);
    color: var(--action-primary-fg);
}
.modal-footer > .action-btn:not(.secondary):disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.modal-footer > .action-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (max-width: 767px) {
    .modal-footer > .action-btn { flex: 1 1 0; min-height: var(--control-h-lg); }
}

/* ── 카드·목록 행·툴바 (B5-4·B5-5·B5-6) ─────────────────────── */
.ui-card { box-sizing: border-box; padding: var(--card-pad); border: 1px solid var(--color-border, #e2e8f0); border-radius: var(--radius-card); background: var(--color-surface, #fff); }
.ui-card__header { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); margin-bottom: var(--space-3); }
.ui-card__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ui-card__header-actions { display: flex; flex: none; gap: var(--space-1); }

.ui-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-h-md); padding: var(--space-2) var(--space-3); }
.ui-row__main { flex: 1 1 auto; min-width: 0; }
.ui-row__actions { display: flex; flex: none; gap: var(--space-2); }

.ui-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--gap-group); }
.ui-toolbar__group { display: flex; align-items: center; gap: var(--gap-inline); }
.ui-toolbar__spacer { flex: 1 1 auto; }
.ui-toolbar :is(input, select, button, .ui-btn) { height: var(--control-h-md); border-radius: var(--radius-control); }

/* 빈 상태 (B5-8) */
.ui-empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-4); color: var(--color-text-secondary, #64748b); font-size: 13px; text-align: center; }

/* Flowboard S1: opt-in variants, activated on S2 surfaces. Frame/menu/ad/safe-area stay external. */
.ui-flow {
    color: var(--flow-text);
    background: var(--flow-canvas);
    font-family: var(--flow-font-family);
    font-size: var(--flow-font-body);
    line-height: var(--flow-line-body);
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.ui-flow :where(.ui-flow-card, .ui-flow-empty, .ui-flow-table, .ui-flow-step,
    .ui-flow-status, .ui-flow-action) { box-sizing: border-box; min-inline-size: 0; }
.ui-flow .ui-flow-card {
    background: var(--flow-surface);
    border: var(--flow-border-width) solid var(--flow-border);
    border-radius: var(--flow-radius-card);
}
.ui-flow .ui-flow-card--raised { box-shadow: var(--flow-shadow); }
.ui-flow .ui-flow-card__header, .ui-flow .ui-flow-card__body {
    padding: var(--flow-space-4) var(--flow-space-5);
}
.ui-flow .ui-flow-card__header {
    word-break: keep-all; overflow-wrap: anywhere;
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: var(--flow-space-3);
    border-block-end: var(--flow-border-width) solid var(--flow-border);
}
.ui-flow .ui-flow-title {
    margin: 0; color: var(--flow-text); font-size: var(--flow-font-title);
    font-weight: var(--flow-weight-heading); line-height: var(--flow-line-title); text-wrap: balance;
    word-break: keep-all; overflow-wrap: anywhere;
}
.ui-flow .ui-flow-section-title {
    margin: 0; color: var(--flow-text); font-size: var(--flow-font-section);
    font-weight: var(--flow-weight-heading); line-height: var(--flow-line-section); text-wrap: balance;
    word-break: keep-all; overflow-wrap: anywhere;
}
.ui-flow .ui-flow-note { color: var(--flow-text-secondary); font-size: var(--flow-font-note); }
.ui-flow .ui-flow-table { inline-size: 100%; border-collapse: collapse; table-layout: fixed; }
.ui-flow .ui-flow-table caption {
    text-align: start; padding-block: var(--flow-space-3);
    color: var(--flow-text); font-weight: 700;
}
.ui-flow .ui-flow-table :is(th, td) {
    padding: var(--flow-space-3); text-align: start; vertical-align: top;
    border-block-end: var(--flow-border-width) solid var(--flow-border);
    overflow-wrap: anywhere; word-break: keep-all;
}
.ui-flow .ui-flow-table th { background: var(--flow-surface-subtle); font-weight: 700; }
.ui-flow .ui-flow-table__number { font-variant-numeric: tabular-nums; }
.ui-flow .ui-flow-status {
    display: inline-flex; align-items: center; gap: var(--flow-space-1);
    max-inline-size: 100%; padding: var(--flow-space-1) var(--flow-space-2);
    border: var(--flow-border-width) solid currentColor;
    border-radius: var(--flow-radius-badge);
    background: var(--flow-surface); color: var(--flow-text-secondary);
    font-size: var(--flow-font-note); line-height: var(--flow-line-heading);
    white-space: normal;
}
.ui-flow .ui-flow-status--success { color: var(--flow-success); }
.ui-flow .ui-flow-status--attention { color: var(--flow-attention); }
.ui-flow .ui-flow-status--danger { color: var(--flow-danger); }
.ui-flow .ui-flow-status--info { color: var(--flow-action); }
.ui-flow .ui-flow-empty {
    display: grid; justify-items: start; gap: var(--flow-space-3);
    padding: var(--flow-space-6); background: var(--flow-surface);
    border: var(--flow-border-width) solid var(--flow-border);
    border-radius: var(--flow-radius-card);
}
.ui-flow .ui-flow-empty > :is(h2, h3, p) { margin: 0; }
.ui-flow .ui-flow-step {
    display: flex; align-items: start; gap: var(--flow-space-3);
    padding-block-end: var(--flow-space-3);
    border-block-end: 2px solid var(--flow-action);
}
.ui-flow .ui-flow-step__index {
    flex: none; color: var(--flow-action); font-size: var(--flow-font-title);
    font-weight: var(--flow-weight-heading); font-variant-numeric: tabular-nums; line-height: var(--flow-line-heading);
}
.ui-flow .ui-flow-step__content { min-inline-size: 0; }
.ui-flow .ui-flow-step__content > p { margin: var(--flow-space-1) 0 0; }
.ui-flow .ui-flow-actions { display: flex; flex-wrap: wrap; gap: var(--flow-space-2); }
.ui-flow .ui-flow-action {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--flow-space-2); min-block-size: var(--flow-control-min);
    min-inline-size: var(--flow-control-min); max-inline-size: 100%;
    padding: var(--flow-space-2) var(--flow-space-3);
    border: var(--flow-border-width) solid var(--flow-control-border);
    border-radius: var(--flow-radius-control);
    background: var(--flow-surface); color: var(--flow-action);
    font: inherit; line-height: var(--flow-line-heading);
    text-align: center; text-decoration: none;
    white-space: normal; word-break: keep-all; overflow-wrap: anywhere; cursor: pointer;
}
.ui-flow .ui-flow-action--primary {
    background: var(--flow-action); color: var(--flow-on-action); border-color: var(--flow-action);
}
.ui-flow .ui-flow-action:hover { box-shadow: inset 0 0 0 1px currentColor; }
.ui-flow .ui-flow-action:focus-visible { outline: var(--flow-focus-width) solid var(--flow-focus); outline-offset: var(--flow-focus-width); }
.ui-flow .ui-flow-action:disabled, .ui-flow .ui-flow-action[aria-disabled="true"] {
    background: var(--flow-surface-subtle); color: var(--flow-text-secondary);
    border-color: var(--flow-border); box-shadow: none; cursor: default;
}
/* Purely presentational: caller supplies an accessible name/status and read rules.
   No number, live announcement, service priority, position or badge counter is implied. */
.ui-flow .ui-flow-indicator {
    display: inline-block; flex: none; inline-size: 8px; block-size: 8px;
    border: 1px solid currentColor; border-radius: 50%;
    background: currentColor; color: var(--flow-action);
}
.ui-flow .ui-flow-indicator--soft { background: transparent; }
@media (max-width: 767px) {
    .ui-flow .ui-flow-card__header, .ui-flow .ui-flow-card__body { padding: var(--flow-space-4); }
    .ui-flow .ui-flow-table :is(th, td) { padding: var(--flow-space-2); }
    .ui-flow .ui-flow-empty { padding: var(--flow-space-4); }
}

/* Shared S2 variants. The consumer, never this kit, owns scrolling and placement. */
.ui-flow .ui-flow-prose { font-size: var(--flow-font-prose); line-height: var(--flow-line-prose); }
.ui-flow .ui-flow-label { font-size: var(--flow-font-label); line-height: var(--flow-line-label); color: var(--flow-text-secondary); }
.ui-flow .ui-flow-action--ghost { border-color: transparent; background: transparent; color: var(--flow-action); }
.ui-flow .ui-flow-table { --flow-row-size: var(--flow-row-default); }
.ui-flow .ui-flow-table--compact { --flow-row-size: var(--flow-row-compact); }
.ui-flow .ui-flow-table--comfortable { --flow-row-size: var(--flow-row-comfortable); }
.ui-flow .ui-flow-table tr { height: var(--flow-row-size); }
.ui-flow .ui-flow-table :is(th, td) {
    line-height: var(--flow-line-list);
    padding-block: calc((var(--flow-row-size) - var(--flow-line-list)) / 2);
}
.ui-flow .ui-flow-table__number { text-align: end; }
.ui-flow .ui-flow-skeleton {
    min-block-size: var(--flow-row-default); border-radius: var(--flow-radius-badge);
    background: var(--flow-surface-subtle); color: var(--flow-text-secondary);
}
.ui-flow .ui-flow-action { transition: background-color var(--flow-motion-fast), border-color var(--flow-motion-fast); }
@media (prefers-reduced-motion: reduce) {
    .ui-flow .ui-flow-action { transition: none; }
}

