/* Remote MDT: desktop workstation and a separate, touch-first phone layout. */
:root {
  --base: #0c1921;
  --surface: #12242e;
  --surface2: #19313c;
  --line: #29414b;
  --line2: #45636f;
  --text: #edf4f5;
  --muted: #a0b5bf;
  --cyan: #6edbe0;
  --rail: 210px;
  color-scheme: dark;
}
body { font-size: 15px; }
button, input, select, textarea { border-radius: 8px; }
button { min-height: 44px; transition: background .14s, border-color .14s; }
button:disabled { cursor: wait; opacity: .55; }
input, textarea, select { min-width: 0; font-size: 16px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; box-shadow: none; }
button.primary, .quick-actions .primary { color: #08242a; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
img { max-width: 100%; }
* { scrollbar-width: thin; scrollbar-color: #37545f transparent; }
.remote-shell { height: 100dvh; background: var(--base); }
.app-rail { background: #09151c; border-right-color: var(--line); padding: 0 12px; }
.rail-brand { height: 96px; display: flex; justify-content: flex-start; gap: 12px; padding-left: 12px; }
.rail-brand img { width: 43px; height: 43px; }
.rail-brand span { display: block; font: 600 17px/1.15 Chakra, sans-serif; letter-spacing: .06em; }
.nav-heading { display: flex; align-items: center; justify-content: space-between; padding: 26px 12px 10px; color: var(--muted); font: 600 10px Chakra, sans-serif; letter-spacing: .15em; }
#closeApps { display: none; }
.app-rail nav { display: grid; align-content: start; gap: 5px; padding: 0; }
.app-rail nav button { display: flex; justify-content: flex-start; align-items: center; gap: 13px; height: 55px; padding: 8px 12px; border: 1px solid transparent; border-radius: 9px; }
.app-rail nav button img { width: 31px; height: 31px; object-fit: contain; border-radius: 0; opacity: 1; filter: none; }
.app-rail nav button span { font: 600 14px Work, sans-serif; }
.app-rail nav button.active { background: #19343f; border-color: #315865; color: var(--text); }
.app-rail nav button.active img { box-shadow: none; }
.app-rail nav button em { position: static; margin-left: auto; min-width: 24px; height: 24px; background: #244b59; color: #c5f7fa; font: normal 600 11px Work, sans-serif; }
.rail-exit { display: flex; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 20px 12px; height: 68px; border-left: 0; }
.rail-exit span { font: 600 13px Work, sans-serif; }
.rail-exit span:first-child { font-size: 23px; }
.terminal { grid-template-rows: 96px minmax(0,1fr) 30px; }
.topbar { padding: 0 28px; background: var(--base); border-color: var(--line); gap: 14px; }
.topbar h1 { font-size: 25px; }
.topbar>div>small { color: var(--muted); font-size: 10px; }
.identity b { font: 600 14px Work, sans-serif; }
.identity small { font-size: 11px; max-width: 240px; }
.connection { font-size: 11px; text-transform: none; white-space: nowrap; }
.icon-button { width: 44px; height: 44px; }
.workspace { display: flex; flex-direction: column; }
.workspace>.view.active { flex: 1; min-height: 0; }
.connection-notice { flex: none; padding: 12px 24px; background: #3a3020; border-bottom: 1px solid #76613a; color: #f1d7a5; font-size: 13px; line-height: 1.5; }
.statusbar { font-size: 10px; text-transform: none; letter-spacing: 0; padding-inline: 24px; }
.shift-intro { padding: 28px 0 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.shift-intro small { font: 600 10px Chakra, sans-serif; letter-spacing: .12em; color: var(--cyan); }
.shift-intro h2 { font: 600 30px/1.15 Chakra, sans-serif; margin: 7px 0; }
.shift-intro p { color: var(--muted); font-size: 14px; }
.quick-actions { display: flex; gap: 8px; flex-shrink: 0; }
.quick-actions button { padding: 0 16px; font-size: 13px; }
.quick-actions span { margin-left: 14px; }
[data-view="command"] { padding: 0 28px 28px; }
.command-strip { min-height: 100px; grid-template-columns: 150px 300px minmax(0,1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.unit-id { padding: 14px 18px; }
.unit-id small { font-size: 10px; }
.unit-id span { font-size: 12px; }
.status-buttons { gap: 5px; padding: 14px 12px; }
.status-buttons button { background: transparent; }
.status-buttons button small { font-size: 10px; }
.status-buttons button.active { background: #22434b; border-color: #51878d; box-shadow: none; }
.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.metrics .metric:nth-child(n) { display: grid; }
.metric { padding: 14px 12px; }
.metric span { font-size: 10px; letter-spacing: 0; }
.metric b { font-size: 27px; margin-top: 4px; }
.command-grid { height: auto; margin-top: 20px; gap: 18px; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); grid-template-rows: auto auto; }
.section { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); height: auto; }
.section>header { min-height: 76px; height: auto; padding: 16px 18px; gap: 10px; }
.section header small { font-size: 10px; color: var(--muted); letter-spacing: .09em; }
.section header button { font: 600 12px Work, sans-serif; }
.section header>span { font: 400 12px Work, sans-serif; white-space: nowrap; padding: 0; }
.section .list { height: auto; max-height: 340px; }
.section h2, .section-heading h2, .chat-stage h2 { font-size: 20px; }
.list-row { grid-template-columns: 4px minmax(0,1fr) auto; gap: 12px; padding: 16px; border-radius: 0; min-height: 78px; border-top-color: var(--line); }
.list-row b { font: 600 14px/1.4 Work, sans-serif; white-space: normal; overflow-wrap: anywhere; }
.list-row small { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.list-row em { font: normal 600 11px Work, sans-serif; max-width: 110px; text-align: right; overflow-wrap: anywhere; }
.list-row .signal { height: 30px; border-radius: 4px; }
.list-row:hover, .list-row.selected { background: #1c3642; }
.list-row.selected { box-shadow: inset 3px 0 var(--cyan); }
.compact .list-row { min-height: 70px; }
.empty-state { min-height: 190px; gap: 10px; }
.empty-state b { font-size: 18px; color: var(--text); }
.empty-state span { font-size: 14px; line-height: 1.6; }
.map-view.active { grid-template-columns: 285px minmax(0,1fr); }
.map-list, .map-inspector { background: var(--surface); }
.map-list { display: flex; flex-direction: column; min-height: 0; }
.map-list>.list { height: auto; flex: 1; min-height: 0; }
.section-heading { height: auto; min-height: 82px; flex: none; padding: 16px; }
.section-heading>small { font-size: 10px; }
.map-inspector { display: none; position: absolute; width: 315px; right: 16px; top: 16px; bottom: 16px; max-height: none; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 35px #0005; z-index: 450; }
.map-view.has-selection .map-inspector { display: block; }
.inspector-head { padding: 18px; }
.inspector-head h2 { font-size: 23px; }
.inspector-head p, .camera-note { font-size: 13px; line-height: 1.6; }
.inspector-head small, .fact small { font-size: 10px; }
.fact b { font: 600 13px/1.5 Work, sans-serif; overflow-wrap: anywhere; }
.inspector-actions { grid-template-columns: 1fr; }
.inspector-actions button { min-height: 46px; font: 600 13px Work, sans-serif; }
.tag { font-size: 12px; border-radius: 6px; }
.map-key { left: 301px; font-size: 11px; border-radius: 7px; }
.camera-filter { flex: none; grid-template-columns: 1fr; }
.camera-filter input, .camera-filter select { height: 46px; width: 100%; }
.scan-card p, .scan-card span { font-size: 13px; }
.leaflet-control-zoom a { min-width: 42px; height: 42px!important; line-height: 42px!important; }
.comms-view.active { grid-template-columns: minmax(0,1fr) 290px; }
.chat-stage>header { height: 76px; padding: 16px 24px; }
.chat-stage { grid-template-rows: 76px minmax(0,1fr) auto; }
.chat-stage>header>span { font-size: 12px; }
.chat-messages { padding: 24px; }
.message { max-width: 900px; margin-bottom: 24px; grid-template-columns: 40px minmax(0,1fr); }
.message header { flex-wrap: wrap; gap: 4px 10px; }
.message header b { font: 600 14px Work, sans-serif; }
.message header small { font-size: 11px; }
.message p { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.composer { padding: 16px 24px; background: var(--surface); }
.composer textarea { min-height: 48px; line-height: 1.5; }
.composer button { font: 600 14px Work, sans-serif; }
.roster { background: var(--surface); }
.record-tools { height: 90px; grid-template-columns: 210px minmax(0,540px) 130px; padding: 18px 24px; gap: 10px; }
.record-tools input, .record-tools button { height: 48px; }
.record-tools>button { font: 600 13px Work, sans-serif; }
.records-layout { height: calc(100% - 90px); grid-template-columns: 310px minmax(0,1fr); }
.search-results { background: var(--surface); }
.record-detail { padding: 28px; }
.record-header { flex-wrap: wrap; }
.record-header h2 { overflow-wrap: anywhere; }
.record-header p { font-size: 14px; overflow-wrap: anywhere; }
.record-header .danger-label { margin-left: 0; }
.detail-grid { gap: 14px; border: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.detail-block { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.detail-block h3 { font-size: 11px; }
.detail-block p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.record-actions button { min-height: 46px; font: 600 13px Work, sans-serif; }
.cases-view.active { grid-template-columns: 280px minmax(0,1fr); }
.cases-view>.alerts-column { display: none; }
.cases-view>aside:first-child { min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.cases-view>aside:first-child>.list { height: auto; min-height: 0; flex: 1; }
.case-file { min-width: 0; }
.case-file h2, .case-narrative { overflow-wrap: anywhere; }
.alerts-column>section>header { height: 70px; }
.alerts-column>section>header small { font-size: 11px; }
.module-intro { min-height: 135px; height: auto; gap: 18px; }
.module-intro small { font-size: 10px; }
.module-intro h2 { font-size: 25px; }
.module-intro p { max-width: 660px; font-size: 14px; }
.module-intro button { font: 600 13px Work, sans-serif; white-space: nowrap; }
.evidence-content, .reference-content { height: auto; overflow: auto; }
.reference-tabs { height: 64px; padding-block: 8px; gap: 8px; }
.reference-tabs button { font: 600 13px Work, sans-serif; }
.reference-table th { font: 600 12px Work, sans-serif; }
.reference-table td { font-size: 14px; line-height: 1.5; }
.reference-table td b { font: 600 14px Work, sans-serif; }
.evidence-grid { gap: 12px; border: 0; }
.evidence-stat { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.compact-primary { min-height: 44px; font: 600 12px Work, sans-serif; letter-spacing: 0; white-space: nowrap; }
.remote-dialog { padding: 24px; max-height: calc(100dvh - 48px); overflow: auto; }
.remote-dialog label, .remote-dialog header small { font-family: Work, sans-serif; font-size: 12px; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.remote-dialog h2 { font-family: Chakra, sans-serif; }
.remote-dialog input, .remote-dialog select, .remote-dialog textarea { font-family: Work, sans-serif; font-size: 16px; }
.remote-dialog input, .remote-dialog select, .remote-dialog header button, .remote-dialog footer button { min-height: 46px; }
.remote-dialog header button { min-width: 46px; }
.remote-dialog footer button { font-family: Work, sans-serif; line-height: 1.4; }
.record-action-fields { max-height: none; overflow: visible; }
#toast { border-radius: 9px; font-size: 14px; line-height: 1.5; }
.pair-card { border-radius: 20px; padding: 40px; max-width: 630px; }
.pair-copy { margin: 44px 0 24px; }
.pair-copy h1 { font-size: clamp(36px,6vw,54px); line-height: 1.06; }
.pair-copy p { font-size: 16px; }
.pair-steps { padding-left: 22px; margin: 0 0 25px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.pair-steps b { color: var(--text); }
.pair-card form { grid-template-columns: minmax(0,1fr) 175px; }
.pair-card button { font: 600 14px Work, sans-serif; }
.pair-card footer { text-transform: none; font: 400 12px/1.6 Work, sans-serif; display: grid; gap: 3px; }
.mobile-nav, .pane-switch, .pane-back, .apps-backdrop { display: none; }
.pane-switch { order: -1; }
.close-inspector { display: block; margin: 12px 12px 0 auto; min-width: 44px; padding: 0 12px; color: var(--muted); font-size: 12px; }
@media (min-width:1500px) {
  .map-view.active { grid-template-columns: 310px minmax(0,1fr) 330px; }
  .map-inspector, .map-view.has-selection .map-inspector { position: static; display: block; width: auto; border-radius: 0; border-width: 0 0 0 1px; box-shadow: none; }
  .map-key { left: 326px; }
  .cases-view.active { grid-template-columns: 300px minmax(0,1fr) 280px; }
  .cases-view>.alerts-column { display: block; }
}
@media (min-width:761px) and (max-width:1499px) {
  .cases-view>.pane-switch { display: flex; grid-column: 1/-1; padding: 10px 18px; gap: 8px; border-bottom: 1px solid var(--line); }
  .cases-view>.pane-switch { grid-row: 1; }
  .cases-view>.pane-switch [data-pane-button="detail"] { display: none; }
  .cases-view.active { grid-template-rows: auto minmax(0,1fr); }
  .cases-view[data-pane="alerts"]>.alerts-column { display: block; grid-column: 1/-1; }
  .cases-view[data-pane="alerts"]>aside:first-child, .cases-view[data-pane="alerts"]>.case-file { display: none; }
}
@media (max-width:1200px) and (min-width:761px) {
  :root { --rail: 174px; }
  .app-rail { padding-inline: 8px; }
  .app-rail nav button { gap: 9px; }
  .topbar { padding-inline: 20px; }
  .identity { display: none; }
  .command-strip { grid-template-columns: 145px minmax(0,1fr); }
  .status-buttons { border-right: 0; }
  .metrics { grid-column: 1/-1; border-top: 1px solid var(--line); }
  .shift-intro { flex-wrap: wrap; }
  .command-grid { grid-template-columns: 1fr; }
  .comms-view.active { grid-template-columns: 1fr; }
  .roster { display: none; }
  .records-layout { grid-template-columns: 250px minmax(0,1fr); }
  .record-tools { grid-template-columns: 160px minmax(0,1fr) 100px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
  :root { --rail: 0px; }
  .remote-shell { display: block; height: 100dvh; }
  .terminal { height: calc(100dvh - 72px - env(safe-area-inset-bottom)); grid-template-rows: 76px minmax(0,1fr); }
  .statusbar { display: none; }
  .topbar { padding: 10px 16px; }
  .topbar h1 { font-size: 20px; line-height: 1.15; }
  .topbar>div>small { display: block; font-size: 9px; margin-bottom: 6px; }
  .top-actions { gap: 10px; }
  .connection span, .identity { display: none; }
  .connection span { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .connection i { width: 9px; height: 9px; }
  .connection-notice { padding: 10px 16px; font-size: 12px; }
  .app-rail { display: none; position: fixed; inset: auto 0 0; height: auto; max-height: 90dvh; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line2); border-radius: 20px 20px 0 0; z-index: 900; overflow: auto; background: #0c1c25; }
  .remote-shell.apps-open .app-rail { display: flex; }
  .app-rail .rail-brand { display: none; }
  .nav-heading { padding: 14px 0; font: 600 20px Chakra, sans-serif; letter-spacing: 0; }
  #closeApps { display: block; width: 44px; font-size: 24px; }
  .app-rail nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); height: auto; overflow: visible; gap: 8px; }
  .app-rail nav button { width: 100%; min-width: 0; height: 65px; padding: 12px; border: 1px solid var(--line); }
  .app-rail nav button span { font-size: 13px; }
  .app-rail nav button.active { border: 1px solid #54848c; }
  .app-rail nav button img { width: 30px; height: 30px; }
  .app-rail nav button em { display: none; }
  .rail-exit { display: flex; margin-top: 16px; padding: 12px; height: 52px; }
  .apps-backdrop { display: block; position: fixed; inset: 0; z-index: 850; border: 0; border-radius: 0; background: #01080cb8; }
  .apps-backdrop:hover { background: #01080cb8; }
  .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 800; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); height: calc(72px + env(safe-area-inset-bottom)); padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line2); background: #09171f; }
  .mobile-nav button { display: grid; place-content: center; justify-items: center; gap: 3px; padding: 4px; min-width: 0; background: transparent; border: 0; color: var(--muted); font: 600 10px Work, sans-serif; }
  .mobile-nav button.active, .mobile-nav button[aria-expanded="true"] { background: #1b3843; color: var(--text); }
  .mobile-nav img { width: 27px; height: 27px; object-fit: contain; }
  .apps-symbol { height: 27px; font-size: 29px; line-height: 27px; color: var(--cyan); }
  [data-view="command"] { padding: 0 16px 24px; }
  .shift-intro { padding: 24px 0 20px; display: block; }
  .shift-intro h2 { font-size: 27px; }
  .shift-intro p { line-height: 1.5; font-size: 13px; }
  .quick-actions { margin-top: 18px; }
  .quick-actions button { flex: 1; min-height: 46px; }
  .command-strip { grid-template-columns: 1fr; grid-template-rows: auto; }
  .unit-id { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-right: 0; padding: 14px; }
  .unit-id b { margin: 0; font-size: 21px; }
  .unit-id span { margin-left: auto; }
  .status-buttons { border: 0; padding: 0 12px 14px; }
  .status-buttons button { min-height: 57px; }
  .status-buttons button small { font-size: 11px; }
  .metrics { grid-column: auto; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); }
  .metric { padding: 14px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:nth-child(n+3) { border-bottom: 0; }
  .metric b { font-size: 28px; }
  .command-grid { height: auto; display: grid; grid-template-columns: 1fr; gap: 16px; overflow: visible; margin-top: 16px; }
  .section { height: auto; }
  .section>header { padding: 16px; }
  .section .list { max-height: none; }
  .list-row { min-height: 78px; padding: 14px; gap: 10px; }
  .list-row em { max-width: 76px; font-size: 10px; }
  .pane-switch { display: flex; flex: none; padding: 10px 12px; gap: 6px; border-bottom: 1px solid var(--line); background: var(--base); }
  .pane-switch button { flex: 1; min-width: 0; padding: 0 8px; color: var(--muted); font-size: 13px; }
  .pane-switch button.active { background: #20404c; border-color: #46747f; color: var(--text); }
  .map-view.active { display: flex; flex-direction: column; position: relative; overflow: hidden; }
  .map-list { position: static; flex: 1; height: auto; width: 100%; border: 0; box-shadow: none; overflow: hidden; }
  .map-list .section-heading { height: auto; min-height: 80px; }
  .map-list>.list, .cameras>.list { height: auto; }
  .camera-filter { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .operations-map { flex: 1; min-height: 0; height: auto; width: 100%; }
  .map-inspector, .map-view.has-selection .map-inspector { position: static; flex: 1; width: 100%; height: auto; min-height: 0; max-height: none; border: 0; border-radius: 0; box-shadow: none; overflow: auto; }
  .map-view[data-pane="map"]>.map-list, .map-view[data-pane="map"]>.map-inspector,
  .map-view[data-pane="list"]>.operations-map, .map-view[data-pane="list"]>.map-inspector,
  .map-view[data-pane="detail"]>.operations-map, .map-view[data-pane="detail"]>.map-list { display: none; }
  .map-view[data-pane="detail"]>.map-inspector { display: block; }
  .close-inspector { display: none; }
  .map-key { display: none; }
  .facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fact { padding: 16px; }
  .inspector-head h2 { font-size: 25px; }
  .inspector-head p { font-size: 14px; }
  .inspector-actions { grid-template-columns: 1fr 1fr; }
  .inspector-actions button { min-height: 50px; }
  .comms-view.active { display: flex; }
  .chat-stage { height: auto; flex: 1; min-width: 0; grid-template-rows: 70px minmax(0,1fr) auto; }
  .chat-stage>header { height: 70px; padding: 12px 16px; }
  .chat-stage h2 { font-size: 20px; }
  .chat-messages { padding: 18px 16px; }
  .composer { padding: 12px; gap: 8px; grid-template-columns: minmax(0,1fr) 65px; }
  .composer textarea { padding: 10px; }
  .record-tools { height: auto; grid-template-columns: minmax(0,1fr) 95px; padding: 12px; }
  .record-tools .segmented { grid-column: 1/-1; }
  [data-view="records"].active { display: flex; flex-direction: column; overflow: hidden; }
  .records-layout { height: auto; flex: 1; min-height: 0; display: block; }
  .search-results { height: 100%; overflow: auto; border: 0; }
  .record-detail { display: none; height: 100%; padding: 18px; }
  [data-view="records"].detail-open>.record-tools { display: none; }
  [data-view="records"].detail-open .search-results { display: none; }
  [data-view="records"].detail-open .record-detail { display: block; }
  .pane-back { display: inline-flex; align-items: center; padding: 0 12px; margin-bottom: 18px; color: var(--cyan); }
  .record-header { gap: 12px; }
  .record-header h2 { font-size: 24px; }
  .record-photo-stack { flex-basis: 64px; width: 64px; height: 64px; }
  .record-photo { width: 64px; height: 64px; }
  .record-header>div { flex: 1; min-width: 0; }
  .record-header p { font-size: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-block { min-height: 100px; }
  .record-actions { display: grid; }
  .cases-view.active { display: flex; flex-direction: column; overflow: hidden; }
  .cases-view>aside:first-child { height: auto; flex: 1; min-height: 0; border: 0; }
  .case-file { height: auto; flex: 1; min-height: 0; padding: 18px; }
  .cases-view>.alerts-column { flex: 1; min-height: 0; border: 0; }
  .cases-view[data-pane="list"]>.case-file, .cases-view[data-pane="list"]>.alerts-column,
  .cases-view[data-pane="detail"]>aside:first-child, .cases-view[data-pane="detail"]>.alerts-column,
  .cases-view[data-pane="alerts"]>aside:first-child, .cases-view[data-pane="alerts"]>.case-file { display: none; }
  .cases-view[data-pane="alerts"]>.alerts-column { display: block; }
  .module-intro { display: block; min-height: 0; padding: 20px 16px; }
  .module-intro h2 { font-size: 23px; }
  .module-intro p { font-size: 13px; line-height: 1.6; }
  .module-intro button { margin-top: 14px; }
  .reference-tabs { height: auto; min-height: 64px; padding: 8px 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reference-tabs button { min-width: 0; }
  .reference-content { overflow: visible; }
  .reference-table { min-width: 0; display: block; padding: 0 16px 16px; }
  .reference-table thead { display: none; }
  .reference-table tbody { display: grid; gap: 12px; }
  .reference-table tr { display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .reference-table td { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: start; gap: 10px; padding: 10px 0; overflow-wrap: anywhere; }
  .reference-table td:last-child { border: 0; }
  .reference-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .reference-table td small { grid-column: 2; }
  .evidence-content { padding: 0 16px 16px; }
  .evidence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .evidence-stat { min-height: 105px; padding: 14px; }
  .remote-modal { padding: 10px; }
  .remote-dialog { padding: 18px; max-height: calc(100dvh - 20px); border-radius: 14px; }
  .remote-dialog footer { flex-wrap: wrap; }
  .call-form-grid { grid-template-columns: 1fr 1fr; }
  #toast { left: 16px; right: 16px; top: calc(86px + env(safe-area-inset-top)); bottom: auto; max-width: none; }
  .pair-view { padding: 16px; min-height: 100dvh; }
  .pair-card { padding: 26px 22px; }
  .pair-card form { grid-template-columns: 1fr; }
  .pair-card button { height: 50px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; } }
