/* ══════════════════════════════════════════════════════════
   어니스트 OS — 컴팩트 아이콘 사이드바 (v1)
   body.compact-sidebar 클래스가 활성일 때만 적용
   원본 CSS는 건드리지 않고 오버라이드만으로 구성
   ══════════════════════════════════════════════════════════ */

body.compact-sidebar {
    --ctx-w: 64px;
    --ctx-w-expanded: 240px;
}

/* ── 사이드바 본체: 64px 좁게 + 호버/포커스 시 240px 확장 ── */
body.compact-sidebar .context-panel {
    width: 64px;
    transition: width .18s ease;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 10px 0 24px;
    box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
    /* overflow 는 style.css 의 세로 스크롤(overflow-y:auto) 그대로 — 🐞 2026-09-29 까지 «호버 팝오버 위해» visible 로 덮어
       메뉴가 화면 높이를 넘으면 아래 메뉴(관리자 홈 «접근 권한 보기» 등)에 스크롤로도 못 닿았다(.app-body 가 잘라낸다).
       레일 밖으로 나가는 팝오버는 없다 — 펼침은 패널 자체가 240px 로 넓어지는 것. tests/sidebar-rail-scroll.test.js */
    position: relative;
    z-index: 20;
}
/* 64px 레일에선 스크롤바를 숨긴다 — 스크롤바가 자리를 차지하는 환경(마우스를 꽂은 맥·윈도)에선 그만큼 좁아져 아이콘이 잘린다.
   휠·트랙패드·키보드(Tab) 스크롤은 그대로. 아래 여백은 📌 버튼의 margin-bottom 이 맡는다(스크롤 상자의 padding 은 sticky 📌 을 그만큼 띄운다).
   모바일 서랍(≤900px)은 아래 @media 블록 그대로 둔다. */
@media (min-width: 901px) {
    body.compact-sidebar .context-panel { scrollbar-width: none; padding-bottom: 0; }
}
body.compact-sidebar .context-panel:focus-within,
body.compact-sidebar .context-panel.compact-pinned {
    width: 240px;
    box-shadow: 4px 0 16px rgba(15, 23, 42, 0.06);
}
@media (hover: hover) {   /* 호버 펼침은 마우스 기기만 — 아래 파일 끝 주석 */
    body.compact-sidebar .context-panel:hover {
        width: 240px;
        box-shadow: 4px 0 16px rgba(15, 23, 42, 0.06);
    }
}

/* ── 섹션 헤더: 기본 숨김, 📌 고정했을 때와 키보드로 들어왔을 때만 표시
   (원본 .ctx-section-header + patch-ui-cleanup.js가 교체한 .v48-nav-group-toggle 둘 다 처리)
   ⚠ 2026-09-29: 마우스 호버(:hover·:focus-within)로 펼치지 않는다 — 머리글이 높이를 되찾으면 아래 메뉴가
     70~110px 밀려 커서 밑 메뉴가 바뀐다(WBS 아이콘을 누르면 «← 프로젝트 목록»이 눌렸다). 호버 펼침은 가로(너비·글자)만.
     :focus-within 은 마우스로 누르는 순간에도 켜져(버튼 포커스) 누르는 중에 밀리므로 키보드 전용 :focus-visible 로 연다.
     :has() 규칙은 따로 둔다 — 고정 규칙과 한 선택자 목록에 섞으면 :has 를 모르는 브라우저가 목록째 버린다.
     tests/sidebar-rail-hover.test.js ── */
body.compact-sidebar .ctx-section-header,
body.compact-sidebar .v48-nav-group-toggle {
    opacity: 0;
    height: 0 !important;
    padding: 0 16px !important;
    margin: 0 !important;
    overflow: hidden;
    transition: opacity .15s, height .18s;
    white-space: nowrap;
    border: 0;
}
body.compact-sidebar .context-panel.compact-pinned .ctx-section-header,
body.compact-sidebar .context-panel.compact-pinned .v48-nav-group-toggle {
    opacity: 1;
    height: auto !important;
    padding: 12px 16px 6px !important;
}
body.compact-sidebar .context-panel:has(:focus-visible) .ctx-section-header,
body.compact-sidebar .context-panel:has(:focus-visible) .v48-nav-group-toggle {
    opacity: 1;
    height: auto !important;
    padding: 12px 16px 6px !important;
}

