:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #213c34; background: #f3f5ee; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 740px; margin: auto; padding: 24px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
header, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #153d34; text-decoration: none; font-size: 24px; font-weight: 750; letter-spacing: -.8px; }
.badge { background: #e7ecdf; color: #4d5d48; padding: 6px 10px; border-radius: 20px; font-size: 12px; font-weight: 650; }
.intro { padding: 36px 0 18px; max-width: 580px; }
.eyebrow { color: #577155; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 750; }
h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(32px, 7vw, 46px); line-height: 1.12; letter-spacing: -1px; margin: 12px 0 16px; }
h2 { font-size: 19px; margin: 0 0 10px; }
p { line-height: 1.6; }
.card { padding: 24px; background: #fff; border: 1px solid #dfe6db; border-radius: 20px; margin: 16px 0; }
.notice { padding: 14px 18px; background: #e4ede6; border-radius: 12px; font-size: 14px; overflow-wrap: anywhere; }
.notice.error { background: #fff0e6; color: #783e23; }
.muted, footer { color: #526159; font-size: 13px; }
label { display: block; margin: 18px 0 7px; font-weight: 600; font-size: 14px; }
input, select { width: 100%; border: 1px solid #a5b5a8; border-radius: 10px; padding: 13px; font: inherit; font-size: 16px; background: white; color: inherit; }
button { font: inherit; font-weight: 650; background: #153d34; color: white; border: 1px solid transparent; padding: 14px 18px; border-radius: 11px; cursor: pointer; min-height: 48px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #a08339; outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary { background: #edf1e9; color: #153d34; border-color: #cdd9ce; }
.text-button { background: transparent; color: #284c3d; text-decoration: underline; padding: 10px 0; font-size: 14px; }
.status { font-size: 12px; color: #456844; }
.app-tabs button { min-width: 0; }
.camera-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-right: 8px; }
.camera-card-heading .camera-name { margin: 12px 0 8px 16px; min-width: 0; overflow-wrap: anywhere; }
.camera-more { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; background: transparent; color: #153d34; font-size: 28px; line-height: 1; }
.settings-section { margin: 26px 0; }
.settings-section h2 { margin: 0 0 12px; font-size: 16px; }
.settings-list, .settings-group { background: white; border: 1px solid #dfe6db; border-radius: 16px; overflow: hidden; }
.settings-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-radius: 0; padding: 18px; text-align: left; background: transparent; color: #153d34; }
.settings-link + .settings-link, .settings-system + .settings-system { border-top: 1px solid #e4e9e0; }
.settings-link small, .settings-system small { display: block; color: #526159; font-size: 12px; font-weight: 400; margin-top: 5px; }
.settings-chevron { font-size: 25px; font-weight: 400; }
.settings-system { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px; }
.settings-access { padding: 18px; }
.settings-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.settings-heading h1 { flex: 1; margin: 0; font: 700 24px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; overflow-wrap: anywhere; min-width: 100px; }
.settings-heading button { padding: 10px; font-size: 13px; }
.settings-feedback { font-size: 14px; min-height: 25px; }
.settings-feedback.error { color: #a03229; }
.settings-group { margin: 24px 0; padding: 0 18px 6px; min-width: 0; overflow: visible; }
.settings-group legend { font-weight: 700; font-size: 16px; padding: 0 8px; }
.setting-row { padding: 16px 0; }
.settings-list.setting-row { padding: 18px; }
.setting-row + .setting-row { border-top: 1px solid #e7ece4; }
.setting-row label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; font-weight: 550; }
.setting-row small { display: block; margin-top: 8px; line-height: 1.5; }
.setting-row input[type=range] { padding: 0; min-height: 36px; accent-color: #153d34; }
.setting-row output { white-space: nowrap; color: #526159; font-size: 13px; }
.setting-row:has(input[type=checkbox]) { display: grid; grid-template-columns: 1fr 48px; gap: 0 12px; align-items: center; }
.setting-row:has(input[type=checkbox]) label { margin: 0; }
.setting-row:has(input[type=checkbox]) small { grid-column: 1 / -1; }
.setting-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 48px; height: 30px; padding: 0; border-radius: 20px; background: #d1dad1; border: 1px solid #a5b5a8; cursor: pointer; position: relative; }
.setting-row input[type=checkbox]::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: white; top: 3px; left: 3px; box-shadow: 0 1px 3px #0002; }
.setting-row input[type=checkbox]:checked { background: #153d34; border-color: #153d34; }
.setting-row input[type=checkbox]:checked::after { left: 21px; }
.setting-row input:disabled { opacity: .55; }
.settings-motion-section { padding: 18px; }
.settings-inline { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.settings-save-bar { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); background: #f3f5eef2; padding: 10px 0; z-index: 5; }
.settings-save-bar button { width: 100%; }
.settings-information summary { cursor: pointer; min-height: 44px; font-weight: 600; }
.settings-information dl > div { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid #dfe6db; padding: 12px 0; font-size: 14px; }
.settings-information dd { margin: 0; text-align: right; }
@media (max-width: 400px) { .app-tabs button { font-size: 11px !important; padding-left: 4px !important; padding-right: 4px !important; } .settings-heading h1 { font-size: 21px; } }
.video-card { background: #edf1e8; }
.video-viewer { margin-top: 18px; border-radius: 16px; background: #e2e9df; overflow: hidden; }
.video-surface { position: relative; aspect-ratio: 16 / 9; background: #0b1210; }
#live-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.viewer-toolbar { position: absolute; z-index: 2; top: 0; right: 0; left: 0; display: flex; justify-content: flex-end; gap: 6px; padding: 8px; background: linear-gradient(#0007, transparent); }
.viewer-toolbar button { min-height: 44px; padding: 10px 12px; border-radius: 24px; font-size: 12px; color: #fff; background: #15201a99; border: 1px solid #ffffff38; }
.viewer-toolbar button[aria-expanded="true"] { background: #ffffff30; border-color: #ffffffb3; }
#video-sound { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; flex: 0 0 44px; }
#video-sound svg { width: 24px; height: 24px; pointer-events: none; }
#video-sound[aria-pressed="true"] .sound-off { display: none; }
.talk-tools { position: absolute; z-index: 4; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.talk-tools button { display: grid; place-items: center; width: 46px; height: 46px; min-height: 46px; padding: 11px; border-radius: 50%; background: #15201aaa; color: white; border: 1px solid #ffffff88; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.talk-tools svg { width: 24px; height: 24px; pointer-events: none; }
#video-talk { width: 54px; height: 54px; touch-action: manipulation; }
#video-talk.is-preparing { border-style: dashed; }
.mic-level-row { display: flex; align-items: center; gap: 8px; }
.mic-level-panel { width: 132px; border-radius: 12px; background: #14231fe8; color: white; padding: 8px 12px; }
@media (max-width: 374px) { .is-expanded .mic-level-row { position: relative; } .is-expanded .mic-level-panel { position: absolute; left: 0; bottom: 54px; } }
.mic-level-panel label { margin: 0 0 2px; display: flex; justify-content: space-between; font-size: 11px; }
.mic-level-panel input { margin: 0; padding: 0; height: 30px; accent-color: #a4dfbf; }
.is-expanded .talk-tools { left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); }
#video-talk[aria-pressed="true"] { background: #984133; border-color: #ffffffb3; }
.viewer-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; }
#video-state { min-height: 26px; }
.pan-controls { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px; }
.pan-pad { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px); justify-content: center; gap: 4px; }
.pan-pad button { display: grid; place-items: center; padding: 0; min-height: 44px; border-radius: 50%; }
.pan-pad, .pan-pad button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.pan-pad button.is-held { background: #40715d; }
.pan-caption { max-width: 220px; font-size: 12px; }
.pan-caption p { margin: 0; line-height: 1.5; }
.pan-caption .pan-hint { margin-top: 6px; color: #526159; font-size: 11px; }
.pan-maintenance { margin-top: 24px; }
.pan-maintenance summary { display: list-item; width: fit-content; padding: 10px 0; color: #526159; font-size: 13px; cursor: pointer; }
.pan-maintenance summary:focus-visible { outline: 3px solid #a08339; outline-offset: 3px; }
.pan-maintenance details > p { max-width: 440px; margin: 4px 0 10px; }
.pan-maintenance details:not([open]) > :not(summary) { display: none; }
.pan-calibrate { padding: 10px 14px; min-height: 44px; font-size: 13px; }
.calibration-alert { padding: 10px 12px; margin: 0 0 8px; border-left: 3px solid #a32b25; border-radius: 6px; background: #fff0ee; color: #96251f; font-size: 14px; }
.calibration-result { margin: 0 0 4px; }
.pan-caption .calibration-required { color: #96251f; font-weight: 650; }
.is-expanded .pan-caption .calibration-required { color: #ffbdb7; }
.pan-mark { position: relative; display: block; width: 20px; height: 20px; pointer-events: none; }
.pan-mark::before { content: ''; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; top: 4px; left: 8px; box-shadow: -4px 4px 0 currentColor, -8px 8px 0 currentColor, 4px 4px 0 currentColor, 8px 8px 0 currentColor; }
[data-pan="left"] .pan-mark { transform: rotate(-90deg); }
[data-pan="right"] .pan-mark { transform: rotate(90deg); }
[data-pan="down"] .pan-mark { transform: rotate(180deg); }
.pan-stop-mark { width: 9px; height: 9px; border-radius: 2px; background: currentColor; pointer-events: none; }
.pan-pad [data-pan="up"] { grid-column: 2; }
.pan-pad [data-pan="left"] { grid-column: 1; grid-row: 2; }
.pan-pad [data-pan="stop"] { grid-column: 2; grid-row: 2; }
.pan-pad [data-pan="right"] { grid-column: 3; grid-row: 2; }
.pan-pad [data-pan="down"] { grid-column: 2; grid-row: 3; }
.viewer-expanded { overflow: hidden; }
.video-viewer.is-expanded { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; height: 100dvh; margin: 0; border-radius: 0; background: #000; overscroll-behavior: contain; }
.is-expanded .video-surface { position: absolute; inset: 0; aspect-ratio: auto; }
.is-expanded .viewer-toolbar { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 20px max(12px, env(safe-area-inset-left)); }
.is-expanded .pan-controls { display: none; position: absolute; z-index: 2; bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); padding: 0; width: 156px; flex-direction: column; gap: 8px; color: #fff; }
.is-expanded.pan-visible .pan-controls { display: flex; }
.is-expanded .pan-pad { grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 4px; }
.is-expanded .pan-pad button { background: #00000018; color: #fff; border: 1px solid #ffffff30; text-shadow: 0 1px 3px #000; }
.is-expanded .pan-mark, .is-expanded .pan-stop-mark { filter: drop-shadow(0 1px 2px #000); }
.is-expanded .pan-pad button:disabled { opacity: .4; }
.is-expanded .pan-pad button.is-held { background: #ffffff38; border-color: #ffffffb3; }
.is-expanded .pan-caption { font-size: 11px; text-align: center; text-shadow: 0 1px 4px #000, 0 0 8px #000; }
.is-expanded .pan-hint { display: none; }
@media (max-height: 440px) and (orientation: landscape) {
  .is-expanded .pan-caption { display: none; }
}
footer { padding: 18px 0 0; border-top: 1px solid #dce3d7; margin-top: 26px; }
[hidden] { display: none !important; }
@media (max-width: 440px) { .card { padding: 20px; } .actions > button { width: 100%; } }

/* Family navigation and camera detail. Expanded viewer styles above stay intact. */
body.has-session { background: #f4f6f0; }
.has-session main { max-width: 1000px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.has-session .intro, .has-session #message:not(.error), .has-session footer { display: none; }
.has-session header { margin-bottom: 28px; }
.app-tabs { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; background: #fffffff5; border-top: 1px solid #dce3d7; padding: 6px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.app-tabs button { flex: 1; max-width: 220px; min-height: 56px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: transparent; color: #68766b; font-size: 12px; border-radius: 14px; }
.app-tabs button span { font-size: 20px; line-height: 22px; }
.app-tabs button[aria-selected="true"] { background: #e5ede3; color: #153d34; }
[role="tabpanel"] { padding-top: 8px; }
[role="tabpanel"] h1 { font-size: 34px; margin: 0 0 10px; }
[role="tabpanel"] .eyebrow { margin: 0 0 6px; }
.camera-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.camera-card { display: block; padding: 0 0 16px; overflow: hidden; text-align: left; background: white; color: #213c34; border: 1px solid #dce3d7; border-radius: 18px; }
.camera-preview { display: block; position: relative; aspect-ratio: 16 / 9; background: #dce4da; overflow: hidden; }
.camera-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-open-button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.camera-motion { position: absolute; bottom: 12px; right: 64px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 9px; border: 1px solid #ffffff80; border-radius: 50%; background: #153d34ed; color: white; }
.camera-motion svg { width: 24px; height: 24px; }
.camera-motion[aria-pressed="false"] { background: #e1e4e5ed; color: #6c7478; border-color: #a7afb4; }
.camera-motion[aria-pressed="true"] .motion-off-mark { display: none; }
.camera-motion:disabled { cursor: wait; }
.preview-missing { position: absolute; inset: 0; display: grid; place-items: center; color: #526159; font-size: 13px; }
.preview-play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #153d34d9; color: #fff; font-size: 28px; }
.camera-name { display: block; margin: 14px 16px 5px; font-size: 18px; }
.camera-preview-label { display: block; margin: 0 16px; font-size: 11px; font-weight: 400; color: #526159; }
.camera-heading { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; }
.camera-heading h2 { margin: 0; font-size: 23px; }
/* This heading receives focus for screen readers, but is not a control. */
#camera-title:focus { outline: none; }
.camera-heading button { font-size: 13px; padding: 10px 12px; }
#camera-reload { margin-left: auto; min-width: 44px; }
.camera-detail .video-viewer:not(.is-expanded) { margin-top: 0; }
.camera-open header { display: none; }
.camera-actions { margin: 16px 0; }
.video-diagnostics { margin-top: 24px; font-size: 13px; color: #526159; overflow-wrap: anywhere; }
.video-diagnostics summary { cursor: pointer; padding: 12px 0; }
.clip-list { display: grid; gap: 10px; margin-top: 20px; }
.clip-view-filter { display: flex; gap: 4px; padding: 4px; margin: 8px 0 20px; background: #e5ede3; border-radius: 14px; }
.clip-view-filter button { flex: 1; padding: 10px; background: transparent; color: #526159; font-size: 14px; }
.clip-view-filter button[aria-pressed="true"] { background: #153d34; color: white; }
#clips-more { width: 100%; margin-top: 16px; }
.clip-card { text-align: left; display: flex; flex-direction: column; gap: 8px; background: #fff; border-color: #dce3d7; color: #213c34; }
.clip-card span { font-size: 13px; font-weight: 400; color: #526159; }
.systems-controls { margin: 14px 0 18px; }
.system-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.system-row + .system-row { margin-top: 10px; }
.system-status { font-size: 14px; font-weight: 650; color: #59665e; }
.system-status.is-armed { color: #226346; }
.system-status::before { content: '●'; margin-right: 7px; font-size: 10px; }
.system-actions { display: flex; gap: 4px; }
.system-actions button { min-height: 44px; padding: 8px 12px; font-size: 12px; border-radius: 10px; background: #edf1eb; color: #526159; border-color: transparent; }
.system-actions button[aria-pressed="true"] { background: #153d34; color: white; opacity: 1; }
.systems-feedback { display: flex; align-items: center; gap: 4px; }
#systems-state { flex: 1; font-size: 11px; color: #526159; margin: 4px 0; }
#systems-refresh { padding: 4px 10px; min-height: 36px; font-size: 20px; margin: 0; }
.clip-player-panel { scroll-margin-top: 16px; padding: 16px; border-radius: 16px; background: #e5ede3; }
.clip-player-panel h2 { font-size: 16px; }
.clip-navigation { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 13px; }
.clip-navigation button { padding: 10px; font-size: 12px; }
.check-label { display: flex; align-items: center; gap: 8px; }
.check-label input { width: 20px; height: 20px; }
#clip-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }
.clip-video-wrap { position: relative; }
#clip-sound { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 10px; border-radius: 50%; color: #fff; background: #15201acc; border: 1px solid #ffffff80; }
#clip-sound svg { width: 24px; height: 24px; pointer-events: none; }
#clip-sound[aria-pressed="true"] .sound-off { display: none; }
.clip-open header { display: none; }
.clip-player-panel { padding: 0; background: transparent; }
.clip-stage { position: sticky; top: 0; z-index: 5; background: #f4f6f0; padding: 10px 0 6px; }
.clip-stage .section-title { gap: 12px; margin-bottom: 4px; }
.clip-stage h2 { margin: 0; font-size: 16px; }
#clip-moment-title:focus { outline: none; }
.clip-caption { font-size: 12px; color: #526159; margin: 8px 0; }
.clip-stage #clip-state { margin: 8px 0 0; font-size: 12px; }
.clip-timeline-wrap { position: relative; padding: 6px 0; }
#clip-timeline { display: block; width: 100%; height: 28px; padding: 0; margin: 0; accent-color: #176d50; background: transparent; border: 0; cursor: pointer; }
#clip-segments { display: flex; gap: 3px; position: absolute; left: 8px; right: 8px; top: 1px; pointer-events: none; }
#clip-segments span { flex: 1; height: 4px; background: #c4d2c4; border-radius: 2px; }
#clip-segments .is-complete { background: #176d50; }
#clip-segments .is-current { background: #36a779; }
.clip-time { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #526159; }
.clip-moment-items { display: grid; gap: 10px; margin-top: 16px; }
.clip-card.moment-card, .moment-clip { display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; padding: 10px; color: #213c34; text-align: left; background: #fff; border: 2px solid #dce3d7; border-radius: 14px; }
.moment-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.moment-info strong { font-size: 14px; overflow-wrap: anywhere; }
.moment-info > span { font-size: 12px; color: #526159; font-weight: 400; }
.clip-preview { flex: 0 0 38%; position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: #dce4da; border-radius: 8px; }
.clip-preview > span { font-size: 26px; color: #526159; }
.clip-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moment-clip.is-current { border-color: #17865e; background: #e0f0e6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (orientation: landscape) and (max-height: 500px) { .clip-stage { position: static; } }
@media (max-width: 600px) {
  .has-session main { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
  .camera-grid { grid-template-columns: 1fr; gap: 16px; }
  .camera-detail { margin: 0 -16px; }
  .camera-heading, .camera-detail > p, .camera-actions, .pan-maintenance, .video-diagnostics { margin-left: 16px; margin-right: 16px; }
  .camera-detail .video-viewer:not(.is-expanded) { border-radius: 0; }
  .camera-actions { justify-content: center; }
  .camera-actions > button { width: auto; flex: 1; }
}

.multi-options, .multi-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.multi-options { margin: 16px 0; }
.multi-options label { display: flex; align-items: center; gap: 8px; }
.multi-options select { width: auto; }
.multi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.multi-grid[data-count="1"] { grid-template-columns: 1fr; }
.multi-tile { min-width: 0; border: 1px solid #d6dde5; border-radius: 14px; padding: 12px; background: #fff; }
.multi-tile video { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #111; border-radius: 8px; margin: 8px 0; }
.multi-tile p { font-size: .88rem; margin: 8px 0; }
.multi-actions button { min-height: 44px; padding: 8px 12px; }
.multi-actions button[aria-pressed="true"] { background: #1d5b42; color: #fff; }
.multi-tile details { margin-top: 8px; }
.multi-pan-pad { display: grid; grid-template-columns: repeat(3, 44px); gap: 3px; width: max-content; margin: 8px auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.multi-pan-pad button { display: flex; align-items: center; justify-content: center; padding: 0; min-height: 44px; }
[data-multi-pan="left"] .pan-mark { transform: rotate(-90deg); }
[data-multi-pan="right"] .pan-mark { transform: rotate(90deg); }
[data-multi-pan="down"] .pan-mark { transform: rotate(180deg); }
.multi-pan-pad [data-multi-pan="up"] { grid-column: 2; }
.multi-pan-pad [data-multi-pan="left"] { grid-column: 1; grid-row: 2; }
.multi-pan-pad [data-multi-pan="stop"] { grid-column: 2; grid-row: 2; }
.multi-pan-pad [data-multi-pan="right"] { grid-column: 3; grid-row: 2; }
.multi-pan-pad [data-multi-pan="down"] { grid-column: 2; grid-row: 3; }
.multi-tile select { width: 100%; }
.multi-help { margin: 8px 0 12px; font-size: .85rem; }
.multi-tile summary { cursor: pointer; min-height: 32px; padding: 5px 0; }
.multi-tools[open] .multi-actions { margin-top: 8px; }
@media (max-width: 600px) {
  .multiview-open main { padding-top: 12px; }
  .multiview-open header { margin-bottom: 8px; }
  .multiview-open .camera-heading { margin: 12px 0; padding: 0; }
  .multi-options { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin: 8px 0; }
  .multi-options button { padding: 9px; font-size: .8rem; }
  .multi-options label { gap: 4px; font-size: .8rem; margin: 0; }
  .multi-options select { padding: 8px 4px; font-size: .8rem; }
  .multi-grid { gap: 8px; }
  .multi-tile { padding: 8px; border-radius: 10px; }
  .multi-tile > label { font-size: .75rem; margin: 0 0 4px; }
  .multi-tile select { padding: 7px 3px; min-height: 40px; font-size: .8rem; }
  .multi-tile p { font-size: .72rem; margin: 4px 0; }
  .multi-tile summary { font-size: .8rem; }
  .multi-actions { gap: 4px; }
  .multi-actions button { padding: 6px; font-size: .75rem; flex: 1; }
  .multi-tile .multi-pan-pad { transform-origin: top center; max-width: 100%; }
}
@media (max-width: 600px) and (max-height: 740px) {
  /* Safari's browser bars leave less height than the phone's screen. */
  .multiview-open header { display: none; }
  .multiview-open main { padding-top: 8px; }
  .multiview-open .camera-heading { margin: 4px 0; }
  .multi-help { margin: 4px 0; }
}
