/* Red Door phase B, batch 2: in-world app styles (see js/README.md §7).
   Notes (NotesAppView.swift), Photos (PhotosAppView.swift), Maps (MapsAppView.swift), Missions (MissionsAppView.swift +
   QuestCardView.swift). Every class is prefixed b2-. Sizes are the SwiftUI values (points = CSS px). */

/* ---------- shared: insetGrouped List with Theme.panel rows (.listRowBackground(Theme.panel)) ---------- */
.b2-inset-list { padding: 0 16px 24px; }
.b2-inset-section { margin-top: 18px; }
.b2-inset-header { padding: 0 16px 7px; font-size: 13px; line-height: 18px; color: var(--text2); text-transform: uppercase; }
.b2-inset-rows { border-radius: 10px; background: var(--panel); overflow: hidden; }
.b2-inset-list > .b2-inset-rows { margin-top: 18px; }
.b2-inset-rows > * { position: relative; }
.b2-inset-rows > * + *::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; border-top: 0.5px solid var(--separator); z-index: 2; }
.b2-dim { color: rgba(140, 140, 140, 0.7); }
.b2-loose { line-height: 29px; }      /* .body + lineSpacing(7) */
.b2-loose6 { line-height: 28px; }     /* .body + lineSpacing(6) */
.b2-overlay-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.b2-search-empty { padding-top: 24px; }

