/* MADEPF UI shell (screen-only). Extracted from TEST resources/css/app.css; selectors depend on html[data-ui-shell]. */
/* Canonical UI shell visibility — device class, not breakpoint.
 * .ui-shell-mobile: MOBILE_TABLET only (PC never shows these).
 * .ui-shell-desktop: DESKTOP only via MT override; keep original
 * hidden sm:/md:/lg: classes so PC-internal breakpoints stay identical.
 */

html[data-ui-shell="desktop"] .ui-shell-mobile {
    display: none !important;
}

html[data-ui-shell="mobile-tablet"] .ui-shell-desktop {
    display: none !important;
}

html[data-ui-shell="mobile-tablet"] .ui-shell-mt-stack {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
}

html[data-ui-shell="mobile-tablet"] .ui-shell-desktop-split {
    height: 0 !important;
    overflow: hidden !important;
    flex: none !important;
    min-width: 0 !important;
}

/*
 * NON-MAP MOBILE_TABLET: reuse the existing open-site phone-frame (412px).
 * Main /map ([data-map-page]) stays viewport-wide. Other pages that inherit
 * layouts.map (more/move/open-site) still get the phone frame.
 * Overlay/backdrop remain viewport-width (outside these content roots).
 * NON-MAP page chrome (fixed header + global bottom nav) is pinned to the
 * same 412px phone-frame below; main /map stays viewport-wide.
 * Keep every [data-map-page] :has() on the html[data-ui-shell="mobile-tablet"]
 * compound: on a layout-root compound it is evaluated on DESKTOP too and every
 * map DOM mutation then re-styles the whole subtree.
 */
html[data-ui-shell="mobile-tablet"] [data-app-layout-root][data-layout-name="app"],
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-app-layout-root][data-layout-name="map"] {
    max-width: 412px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

html[data-ui-shell="mobile-tablet"]:has([data-map-page="1"]) [data-app-layout-root][data-layout-name="map"],
html[data-ui-shell="mobile-tablet"] [data-map-page="1"] {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/*
 * Tablet NON-MAP gutter: viewport around the 412px phone-frame is a hair
 * darker than white so the column reads as content, not empty canvas.
 * Only from 413px up — phone viewports have no side gutter and stay white.
 * Main /map and dark theme are excluded. Center stays #ffffff.
 *
 * Phone-frame edge: exact reuse of detailm #propertyOverlay.shadow-lg
 * (Tailwind shadow-lg). Do not invent a new shadow. Skip while the
 * overlay is open so its existing shadow-lg is not stacked.
 */
@media (min-width: 413px) {
    html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])) {
        background-color: #F7F8F9 !important;
    }
    html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])) body {
        background-color: #F7F8F9 !important;
    }
    html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])):not(:has([data-lw-items-detail="1"]:not([data-fav-inline]))) [data-app-layout-root][data-layout-name="app"],
    html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])):not(:has([data-lw-items-detail="1"]:not([data-fav-inline]))) [data-app-layout-root][data-layout-name="map"] {
        /* Identical to Tailwind .shadow-lg used by detailm overlay */
        --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
        --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
        box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    }
    /*
     * Detail overlay sits in parcialdetail's full-viewport wrap (bg-white).
     * That wrap — not body — is the visible outer gutter. Reuse HOME #F7F8F9.
     * PC / map / dark / phone (<413) are excluded by the same gates.
     */
    html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])) [data-parcialdetail-root="1"] > .fixed.inset-0.bg-white {
        background-color: #F7F8F9;
    }
}

/*
 * MAP-host detail only: the 412px #propertyOverlay stays opaque white.
 * Wrap stays transparent (never return to full-viewport white).
 * Backdrop is a very light slate veil so the live map remains clearly
 * visible but reads as a blocked/pressed region. Alpha stays well
 * below a heavy modal (not bg-black/50, not >= 0.15).
 * pointer-events stay auto. NON-MAP / community / purchase / desktop
 * are not selected.
 */
@media (min-width: 600px) and (min-height: 480px) {
    html[data-ui-shell="mobile-tablet"] [data-parcialdetail-root="1"][data-building-modal-host="map"]:not(:has(> .fixed.inset-0.bg-white > .invisible)) > .fixed.inset-0.bg-white {
        background-color: transparent !important;
    }

    html[data-ui-shell="mobile-tablet"] [data-parcialdetail-root="1"][data-building-modal-host="map"]:not(:has(> .fixed.inset-0.bg-white > .invisible)) > .fixed.inset-0.bg-black {
        background-color: rgba(15, 23, 42, 0.06) !important;
    }
}

