/* Red Door phase B, batch 3: in-world app styles (see js/README.md §7).
   Case Board (CaseBoardView.swift), Vitals, Settings (+ OddityCollectionView), Cases store, App Store. */

/* ---------- Case Board ---------- */
.board-screen { background: rgb(23, 19, 15); }
.board-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.board-screen > .navbar, .board-screen > .screen-inset { z-index: 2; }
.board-screen .screen-body { z-index: 1; background: transparent; }
.board { position: relative; margin: 0; }
.board-card { position: absolute; display: block; padding: 0; transform-origin: 50% 50%; color: rgb(33, 31, 28); -webkit-touch-callout: none; }
.board-card:active { filter: brightness(0.92); }
.board-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.polaroid { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; background: rgb(237, 232, 217); border-radius: 3px; overflow: hidden;
  box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.55); }
.card-photo { flex: none; margin-top: 20px; overflow: hidden; background: rgb(217, 217, 217); display: grid; place-items: center; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-walk { font-size: 28px; color: rgba(33, 31, 28, 0.4); line-height: 0; }
.card-caption { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 8px; text-align: center; color: rgb(33, 31, 28); }
.card-caption.no-pad { padding: 0; }
.card-caption > div { max-width: 100%; }
.card-caption .dim { opacity: 0.7; }
.serif-note { font-family: ui-serif, "New York", Georgia, "Times New Roman", serif; font-style: italic; opacity: 0.9; }
.board-note { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 12px 10px; border-radius: 2px; overflow: hidden;
  color: rgb(33, 31, 28); text-align: left; box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5); }
.board-note > div { max-width: 100%; overflow-wrap: anywhere; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.board-string { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.board-string path { fill: none; stroke-linecap: round; }
.board-string .string-shadow { stroke: rgba(0, 0, 0, 0.35); stroke-width: 3; }
.board-string .string-red { stroke: rgb(219, 41, 41); stroke-width: 2; }
.board-pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 0 0, rgb(255, 115, 102) 0, rgb(219, 41, 41) 12px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.board-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; }
.board-empty-pin { font-size: 34px; line-height: 1; color: rgb(219, 41, 41); }
.board-detail-col { gap: 16px; padding: 20px; align-items: stretch; }
.detail-photo img { display: block; width: 100%; height: auto; border-radius: 10px; }
.tracked2 { letter-spacing: 2px; }
.board-note-field { display: block; width: 100%; resize: none; overflow: hidden; padding: 12px; border: 0; border-radius: 10px; background: var(--panel); color: var(--text); outline: none; line-height: 20px; }
.board-note-field::placeholder { color: rgba(235, 235, 245, 0.3); }

/* ---------- Vitals ---------- */
.vitals-col { gap: 20px; padding: 20px; }
.vitals-head { display: flex; align-items: center; gap: 8px; }
.vitals-head .ecg { font-size: 34px; line-height: 1; color: var(--accent); }
.vitals-head .t-title { font-weight: 700; }
.tab-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.tab-strip::-webkit-scrollbar { display: none; }
.tab-cap { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--panel); color: var(--text2); font-weight: 700; white-space: nowrap; }
.tab-cap.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.vstack.gap20 { gap: 20px; } .vstack.gap16 { gap: 16px; } .vstack.gap14 { gap: 14px; } .vstack.gap12 { gap: 12px; } .vstack.gap10 { gap: 10px; } .vstack.gap8 { gap: 8px; } .vstack.gap6 { gap: 6px; } .vstack.gap5 { gap: 5px; } .vstack.gap4 { gap: 4px; }
.metric-row { display: flex; gap: 12px; }
.metric { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; background: var(--panel); }
.metric-value { font: 500 34px/41px var(--rounded); }
.vision-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--panel); }
.vision-card .brain { font-size: 22px; color: var(--accent); line-height: 0; }
.b3-panel { padding: 18px; border-radius: 18px; background: var(--panel); }
.b3-panel.r16 { border-radius: 16px; }
.storage-bar { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; }
.storage-bar span { height: 100%; }
.activity-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.activity-filters::-webkit-scrollbar { display: none; }
.act-filter { flex: none; min-height: 34px; padding: 0 11px; border-radius: 999px; background: var(--panel-light); color: var(--text2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.act-filter.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.activity-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 5px 0; color: var(--text); text-align: left; }
.activity-row:active { opacity: 0.6; }
.activity-row .act-sym { width: 22px; flex: none; display: grid; place-items: center; font-size: 17px; height: 20px; }
.activity-row .act-chev { font-size: 12px; color: var(--text2); padding-top: 3px; }
.view-all { display: block; width: 100%; min-height: 44px; text-align: center; color: var(--accent); }
.report { padding: 16px; border-radius: 16px; background: var(--panel); line-height: 24px; white-space: pre-wrap; }
.process-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 18px; border-radius: 14px; background: var(--panel); color: var(--text); text-align: left; }
.process-row:active { opacity: 0.6; }
.process-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.network-row { display: flex; align-items: center; padding: 12px 0; }
.process-detail { gap: 20px; padding: 24px; }
.process-detail .t-title2 { font-weight: 700; }
.lh5 { line-height: 27px; }