/* ── 구분선: 기본 좁은 점선, 확장 시 풀 라인 (좌우만 — 위아래 여백이 바뀌면 아래 메뉴가 밀린다) ── */
body.compact-sidebar .ctx-divider {
    margin: 6px 18px;
    background: #cbd5e1;
    height: 2px;
    border-radius: 2px;
    opacity: 0.4;
    transition: opacity .15s, margin .15s;
}
body.compact-sidebar .context-panel:focus-within .ctx-divider,
body.compact-sidebar .context-panel.compact-pinned .ctx-divider {
    opacity: 0.6;
    margin-inline: 12px;
    background: #e2e8f0;
}
@media (hover: hover) {   /* 호버 펼침은 마우스 기기만 — 아래 파일 끝 주석 */
    body.compact-sidebar .context-panel:hover .ctx-divider {
        opacity: 0.6;
        margin-inline: 12px;
        background: #e2e8f0;
    }
}

/* ── 네비 버튼: 기본은 아이콘만, 확장 시 라벨 노출 ── */
body.compact-sidebar .ctx-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 0 20px;
    height: 44px;
    margin: 2px 8px;
    border-radius: 10px;
    gap: 12px;
    overflow: hidden;
    position: relative;
    width: calc(100% - 16px);
    /* 축소 상태: 텍스트 노드(라벨)를 font-size:0으로 숨김 — 확장 시 13px로 복원 */
    font-size: 0;
    font-weight: 600;
    color: #475569;
    background: transparent;
    white-space: nowrap;
    transition: background .12s, color .12s, font-size .15s;
}
/* 확장 상태에서 라벨 텍스트 복원 */
body.compact-sidebar .context-panel:focus-within .ctx-nav-item,
body.compact-sidebar .context-panel.compact-pinned .ctx-nav-item {
    font-size: 13px;
}
@media (hover: hover) {   /* 호버 펼침은 마우스 기기만 — 아래 파일 끝 주석 */
    body.compact-sidebar .context-panel:hover .ctx-nav-item {
        font-size: 13px;
    }
}
body.compact-sidebar .ctx-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 1.8;
    transition: transform .12s;
}
body.compact-sidebar .ctx-nav-item > *:not(svg) {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s ease, transform .15s ease;
    pointer-events: none;
}
body.compact-sidebar .context-panel:focus-within .ctx-nav-item > *:not(svg),
body.compact-sidebar .context-panel.compact-pinned .ctx-nav-item > *:not(svg) {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
@media (hover: hover) {   /* 호버 펼침은 마우스 기기만 — 아래 파일 끝 주석 */
    body.compact-sidebar .context-panel:hover .ctx-nav-item > *:not(svg) {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

/* ── 동적 메뉴(재무/제안서 AI) 이모지 아이콘 — SVG 없는 버튼도 축소 레일에서 아이콘 표시 ──
   버튼 font-size:0(라벨 숨김)과 > *:not(svg) 숨김의 예외. 부모보다 구체적이라 항상 우선.
   2026-09-29 부터 두 메뉴도 선 그림(app.js _NAV_ICON) — 이 규칙은 그림이 없는 키가 이모지로 물러날 때만 쓰인다. */
body.compact-sidebar .ctx-nav-item .ctx-emoji {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}
body.compact-sidebar .ctx-nav-item > .ctx-emoji {
    opacity: 1;
    transform: none;
}

/* ── 활성 상태: 파란 바 + 연한 배경 ── */
body.compact-sidebar .ctx-nav-item.ctx-active,
body.compact-sidebar .ctx-nav-item.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}
body.compact-sidebar .ctx-nav-item.ctx-active::before,
body.compact-sidebar .ctx-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: #2563eb;
    border-radius: 0 4px 4px 0;
}
body.compact-sidebar .ctx-nav-item.ctx-active svg,
body.compact-sidebar .ctx-nav-item.active svg {
    color: #2563eb;
}
body.compact-sidebar .ctx-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
body.compact-sidebar .ctx-nav-item:hover svg {
    transform: scale(1.05);
}

/* ── 뱃지(ex: todoBadge) 위치: 축소 상태에서 아이콘 우상단 ── */
body.compact-sidebar .ctx-nav-item .todo-badge-style,
body.compact-sidebar .ctx-nav-item [class*="Badge"] {
    position: absolute;
    top: 6px;
    left: 32px;
    margin: 0 !important;
    font-size: 9px;
    padding: 1px 5px;
    min-width: 14px;
    text-align: center;
    background: #ef4444;
    color: white;
    border-radius: 999px;
    font-weight: 900;
    line-height: 1.3;
}
body.compact-sidebar .context-panel:focus-within .ctx-nav-item .todo-badge-style,
body.compact-sidebar .context-panel.compact-pinned .ctx-nav-item .todo-badge-style {
    position: static;
    margin-left: auto !important;
    background: #fef3c7;
    color: #92400e;
}
@media (hover: hover) {   /* 호버 펼침은 마우스 기기만 — 아래 파일 끝 주석 */
    body.compact-sidebar .context-panel:hover .ctx-nav-item .todo-badge-style {
        position: static;
        margin-left: auto !important;
        background: #fef3c7;
        color: #92400e;
    }
}

/* ── 워크스페이스 칸(역할 배지 · 상세 화면에선 드롭다운이 숨는다): 기본 숨김, 📌 고정·키보드 진입 때만 노출
   호버로 열지 않는 이유는 위 «섹션 헤더» 주석 ── */
body.compact-sidebar .ctx-workspace-select {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0 10px;
    transition: opacity .15s, height .18s;
}
body.compact-sidebar .context-panel.compact-pinned .ctx-workspace-select {
    opacity: 1;
    height: auto;
    padding: 4px 10px 8px;
}
body.compact-sidebar .context-panel:has(:focus-visible) .ctx-workspace-select {
    opacity: 1;
    height: auto;
    padding: 4px 10px 8px;
}

/* ── 고정(핀) 버튼: 사이드바 하단에 추가
   sticky — 패널이 스크롤돼도 보이는 바닥에 붙어 있고, 끝까지 내리면 마지막 메뉴 아래로 비켜선다
   (absolute 는 스크롤 상자 안에서 메뉴와 함께 올라가 가운데 메뉴를 가린다).
   order:1 — 재무·제안서 AI·메일 메뉴는 핀 뒤에 붙는다(appendChild) · margin-top:auto — 메뉴가 짧으면 바닥으로 ── */
body.compact-sidebar .compact-pin-btn {
    position: sticky;
    bottom: 12px;
    order: 1;
    flex-shrink: 0;
    margin: auto auto 12px;
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    z-index: 10;
    transition: all .12s;
}
body.compact-sidebar .compact-pin-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
body.compact-sidebar .context-panel.compact-pinned .compact-pin-btn {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* ── 메인 콘텐츠: 좁아진 사이드바만큼 가용 너비 증가 ── */
body.compact-sidebar .main-content {
    min-width: 0;
}
body.compact-sidebar .content-area {
    max-width: none;           /* 1400px 제한 풀기 */
    padding: 24px 28px 40px;   /* 좌우 패딩 축소 */
}

/* ══════════════════════════════════════════════════════════
   Flat-Design Patch — 프레임-인-프레임(박스 안 박스) 제거
   재무 대시보드 / 팀관리 / 전사집계 영역의 중첩 카드 평탄화
   ══════════════════════════════════════════════════════════ */

/* 중첩된 카드가 한 번 더 감싸질 때 바깥 박스의 테두리/그림자를 지움
   (.ctx-card / .card / .box 안에 .ctx-card / .card 가 또 들어가는 경우) */
body.compact-sidebar .ctx-card .ctx-card,
body.compact-sidebar .ctx-card .card,
body.compact-sidebar .card .ctx-card,
body.compact-sidebar .card .card,
body.compact-sidebar .bg-white.rounded-xl .bg-white.rounded-xl,
body.compact-sidebar .bg-white.rounded-2xl .bg-white.rounded-xl,
body.compact-sidebar .bg-white.rounded-2xl .bg-white.rounded-2xl {
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    padding: 12px !important;
}

/* 대시보드 위젯 헤더: 어두운 배경 바 대신 플랫 텍스트 헤더 */
body.compact-sidebar .dashboard-widget-title,
body.compact-sidebar .widget-header-dark,
body.compact-sidebar .section-header-dark {
    background: transparent !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.01em;
}

/* 테이블 헤더의 무거운 진한-회색 톤을 플랫화 */
body.compact-sidebar table thead th[style*="background:#1e293b"],
body.compact-sidebar table thead th[style*="background: #1e293b"],
body.compact-sidebar table thead[style*="background:#0f172a"] th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 800;
    border-bottom: 2px solid #cbd5e1 !important;
}

/* 홈 대시보드의 기능 카드 영역: 일관된 라운드/패딩 */
body.compact-sidebar .home-widget,
body.compact-sidebar .dashboard-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.compact-sidebar .home-widget .home-widget,
body.compact-sidebar .dashboard-card .dashboard-card {
    border: 0;
    box-shadow: none;
    background: transparent;
}

/* ── 칸반 보드가 잘리지 않도록 가로 스크롤 허용 ── */
body.compact-sidebar #todoKanban,
body.compact-sidebar .kanban-container,
body.compact-sidebar .todo-kanban {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
}
body.compact-sidebar #todoKanban > *,
body.compact-sidebar .kanban-container > *,
body.compact-sidebar .todo-kanban > * {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ── 햄버거 트리거 버튼 ── */
/* 2026-04-25: 사용자 피드백 "로고와 겹침" + 모바일에선 토프바 nav + 하단 버튼으로
   충분히 탐색 가능 → 햄버거 자체 제거. 사이드바는 데스크톱에서만 사용. */
body.compact-sidebar .compact-ham-btn {
    display: none !important;
}

/* 오버레이 배경 (사이드바 열릴 때) — 2026-04-25: 0.4 → 0.15 로 완화 (사용자 피드백 "화면 어두워짐") */
body.compact-sidebar .compact-overlay-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.15);
    z-index: 30;
}
body.compact-sidebar.mob-menu-open .compact-overlay-bg {
    display: block;
}