html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]) [data-app-layout-root][data-layout-name="app"],
html[data-ui-shell="mobile-tablet"]:not([data-theme="dark"]):not(:has([data-map-page="1"])) [data-app-layout-root][data-layout-name="map"] {
    background-color: #ffffff;
}

html[data-ui-shell="mobile-tablet"] [data-lw-items-detail="1"]:not([data-fav-inline]) {
    max-width: 412px;
    width: 100%;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

/*
 * NON-MAP MT: align detail CTA / 건물정보 / 우하단 FABs to the 412 phone-frame.
 * Source of truth is map-opened detail (sticky CTA + absolute right-4 inside overlay).
 * Map page keeps current placement. Desktop shell is not selected.
 * Do not use a global `.fixed` override; register/open-site footers are out of scope.
 */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-lw-items-detail="1"]:not([data-fav-inline]) [data-detailm-cta="1"] {
    max-width: 412px;
    width: 100%;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-lw-items-detail="1"]:not([data-fav-inline]) [data-detailm-building-fab="1"],
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) .safe-area-fab.fixed.right-4,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) .ui-shell-mobile.fixed.right-4 {
    right: max(1rem, calc((100vw - min(412px, 100vw)) / 2 + 1rem));
}

/*
 * NON-MAP MT page chrome: pin existing fixed headers + global bottom nav
 * to the canonical 412px phone-frame (same inset as layout roots / FABs).
 * Main /map is excluded. Desktop shell is not selected.
 * Do not use a global `header` / `nav` / `.fixed` hammer.
 * Visibility of the nav (which routes render it) is unchanged.
 * Horizontal alignment only — z-index, bottom, safe-area stay as-is.
 * No extra shadow on header/nav (frame shadow remains on the layout root).
 */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) {
    --mt-phone-frame-w: 412px;
}

