#map .leaflet-overlay-pane svg {
  width: auto;
  min-height: 0;
  max-width: none;
}
#map {
  isolation: isolate;
}

/* Keep the attribution icon clear of the site's full-size SVG styles. */
.map-view .leaflet-attribution-flag {
  display: inline;
  width: 12px;
  height: 8px;
  min-height: 0;
}

#dashboard .map-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

#dashboard .map-controls button,
#dashboard .guest-location button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

#dashboard .map-controls button[aria-pressed="true"] {
  background: #006779;
  border-color: #006779;
  color: #fff;
}

#dashboard .map-controls button:focus-visible,
#dashboard .guest-location button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

#dashboard .map-controls button {
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 2px;
  white-space: nowrap;
}

.map-toggle-action {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
}
#dashboard .map-power-icon {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  min-height: 0;
}

.map-view {
  position: relative;
}

#map-status {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 68px);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px #0002;
  pointer-events: none;
}

#map-status:empty {
  display: none;
}

@media (max-width: 360px) {
  #dashboard .map-controls {
    gap: 6px;
    padding-inline: 8px;
  }
}


#track-mode-status:not(:empty) {
  padding: 8px 12px;
  color: var(--mut);
  text-align: center;
  font-size: 0.75rem;
}

#dashboard .phone-share {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
}

#dashboard .phone-share label {
  font-size: 0.75rem;
  white-space: nowrap;
}

#dashboard .phone-share input,
#dashboard .phone-share button {
  min-width: 0;
  margin: 0;
}

#phone-result {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--mut);
  font-size: 0.75rem;
}

#phone-result:empty {
  display: none;
}

#map .map-device-name {
  padding: 2px 6px;
  max-width: min(125px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 650;
  pointer-events: none;
}

#dashboard .phone-card {
  padding: 0;
  min-width: 0;
}

.phone-card summary, .expandable-health summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.phone-card summary::-webkit-details-marker, .expandable-health summary::-webkit-details-marker { display: none; }
.phone-card summary::after, .expandable-health summary::after { content: '▾'; }
.phone-card[open] summary::after, .expandable-health[open] summary::after { content: '▴'; }
.phone-card summary strong, .expandable-health summary strong { overflow-wrap: anywhere; }
.phone-card summary span { color: var(--mut); font-size: 0.75rem; }
.phone-card > div, .expandable-health > div { padding: 0 12px 8px; }

#dashboard .layout,
#dashboard .layout > * { min-width: 0; }

.brand-feature {
  display: block;
  margin-top: 4px;
  color: #b1cbd5;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

#home-install summary {
  color: #ffb703;
  cursor: pointer;
}
#home-install .home-install-guide {
  max-width: 32rem;
  margin-top: .65rem;
  padding: .75rem;
  border: 1px solid #577786;
  border-radius: .65rem;
  color: #fff;
  background: #062f41;
}
#home-install .home-install-guide img {
  border-radius: .45rem;
}
#home-install .home-install-guide p {
  margin: .4rem 0 0;
}

.header-shortcuts {
  display: none;
}

body:has(#dashboard:not([hidden])) .header-shortcuts {
  display: contents;
}

.header-group-share {
  display: none;
}
body:has(#dashboard:not([hidden])) .header-group-share {
 display: grid;
 justify-items: start;
 gap: .4rem;
 min-width: 0;
}
header .header-shortcuts #group-share {
  appearance: none;
  min-height: 44px;
  padding: 0 .125rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #9be5ed;
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  text-shadow: 0 1px 2px #0005;
}
header .header-shortcuts #group-share:hover {
  text-decoration: underline;
  text-underline-offset: .22em;
}
header .header-shortcuts #group-share:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
:root[data-theme=dark] header .header-shortcuts #group-share {
  color: #8fdfed;
  text-shadow: 0 1px 2px #0007;
}
#group-share-status {
 margin: 0;
}
#group-share-url {
 width: 100%;
}

#dashboard .guest-location {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  margin: 1rem 0 1.5rem;
}
#guest-location-intro {
  grid-column: 1 / -1;
}
#guest-location-intro p {
  margin: .25rem 0 .5rem;
  font-size: .8rem;
  line-height: 1.4;
}
#dashboard .guest-location button:disabled {
  opacity: .65;
}
#dashboard .guest-location input {
  width: 100%;
  font-size: 16px;
}
#dashboard .guest-location button {
  padding-inline: .65rem;
  white-space: nowrap;
}

body > header:has(.group-brand-row) {
  flex-wrap: wrap;
}
.group-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex: 1 0 100%;
  min-width: 0;
}
.group-brand-row .brand {
  min-width: 0;
}
.group-brand-row .group-back {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: .32em;
  min-height: 44px;
  padding: 0 .15rem;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
body > header:has(.group-brand-row) {
  padding-block: 15px 2px;
  row-gap: 4px;
}

body > header:has(.group-brand-row) .header-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 0 6px;
}

body:has(#dashboard:not([hidden])) > header .header-actions {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

header .header-actions .connection { grid-column: 1; }
header .header-actions .header-group-share { grid-column: 2; grid-row: 1; }
body:has(#dashboard:not([hidden])) > header .header-actions #theme { grid-column: 3; grid-row: 1; }
header .header-actions .header-menu { grid-column: 4; grid-row: 1; }

.group-brand-row .brand {
  line-height: 1.25;
}

header .header-icon {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
}

header .header-actions #theme {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0;
  margin: 0 0 0 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: .875rem;
}

header #theme:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

header #theme .theme-sun,
:root[data-theme="dark"] header #theme .theme-moon {
  display: none;
}

:root[data-theme="dark"] header #theme .theme-sun {
  display: block;
}
.group-brand-row .group-back:hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.group-brand-row .group-back:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body:has(#dashboard:not([hidden])) .group-brand-row .group-back {
  display: inline-flex;
}

#dashboard .layout.map-first {
  display: block;
}
#dashboard .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 1rem;
}

#dashboard .summary-grid article {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: none;
}

#dashboard .summary-grid strong {
  margin: 2px 0 0;
  font-size: 0.9375rem;
  line-height: 1.35;
}

#dashboard .expandable-health { padding: 0; min-width: 0; }

body > header:has(.group-brand-row) .connection {
  min-width: 0;
  margin: 0;
  font-size: .75rem;
  line-height: 1.25;
}

