/* Sandobaro Pro 2026 field-first refresh
   기존 판독 색상(--acid/--neutral/--alkali)은 의도적으로 유지한다. */

.pro-app-shell {
    --primary-dark: #24583a;
    --primary-strong: #17452c;
    --primary-soft: #e6efe8;
    --accent-soil: #9b6b37;
    --bg-gray: #f1f0e9;
    --card-bg: #fffef9;
    --text-main: #1d2a22;
    --text-sub: #667168;
    --border-color: #dde2d9;
    background:
        radial-gradient(circle at 10% 0%, rgba(112, 141, 91, .12), transparent 30%),
        var(--bg-gray);
}

.pro-app-shell #main-header {
    background: linear-gradient(135deg, #17452c 0%, #2c6544 100%) !important;
    padding: max(12px, env(safe-area-inset-top)) 16px 14px !important;
    box-shadow: 0 8px 24px rgba(19, 59, 37, .2) !important;
    gap: 10px !important;
}

.pro-app-shell .app-title {
    font-size: 19px !important;
    letter-spacing: -.35px;
}

.pro-app-shell .header-right-actions { gap: 7px; }
.pro-app-shell .icon-action-btn {
    width: 42px !important;
    height: 42px !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
}
.pro-app-shell .login-compact-btn {
    height: 42px;
    min-height: 42px;
    padding: 0 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
}

/* 최초 측정 가이드 말풍선은 상태 카드가 아니라 버튼 왼쪽을 향한다. */
@keyframes proGuidePulseLeft {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-5px); }
}
.pro-app-shell #onboarding-guide-tooltip {
    top: 50% !important;
    right: calc(100% + 12px) !important;
    width: min(230px, calc(100vw - 145px)) !important;
    max-width: none !important;
    box-sizing: border-box;
    transform: translateY(-50%);
    animation: proGuidePulseLeft 1.5s infinite !important;
    line-height: 1.4;
}
.pro-app-shell .gps-badge {
    background: rgba(9, 31, 18, .35);
    min-height: 22px;
    padding: 3px 9px;
    font-size: 11px;
}
.pro-app-shell .gps-badge[data-state="good"] { background: rgba(9, 89, 50, .62); }
.pro-app-shell .gps-badge[data-state="weak"] { background: rgba(139, 91, 18, .72); }
.pro-app-shell .gps-badge[data-state="error"] { background: rgba(145, 48, 39, .72); }

.pro-app-shell .view-section { padding: 22px 18px calc(92px + env(safe-area-inset-bottom)); }
.pro-app-shell #view-project,
.pro-app-shell #view-home { align-items: center; }
.pro-app-shell #view-project > *,
.pro-app-shell #view-home > * { width: min(100%, 720px); }

.pro-app-shell .project-header-container { margin: 4px 0 18px; align-items: flex-end; }
.pro-app-shell .project-header-container h2 { margin: 0 0 7px; font-size: 24px; line-height: 1.25; letter-spacing: -.6px; }
.pro-app-shell .project-header-container p { margin: 0; color: var(--text-sub); font-size: 15px; line-height: 1.5; }
.pro-app-shell .edit-mode-btn {
    min-height: 42px;
    padding: 0 15px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .68) !important;
    color: var(--primary-dark) !important;
    font-weight: 800 !important;
}