/* ── 모바일: 컴팩트 사이드바는 숨기고 풀스크린 오버레이로 전환 ── */
@media (max-width: 900px) {
    /* 2026-04-25: 햄버거 버튼 제거 (로고와 겹침 — 사용자 피드백) */
    body.compact-sidebar .compact-ham-btn {
        display: none !important;
    }
    /* 2026-04-25: style.css 의 @media (max-width: 768px) .context-panel { display: none } 무력화 */
    body.compact-sidebar .context-panel {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        width: 260px;
        max-width: 80vw;
        /* 닫힌 패널(화면 밖)의 그림자가 왼쪽 가장자리에 회색 띠로 비쳐 화면이 쏠려 보였다(2026-11-03) — 열렸을 때만 */
        box-shadow: none;
        z-index: 40;
        transition: transform .22s ease;
        padding-top: 56px;
        background: #ffffff;
        overflow-y: auto;
    }
    body.compact-sidebar.mob-menu-open .context-panel {
        transform: translateX(0);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }
    /* 모바일 오버레이 모드에서는 확장된 모습 강제 */
    body.compact-sidebar .context-panel .ctx-nav-item {
        font-size: 13px !important;
    }
    /* 🐞 2026-08-07: **재무·제안서 AI 사이드바가 이모지만 보이던 문제**
       그 메뉴들은 라벨을 `<span class="ctx-label">` 로 따로 담는다(동적 생성). 축소 레일이
       `.ctx-nav-item > *:not(svg)` 를 `opacity:0` 으로 숨기는데, 복원 조건이
       **hover / :focus-within / .compact-pinned** 뿐이다 — 모바일엔 hover 가 없고
       핀 버튼도 이 블록에서 숨긴다. 그래서 오버레이를 열어도 라벨이 영영 안 떴다.
       위 규칙은 `font-size` 만 되돌려서 **텍스트 노드로 된 메뉴(프로젝트)만** 고쳐졌고,
       span 으로 분리된 메뉴는 그대로 남아 있었다(무엇이 자금이고 급여인지 알 수 없음).
       ⚠ 여기서 되돌리는 건 «축소 레일» 연출뿐이다 — 모바일에서는 항상 펼친 오버레이다. */
    body.compact-sidebar .context-panel .ctx-nav-item > *:not(svg) {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto;
    }
    body.compact-sidebar .context-panel .ctx-section-header,
    body.compact-sidebar .context-panel .v48-nav-group-toggle {
        opacity: 1 !important;
        height: auto !important;
        padding: 12px 16px 6px !important;
    }
    /* 핀 버튼은 모바일에서 숨김 (항상 오버레이 모드) */
    body.compact-sidebar .compact-pin-btn {
        display: none;
    }

    /* 2026-05-27: 사이드패널 열렸을 때 하단 네비 숨김 — 메뉴 UI 중복/가림 해소
       (사이드패널이 ctx 메뉴 항목들을 보여주는데 하단 네비가 z:150으로 그 위에 떠
       마지막 항목 가림). transform 슬라이드 다운으로 부드럽게 전환. */
    .mobile-bottom-nav {
        transition: transform .22s ease, opacity .22s ease;
    }
    body.compact-sidebar.mob-menu-open .mobile-bottom-nav {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }
    /* dim 배경도 하단 네비 잔상 위로 — 닫히는 0.22s 동안 시각 일관성 */
    body.compact-sidebar .compact-overlay-bg {
        z-index: 35;
    }
}

