/* Touch layout for controller WebViews. Loaded after the shared theme. */
html, body { height: auto; min-height: 100%; overflow: auto; }
body { min-width: 0; }
main { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
#dashboard { height: auto; }
button, input { font-family: inherit; touch-action: manipulation; }
button { min-height: 48px; font-size: 15px; font-weight: 700; }
button:disabled { cursor: default; opacity: .45; box-shadow: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--fc-primary); outline-offset: 4px; }
button:hover:disabled { background: var(--fc-primary); }
.topbar { height: 64px; padding: 0 24px; gap: 16px; }
.topbar .brand { font-size: 12px; white-space: nowrap; }
.topbar-status { flex-wrap: nowrap; gap: 8px; }
.icon-button, .user-chip { width: 48px; height: 48px; min-height: 48px; flex-shrink: 0; }
.connection-status { font-size: 12px; padding: 9px 12px; }
.connection-status[data-state="waiting"] { color: var(--fc-muted); background: var(--fc-bg); }
.flight-layout { grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); grid-template-rows: auto auto; align-content: start; align-items: stretch; height: auto; max-width: 1280px; margin: 0 auto; padding: 20px 24px 28px; gap: 16px; }
.flight-card { grid-column: 1 / -1; min-height: 0; padding: 18px 24px; gap: 14px; }
.controller-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; margin: 0 0 8px; }
.controller-summary h1 { font-size: 24px; line-height: 1.2; }
.live-dot { flex-shrink: 0; font-size: 12px; letter-spacing: 0; color: var(--fc-muted); }
.live-dot::before { background: currentColor; box-shadow: none; }
.live-dot[data-state="connected"] { color: var(--fc-success); }
.warning { margin: 0; padding: 10px 14px; font-size: 14px; line-height: 1.4; }
.service-strip { display: flex; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid var(--fc-border); padding-top: 12px; color: var(--fc-muted); font-size: 13px; }
.service-strip > span { display: flex; align-items: center; gap: 8px; }
.service-strip svg { width: 19px; height: 19px; stroke: var(--fc-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.video-card, .widget-card { min-height: 0; padding: 24px; border-radius: 16px; }
.video-card { display: flex; flex-direction: column; gap: 20px; border-top: 3px solid var(--fc-primary); }
.card-heading { gap: 12px; }
.card-heading .eyebrow { margin: 0; }
.protocol-label { font-size: 10px; letter-spacing: .08em; color: var(--fc-muted); border: 1px solid var(--fc-border); padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.video-summary { display: flex; align-items: center; gap: 16px; }
.video-summary h2 { font-size: 28px; line-height: 1.2; }
.video-summary p { margin-top: 8px; color: var(--fc-muted); font-size: 15px; line-height: 1.45; }
.video-symbol { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border: 1px solid var(--fc-border); border-radius: 16px; background: var(--fc-bg); color: var(--fc-primary); }
.video-symbol svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.stream-status-line { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 14px; border: 1px solid var(--fc-border); background: var(--fc-bg); border-radius: 10px; font-size: 14px; line-height: 1.4; }
.stream-status-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--fc-muted); }
.video-card[data-state="active"] .stream-status-dot { background: var(--fc-success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fc-success) 12%, transparent); }
.video-card[data-state="active"] .stream-status-line { color: var(--fc-success); }
.stream-actions { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.stream-actions button { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 12px; font-size: 16px; }
.stream-actions svg { width: 22px; height: 22px; flex-shrink: 0; fill: currentColor; }
#livestream-start { background: var(--fc-primary); color: #102342; }
#livestream-start:hover:enabled { background: var(--fc-primary-dark); }
#livestream-stop { border: 1px solid var(--fc-border); background: var(--fc-bg); color: var(--fc-text); box-shadow: none; }
#livestream-stop:hover:enabled { border-color: var(--fc-warning-border); background: var(--fc-warning-bg); }
.video-card .error { font-size: 14px; line-height: 1.45; min-height: 0; }
.video-card .error:empty { display: none; }
.video-note { color: var(--fc-muted); font-size: 13px; line-height: 1.5; }
.widget-card { gap: 16px; justify-content: center; }
.widget-card .eyebrow { margin: 0; }
.widget-symbol { width: 48px; height: 48px; color: var(--fc-muted); }
.widget-symbol svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.widget-card h2 { font-size: 24px; }
.widget-card > p:not(.eyebrow) { margin: 0; font-size: 14px; line-height: 1.5; }
.widget-card > button { margin-top: 4px; min-height: 52px; border-radius: 12px; border: 1px solid var(--fc-border); color: var(--fc-text); background: var(--fc-bg); box-shadow: none; }
.widget-card > button:hover { border-color: var(--fc-primary); }
.pairing-status:empty { display: none; }
.account-menu-item { min-height: 48px; }
dialog { max-height: calc(100dvh - 24px); overflow: auto; }
.modal-close { width: 48px; height: 48px; }
.login-form input { min-height: 48px; font-size: 16px; }
.otp-inputs input { min-height: 52px; }
:root:not([data-theme="dark"]) #livestream-start { color: #fff; }
@media (orientation: landscape) and (max-height: 640px) {
  .topbar { height: 56px; padding: 0 16px; }
  .flight-layout { padding: 12px 16px 16px; gap: 12px; }
  .flight-card { padding: 12px 18px; gap: 10px; }
  .controller-summary h1 { font-size: 21px; }
  .controller-summary .eyebrow { display: none; }
  .service-strip { padding-top: 8px; }
  .video-card, .widget-card { padding: 18px; }
  .video-card { gap: 14px; }
  .video-summary h2 { font-size: 24px; }
  .video-symbol { width: 48px; height: 48px; border-radius: 12px; }
  .video-symbol svg { width: 28px; height: 28px; }
  .video-summary p { margin-top: 4px; font-size: 14px; }
  .stream-actions button { min-height: 56px; }
  .widget-symbol { display: none; }
  .widget-card { gap: 14px; }
  .widget-card h2 { font-size: 22px; }
  .warning { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 700px) {
  .topbar { padding: 0 12px; }
  .topbar .brand { font-size: 10px; }
  .topbar .brand-mark { display: none; }
  .topbar-status { gap: 2px; }
  .connection-status { font-size: 11px; padding: 7px 8px; }
  .flight-layout { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .video-card, .widget-card { padding: 20px; }
  .controller-summary { flex-wrap: wrap; gap: 10px; }
  .widget-card { justify-content: flex-start; }
  .widget-symbol { display: none; }
}
@media (orientation: landscape) and (min-width: 640px) and (max-width: 700px) {
  .flight-layout { grid-template-columns: minmax(0, 1.5fr) minmax(210px, 1fr); }
  .stream-actions { grid-template-columns: 1fr; }
}