.header-menu {
  position: relative;
  align-self: center;
  flex: 0 0 auto;
  margin-inline-start: 0;
}

.group-brand-row .brand {
  flex: 1 1 auto;
}

.header-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 10px;
  color: inherit;
}

.header-menu > summary::-webkit-details-marker {
  display: none;
}

.header-menu > summary:active {
  background: #ffffff18;
}

.header-menu-panel {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  gap: 3px;
  width: min(18rem, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #416174;
  border-radius: 14px;
  background: #102f42;
  box-shadow: 0 10px 26px #00172555;
  font-size: .875rem;
}

body > header .header-menu-panel .menu-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  color: #f3f8fb !important;
  line-height: 1.35;
  text-decoration: none;
  list-style: none;
}

.header-menu-panel summary::-webkit-details-marker { display: none; }
.header-menu-panel .menu-item:hover,
.header-menu-panel .menu-item:active { background: #ffffff15; }
.header-menu-panel .menu-item:focus-visible { outline: 2px solid #abd9f6; outline-offset: -2px; }

.header-menu-panel .menu-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--menu-accent);
  background: var(--menu-tint);
}

.header-menu-panel .menu-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  min-height: 0;
}

.menu-device { --menu-accent: #9fd2ff; --menu-tint: #214965; }
.menu-firmware { --menu-accent: #ffd276; --menu-tint: #54452f; }
.menu-home { --menu-accent: #9be6d0; --menu-tint: #214c49; }

.header-menu-panel .menu-direction {
  width: 6px;
  height: 6px;
  margin-inline-end: 3px;
  border-top: 1.5px solid #a7c4d3;
  border-right: 1.5px solid #a7c4d3;
  transform: rotate(45deg);
}

.header-menu-panel details[open] .menu-direction { transform: rotate(135deg); }
.header-menu-panel #home-install .home-install-guide { margin: 3px 4px 4px; }


body > header.secondary-header .group-back {
  display: inline-flex;
  color: inherit !important;
  text-decoration: none;
}

body > header.secondary-header #theme {
  grid-column: 2;
}

/* Keep the logo independent of the length of the feature summary. */
.group-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 4px;
}
.group-brand-row .brand-icon {
  flex: 0 0 42px;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
}
.group-brand-row .brand-feature {
  grid-column: 1 / -1;
  margin: 0 0 0 53px;
  line-height: 1.45;
  word-break: keep-all;
}

@media (max-width: 480px) {
  body:has(#dashboard:not([hidden])) > header:has(.group-brand-row) .connection {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

footer.oz-copyright > strong {
  font-size: 12px;
  font-weight: 700;
}
footer.oz-copyright > span {
  font-size: 11px;
  font-weight: 400;
}

.menu-usage { --menu-accent: #cde5fb; --menu-tint: #26475c; }

.header-menu-panel .usage-guide-text {
  margin: 3px 4px 4px;
  padding: 10px 12px;
  border: 1px solid #416174;
  border-radius: 9px;
  color: #f3f8fb;
  font-size: .8125rem;
  line-height: 1.6;
  word-break: keep-all;
}

#dashboard #phone-share[hidden]{display:none}



#map .track-heading-icon {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
}

#map .track-heading {
  display: block;
  width: 10px;
  height: 11px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 95%, 50% 69%, 0 95%);
  transition: transform 120ms linear;
}

#map .track-heading[hidden] { display: none; }

#dashboard .map-view {
  height: clamp(320px, 60vh, 760px);
  overflow: hidden;
  isolation: isolate;
}
#dashboard #map {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--map-diameter, 100%);
  height: var(--map-diameter, 100%);
  transform: translate(-50%, -50%) rotate(var(--map-angle, 0deg));
}
#map .map-device-name {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#map .map-device-name > span {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff;
  color: #222;
  box-shadow: 0 1px 5px #0004;
  overflow: hidden;
  text-overflow: ellipsis;
  rotate: var(--map-counter-angle, 0deg);
}
.map-view .leaflet-control-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.map-view .leaflet-control-attribution {
  background: #fffe;
  color: #263744;
  font: 11px/1.5 system-ui, sans-serif;
}
.map-view .leaflet-control-attribution a { color: #07536b; }
#dashboard #map-orientation {
  position: absolute;
  right: 12px;
  bottom: 34px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 8px #0003;
}
#dashboard #map-orientation[aria-pressed="true"] { border: 2px solid #00778b; }
#dashboard #map-orientation svg { width: 32px; height: 32px; min-height: 0; }
#map-north-needle { transform-origin: 16px 16px; rotate: var(--map-angle, 0deg); }
#map-orientation-status {
  position: absolute;
  right: 66px;
  bottom: 43px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: .72rem;
  pointer-events: none;
}


:root[data-theme=dark] #dashboard .map-controls button[aria-pressed="true"]:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accentink);
}

:root[data-theme=dark] #dashboard #map-orientation {
  color: var(--accent);
}

:root[data-theme=dark] #dashboard #map-orientation[aria-pressed="true"] {
  border-color: var(--accent);
}

:root[data-theme=dark] #map-north-needle path:first-child {
  fill: var(--accent);
}

:root[data-theme=dark] .map-view .leaflet-tile {
  filter: invert(.87) hue-rotate(180deg) !important;
}

:root[data-theme=dark] .map-view :is(.leaflet-bar a, .leaflet-control-attribution, .leaflet-control-scale-line) {
  background: var(--surface2);
  color: var(--ink);
  border-color: var(--line-strong);
}

:root[data-theme=dark] .map-view .leaflet-control-attribution a {
  color: var(--accent);
}

#map-expand, #map-touch-lock {
  position: absolute;
  z-index: 3;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 8px #0002;
}
#map-expand > svg, #map-touch-lock > svg {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  display: block;
  margin: auto;
  pointer-events: none;
}
#map-expand[aria-pressed="false"] .map-expand-close,
#map-expand[aria-pressed="true"] .map-expand-open {
  display: none;
}
#map-touch-lock {
  right: calc(max(12px, env(safe-area-inset-right)) + 50px);
}
#map-touch-lock[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accentink);
}
#map-touch-lock[aria-pressed="false"] .map-touch-slash { display: none; }
.map-touch-locked #map,
.map-touch-locked #map .leaflet-interactive {
  pointer-events: none;
}
.map-touch-locked { touch-action: pan-y; }
#map-status {
  right: calc(max(12px, env(safe-area-inset-right)) + 100px);
  max-width: calc(100% - 162px);
}
body.map-expanded { overflow: hidden; overscroll-behavior: none; }
#dashboard .map-view.map-expanded {
  position: fixed;
  inset: 0;
  height: auto;
  width: auto;
  z-index: 1000;
}