/* ══════════════════════════════════════════════════════════
   모바일 폴리시 (v342+) — 홈 헤더, WBS 테이블, 프로젝트 상세
   ══════════════════════════════════════════════════════════ */

/* 홈 헤더 — 태블릿 이하: 6카드 → 3열 */
@media (max-width: 900px) {
    #homeHeader > div[style*="grid-template-columns"]:first-of-type {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    #homeHeader > div[style*="grid-template-columns"] button {
        min-width: 0 !important;
    }
}

/* 홈 헤더 — 모바일: 6카드 → 2열, 확장 카드(주간 마감/최근 프로젝트) → 1열 */
@media (max-width: 600px) {
    #homeHeader {
        padding: 14px 12px !important;
    }
    #homeHeader > div[style*="grid-template-columns"]:first-of-type {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    #homeHeader > div[style*="grid-template-columns"]:first-of-type button {
        padding: 8px 10px !important;
    }
    #homeHeader > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* 인사말 영역 폰트 축소 */
    #homeHeader .text-xl {
        font-size: 1rem !important;
    }
}

/* WBS/이슈 등 넓은 테이블 — 모바일에서 가로 스크롤 + 얇은 스크롤바 */
@media (max-width: 900px) {
    .content-area table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .content-area table::-webkit-scrollbar { height: 6px; }
    .content-area table::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
}
/* 태블릿 폭(769~900)만 — 줄마다 폭 100% 고정 표로 쪼갠다(종전 동작 그대로).
   🚨 폰(≤768)에 다시 넓히지 말 것 (2026-09-17 세금계산서 글자 겹침). 폰은 style.css 가 칸 안
   글자 줄바꿈을 막는데(nowrap), 줄마다 따로 된 고정폭 표는 칸 폭이 «표 폭 ÷ 칸 수»로 똑같아져
   글자가 옆 칸으로 넘친다 — 실측 12칸 표 65칸 중 52칸 넘침. 이 폭은 줄바꿈 금지가 없어 넘치지 않는다.
   ⓘ 이 폭에서는 colgroup 이 여전히 먹지 않는다 — 전용 표(견적·사전내수표·전사 일정)의 복원 블록은 그대로 둔다 */