.pro-app-shell .project-list-ul {
    display: grid;
    gap: 12px;
    background: transparent;
    box-shadow: none;
}
.pro-app-shell .project-item {
    min-height: 102px;
    border: 1px solid rgba(40, 85, 57, .12);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(35, 62, 44, .07);
    overflow: hidden;
}
.pro-app-shell .project-item:active { transform: scale(.985); }
.pro-app-shell .project-symbol {
    width: 50px;
    height: 50px;
    margin-left: 16px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: var(--primary-soft);
    flex: 0 0 auto;
}
.pro-app-shell .project-symbol .ico { width: 24px; height: 24px; }
.pro-app-shell .p-info { padding: 17px 12px; min-width: 0; }
.pro-app-shell .p-name { font-size: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pro-app-shell .p-date { margin-top: 8px; font-size: 13px; }

/* 측정방식 배지를 카드 좌상단으로 + 격자/GPS 카드 색 구분 */
.pro-app-shell .project-item { position: relative; padding-top: 22px; }
.pro-app-shell .p-mode { position: absolute; top: 9px; left: 14px; margin-top: 0; z-index: 2; }
.pro-app-shell .project-item.pi-grid { background: #f5f2fc; border-color: rgba(124, 58, 237, .20); }
.pro-app-shell .project-item.pi-gps  { background: #eef7f1; border-color: rgba(40, 85, 57, .16); }
.pro-app-shell .pi-grid .p-mode { background: #ece5fb; color: #6d3bd6; }
.pro-app-shell .pi-gps  .p-mode { background: #e2f1e7; color: #2e7d32; }
body.dark-mode.pro-app-shell .project-item.pi-grid { background: #221f2c; border-color: rgba(167, 139, 250, .28); }
body.dark-mode.pro-app-shell .project-item.pi-gps  { background: #17201a; border-color: rgba(76, 175, 80, .24); }
body.dark-mode.pro-app-shell .pi-grid .p-mode { background: #2e2740; color: #c4b5fd; }
body.dark-mode.pro-app-shell .pi-gps  .p-mode { background: #1f2e1f; color: #9ccc9e; }
.pro-app-shell .project-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--text-sub); font-size: 12px; margin-top: 7px; }
.pro-app-shell .project-ph-distribution { width: 100%; max-width: 300px; margin-top: 9px; }
.pro-app-shell .project-ph-percentages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 5px;
    color: var(--text-sub);
    font-size: 10px;
    line-height: 1.2;
}
.pro-app-shell .project-ph-percentages span { min-width: 0; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.pro-app-shell .project-ph-percentages span:nth-child(2) { justify-content: center; }
.pro-app-shell .project-ph-percentages span:nth-child(3) { justify-content: flex-end; }
.pro-app-shell .project-ph-percentages b { color: var(--text-main); font-weight: 900; }
.pro-app-shell .project-ph-percentages i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.pro-app-shell .project-ph-percentages i.acid,
.pro-app-shell .project-ph-bar i.acid { background: var(--acid-color); }
.pro-app-shell .project-ph-percentages i.neutral,
.pro-app-shell .project-ph-bar i.neutral { background: var(--neutral-color); }
.pro-app-shell .project-ph-percentages i.alkali,
.pro-app-shell .project-ph-bar i.alkali { background: var(--alkali-color); }
.pro-app-shell .project-ph-bar { width: 100%; height: 9px; display: flex; overflow: hidden; border-radius: 999px; background: var(--border-color); }
.pro-app-shell .project-ph-bar i { height: 100%; display: block; }
.pro-app-shell .project-no-distribution { display: block; margin-top: 8px; color: var(--text-sub); font-size: 11px; }
.pro-app-shell .project-memo {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    color: #4f6457;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.pro-app-shell .project-memo .ico { width: 14px; height: 14px; margin: 1px 4px 0 0; vertical-align: text-top; }
.pro-app-shell .p-setting-btn { min-width: 52px; min-height: 64px; padding: 14px !important; }

.pro-app-shell .empty-project-state {
    padding: 38px 22px 28px;
    text-align: center;
    border: 1px dashed #b8c5b9;
    border-radius: 24px;
    background: rgba(255, 254, 249, .78);
}
.pro-app-shell .empty-project-icon {
    width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px;
    display: grid; place-items: center; color: var(--primary-dark); background: var(--primary-soft);
}
.pro-app-shell .empty-project-state h3 { margin: 0 0 9px; font-size: 21px; }
.pro-app-shell .empty-project-state p { margin: 0 auto 22px; max-width: 360px; color: var(--text-sub); line-height: 1.55; font-size: 14px; }
.pro-app-shell .empty-project-cta {
    width: 100%; min-height: 54px; border: 0; border-radius: 16px;
    color: #fff; background: var(--primary-dark); font-size: 16px; font-weight: 900;
}
.pro-app-shell .fab-new-project {
    width: auto; height: 58px; min-width: 58px; padding: 0 21px;
    border-radius: 18px; font-size: 0; bottom: calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 10px 25px rgba(23, 69, 44, .28);
}
.pro-app-shell .fab-new-project::before { content: '+'; font-size: 28px; margin-right: 7px; }
.pro-app-shell .fab-new-project::after { content: attr(aria-label); font-size: 14px; font-weight: 900; }

.pro-app-shell .top-content-area { padding: 0 !important; }
.pro-app-shell .field-work-status {
    display: grid;
    grid-template-columns: .9fr 1.15fr .95fr;
    gap: 8px;
    margin-bottom: 16px;
}
.pro-app-shell .field-status-item {
    min-width: 0;
    padding: 12px 10px;
    border-radius: 16px;
    background: rgba(255, 254, 249, .85);
    border: 1px solid rgba(40, 85, 57, .12);
}
.pro-app-shell .field-status-label { display: block; color: var(--text-sub); font-size: 11px; font-weight: 800; margin-bottom: 5px; }
.pro-app-shell .field-status-value { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-main); font-size: 13px; font-weight: 900; }
.pro-app-shell #field-session-status { white-space: normal; line-height: 1.25; }
.pro-app-shell .field-status-value.gridmode { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.pro-app-shell .field-status-detail { display: block; margin-top: 3px; color: var(--text-sub); font-size: 9px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.pro-app-shell .field-status-value.good { color: #17633a; }
.pro-app-shell .field-status-value.warn { color: #9b5b00; }
.pro-app-shell .field-status-value.error { color: #b23b32; }

.pro-app-shell .quick-record-panel { margin-bottom: 15px; }
.pro-app-shell .quick-record-primary {
    position: relative;
    width: 100%;
    min-height: 76px;
    padding: 13px 16px;
    border: 2px solid rgba(225, 194, 116, .78);
    border-radius: 21px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #fff;
    background: linear-gradient(135deg, #286b47 0%, #347a56 100%);
    text-align: left;
    box-shadow: 0 12px 26px rgba(23, 69, 44, .25), 0 0 0 3px rgba(225,194,116,.1), inset 0 0 0 1px rgba(255,255,255,.12);
    transition: transform .12s ease, box-shadow .12s ease;
    cursor: pointer;
}
.pro-app-shell .quick-record-primary:hover { box-shadow: 0 15px 30px rgba(23, 69, 44, .3), inset 0 0 0 1px rgba(255,255,255,.18); }
.pro-app-shell .quick-record-primary:active { transform: scale(.985); box-shadow:0 7px 16px rgba(23,69,44,.22); }
.pro-app-shell .quick-record-primary:focus-visible,
.pro-app-shell .quick-record-secondary:focus-visible { outline:3px solid rgba(238,184,69,.72); outline-offset:3px; }
.pro-app-shell .quick-record-icon {
    width: 44px;
    height: 44px;
    padding: 11px;
    box-sizing: border-box;
    flex: 0 0 auto;
    border-radius: 15px;
    background: rgba(255,255,255,.14);
}
.pro-app-shell .quick-record-copy { min-width: 0; flex: 1; }
.pro-app-shell .quick-record-title-row { display:flex; align-items:center; gap:8px; }
.pro-app-shell .quick-record-copy b { display: block; font-size: 19px; letter-spacing: -.3px; }
.pro-app-shell .quick-record-copy em { padding:4px 7px; border:1px solid rgba(255,255,255,.24); border-radius:999px; color:#fff; background:rgba(255,255,255,.14); font-size:9px; font-style:normal; font-weight:900; }
.pro-app-shell .quick-record-copy small { display: block; margin-top: 5px; color: rgba(255,255,255,.76); font-size: 12px; }
.pro-app-shell .quick-record-arrow { width: 31px; height: 31px; padding:8px; box-sizing:border-box; border-radius:50%; background:rgba(255,255,255,.15); opacity:1; }
.pro-app-shell .quick-record-secondary-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: 9px; margin-top: 9px; }
.pro-app-shell .quick-record-secondary {
    min-height: 58px;
    padding: 10px 12px;
    border: 1.5px solid rgba(40, 85, 57, .28);
    border-radius: 17px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--primary-dark);
    background: rgba(255,254,249,.98);
    box-shadow: 0 7px 16px rgba(35,62,44,.09), inset 0 1px 0 rgba(255,255,255,.85);
    text-align: left;
    cursor: pointer;
}
.pro-app-shell .quick-record-secondary:active { transform:scale(.98); background:var(--primary-soft); }
.pro-app-shell .quick-record-secondary.photo { color: #52665a; background: rgba(255,254,249,.92); }
.pro-app-shell .quick-record-secondary > .ico:not(.quick-secondary-arrow) { width: 34px; height: 34px; padding:8px; box-sizing:border-box; flex: 0 0 auto; border-radius:11px; color:var(--primary-dark); background:var(--primary-soft); }
.pro-app-shell .quick-record-secondary > span:nth-child(2) { min-width:0; flex:1; }
.pro-app-shell .quick-secondary-arrow { width:16px; height:16px; flex:0 0 auto; color:var(--primary-dark); opacity:.58; }
.pro-app-shell .quick-record-secondary b { display: block; font-size: 14px; }
.pro-app-shell .quick-record-secondary small { display: block; margin-top: 3px; color: var(--text-sub); font-size: 10px; line-height: 1.25; }

.pro-app-shell .dashboard-chart-wrapper {
    margin-bottom: 15px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(40, 85, 57, .1);
    background: var(--card-bg) !important;
    box-shadow: 0 8px 24px rgba(35, 62, 44, .07) !important;
}
.pro-app-shell .dashboard-chart-header {
    padding: 17px 10px 10px !important;
    padding-right: 10px !important;
    margin-bottom: 8px !important;
    gap: 12px !important;
}
.pro-app-shell .dashboard-chart-title {
    order: 1 !important;
    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}
.pro-app-shell #dashboard-chart-body {
    max-height: 158px !important;
    padding-right: 4px !important;
    overscroll-behavior: contain;
}
.pro-app-shell .slim-bar-row {
    min-height: 46px;
    margin-bottom: 4px;
    gap: 7px;
    box-sizing: border-box;
}
.pro-app-shell .slim-bar-row-clickable {
    min-height: 46px !important;
    padding: 5px 9px !important;
    margin: 2px -3px 4px !important;
}
.pro-app-shell .slim-bar-label { width: 88px !important; min-width: 88px !important; display:flex; flex-direction:column; justify-content:center; gap:2px; line-height:1.1; }
.pro-app-shell .slim-bar-label strong { overflow:hidden; color:var(--text-main); font-size:10.5px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.pro-app-shell .slim-bar-label small { overflow:visible; color:var(--text-sub); font-size:9px; font-weight:750; white-space:nowrap; }
.pro-app-shell .chart-drill-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 9px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}
.pro-app-shell .chart-drill-action i { font-style: normal; font-size: 12px; }

.pro-app-shell #view-home { overflow-y: auto !important; padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important; }
.pro-app-shell #view-home .top-content-area { flex: none; overflow: visible; padding-bottom: 0; }
.pro-app-shell .field-log-card {
    position: relative;
    width: 100%;
    padding: 6px 16px 8px;
    box-sizing: border-box;
    border: 1px solid rgba(40, 85, 57, .1);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(35, 62, 44, .07);
}
.pro-app-shell .field-log-card .log-header { justify-content: space-between; min-height: 50px; margin: 0; padding: 0; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.pro-app-shell .log-title-group { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.pro-app-shell .log-title-group .ico { width: 18px; height: 18px; color: var(--primary-dark); }
.pro-app-shell .log-sheet-count { min-width: 23px; padding: 3px 7px; border-radius: 999px; color: var(--primary-dark); background: var(--primary-soft); font-size: 11px; text-align: center; }
.pro-app-shell .log-sheet-toggle-text { color: var(--primary-dark); font-size: 12px; font-weight: 850; }
.pro-app-shell .field-log-card #log-list { max-height: none; overflow: visible; flex: none; }
.pro-app-shell .field-log-card:not(.expanded) #log-list .log-item:nth-child(n+4) { display: none; }
.pro-app-shell .field-log-card.expanded #log-list { max-height: 46vh; overflow-y: auto; }
.pro-app-shell .log-item { min-height: 56px; }
.pro-app-shell .log-empty { padding: 24px 8px; color: var(--text-sub); font-size: 13px; text-align: center; }

.pro-app-shell .modal-content,
.pro-app-shell .bottom-sheet-content { background: var(--card-bg); }
.pro-app-shell .modal-content { border-radius: 24px; border: 1px solid rgba(40, 85, 57, .1); }
.pro-app-shell #project-input,
.pro-app-shell #project-memo-input { background: #f7f6ef; }
/* 다크모드: 크림색 입력창에 밝은 글자가 얹혀 안 보이던 문제 수정 */
body.dark-mode.pro-app-shell #project-input,
body.dark-mode.pro-app-shell #project-memo-input { background: #262a27; color: var(--text-main); border-color: #3a423c; }
.pro-app-shell .project-editor-modal { max-width: 390px; padding: 27px 24px 24px; gap: 16px; text-align: left; }
.pro-app-shell .project-editor-heading { display: flex; align-items: center; gap: 12px; }
.pro-app-shell .project-editor-icon {
    width: 46px; height: 46px; padding: 12px; box-sizing: border-box; flex: 0 0 auto;
    border-radius: 15px; color: var(--primary-dark); background: var(--primary-soft);
}
.pro-app-shell .project-editor-heading h3 { font-size: 21px; }
.pro-app-shell .project-editor-heading p { margin: 5px 0 0; color: var(--text-sub); font-size: 12px; line-height: 1.4; }
.pro-app-shell .project-form-field { display: block; color: var(--text-main); font-size: 13px; font-weight: 850; }
.pro-app-shell .project-form-field > span { display: block; margin: 0 0 7px 2px; }
.pro-app-shell .project-form-field > span small { color: var(--text-sub); font-size: 11px; font-weight: 650; }
.pro-app-shell .project-form-field #project-input { height: 54px; text-align: left; font-size: 16px; border-width: 1px; }
.pro-app-shell .project-form-field #project-memo-input { height: 88px; margin: 0; border-width: 1px; font-size: 14px; line-height: 1.45; }
.pro-app-shell .project-memo-help { display: block; margin: 7px 2px 0; color: var(--text-sub); font-size: 11px; font-weight: 600; }
.pro-app-shell .project-editor-modal .modal-actions { margin-top: 2px; }
.pro-app-shell .project-editor-modal #btn-delete-project { margin-top: 0; }

/* 사진 판독: 가이드 박스와 판독 좌표는 변경하지 않고 주변 조작부만 정돈한다. */
.pro-app-shell .photo-mode-header {
    min-height: 66px; padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    box-sizing: border-box; display: flex; align-items: center; gap: 11px;
    color: #fff; background: #101712; z-index: 120;
}
.pro-app-shell .photo-mode-view { height: 100% !important; overflow: hidden !important; }
.pro-app-shell .photo-mode-heading { min-width: 0; flex: 1; }
.pro-app-shell .photo-mode-heading span { display: block; color: #95b4a0; font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.pro-app-shell .photo-mode-heading strong { display: block; margin-top: 3px; font-size: 16px; }
.pro-app-shell .photo-mode-badge { padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #d9e6dc; font-size: 10px; font-weight: 800; }
.pro-app-shell .photo-actions { gap: 10px; padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); background: #101712; }
.pro-app-shell .photo-action-copy { width: 100%; margin-bottom: 3px; color: #fff; text-align: left; }
.pro-app-shell .photo-action-copy strong { display: block; font-size: 15px; }
.pro-app-shell .photo-action-copy span { display: block; margin-top: 4px; color: #aebbb1; font-size: 11px; }
.pro-app-shell .photo-actions .action-btn,
.pro-app-shell .photo-actions .cancel-btn { min-height: 52px; padding: 13px 16px; border-radius: 15px; font-size: 15px; }
.pro-app-shell .photo-actions .dark-mode-cancel {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    min-height: 46px;
    color: #f5f7f5;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.24);
    font-weight: 850;
}

/* 직접기록과 음성기록은 같은 저장 엔진을 쓰되 화면에서는 명확히 분리한다. */
.pro-app-shell #view-manual[data-entry-mode="manual"] .voice-control-area { display: none; }
.pro-app-shell #view-manual[data-entry-mode="voice"] .manual-btn-grid { display: none; }
.pro-app-shell #view-manual[data-entry-mode="voice"] .manual-center-wrapper { max-width: 430px !important; }
.pro-app-shell #view-manual[data-entry-mode="voice"] .voice-control-area { margin: 14px 0 0; padding: 24px; }
.pro-app-shell .manual-desc-text { max-width: 380px; margin-left: auto; margin-right: auto; line-height: 1.55; }

.pro-app-shell #btn-sync-data.syncing { animation: proSyncSpin .9s linear infinite; }
.pro-app-shell #btn-sync-data.has-pending::after {
    content: ''; position: absolute; right: 2px; top: 2px; width: 8px; height: 8px;
    border-radius: 50%; background: #ffb52e; border: 2px solid #24583a;
}
@keyframes proSyncSpin { to { transform: rotate(360deg); } }

body.dark-mode.pro-app-shell {
    --bg-gray: #151a16;
    --card-bg: #202821;
    --text-main: #f3f5ef;
    --text-sub: #aeb9af;
    --border-color: #344137;
    background: #151a16;
}
body.dark-mode.pro-app-shell .field-status-item,
body.dark-mode.pro-app-shell .empty-project-state { background: rgba(32, 40, 33, .9); }
body.dark-mode.pro-app-shell .project-memo { color: #b6c8bb; }
body.dark-mode.pro-app-shell .quick-record-secondary { background: rgba(32,40,33,.92); }
body.dark-mode.pro-app-shell .quick-record-secondary.photo { background: rgba(32,40,33,.65); }
/* Functional readability fixes; preserve the existing layout and result colors. */
body.dark-mode.pro-app-shell .field-status-value.good { color: #a9e6bc; }
body.dark-mode.pro-app-shell .field-status-value.warn { color: #f5cd81; }
body.dark-mode.pro-app-shell .field-status-value.error { color: #ffb1a8; }
body.dark-mode.pro-app-shell .quick-record-secondary.photo { color: var(--text-main); }
body.dark-mode.pro-app-shell .edit-mode-btn {
    background: var(--card-bg) !important;
    color: #a9e6bc !important;
}
.pro-app-shell #view-project .project-header-container p {
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}
.pro-app-shell .slim-bar-row.empty .slim-bar-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
}

@media (max-width: 420px) {
    .pro-app-shell #main-header { padding-left: 12px !important; padding-right: 12px !important; }
    .pro-app-shell .header-left { padding-right: 5px; }
    .pro-app-shell .header-right-actions { gap: 5px; }
    .pro-app-shell .icon-action-btn { width: 39px !important; height: 39px !important; }
    .pro-app-shell .login-compact-btn { height: 39px; min-height: 39px; padding: 0 11px !important; font-size: 12px !important; }
    .pro-app-shell .view-section { padding-left: 14px; padding-right: 14px; }
    .pro-app-shell .project-header-container h2 { font-size: 21px; }
    .pro-app-shell .quick-record-primary { min-height: 72px; padding: 12px 14px; }
    .pro-app-shell .quick-record-copy b { font-size: 18px; }
    .pro-app-shell .quick-record-secondary { padding: 9px 10px; }
    .pro-app-shell .field-status-item { padding: 10px 7px; }
    .pro-app-shell .field-status-label { font-size: 10px; }
    .pro-app-shell .field-status-value { font-size: 12px; }
    .pro-app-shell .field-status-detail { font-size: 8px; letter-spacing: -.2px; }
    .pro-app-shell .dashboard-chart-header { gap: 8px !important; }
    .pro-app-shell .dashboard-chart-title { font-size: 17px !important; }
    .pro-app-shell .slim-bar-label { width: 82px !important; min-width: 82px !important; }
    .pro-app-shell .slim-bar-label strong { font-size:10px; }
    .pro-app-shell .slim-bar-label small { font-size:8.5px; }
}
@media (min-width: 760px) {
    .pro-app-shell .project-list-ul { grid-template-columns: 1fr 1fr; }
}

/* 지도: 결과색은 원래의 선명한 RGB를 유지하고 조작부만 정돈 */
.pro-map-shell {
    --primary-dark: #24583a;
    --bg-gray: #f1f0e9;
    --card-bg: #fffef9;
    --text-main: #1d2a22;
    --text-sub: #667168;
    --border-color: #dde2d9;
}
.pro-map-shell .map-header {
    background: rgba(255, 254, 249, .94);
    border-bottom: 1px solid rgba(40, 85, 57, .12);
    box-shadow: 0 8px 24px rgba(35, 62, 44, .11);
    backdrop-filter: blur(14px);
}
/* 다크모드: 위 밝은 크림 배경이 다크에도 그대로 남아 제목·햄버거가 안 보이던 문제 수정 */
body.dark-mode.pro-map-shell .map-header {
    background: rgba(22, 23, 25, .94);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.pro-map-shell .back-btn,
.pro-map-shell .menu-btn,
.pro-map-shell #btn-view-mode { min-height: 42px; border-radius: 13px; }
.pro-map-shell .map-toggle-wrapper { min-height: 42px; border-radius: 13px; }
.pro-map-shell .floating-pill-container,
.pro-map-shell .legend-container,
.pro-map-shell .radius-popup,
.pro-map-shell #btn-res-fab { border: 1px solid rgba(40, 85, 57, .13); box-shadow: 0 8px 24px rgba(35, 62, 44, .13); }
.pro-map-shell #onboarding-res-tooltip {
    top: auto;
    bottom: auto;
    left: 50%;
    max-width: min(260px, calc(100vw - 20px));
    box-sizing: border-box;
    line-height: 1.4;
}

@media (max-width: 420px) {
    .pro-map-shell .floating-actions { left:12px; bottom:22px; max-width:130px; gap:8px; }
    .pro-map-shell .floating-actions .action-btn { padding:10px 14px; }
    .pro-map-shell #btn-res-fab { max-width:130px; padding:9px 12px; }
    .pro-map-shell .res-fab-copy { gap:4px; }
    .pro-map-shell .legend-container { right:10px; bottom:22px; width:150px; padding:10px 12px; }
    .pro-map-shell .legend-title-text { font-size:11px; }
    .pro-map-shell .legend-gradient-bar { height:11px; }
    .pro-map-shell .legend-labels { font-size:10px; }
}
@media (max-width: 360px) {
    .pro-map-shell .floating-actions { left:10px; max-width:118px; }
    .pro-map-shell #btn-res-fab { max-width:118px; padding-inline:9px; }
    .pro-map-shell .legend-container { right:8px; width:132px; padding-inline:10px; }
}
.pro-map-shell .bottom-sheet { border-radius: 26px 26px 0 0; }
.pro-map-shell .quick-edit-btn { min-height: 52px; font-size: 16px; font-weight: 900; }
.pro-map-shell .my-location-btn { width: 58px; height: 58px; }