#language-select {
  width: auto;
  max-width: 9rem;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
}
#language-select[hidden] { display: none; }

#web-radio {
  position: fixed;
  margin: 0;
  z-index: 1100;
  inset: auto 0 0;
  display: grid;
  gap: 8px;
  padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  color: #fff;
  background: #062f41;
}
@media (hover: none) and (pointer: coarse) {
  #web-radio {
    inset: var(--dock-edge, 100%) auto auto var(--dock-left, 0px);
    width: var(--dock-width, 100%);
    transform: translateY(-100%);
  }
}
#web-radio[hidden], #web-radio-gear[hidden] { display: none; }
body:not(.web-settings-open):has(#web-radio:not([hidden])) { padding-bottom: var(--web-radio-height, 130px); }
#web-radio-status { grid-column: 1 / -1; margin: 0; text-align: center; }
#web-radio-ptt { min-height: 48px; touch-action: none; user-select: none; }
#web-radio-ptt:is([aria-pressed="true"], .emergency-armed) { background: #bc382d; color: #fff; }
.group-radio-actions { display: flex; align-items: center; gap: 8px; }
#dashboard .map-view.map-expanded { bottom: var(--web-radio-height, 0px); }
body.web-settings-open > :is(header, main:not(#web-radio-settings), #web-radio, footer) {
  display: none;
}
body.web-settings-open { overflow: auto; padding-bottom: 0; }
#web-radio-settings[hidden] { display: none; }
#web-radio-settings { max-width: none; margin: 0; padding: 0; }
.web-settings-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px max(16px, calc((100% - 740px) / 2));
  color: white;
  background: #062f41;
}
.web-settings-bar h1 { margin: 0; font-size: clamp(17px, 4vw, 23px); line-height: 1.35; color: inherit; }
#web-settings-back, #web-radio-gear {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-size: 23px;
  line-height: 1;
}
#web-settings-back { font-size: 35px; }
#web-settings-back:hover { background: rgb(255 255 255 / 13%); }
#web-radio-gear {
  background: #693552;
  color: #ffe0ed;
  border: 1px solid #ae658b;
  border-radius: 11px;
}
#web-radio-gear:hover { background: #804265; }
#web-radio-gear svg { display: block; width: 28px; height: 28px; min-height: 0; }
#web-radio-gear[hidden] { display: none; }
#web-radio-menu { --menu-accent: #ffc2df; --menu-tint: #693552; }
body > header .header-menu-panel #web-radio-menu { width: 100%; border: 0; background: transparent; box-shadow: none; text-align: left; }
body > header .header-menu-panel #web-radio-menu:hover { background: #ffffff15; }
body > header .header-menu-panel #web-radio-menu[hidden],
#web-radio-menu[data-enabled="true"] .web-radio-toggle-slash,
#web-radio-gear:not([data-enabled="false"]) .web-radio-toggle-slash { display: none; }
#web-radio-gear[data-enabled="false"] { background: #254656; color: #d0e0e8; border-color: #64828f; }
#web-radio-gear .web-radio-toggle-slash { stroke-width: 2.2; }
.web-settings-content { max-width: 772px; margin: auto; padding: 20px 16px 32px; }
.web-settings-card {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: clamp(16px, 4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
}
.web-settings-card[hidden] { display: none; }
.web-settings-card h2 { margin: 0 0 4px; font-size: 1.3rem; }
.web-settings-card label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.web-settings-card output { font-variant-numeric: tabular-nums; }
.web-settings-card #phone-result { margin: 0; }
.web-settings-card #phone-result:empty { display: none; }
body:has(#dashboard[hidden]) #web-radio-settings #phone-send { display: none; }
#web-radio-settings input[type="range"] {
  appearance: none;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(to right, var(--accent) var(--volume, 0%), var(--line) var(--volume, 0%)) center / 100% 6px no-repeat;
}
#web-radio-settings input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
#web-radio-settings input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 480px) {
  .group-radio-actions { gap: 2px; }
}

#web-radio-volume-controls { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
#web-radio-volume-controls:disabled { opacity: .5; }
#web-radio-enabled { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }

/* Desktop operations layout. The native app keeps its single-column view. */
@media (min-width: 768px) {
  body:has(#web-radio-gear:not([hidden])) #dashboard .map-controls {
    grid-template-columns: repeat(3, minmax(120px, 170px));
  }
  body:has(#web-radio-gear:not([hidden])) #gps-health,
  body:has(#web-radio-gear:not([hidden])) #devices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    align-items: start;
    gap: 12px;
  }
  body:has(#web-radio-gear:not([hidden])) #web-radio-ptt {
    width: min(100%, 640px);
    justify-self: center;
  }
}
@media (min-width: 1440px) {
  body:has(#dashboard:not([hidden])):has(#web-radio-gear:not([hidden])) > :is(header, main:not(#web-radio-settings)) {
    width: 100%;
    max-width: none;
    padding-inline: clamp(24px, 2vw, 48px);
  }
  body:has(#web-radio-gear:not([hidden])) .dashboard-workspace {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(440px, 1fr);
    align-items: start;
    gap: clamp(20px, 2vw, 36px);
  }
  body:has(#web-radio-gear:not([hidden])) .dashboard-workspace > div { min-width: 0; }
  body:has(#web-radio-gear:not([hidden])) .dashboard-workspace .summary-grid { margin-top: 0; }
}

.map-floating-controls, #web-map-group, #web-map-mute,
#web-radio-ptt > svg, #map-group-panel[hidden] { display: none; }

#dashboard .map-expanded #map-orientation {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: auto;
  bottom: auto;
}
.map-expanded #map-orientation-status {
  top: calc(max(12px, env(safe-area-inset-top)) + 11px);
  left: calc(max(12px, env(safe-area-inset-left)) + 54px);
  right: auto;
  bottom: auto;
}
.map-expanded .leaflet-top.leaflet-left {
  top: calc(max(12px, env(safe-area-inset-top)) + 52px);
  left: auto;
  right: max(12px, env(safe-area-inset-right));
}
.map-expanded .leaflet-top .leaflet-control-zoom { margin: 0; border: 0; box-shadow: none; }
.map-expanded .leaflet-control-zoom a {
  width: 42px;
  height: 42px;
  margin-bottom: 7px;
  line-height: 40px;
  border: 1px solid var(--line);
  border-radius: 50% !important;
  box-shadow: 0 2px 8px #0003;
}
.map-expanded #map-status {
  top: auto;
  right: max(12px, env(safe-area-inset-right));
  bottom: 30px;
}