/* ---------- Settings ---------- */
.settings-picker { padding: 16px; }
.oddities-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; color: var(--accent); }
.oddities-link:active { opacity: 0.4; }
.settings-list .form-section:first-child { margin-top: 0; }
.form-rows.panel-rows { background: var(--panel); }
.form-row.record-row, .form-row.labeled { justify-content: space-between; gap: 12px; }
.form-row.stack-row { flex-direction: column; align-items: stretch; gap: 8px; }
.form-row .row-btn { color: var(--tint); text-align: left; width: 100%; }
.form-row .row-btn:active { opacity: 0.4; }
.toggle-row.disabled { opacity: 0.4; pointer-events: none; }
.oddity-row { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--text); text-align: left; }
.oddity-row > .sf { color: var(--accent); font-size: 17px; }
.oddity-row .row-chevron { margin-left: auto; }
.oddity-row:active { opacity: 0.6; }
.nudge-btn { color: var(--accent); text-align: left; }
.nudge-btn:active { opacity: 0.4; }

/* ---------- Cases store ---------- */
.store-col { gap: 14px; padding: 16px; }
.bundle-card, .case-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--panel); border-radius: 16px; }
.bundle-card { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.case-card { gap: 10px; border-radius: 14px; }
.case-card.active { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.store-top { display: flex; align-items: flex-start; gap: 10px; }
.store-top .lead { font-size: 20px; width: 28px; flex: none; display: grid; place-items: center; height: 25px; }
.bundle-card .store-top { gap: 8px; }
.bundle-card .store-top .lead { font-size: 22px; width: auto; height: 28px; }
.store-badge { flex: none; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.buy-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.buy-btn:active { opacity: 0.6; }
.open-case { display: flex; align-items: center; gap: 8px; width: 100%; padding-top: 2px; color: var(--accent); }
.open-case:active { opacity: 0.5; }
.replay-btn { align-self: flex-end; text-align: right; color: var(--text2); min-height: 30px; }
.replay-btn:active, .restore-btn:active { opacity: 0.4; }
.restore-btn { display: flex; justify-content: center; width: 100%; padding: 12px 0; color: var(--text2); }
.progress-track { height: 4px; border-radius: 2px; background: rgba(120, 120, 128, 0.36); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: 2px; }
.store-fine { text-align: center; padding: 0 8px; }
/* confirmationDialog → the iOS action sheet */
.action-sheet-wrap { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 8px calc(8px + var(--sab)); background: rgba(0, 0, 0, 0.4); }
.action-sheet { display: flex; flex-direction: column; gap: 8px; }
.action-group { border-radius: 14px; overflow: hidden; background: rgba(40, 40, 40, 0.92); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.action-head { padding: 14px 16px; text-align: center; color: var(--text2); display: flex; flex-direction: column; gap: 4px; }
.action-head .t-footnote { font-weight: 600; }
.action-head + .action-btn { border-top: 0.5px solid var(--separator); }
.action-btn { display: block; width: 100%; min-height: 57px; font-size: 20px; text-align: center; color: var(--tint); }
.action-btn.destructive { color: #ff453a; }
.action-btn.cancel { font-weight: 600; background: rgba(40, 40, 40, 0.92); border-radius: 14px; -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.action-btn:active { background: rgba(255, 255, 255, 0.08); }

/* ---------- App Store ---------- */
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.listing-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px; background: var(--panel); text-align: left; min-width: 0; }
.listing-card:active { opacity: 0.7; }
.listing-card > div { max-width: 100%; }
.listing-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-size: 26px; line-height: 0; flex: none; }
.listing-icon.big { width: 90px; height: 90px; border-radius: 22px; font-size: 44px; margin-top: 24px; }
.get-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; }
.get-badge .sf { font-size: 11px; }
.listing-detail { align-items: center; gap: 20px; padding: 16px; text-align: center; }
.listing-detail .privacy { align-self: stretch; text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--panel); }
.get-big { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 28px; border-radius: 999px; background: var(--accent); color: #000; }
.get-big:active { filter: brightness(0.85); }
.get-big:disabled { opacity: 1; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.25); border-top-color: #000; animation: b3spin 0.8s linear infinite; }
@keyframes b3spin { to { transform: rotate(360deg); } }
.restricted { margin-top: 12px; }
.listing-detail .os-primary { align-self: stretch; }
.opacity80 { opacity: 0.8; }
.opacity90 { opacity: 0.9; }