@media (min-width: 769px) and (max-width: 900px) {
    .content-area table thead,
    .content-area table tbody,
    .content-area table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

/* 프로젝트 상세 — 카드 패딩 축소, 헤더 2줄 허용 */
@media (max-width: 600px) {
    .content-area .ctx-card,
    .content-area .bg-white.rounded-xl {
        padding: 12px !important;
    }
    .content-area .ctx-card h1,
    .content-area .ctx-card h2 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    /* 툴바/헤더 버튼은 가로 스크롤 허용 */
    .toolbar, .ctx-toolbar, #projectToolbar {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    /* 모달 본체 모바일 최적화 — 좌우 여백 축소 */
    .modal-body, [id$="ModalBody"] {
        padding: 16px !important;
    }
    /* 재무 카드 그리드 2열 → 1열 */
    .fin-grid, .fin-summary-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 홈 나의 일정 위젯 — 모바일 패딩 축소 */
@media (max-width: 600px) {
    #myScheduleWidget {
        padding: 12px !important;
    }
    #myScheduleWidget .ms-list-item {
        font-size: 12px !important;
    }
}

/* ══════════════════════════════════════════════════════════
   좌측 사이드바 그랩 핸들 (2026-07-02 v3)
   엣지 스와이프는 OS 뒤로가기와 존을 나눠 쓰는 한계가 있어,
   탭 한 번으로 여는 상시 진입점. 모바일(≤900px) 전용, 열리면 숨김.
   ══════════════════════════════════════════════════════════ */