.map-expanded .map-floating-controls {
  position: absolute;
  z-index: 3;
  top: calc(max(12px, env(safe-area-inset-top)) + 56px);
  left: max(12px, env(safe-area-inset-left));
  display: grid;
  gap: 8px;
}
.map-floating-controls button, body.map-expanded :is(#web-map-group, #web-map-mute, #web-radio-ptt) {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 8px #0003;
}
.map-floating-controls button[aria-pressed]::after {
  content: '';
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 17px;
  height: 10px;
  border: 1px solid var(--card);
  border-radius: 10px;
  background: radial-gradient(circle at 4px 50%, white 2px, transparent 2.5px), #657581;
}
.map-floating-controls button[aria-pressed="true"]::after {
  background: radial-gradient(circle at 11px 50%, white 2px, transparent 2.5px), #148468;
}
.map-floating-controls button:is([aria-pressed="true"], [aria-expanded="true"]) {
  border-color: #268d76;
  color: #13836b;
}
.map-floating-controls svg, body.map-expanded #web-radio button svg {
  display: block;
  width: 24px;
  height: 24px;
  min-height: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#map-float-follow svg { width: 30px; }
#map-float-follow svg circle, #map-float-track svg circle { fill: var(--card); }
body.map-expanded:has(#web-radio:not([hidden])) #map-group-fallback,
body.map-expanded.native-map-dock #map-group-fallback { display: none; }
#map-group-panel {
  position: absolute;
  z-index: 4;
  bottom: 30px;
  left: max(12px, env(safe-area-inset-left));
  width: min(280px, calc(100% - 24px));
  max-height: 42%;
  overflow: auto;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 15px #0003;
}
#map-group-members { margin: 8px 0 0; padding: 0; list-style: none; }
#map-group-members li { padding: 4px 0; overflow-wrap: anywhere; }
#map-group-members .talking { color: #148468; font-weight: 700; }
#web-radio-ptt > svg { display: none; }
body.map-expanded #web-radio {
  grid-template-columns: 48px 68px 48px;
  justify-content: center;
  justify-items: center;
  align-items: center;
  column-gap: 14px;
}
body.map-expanded #web-radio-ptt {
  width: 66px;
  height: 66px;
  border-color: #86a9b9;
  background: #254c5d;
  color: white;
}
body.map-expanded #web-radio-ptt:disabled { opacity: .5; }
body.map-expanded #web-radio-ptt > svg { display: block; width: 29px; height: 29px; }
body.map-expanded #web-radio-ptt-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
body.map-expanded.group-receiving #web-radio-ptt { background: #137c67; border-color: #80d9bb; }
body.map-expanded #web-radio-ptt[data-transmit="pending"] { background: #9a6516; border-color: #ffcf72; }
body.map-expanded #web-radio-ptt:is(.emergency-armed, [data-transmit="active"]) { background: #b43861; border-color: #f5a1bb; }
body.map-expanded #web-map-mute[aria-pressed="true"] { background: #2d4654; color: #fff; }
#web-map-mute[aria-pressed="false"] .sound-slash,
#web-map-mute[aria-pressed="true"] .sound-waves { display: none; }

#map-expand, #map-touch-lock { border-radius: 50%; }
#map-expand > svg, #map-touch-lock > svg { width: 23px; height: 23px; min-height: 0; }

body.map-expanded #web-radio {
  grid-template-columns: 52px 116px 52px;
  column-gap: 16px;
  background: transparent;
  pointer-events: none;
}
body.map-expanded #web-radio > button { pointer-events: auto; }
body.map-expanded #web-radio-status {
  justify-self: center;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 3px 12px;
  border-radius: 20px;
  background: #062f41c9;
  color: white;
}
body.map-expanded :is(#web-map-group, #web-map-mute) {
  width: 52px;
  height: 52px;
  background: #062f41df;
  color: white;
}
body.map-expanded #web-radio-ptt {
  width: 116px;
  height: 116px;
  border: 14px solid #ffabbc66;
  border-radius: 50%;
  background: #fb627e;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px #ffcfdb44;
}
body.map-expanded #web-radio-ptt > svg { width: 38px; height: 38px; pointer-events: none; }
body.map-expanded #dashboard .map-view.map-expanded { bottom: 0; }
body.map-expanded #map-group-panel { bottom: calc(var(--web-radio-height, 160px) + 12px); }
body.map-expanded .leaflet-control-attribution { max-width: 100%; font-size: 9px; }

/* Shared floating-control palette, matching the approved map sample. */
#dashboard .map-view {
  --map-control-bg: rgb(6 47 65 / 86%);
  --map-control-border: rgb(185 225 234 / 48%);
  --map-control-on: #40e3a7;
}
#dashboard .map-view :is(#map-orientation, #map-expand, #map-touch-lock, .map-floating-controls button, .leaflet-control-zoom a),
body.map-expanded :is(#web-map-group, #web-map-mute) {
  background: var(--map-control-bg, rgb(6 47 65 / 86%));
  color: #fff;
  border: 1px solid var(--map-control-border, rgb(185 225 234 / 48%));
  box-shadow: 0 3px 10px #001e3040, inset 0 1px 0 #ffffff12;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
#dashboard .map-view :is(#map-orientation, #map-expand, #map-touch-lock, .map-floating-controls button)[aria-pressed="true"] {
  color: #fff;
  border-color: var(--map-control-on);
}
#dashboard .map-floating-controls button[aria-pressed]::after {
  border-color: #c9f6e6;
  background: radial-gradient(circle at 4px 50%, white 2px, transparent 2.5px), #526f79;
}
#dashboard .map-floating-controls button[aria-pressed="true"]::after {
  background: radial-gradient(circle at 11px 50%, #063e36 2px, transparent 2.5px), var(--map-control-on);
}
#dashboard :is(#map-float-follow, #map-float-track) svg circle { fill: #062f41; }
#dashboard #map-north-needle path:first-child { fill: #fff; }
#dashboard #map-north-needle path:nth-child(2) { fill: #ffffff59; }
#dashboard #map-orientation-status {
  background: rgb(6 47 65 / 78%);
  color: #fff;
}
body.map-expanded #web-map-mute[aria-pressed="true"] { color: #ffc4d2; border-color: #ffc4d2; }
/* Keep state colors above the idle pink halo rule. */
body.map-expanded.group-receiving #web-radio-ptt { background-color: #137c67; border-color: #80d9bb66; }
body.map-expanded #web-radio-ptt[data-transmit="pending"] { background-color: #9a6516; border-color: #ffcf7266; }
body.map-expanded #web-radio-ptt[data-transmit="active"] { background-color: #c63e64; border-color: #ffabbc80; }
body.map-expanded #web-radio-ptt.emergency-armed { background-color: #bc293c; border-color: #ff697c80; }