/* ---------- Notes ---------- */
.b2-mode-row { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; background: var(--bg); }
.b2-mode-row::-webkit-scrollbar { display: none; }
.b2-mode { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--panel); color: var(--text2); white-space: nowrap; }
.b2-mode.on { background: rgba(64, 255, 140, 0.18); color: var(--accent); }
.b2-mode:active { opacity: 0.7; }
.b2-dossier { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 12px; background: var(--panel); -webkit-touch-callout: none; }
.b2-note-row { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 15px 16px; min-width: 0; text-align: left; background: var(--panel); }
.b2-note-row:active { background: var(--panel-light); }
.b2-swipe-row { position: relative; overflow: hidden; background: #ff453a; }
.b2-swipe-content { position: relative; z-index: 1; background: var(--panel); touch-action: pan-y; }
.b2-swipe-delete { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; color: #fff; font-size: 17px; text-align: center; background: #ff453a; }
.b2-saved-notes { position: relative; min-height: 100%; }
.b2-saved-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 19px 16px; text-align: left; background: var(--panel); }
.b2-saved-row:active { background: var(--panel-light); }
.b2-saved-row .row-chevron { margin-left: 0; }
.b2-saved-detail { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.b2-saved-foot { padding-top: 24px; }
.b2-editor-body { display: flex; flex-direction: column; overflow: hidden !important; padding-bottom: 0 !important; }
.b2-editor { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.b2-note-title { display: block; width: 100%; margin-top: 16px; padding: 0 16px; border: 0; outline: none; background: none; color: var(--text); }
.b2-note-title::placeholder { color: rgba(235, 235, 245, 0.3); }
.b2-editor-divider { margin: 0; border: 0; border-top: 0.5px solid var(--separator); }
.b2-note-body { flex: 1; width: 100%; min-height: 0; padding: 0 17px; border: 0; outline: none; resize: none; background: none; color: var(--text); }
.b2-editor-bar { display: flex; align-items: center; gap: 8px; padding: 10px 18px calc(10px + var(--sab)); background: var(--panel); }

/* ---------- Photos ---------- */
.b2-photos-head { background: var(--bg); }
.b2-photos-picker { padding: 8px 16px 0; }
.b2-photos-desc { padding: 6px 18px 2px; }
.b2-archive-note { padding: 12px 16px 0; }
.b2-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; row-gap: 12px; padding: 16px; align-items: start; }
.b2-tile { display: flex; flex-direction: column; gap: 7px; min-width: 0; text-align: left; }
.b2-tile:active .b2-thumb { filter: brightness(0.75); }
.b2-thumb-wrap { position: relative; display: block; }
.b2-thumb { display: block; width: 100%; height: 160px; border-radius: 12px; overflow: hidden; background: #000; }
.b2-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.b2-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 17px; }
.b2-found { position: absolute; top: 8px; right: 8px; padding: 5px 7px; border-radius: 999px; background: var(--accent); color: #000; }
.b2-phone-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; margin-bottom: 10px; border-radius: 12px; background: var(--panel); }
.b2-phone-search-input { flex: 1; min-width: 0; height: 42px; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); -webkit-appearance: none; appearance: none; }
.b2-phone-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.b2-phone-search-input::placeholder { color: rgba(235, 235, 245, 0.3); }
.b2-phone-search-clear { display: grid; place-items: center; font-size: 17px; }
.b2-heart-filter { display: grid; place-items: center; width: 40px; height: 40px; font-size: 17px; }
/* full-screen viewers (NativeZoomableCanvas + .safeAreaInset(edge: .bottom)) */
.b2-viewer-body { display: flex; flex-direction: column; overflow: hidden !important; padding-bottom: 0 !important; }
.b2-viewer { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.b2-zoom { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.b2-zoom-content { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.b2-zoom-img { display: block; width: 100%; height: 100%; pointer-events: none; }
.b2-zoom-holder { flex: 1; min-height: 0; display: grid; place-items: center; }
.b2-hotspots { position: absolute; inset: 0; }
.b2-hotspot { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 26px; }
.b2-hotspot.found { color: var(--accent); }
.b2-hotspot:active { filter: brightness(0.8); }
.b2-inset-panel { flex: none; background: var(--panel); margin-bottom: var(--sab); }
.b2-fit-panel { align-self: center; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; }
.b2-fit-panel > * { max-width: 100%; }
.b2-your-panel { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; }
.b2-roll-panel { padding: 0 18px; }
.b2-phone-panel { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.b2-heart { display: grid; place-items: center; width: 44px; height: 44px; font-size: 17px; flex: none; }
.b2-phone-panel .b2-heart { margin: -11px -8px -11px 0; }
.b2-heart:active, .b2-heart-filter:active { opacity: 0.4; }
/* .confirmationDialog */
.b2-action-wrap { position: absolute; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 8px calc(8px + var(--sab)); background: rgba(0, 0, 0, 0.4); }
.b2-action-sheet { display: flex; flex-direction: column; gap: 8px; }
.b2-action-group { border-radius: 14px; overflow: hidden; background: rgba(44, 44, 46, 0.86); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); }
.b2-action-title { padding: 14px 16px; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--text2); text-align: center; border-bottom: 0.5px solid var(--separator); }
.b2-action-btn { display: block; width: 100%; min-height: 57px; font-size: 20px; text-align: center; color: var(--tint); }
.b2-action-btn.destructive { color: #ff453a; }
.b2-action-btn.cancel { font-weight: 600; background: rgba(44, 44, 46, 0.95); }
.b2-action-btn:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- Maps ---------- */
.b2-route { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.b2-route > * { max-width: 100%; }
.b2-route-note { padding-top: 8px; }
.b2-route-map-pad { align-self: stretch; padding: 0 16px; }
.b2-route-map { position: relative; width: 100%; aspect-ratio: 1; }
.b2-route-map.small { overflow: hidden; border-radius: 12px; }
.b2-route-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.72; pointer-events: none; }
.b2-route-grid { position: absolute; inset: 0; opacity: 0.72; pointer-events: none; }
.b2-route-grid-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.b2-route-north { position: absolute; top: 8px; right: 8px; }
.b2-checkpoint { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent); }
.b2-checkpoint.on { background: var(--accent); color: #000; }
.b2-route-step { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.b2-route-hint { align-self: stretch; padding: 0 16px; }
.b2-route-reset { padding: 4px 8px; margin-bottom: 12px; }
.b2-route-log { display: flex; flex-direction: column; gap: 20px; }
.b2-route-log-title { letter-spacing: 2px; padding: 16px 16px 0; }
.b2-route-card { display: flex; flex-direction: column; gap: 8px; margin: 0 16px; padding: 12px; border-radius: 16px; background: var(--panel); }
.b2-route-log-foot { padding: 0 16px 24px; }
.b2-places { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.b2-place { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--panel); text-align: left; }
.b2-place:active { filter: brightness(1.3); }
.b2-place-img { width: 76px; height: 76px; flex: none; object-fit: cover; border-radius: 12px; display: block; }
.b2-place-chevron { font-size: 17px; }
.b2-place-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; }
.b2-place-hero { display: block; width: 100%; height: auto; }
.b2-share-place { padding: 0; }

/* ---------- Missions ---------- */
.b2-mission > * { align-self: stretch; }
.b2-brief { padding: 0 4px; }
.b2-mission-investigation { gap: 18px; }
.b2-mission-investigation > .os-primary { align-self: stretch; }
.b2-quest-card { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px; border-radius: 24px; background: var(--panel);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(64, 255, 140, 0.35); }
.b2-quest-card > .os-primary, .b2-quest-card > .os-secondary, .b2-footer { align-self: stretch; }
.b2-track4 { letter-spacing: 4px; }
.b2-track2 { letter-spacing: 2px; }
.b2-verify { padding: 7px 12px; border-radius: 999px; background: rgba(64, 255, 140, 0.1); }
.b2-quest-title { padding: 0 8px; }
.b2-briefing { gap: 8px; padding: 0 8px; }
.b2-evidence { color: rgba(140, 140, 140, 0.9); }
.b2-analyzing { gap: 10px; justify-content: center; }
.b2-spinner { display: inline-grid; color: var(--accent); animation: b2-spin 0.8s steps(8) infinite; }
@keyframes b2-spin { to { transform: rotate(360deg); } }
.b2-debrief { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--panel-light); text-align: left; }
.b2-panel-row { padding: 12px; border-radius: 12px; background: var(--panel); }
.b2-panel-row .text-btn { padding: 0; min-height: 0; }
.b2-nearby { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--panel); }
.b2-nearby-dismiss { width: 100%; min-height: 36px; text-align: center; }
.b2-nearby-dismiss:active { opacity: 0.4; }
.os-primary > .label, .os-secondary > .label { justify-content: center; }