#leftPanelHandle { display: none; }
@media (max-width: 900px) {
    body.compact-sidebar #leftPanelHandle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 0;
        top: 45%;
        width: 18px;
        height: 64px;
        padding: 0;
        background: rgba(15, 23, 42, 0.28);
        color: #fff;
        font-size: 11px;
        border: none;
        border-radius: 0 10px 10px 0;
        z-index: 36;
    }
    body.compact-sidebar.mob-menu-open #leftPanelHandle,
    body.portal-mode #leftPanelHandle { display: none !important; }
}

/* 재무는 모바일에서 상단 보조 탐색 하나만 사용한다. 데스크톱 메뉴는 그대로 둔다. */
#finMobileTabBar, #finMobileMenu { display: none; }
@media (max-width: 900px) {
    body.finance-workspace .context-panel,
    body.finance-workspace #leftPanelHandle,
    body.finance-workspace .compact-ham-btn,
    body.finance-workspace .compact-overlay-bg { display: none !important; }
    body.finance-workspace #finMobileTabBar { display: flex !important; gap: 6px; white-space: normal; }
    .fin-mobile-nav-button {
        flex: 1; min-height: 44px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 10px;
        background: white; color: #475569; font-size: var(--fs-body); font-weight: 700; cursor: pointer;
    }
    .fin-mobile-nav-button[aria-current="page"], #finMobileMenu button[aria-current="page"] {
        color: var(--color-blue); background: #eff6ff; border-color: #93c5fd;
    }
    body.finance-workspace #finMobileMenu {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
        padding: 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    }
    #finMobileMenu .fin-mobile-menu-heading { grid-column: 1 / -1; padding: 8px 4px; font-weight: 800; color: #64748b; }
    #finMobileMenu button { min-height: 44px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; text-align: left; background: white; font-size: var(--fs-body); }
}

.approval-inbox-folders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.approval-inbox-folders button { min-height: 44px; padding: 10px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: white; color: #475569; font-size: var(--fs-base); font-weight: 800; }
.approval-inbox-folders button[aria-current="page"] { background: var(--color-blue); color: white; border-color: var(--color-blue); }
.approval-inbox-help { color: #64748b; font-size: var(--fs-base); margin-bottom: 16px; }

#attendWorkspaceTabs button, #attendToday .btn { min-height: 44px; }

/* 👆 호버로 펼치기는 마우스가 있는 기기만(@media (hover: hover)) — 터치 기기는 📌 고정·키보드로 연다(2026-10-13).
   아이폰 사파리는 «호버로 모양이 바뀌는» 곳의 첫 탭을 호버로만 쓰고 클릭을 보내지 않는다 — 모바일 서랍에서 메뉴를 누르면
   서랍 폭이 260→240px 로 바뀌고 «접기»가 나타나 첫 탭이 먹히고 두 번째에 이동했다(사장님 아이폰 실측).
   아이패드 레일도 같았다(첫 탭 = 펼침). 펼친 모습(폭·글자·구분선·배지)은 :focus-within·.compact-pinned 규칙 그대로.
   tests/sidebar-touch-hover-2026-10-13.test.js */