/* Readable ON/OFF badges from the approved sample. */
#dashboard .map-floating-controls :is(#map-float-follow, #map-float-track)::after {
  content: 'OFF';
  display: grid;
  place-items: center;
  right: -3px;
  bottom: -2px;
  width: 30px;
  height: 18px;
  box-sizing: border-box;
  border: 1px solid #d5dbdf;
  border-radius: 10px;
  background: #727b83;
  color: #fff;
  font: 700 10px/1 system-ui, sans-serif;
  letter-spacing: .2px;
  box-shadow: 0 2px 5px #001e3030;
  pointer-events: none;
}
#dashboard .map-floating-controls :is(#map-float-follow, #map-float-track)[aria-pressed="true"]::after {
  content: 'ON';
  background: #40e3a7;
  border-color: #b1f7db;
  color: #063e36;
}

/* One map control layout at both embedded and full-screen sizes. */
#dashboard .map-controls { display: none; }
#dashboard .map-view #map-orientation {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: auto;
  bottom: auto;
}
#dashboard .map-view #map-orientation-status {
  top: calc(max(12px, env(safe-area-inset-top)) + 11px);
  left: calc(max(12px, env(safe-area-inset-left)) + 54px);
  right: auto;
  bottom: auto;
  max-width: calc(100% - 178px);
}
#dashboard .map-view .leaflet-top.leaflet-left {
  top: calc(max(12px, env(safe-area-inset-top)) + 52px);
  left: auto;
  right: max(12px, env(safe-area-inset-right));
}
#dashboard .map-view .leaflet-top .leaflet-control-zoom { margin: 0; border: 0; box-shadow: none; }
#dashboard .map-view .leaflet-control-zoom a {
  width: 42px;
  height: 42px;
  margin-bottom: 7px;
  line-height: 40px;
  border-radius: 50% !important;
}
#dashboard .map-view .map-floating-controls {
  position: absolute;
  z-index: 3;
  top: calc(max(12px, env(safe-area-inset-top)) + 56px);
  left: max(12px, env(safe-area-inset-left));
  display: grid;
  gap: 8px;
}
#dashboard .map-view #map-status {
  top: auto;
  right: 12px;
  bottom: 30px;
}
#dashboard .map-view #map-group-panel {
  max-height: min(42%, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
#map-group-panel .map-member-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
}
#map-group-panel .map-member-choice[aria-pressed="true"] {
  background: #40e3a71f;
  font-weight: 700;
}
#map-group-panel .map-member-check { width: 18px; flex-shrink: 0; color: #148468; }
#map-group-panel .map-member-choice:disabled { opacity: .55; cursor: default; }
#map-group-panel .map-member-choice:focus-visible { outline: 2px solid #148468; outline-offset: -2px; }

/* Approved Inje full-course dotted track icon. */
#map-float-track > svg.map-inje-outline { width: 28.4px; height: 35px; transform: translate(-4px, -4px); }
#map-float-track .map-inje-outline path { stroke-width: 43.3; stroke-dasharray: 0.01 86.7; }