html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-bottom-nav="1"].app-mobile-bottom-nav,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) .ui-shell-mobile.fixed.top-0:not([data-os-mobile-os-fixed-header]),
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-page-header="1"] {
    max-width: var(--mt-phone-frame-w);
    width: 100%;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] {
    max-width: 412px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-body {
    flex-direction: column !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-list-pane {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-map-pane {
    display: none !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-map-pane.nb-show-map {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-list-pane.nb-hide-list {
    display: none !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-detail-sheet:not(.nb-detail-mobile) {
    display: none !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-trend-body {
    flex-direction: column !important;
}

html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-trend-left,
html[data-ui-shell="mobile-tablet"] [data-nb-workspace="1"] .nb-trend-right {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* iPad+ community overlays stay viewport-fixed (PHONE path). Do not set
 * display:!important — Alpine x-show owns visibility. Desktop keeps lg:absolute. */
html[data-ui-shell="mobile-tablet"] [data-community-overlay-panel="1"] {
    position: fixed !important;
    inset: 0 !important;
    z-index: 130 !important;
    background: rgba(0, 0, 0, 0.4);
}

html[data-ui-shell="mobile-tablet"] [data-community-overlay-panel="1"] > div {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 100% !important;
    max-width: 412px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    z-index: 130 !important;
}

/*
 * NON-MAP MOBILE_TABLET: pin PHONE responsive state inside the 412px frame.
 * iPad viewport still matches Tailwind sm/md/lg, so PC-oriented breakpoint
 * layout (2-col grids, flex-row splits, sm:hidden chrome) must not run here.
 * Scoped to [data-mt-phone-layout] and excluded from main /map.
 * Desktop shell is not selected — PC breakpoints stay identical.
 */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:grid {
    display: block !important;
}

html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:grid-cols-2,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:grid-cols-3,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:grid-cols-4,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:grid-cols-2,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:grid-cols-3,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:grid-cols-4,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:grid-cols-2,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:grid-cols-3,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:grid-cols-4,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .xl\:grid-cols-2,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .xl\:grid-cols-3,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .xl\:grid-cols-4 {
    grid-template-columns: none !important;
}

html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:flex-row,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:flex-row-reverse,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:flex-row,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:flex-row-reverse,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:flex-row,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:flex-row-reverse {
    flex-direction: column !important;
}

/* PC chrome that appears only from sm/md/lg stays hidden on MT (phone state). */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.sm\:flex,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.sm\:block,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.md\:flex,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.md\:block,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.lg\:flex,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .hidden.lg\:block {
    display: none !important;
}

/* Phone chrome hidden from sm+ must remain visible on MT. */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .flex.sm\:hidden,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .flex.md\:hidden,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .flex.lg\:hidden {
    display: flex !important;
}

html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .block.sm\:hidden,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .block.md\:hidden,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .block.lg\:hidden,
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:hidden:not(.hidden):not(.flex),
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .md\:hidden:not(.hidden):not(.flex),
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .lg\:hidden:not(.hidden):not(.flex) {
    display: block !important;
}

/* Mobile fixed-header offset: pt-[53px] sm:pt-0 is a PC pattern. */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .pt-\[53px\].sm\:pt-0 {
    padding-top: 53px !important;
}

/* PC vertically-centers settings/profile cards from sm+. Phone stacks from the top. */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .sm\:flex.sm\:items-center.sm\:justify-center {
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* ═══════════════════════════════════════════════════════
   다크모드 글로벌 오버라이드 — MOBILE_TABLET shell 전용 (viewport width와 무관)
   토글 ON 시 data-theme="dark"가 <html>에 설정됨
   ═══════════════════════════════════════════════════════ */
/* 배경 — 계층: gray-50(최어두운 페이지 배경) → gray-100/white(카드) → gray-200/300(구분선·칩) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white        { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-50      { background-color: #111827 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-100     { background-color: #1f2937 !important; }

 /* 카드/섹션 배경 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-200     { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-300     { background-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .modal-content   { background: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .tab-active      { background-color: #1f2937 !important; color: #f9fafb !important; }

/* 텍스트 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-900   { color: #f9fafb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-800   { color: #e5e7eb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-700   { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-600   { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-500   { color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-gray-400   { color: #6b7280 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-black      { color: #f9fafb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .tab-inactive    { color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .tab-inactive:hover { color: #e5e7eb !important; }

/* 테두리 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-gray-100 { border-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-gray-200 { border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-gray-300 { border-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #374151 !important; }

/* 호버/액티브 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-gray-50:hover   { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-gray-100:hover   { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .active\:bg-gray-50:active  { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .active\:bg-gray-100:active { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-white:hover       { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .active\:bg-white:active     { background-color: #374151 !important; }

/* 인풋/폼 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] input, html[data-ui-shell="mobile-tablet"][data-theme="dark"] textarea, html[data-ui-shell="mobile-tablet"][data-theme="dark"] select {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"] input::placeholder, html[data-ui-shell="mobile-tablet"][data-theme="dark"] textarea::placeholder {
    color: #6b7280;
}

/* SweetAlert2 다크 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .swal2-popup { background: #1f2937 !important; color: #f9fafb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .swal2-title { color: #f9fafb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .swal2-html-container, html[data-ui-shell="mobile-tablet"][data-theme="dark"] #swal2-html-container { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner button.swal2-cancel { background: #374151 !important; color: #e5e7eb !important; border-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner button.swal2-deny { background: #374151 !important; color: #e5e7eb !important; border-color: #4b5563 !important; }

/* layouts/footer 등에서 div.swal-sonner 타이틀/본문에 밝은 배경용 색이 고정되어 다크 팝업에서 대비가 사라지는 문제 보정 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner .swal2-title {
    color: #f9fafb !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner .swal2-html-container,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner #swal2-html-container {
    color: #e5e7eb !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"] div.swal-sonner .swal2-html-container .text-gray-400 {
    color: #a1a1aa !important;
}

/* 토스트/소너 다크 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sonner-toast { background: rgba(31,41,55,0.95) !important; color: #f9fafb !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .rt-boundary-toast {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* 스크롤바 다크 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .scrollbar-thin::-webkit-scrollbar-track { background: #1f2937; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .scrollbar-thin::-webkit-scrollbar-thumb { background: #4b5563; }

/* 그림자 / 박스섀도우 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .shadow-sm  { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .shadow-lg  { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .shadow-xl  { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.3) !important; }

/* 포인트 컬러 배경 (다크에서 채도 낮추고 투명하게) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-blue-50     { background-color: rgba(30,58,138,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-blue-100    { background-color: rgba(30,58,138,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-blue-200    { background-color: rgba(30,64,175,0.4) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-red-50      { background-color: rgba(127,29,29,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-red-100     { background-color: rgba(127,29,29,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-green-50    { background-color: rgba(20,83,45,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-green-100   { background-color: rgba(20,83,45,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-orange-50   { background-color: rgba(124,45,18,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-orange-100  { background-color: rgba(124,45,18,0.35) !important; }

/* 홈 매물카드 식대지급 배지: 위 전역 투명 orange 배경 대신 불투명 대비 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .home-meal-supply-badge {
    background-color: #c2410c !important;
    color: #ffedd5 !important;
    border-color: #fb923c !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-yellow-50   { background-color: rgba(113,63,18,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-yellow-100  { background-color: rgba(113,63,18,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-purple-50   { background-color: rgba(88,28,135,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-indigo-50   { background-color: rgba(49,46,129,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-amber-50    { background-color: rgba(120,53,15,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-teal-50     { background-color: rgba(19,78,74,0.25) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-emerald-50  { background-color: rgba(6,78,59,0.25) !important; }

/* 포인트 컬러 텍스트 (다크에서 밝게) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-blue-600  { color: #93c5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-blue-700  { color: #93c5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-blue-800  { color: #bfdbfe !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-red-500   { color: #fca5a5 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-red-600   { color: #fca5a5 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-red-700   { color: #fecaca !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-green-600 { color: #86efac !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-green-700 { color: #86efac !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-orange-600{ color: #fdba74 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-orange-700{ color: #fed7aa !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-purple-600{ color: #c4b5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-yellow-600{ color: #fcd34d !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-amber-600 { color: #fbbf24 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-teal-600  { color: #5eead4 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-indigo-600{ color: #a5b4fc !important; }

/* 포인트 컬러 테두리 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-blue-200  { border-color: rgba(59,130,246,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-blue-300  { border-color: rgba(59,130,246,0.4) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-blue-500  { border-color: #3b82f6 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-red-200   { border-color: rgba(239,68,68,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-red-300   { border-color: rgba(239,68,68,0.4) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-green-200 { border-color: rgba(34,197,94,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-orange-200{ border-color: rgba(249,115,22,0.3) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-yellow-200{ border-color: rgba(234,179,8,0.3) !important; }

/* 포인트 컬러 호버 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-blue-50:hover   { background-color: rgba(30,58,138,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-blue-100:hover  { background-color: rgba(30,58,138,0.45) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-red-50:hover    { background-color: rgba(127,29,29,0.35) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-green-50:hover  { background-color: rgba(20,83,45,0.35) !important; }

/* 하단 네비게이션 바 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-bottom-nav] { background-color: #1f2937 !important; border-color: #374151 !important; }

/* 모바일 고정/스티키 헤더 (각 페이지 상단) — full-width 헤더에만 적용 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .fixed.top-0.left-0.right-0.bg-white { background-color: #1f2937 !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.bg-white { background-color: #1f2937 !important; }

/* 반투명 배경 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white\/90 { background-color: rgba(31,41,55,0.9) !important; }

/* 포커스 링/아웃라인 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .focus\:border-blue-400:focus { border-color: #3b82f6 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .focus\:ring-blue-200:focus { --tw-ring-color: rgba(59,130,246,0.3) !important; }

/* 토글 스위치 (push-settings 등) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .push-slider { background-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .push-slider:before { background-color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] input:checked + .push-slider { background-color: #3b82f6 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] input:disabled + .push-slider { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] input:disabled + .push-slider:before { background-color: #4b5563 !important; }

/* 커스텀 컴포넌트 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .deal-type-selected { background-color: #e5e7eb !important; color: #111827 !important; border-color: #e5e7eb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .deal-type-unselected { background-color: #374151 !important; color: #d1d5db !important; border-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .deal-type-unselected:hover { background-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .deal-type-disabled { background-color: #1f2937 !important; color: #6b7280 !important; border-color: #374151 !important; }

/* 지도 페이지 플로팅 버튼 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .map-float-btn { background-color: #1f2937 !important; border-color: #374151 !important; color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .map-float-btn svg { color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .map-float-btn.bg-blue-200 { background-color: #1f2937 !important; border-color: #3b82f6 !important; color: #93c5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .map-float-btn.bg-blue-200 svg { color: #93c5fd !important; }

/* 지도 바텀시트 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .rounded-t-2xl.shadow-2xl.bg-white { background-color: #1f2937 !important; }

/* 스켈레톤 로딩 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .animate-pulse.bg-gray-200 { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .animate-pulse.bg-gray-100 { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [class*="animate-pulse"][class*="bg-gray"] { background-color: #374151 !important; }

/* 인라인 style 아이콘 배경 (push-settings 등) — CSS로 override 불가하므로 부모에 대비만 */

/* dot 컬러 유지 (이미 원색이므로 변경 불필요) */

/* slate 계열 (대출계산기·자동알림·충전 등) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-slate-50      { background-color: #111827 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-slate-100     { background-color: #1e293b !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-slate-200     { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-50  { border-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-100 { border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-200 { border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-300 { border-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-400 { border-color: #6b7280 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-slate-600 { border-color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-900   { color: #f9fafb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-800   { color: #e5e7eb !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-700   { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-600   { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-500   { color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-400   { color: #6b7280 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-300   { color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .text-slate-200   { color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-slate-100:hover    { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:bg-slate-50:hover     { background-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:border-slate-300:hover { border-color: #4b5563 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hover\:border-slate-400:hover { border-color: #6b7280 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .min-h-screen.bg-slate-50     { background-color: #111827 !important; }

/* 구분선 / border-t / border-b */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-t { border-top-color: #374151; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-b { border-bottom-color: #374151; }

/* ── 1. 홈 상단 헤더 바 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-50.min-h-screen { background-color: #111827 !important; }

/* ── 2. 지도 필터 바 (mapfilterm) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] { background-color: #111827 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button { background-color: #1f2937 !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button .text-gray-700,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button span.text-gray-700 { color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button .text-gray-600,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button svg.text-gray-600 { color: #9ca3af !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button[class*="bg-blue-500"] { background-color: #2563eb !important; border-color: #3b82f6 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button[class*="border-blue-500"]:not([class*="bg-blue-500"]) { background-color: #1e3a5f !important; border-color: #3b82f6 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button[class*="border-blue-500"] .text-blue-700,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button[class*="border-blue-500"] span.text-blue-700 { color: #93c5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button[class*="border-blue-500"] svg.text-blue-600 { color: #60a5fa !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button.\!bg-white { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] button:disabled { background-color: #1f2937 !important; }

/* 필터 칩 태그 영역 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] .bg-blue-100.text-blue-800 { background-color: rgba(30,58,138,0.35) !important; color: #93c5fd !important; border-color: rgba(59,130,246,0.4) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] .bg-gradient-to-b { background: rgba(17,24,39,0.7) !important; border-color: #374151 !important; }

/* ── 3. 지도 '기본, 금액, OFF' 라벨모드 토글 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] #labelModeToggle { background-color: #1f2937 !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] #labelModeToggle div { color: #d1d5db !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] #labelModeToggle div[style*="background:#dbeafe"],
html[data-ui-shell="mobile-tablet"][data-theme="dark"] #labelModeToggle div[data-active="true"] { background-color: rgba(30,58,138,0.4) !important; color: #93c5fd !important; }

/* ── 지도 매물명·금액 라벨 (CustomOverlay 인라인 배경/글자색 덮어씀) ── */
/* 꼬리 ::before 는 border-top-color:inherit 시 테두리색(#4b5563)을 물려받아 본체보다 밝게 보임.
   본체·꼬리(::before/::after)가 동일 --map-label-bg 를 쓰도록 고정한다.
   주의: border-color 단축은 border-left(오픈=빨강/일반=파랑 띠)까지 덮어쓰므로
   상·우·하만 회색으로 두고 좌측 띠는 타입 클래스로 복원한다. */
html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label {
    --map-label-bg: rgba(31, 41, 55, 0.96);
    background: var(--map-label-bg) !important;
    border-top-color: #4b5563 !important;
    border-right-color: #4b5563 !important;
    border-bottom-color: #4b5563 !important;
    color: #f3f4f6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38) !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label--open {
    border-left-color: #f87171 !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label--general {
    border-left-color: #60a5fa !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label--tail::before {
    /* Safari: border-top shorthand + explicit color (avoid inherit/currentcolor white tip) */
    border-left: 7px solid transparent !important;
    border-right: 7px solid transparent !important;
    border-top: 10px solid rgba(31, 41, 55, 0.96) !important;
    border-top-color: rgba(31, 41, 55, 0.96) !important;
    color: rgba(31, 41, 55, 0.96) !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label--tail::after {
    background: rgba(31, 41, 55, 0.96) !important;
    background-color: rgba(31, 41, 55, 0.96) !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label.label-loading {
    --map-label-bg: rgba(30, 58, 138, 0.55);
    background: var(--map-label-bg) !important;
    border-top-color: #3b82f6 !important;
    border-right-color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
    color: #e0e7ff !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label.label-loading.map-name-label--open {
    border-left-color: #f87171 !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label.label-loading.map-name-label--general {
    border-left-color: #60a5fa !important;
}

/* 지도 금액 모드: 매물 금액 숫자(인라인 색 덮어씀) */
html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) .map-name-label .map-label-price {
    color: #fff !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) #notifStrip .notif-strip-tx-badge--0 { background: #A34F4F !important; color: #fff !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) #notifStrip .notif-strip-tx-badge--2 { background: #7B5B43 !important; color: #fff !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) #notifStrip .notif-strip-tx-badge--1 { background: #2C4B72 !important; color: #fff !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"]:not([data-no-dark]) #notifStrip .notif-strip-tx-badge--3 { background: #4A8B63 !important; color: #fff !important; }

/* ── 4. 커뮤니티/문의 모바일 플로팅 버튼 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .lg\:hidden.fixed.right-4 .bg-white { background-color: #1f2937 !important; border-color: #374151 !important; color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .lg\:hidden.fixed.right-4 .bg-blue-500 { background-color: #2563eb !important; border-color: #3b82f6 !important; }

/* ── 5. 포인트내역·문의게시판 등 모바일 고정 헤더 — 위 '모바일 고정/스티키 헤더' 규칙에 통합됨 ── */

/* 페이지 배경 — min-h-screen 또는 전체 flex 컨테이너로 쓰이는 bg-gray-100은 최어두운 배경 적용 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-100.min-h-screen,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .flex.flex-col.bg-gray-100 { background-color: #111827 !important; }

/* 커뮤니티 글쓰기 모달 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .write-page.fixed.inset-0.bg-white { background-color: #1f2937 !important; }

/* 검색 input 위 영역 */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-mapfilter-mobile="1"] input,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .lg\:hidden.bg-gray-100 input { background-color: #1f2937 !important; border-color: #374151 !important; color: #e5e7eb !important; }

/* ── 홈 상단 로고만: 다크모드에서 밝기 낮추기 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-home-logo] img { opacity: 0.7 !important; filter: brightness(0.85) !important; }

/* ── 설정 아이콘 배경 (inline style은 CSS로 override 불가 → 부모 opacity로 대처) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .push-settings-icon-wrap { opacity: 0.75 !important; filter: brightness(0.7) saturate(0.8) !important; }

/* ── 포인트내역 본문 상단 그라데이션 카드 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gradient-to-br.from-blue-500.to-blue-600 {
    background-image: linear-gradient(to bottom right, #1e3a5f, #1e3a8a) !important;
}

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gradient-to-br.from-blue-500.to-blue-600 .text-blue-100 { color: #93c5fd !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gradient-to-br.from-blue-500.to-blue-600 .bg-white\/30 { background-color: rgba(255,255,255,0.12) !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gradient-to-br.from-blue-500.to-blue-600 .border-white\/40 { border-color: rgba(255,255,255,0.15) !important; }

/* ════════════════════════════════════════════════════
   추가 보강: 미점검 페이지 패턴
   ════════════════════════════════════════════════════ */

/* ── 매물 상세(detailm) / 공통 전체화면 모달 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .fixed.inset-0.bg-white { background-color: #111827 !important; }

/* ── 매물 상세 sticky 상단 바 (border-l-red/blue 포함) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.bg-white.border-b { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 매물 상세 / 구매 하단 고정 CTA 바 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .fixed.bottom-0.left-0.right-0.bg-white { background-color: #1f2937 !important; border-top-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.bottom-0.bg-white { background-color: #1f2937 !important; border-top-color: #374151 !important; }

/* ── 관심매물 탭 헤더 바 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white.border-b.border-gray-200.flex-shrink-0 { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 탭 border-b-2 (활성 탭 파란 밑줄은 유지, 비활성 구분선만 어둡게) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .border-transparent { border-color: transparent !important; }

/* ── 관심매물 리스트 배경 / 스크롤 영역 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .overflow-y-auto.bg-gray-50 { background-color: #111827 !important; }

/* ── sticky top 그룹 헤더 (날짜별 섹션) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.z-\[60\] { background-color: #1e3a5f !important; border-bottom-color: rgba(59,130,246,0.3) !important; }

/* ── 알림 설정 / 자동알림 모바일 헤더 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sm\:hidden.sticky.top-0.bg-white { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .hidden.sm\:block.sticky.top-0.bg-white { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 커뮤니티 글 읽기 / 글쓰기 상단 바 (sticky → WebKit 회피용 relative 병행) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.bg-white.z-20,
html[data-ui-shell="mobile-tablet"][data-theme="dark"] [data-community-page-root="1"] .safe-area-overlay-top .relative.z-20.bg-white { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 테이블 thead sticky (실거래가, 지역시세 등) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] thead.sticky.top-0.bg-gray-50 { background-color: #1e293b !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] thead.sticky.top-0.bg-white   { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] th { background-color: inherit !important; color: #d1d5db !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] td { color: #d1d5db !important; border-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] tr:hover td { background-color: #1e2d3d !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] table { border-color: #374151 !important; }

/* ── 필터 드롭다운 패널 (관심매물 필터 바) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white.shadow-lg.rounded-b-xl { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white.shadow-lg { background-color: #1f2937 !important; }

/* ── 메모 카드 (관심매물) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .memo-unified-card { background-color: #1f2937 !important; border-color: #374151 !important; }

/* ── 빌딩 정보 모달 (detailm buildinginfo-modal) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .buildinginfo-modal-body { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .buildinginfo-modal-header { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 알림 알림 설정 내 sticky 탭 헤더 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.bg-white.border-b.border-gray-200.px-4 { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .sticky.top-0.bg-white.border-b.border-gray-100 { background-color: #1f2937 !important; border-bottom-color: #374151 !important; }

/* ── 프로필 편집 입력 필드 구역 배경 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-50.rounded-xl { background-color: #1e293b !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-50.p-3.rounded-lg { background-color: #1e293b !important; }

/* ── 뱃지/칩 배경 (bg-gray-100 소형) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-100.rounded-xl { background-color: #374151 !important; color: #d1d5db !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-gray-100.px-1\.5.py-0\.5.rounded-xl { background-color: #374151 !important; color: #d1d5db !important; }

/* ── 구매/이용권 페이지 카드 ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .rounded-2xl.bg-white { background-color: #1f2937 !important; }

html[data-ui-shell="mobile-tablet"][data-theme="dark"] .rounded-xl.bg-white  { background-color: #1f2937 !important; }

/* ── 구분선 확장 (border-gray-100 inline) — 위 '테두리' 섹션에 이미 선언됨, 생략 ── */

/* ── 선택된 탭 하이라이트 bg (bg-white + shadow pill tab) ── */
html[data-ui-shell="mobile-tablet"][data-theme="dark"] .bg-white.text-blue-600.shadow-sm { background-color: #1e3a5f !important; color: #93c5fd !important; }

/* PROD compatibility: the bottom nav keeps its PROD md:hidden breakpoint for desktop; mobile-tablet shows it at every width. */
html[data-ui-shell="mobile-tablet"] [data-bottom-nav="1"].app-mobile-bottom-nav {
    display: block !important;
}

/* PROD compatibility: unconverted screens do not carry ui-shell-mobile, so match the same fixed top bars and floating buttons by their class combination. */
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .fixed.top-0.left-0.right-0:not(.bottom-0):not(.inset-0):not([data-os-mobile-os-fixed-header]) {
    max-width: var(--mt-phone-frame-w);
    width: 100%;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}
html[data-ui-shell="mobile-tablet"]:not(:has([data-map-page="1"])) [data-mt-phone-layout="1"] .fixed.right-4:not(.left-0):not(.inset-0):not(.inset-x-0) {
    right: max(1rem, calc((100vw - min(412px, 100vw)) / 2 + 1rem));
}