/* Emergency calls share the header menu's button reset and icon palette. */
:is(#web-emergency-call, #native-emergency-call) { --menu-accent: #ffb9c8; --menu-tint: #68394c; }
body > header .header-menu-panel :is(#web-emergency-call, #native-emergency-call) {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: #e4f0f6;
  box-shadow: none;
  text-align: left;
}
body > header .header-menu-panel :is(#web-emergency-call, #native-emergency-call):hover { background: #ffffff15; }
:is(#web-emergency-call, #native-emergency-call) .menu-icon { font-size: 24px; font-weight: 800; }

/* The same floating radio controls in normal and full-screen views. */
body #web-radio {
  grid-template-columns: 52px 116px 52px;
  justify-content: center;
  justify-items: center;
  align-items: center;
  column-gap: 16px;
  background: transparent;
  pointer-events: none;
}
body #web-radio > button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
}
body #web-radio-status {
  justify-self: center;
  width: max-content;
  max-width: min(480px, calc(100vw - 24px));
  padding: 3px 12px;
  border-radius: 20px;
  background: #062f41c9;
  color: white;
  font-size: 14px;
}
body :is(#web-map-group, #web-map-mute) {
  width: 52px;
  height: 52px;
  background: #062f41df;
  color: white;
  border: 1px solid #b9e1ea7a;
  box-shadow: 0 3px 10px #001e3040;
}
body #web-radio button svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body #web-radio-ptt {
  width: 116px;
  height: 116px;
  border: 14px solid #ffabbc66;
  background: #fb627e;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px #ffcfdb44;
  color: white;
}
body #web-radio-ptt > svg { width: 38px; height: 38px; pointer-events: none; }
body #web-radio-ptt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.group-receiving #web-radio-ptt { background-color: #137c67; border-color: #80d9bb66; }
body #web-radio-ptt[data-transmit="pending"] { background-color: #9a6516; border-color: #ffcf7266; }
body #web-radio-ptt[data-transmit="active"] { background-color: #c63e64; border-color: #ffabbc80; }
body #web-radio-ptt.emergency-armed { background-color: #bc293c; border-color: #ff697c80; }
body #web-radio-ptt:disabled { opacity: .5; }
body #web-map-mute[aria-pressed="true"] { color: #ffc4d2; border-color: #ffc4d2; }
body.odygo-native-radio:not(.map-expanded) { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
body.odygo-native-radio.map-expanded #map-group-panel { bottom: calc(190px + env(safe-area-inset-bottom)); }
body.native-map-dock #map-group-fallback { display: none; }

body:has(#web-radio-gear:not([hidden])) #web-radio-ptt { width: 116px; }
body #web-radio button svg { min-height: 0; }
body #web-radio #web-radio-ptt > svg { width: 38px; height: 38px; min-height: 0; }

/* Group list is opened from the bottom dock in the embedded map. */
#dashboard .map-view:not(.map-expanded) #map-group-fallback { display: none; }

/* North-up is a plain compass; heading-up adds a 60-degree green sector. */
#dashboard .map-view #map-orientation-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: transparent;
}
#dashboard #map-orientation::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  /* The night theme removes decorative backgrounds; this sector conveys heading mode. */
  background-image: conic-gradient(from -30deg, #40e3a780 0deg 60deg, transparent 60deg 360deg) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
#dashboard #map-orientation[aria-pressed="true"]::before { opacity: 1; }
#dashboard #map-orientation > svg { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  #dashboard #map-orientation::before { transition: none; }
}

/* Keep radio controls and their scroll clearance inside a real group dashboard. */
body:has(#dashboard[hidden]) #web-radio,
body:has(#dashboard[hidden]) #map-group-panel {
  display: none !important;
}
body:has(#dashboard[hidden]),
body.web-settings-open,
body.map-expanded {
  padding-bottom: 0 !important;
}
body:not(.web-settings-open):not(.map-expanded):has(#dashboard:not([hidden])):has(#web-radio:not([hidden])) {
  padding-bottom: calc(var(--web-radio-height, 168px) + 8px);
}
body.odygo-native-radio:not(.map-expanded):has(#dashboard:not([hidden])) {
  padding-bottom: calc(190px + env(safe-area-inset-bottom));
}

/* Match Safari's visible area after keyboard/address-bar viewport changes. */
body.map-expanded #dashboard .map-view.map-expanded {
  top: var(--expanded-top, 0px);
  left: var(--expanded-left, 0px);
  right: auto;
  bottom: auto;
  width: var(--expanded-width, 100%);
  height: var(--expanded-height, 100dvh);
}

/* Header radio action uses the same plain white treatment as adjacent actions. */
body #web-radio-gear,
body #web-radio-gear[data-enabled="false"] {
  background: transparent;
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}
body #web-radio-gear:hover { background: #ffffff12; }
body #web-radio-gear:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

body #web-radio-gear .web-radio-toggle-slash { display: none; }

/* PTT is a press control, including its halo and accessibility label on iOS. */
body #web-radio,
body #web-radio * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body #web-radio-ptt * { pointer-events: none; }

/* Reserve the radio overlap once, before the end of dashboard content. */
body:has(#dashboard:not([hidden])) { padding-bottom: 0 !important; }
body:has(#dashboard:not([hidden])) > .oz-copyright { display: none; }
body:not(.web-settings-open):not(.map-expanded):has(#dashboard:not([hidden])):has(#web-radio:not([hidden])) > main:not(#web-radio-settings) {
  padding-bottom: calc(var(--web-radio-height, 168px) + 12px);
}
body.odygo-native-radio:not(.web-settings-open):not(.map-expanded):has(#dashboard:not([hidden])) > main:not(#web-radio-settings) {
  padding-bottom: calc(190px + env(safe-area-inset-bottom) + 12px);
}

/* Settings checkboxes must not inherit the full-width text-input geometry. */
#web-radio-settings .web-settings-toggle {
 display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:0;cursor:pointer;
}
#web-radio-settings .web-settings-toggle > span {flex:1;min-width:0;}
#web-radio-settings .web-settings-toggle input[type="checkbox"] {
 appearance:auto;display:block;flex:0 0 20px;width:20px!important;max-width:20px;height:20px!important;min-height:20px!important;
 padding:0!important;margin:0!important;align-self:center;accent-color:var(--accent);cursor:pointer;
}
#web-radio-settings .web-settings-toggle + .note {margin:0;font-size:13px;line-height:1.6;}


/* One shared metadata row, inset from device corner masks. */
.map-view .map-footer-row{position:absolute;z-index:1050;bottom:12px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;gap:8px;height:22px;pointer-events:none}
.map-view .map-footer-row .leaflet-control{position:static!important;float:none!important;clear:none!important;margin:0!important;box-sizing:border-box;height:22px!important;min-height:0!important;min-width:0}
.map-view .map-footer-row .leaflet-control-scale{flex:0 0 auto}
.map-view .map-footer-row .leaflet-control-scale-line{box-sizing:border-box;display:flex;align-items:center;width:max-content!important;max-width:none;white-space:nowrap;height:22px;line-height:1;padding-top:0;padding-bottom:0;font-size:11px}
.map-view .map-footer-row .leaflet-control-attribution{flex:0 0 auto;pointer-events:auto!important;white-space:nowrap;font:9px/14px system-ui,sans-serif!important;padding:4px 6px!important;border-radius:8px}
.map-view .map-footer-row .leaflet-control-attribution a{pointer-events:auto!important}
@media(max-width:360px){.map-view .map-footer-row{left:28px;right:28px;gap:6px}.map-view .map-footer-row .leaflet-control-attribution{font-size:8px!important;padding-left:4px!important;padding-right:4px!important}.map-view .map-footer-row .leaflet-control-scale-line{font-size:10px}}

/* Approved web connection overlay; underlying UI remains mounted. */

html.odygo-connecting body>*:not(.odygo-connection):not(.odygo-title):not(script):not(style){pointer-events:none}

.odygo-connection{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,calc(100vw - 56px));box-sizing:border-box;padding:18px 14px 22px;background:#062f41;color:#fff;border-radius:24px;box-shadow:0 12px 40px #00182255;z-index:2147483000;transition:opacity 1.5s ease-in-out;outline:none;text-align:center;font-family:-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo',sans-serif}
.odygo-connection.fading{opacity:0}
.connection-animation{position:relative;height:140px}
.connection-message{display:flex;justify-content:center;align-items:center;gap:.125em;margin:8px 0 0;padding:4px 0;font-size:16px;line-height:28px;min-height:36px;animation:odygo-connection-pulse 2.8s ease-in-out infinite}
.connection-message span{display:inline-block;transform-origin:center}
.odygo-connection.failed .connection-message{display:block;animation:none;font-size:15px}
.connection-retry{margin-top:12px;border:0;border-radius:999px;background:#ffb703;color:#023047;padding:12px 30px;min-height:44px;font:600 16px/1.4 sans-serif}
.connection-retry[hidden]{display:none}
@keyframes odygo-connection-pulse{0%,100%{opacity:.4}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.connection-message{animation:none}.connection-message span{transform:none!important;color:white!important}}


body .odygo-connection:focus{outline:none!important;border:0!important;box-shadow:0 12px 40px #00182255!important}


/* Hide only legacy bootstrap UI; keep the live shell visible and sharp. */
html.odygo-connecting body>:not(#web-shell-root):not(.odygo-connection):not(.odygo-title):not(script):not(style):not(link){visibility:hidden!important;pointer-events:none!important}

/* 벡터 지도(MapLibre, 브랜치 claude/try-google-maps). 회전은 MapLibre가 하므로 지도 상자를 CSS로 돌리거나 키우지 않는다.
   #map#map: 웹 화면(web-shell.css)의 !important 규칙보다 우선하기 위한 선택자. */
html body.map-engine-maplibre #map#map { position: absolute !important; inset: 0 !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; transform: none !important; }
body.map-engine-maplibre #map .map-device-name > span { rotate: none; }
body.map-engine-maplibre #map .leaflet-tooltip.map-device-name { position: absolute; white-space: nowrap; }
body.map-engine-maplibre #map .odygo-dot { width: 18px; height: 18px; box-sizing: border-box; border: 2px solid #fff; border-radius: 50%; cursor: default; }
body.map-engine-maplibre #map .maplibregl-canvas { outline: none; }

/* 2026-11-25 이전 지도(Leaflet) 축소 시 동해·울릉도·독도 글자 */
.odygo-korea-label{background:none;border:0;white-space:nowrap;pointer-events:none}
.odygo-korea-label span{display:inline-block;transform:translate(-50%,-50%) rotate(calc(-1 * var(--map-angle, 0deg)));text-shadow:0 0 3px #fff,0 0 3px #fff,0 0 2px #fff}
.odygo-korea-sea span{color:#4d80b3;font:600 18px/1 -apple-system,'Apple SD Gothic Neo',sans-serif;letter-spacing:.4em}
.odygo-korea-isle span{color:#023047;font:700 13px/1 -apple-system,'Apple SD Gothic Neo',sans-serif}
[data-theme=dark] .odygo-korea-label span{text-shadow:0 0 3px #000,0 0 3px #000}
[data-theme=dark] .odygo-korea-isle span{color:#e7f1f5}
/* 2026-11-27 user request: while the map is locked, the attribution stays visible but ignores taps (PTT slips were opening the OSM link). Unlocking restores the link. */
.map-view.map-touch-locked .map-footer-row .leaflet-control-attribution,.map-view.map-touch-locked .map-footer-row .leaflet-control-attribution a{pointer-events:none!important}
/* 2026-12-02 사용자 "베이스 웹을 전체 화면으로 … 누구도 그 화면 안 보는데" → "웹 고치기 진행": 앱 안에서 그룹 화면이 지도 전체 화면으로 바뀌기 전의
   웹 브라우저용 배치(그룹 이름·남은 시간·작은 지도 카드)는 그리지 않는다. 지도 전체 화면은 app-boot.js가 바로 켠다. 웹 브라우저(앱 표시 없음)는 그대로. */
/* 같은 날 추가 사용자 "애플 앱 화면이 전환될 때 이 화면(웹 그룹 찾기 첫 화면)이 잠깐 나오는데 전혀 사용하지 않는 화면 아냐?": 앱은 대기실·그룹 찾기를
   앱 화면으로 그리므로, 앱 안에서는 지도 전체 화면이 아닌 웹 화면(그룹 찾기 첫 화면 포함)을 그리지 않는다. */
html.odygo-app-boot body:not(.map-expanded){visibility:hidden}

/* 2026-12-02 화면 전환 기준 '한 번에 한 장면': 웹 연결 카드는 실패(재시도) 때만 보인다. 연결 중 안내는 대기실 카드("그룹에 연결중입니다…"). */
.odygo-connection.quiet:not(.failed){visibility:hidden!important}
/* 2026-12-02 사용자 "웹 오픈할 때 까만색 → 하얀색 깜박하고 지도 나와… 아주 어색해", "까만 화면 → 기본 남한 지도 디졸브 → 다음 디졸브 이렇게 진행되어야": 시작 바탕을 밝은 회색 대신 검정(사파리 첫 화면과 이어짐). 대기실 지도는 그림을 받은 뒤 1.5초 페이드 인, 대기실 카드는 지도가 다 나타난 뒤 1.5초 페이드 인. 몸체 남색(2026-11-25 상태 표시줄 결정)은 연결 중에만 검정으로 덮는다. 연결 중 끼어들던 무전 대기 알림은 web-shell.js에서 장면 중에 옮기지 않는다. */
html.odygo-connecting.odygo-connecting,html.odygo-connecting.odygo-connecting body{background:#000!important}
#lobby-map{background:#000!important}
#lobby-map .leaflet-map-pane{opacity:0;transition:opacity 1.5s ease-in-out}
#lobby-map.tiles-ready .leaflet-map-pane{opacity:1}
#lobby-card{transition:opacity 1.5s ease-in-out}
html:not(.odygo-lobby-shown) #lobby-card{opacity:0;pointer-events:none}
/* 2026-12-03 사용자 "배경은 실행되도록 하고 흐리게만 하면 어때요? 페이드 인은 그대로… 누구와 함께할까요 카드가 선명하거나, 아니면 기존그룹으로 연결중입니다가 선명": 카드가 떠 있는 동안 뒤 지도만 흐리게 한다(카드·상단 바는 선명). 연결 카드가 사라질 때 흐림도 1.5초 동안 함께 풀린다. 지도 페이드 인은 그대로. */
#web-shell-root :is(#lobby-map,#shell-map-slot)::after{content:'';position:absolute;inset:0;z-index:1100;pointer-events:none;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);opacity:0;visibility:hidden;transition:opacity 1.5s ease-in-out,visibility 0s linear 1.5s}
html.odygo-connect-blur:not(.odygo-connection-fading) #web-shell-root :is(#lobby-map,#shell-map-slot)::after,#web-shell-root #app:has(#lobby-card:not([hidden]):not(:empty)) #lobby-map::after{opacity:1;visibility:visible;transition:opacity 1.5s ease-in-out,visibility 0s}
/* 같은 지시 + 사용자 "누구와 함께할까요가 먼저 뜨면서 지도가 배경에 깔리는 게 더 자연스러워요": 대기실 카드는 지도를 기다리지 않고 먼저 1.5초 페이드 인하고, 지도는 그림을 받는 대로 흐린 상태로 뒤에서 페이드 인한다. */
@keyframes odygo-lobby-card-in{from{opacity:0}to{opacity:1}}
html:not(.odygo-lobby-shown) #web-shell-root #lobby-card{opacity:1;pointer-events:auto;animation:odygo-lobby-card-in 1.5s ease-in-out}
/* 같은 날 사용자 "글자가 굵어지는 글자가 금색으로 물결치듯이": 연결중 문구를 굵게(600). 깜박임(odygo-connection-pulse)은 0.4 흐림에서 시작해 카드가 빨리 사라지면 글자가 희미하게만 보였으므로, 밝은 지점(50%)에서 시작하게만 바꾼다(주기·모양 그대로). */
.odygo-connection .connection-message{font-weight:600;animation-delay:-1.4s}
/* 2026-12-03 홈 화면 웹 앱 타이틀(brand-loading.js odygoMountTitle). 연결 중 숨김 규칙(html.odygo-connecting body>…)에서 .odygo-title은 뺀다 — 빠뜨려서 운영 첫 배포 때 타이틀이 연결이 끝난 뒤에야 보였다(사용자 지적). 바탕은 로고 바탕색 #023047, 로고·글씨 1초 디졸브로 나타나고 1.5초 디졸브로 사라진다. */
.odygo-title{position:fixed;inset:0;z-index:2147483600;background:#023047;color:#fff;font-family:-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo',sans-serif;transition:opacity 1.5s ease-in-out;pointer-events:auto}
.odygo-title.out{opacity:0;pointer-events:none}
.odygo-title-main{position:absolute;left:0;right:0;top:45%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;opacity:0;transition:opacity 1s ease-in-out}
.odygo-title-main img{width:140px;height:140px;display:block}
.odygo-title-main b{margin-top:10px;font-size:44px;font-weight:700;line-height:1.15;letter-spacing:0}
.odygo-title-main span{margin-top:14px;font-size:15px;color:#ffce6e}
.odygo-title-foot{position:absolute;left:0;right:0;bottom:calc(env(safe-area-inset-bottom) + 26px);display:flex;flex-direction:column;align-items:center;gap:6px;opacity:0;transition:opacity 1s ease-in-out}
.odygo-title-foot span{font-size:15px;font-weight:500;color:#cddce4}
.odygo-title-foot small{font-size:12.5px;color:#7896a5}
.odygo-title.in .odygo-title-main,.odygo-title.in .odygo-title-foot{opacity:1}
/* 2026-12-03 사용자 "지도먼저 로딩하고 지도로딩하면서 지도라이센스 아이콘도 같이 나와줘.. 까만데 하얀녀석이 먼저 아래에서 나오니 아주 어색해":
   지도 출처(저작권) 표시가 지도보다 먼저 보이지 않게 한다. 대기실 지도는 지도 그림과 같은 1.5초 디졸브, 그룹 지도(MapLibre)는 바탕 지도 준비(또는 빈 바탕 전환) 때 축척·출처 줄이 1.5초 디졸브로 나타난다. */
#lobby-map .leaflet-control-container{opacity:0;transition:opacity 1.5s ease-in-out}
#lobby-map.tiles-ready .leaflet-control-container{opacity:1}
body.map-engine-maplibre .map-view .map-footer-row{transition:opacity 1.5s ease-in-out}
body.map-engine-maplibre .map-view:not(.odygo-tiles-ready) .map-footer-row{opacity:0;visibility:hidden}
/* 2026-12-03 사용자 "살짝 남색에서 로고로 바뀌는 순간 깜박 합니다": 홈 화면 웹 앱은 iOS 남색 시작 그림 → 페이지 첫 그림으로 넘어갈 때 연결 중 검정 바탕(위 #000 규칙)이 먼저 한 번 그려질 수 있다.
   홈 화면 웹 앱(standalone)에서만 연결 중 바탕을 시작 그림·타이틀과 같은 #023047로. 브라우저 탭의 검정 시작은 그대로. */
/* 2026-12-03 이어서 사용자 "바탕색만 남색으로 맞추고, 타이틀은 지금처럼 홈 화면 웹 앱에만": 브라우저 탭도 시작 바탕(연결 중 html·body, 대기실 지도 바닥)을 검정 대신 #023047로. 위 2026-12-02 #000 규칙은 이력으로 남기고 이 규칙이 덮는다. */
html.odygo-connecting.odygo-connecting,html.odygo-connecting.odygo-connecting body{background:#023047!important}
#lobby-map{background:#023047!important}
/* 2026-12-03 사용자 "흰색 - 로고(황금색, 글씨는 남색) - 디졸브로 지도": iOS가 홈 화면 웹 앱 창을 흰색으로 열어 남색 시작 그림으로 바뀌는 동안·끝에 한 장 깜박임(녹화 분석) → 시작 그림·타이틀을 흰 바탕으로. 위 남색 타이틀 규칙은 이력으로 두고 이 규칙이 덮는다. 로고는 바탕 투명 금색(icons/startup/title-logo-512.png). 브라우저 탭 연결 중 남색 바탕은 그대로, 홈 화면 웹 앱만 흰색. */
.odygo-title{background:#fff;color:#023047}
.odygo-title-main span{color:#9a6b00}
.odygo-title-foot span{color:#3d5a6a}
.odygo-title-foot small{color:#8a9ba5}
@media (display-mode: standalone){html.odygo-connecting.odygo-connecting,html.odygo-connecting.odygo-connecting body{background:#fff!important}}
/* 2026-12-03 사용자 "초기 하얀 로고가 기대되는데 흐릿하게 위쪽 띠가 남색": 흰 타이틀이 보이는 동안(brand-loading.js가 html.odygo-title-up을 붙임)은 연결 중 남색 바탕(위 #023047 규칙)도 흰색. 타이틀이 다 사라진 뒤 클래스를 떼어 원래 바탕. */
html.odygo-title-up.odygo-title-up.odygo-title-up,html.odygo-title-up.odygo-title-up.odygo-title-up body{background:#fff!important}
