/* JARVIS — command centre (hud2).
   Sits on top of styles.css; everything is scoped to html.cc so
   More ▸ Classic layout switches straight back to the old screen.
   Desktop ≥1100px: a 12-column dashboard around the holographic Earth.
   Phone: Earth card on top, panels underneath, five tabs at the bottom. */

html.cc {
  --panel:   rgba(6, 18, 32, .64);
  --panel-2: rgba(10, 28, 48, .74);
  --edge:    rgba(var(--brand-rgb), .20);
  --edge-2:  rgba(var(--brand-rgb), .44);
  --ease:    cubic-bezier(.2, .8, .2, 1);
  --tab-h:   62px;
  --comp-h:  62px;
}
html.cc body[data-state="listening"] { --accent: #3dffd0; --accent-rgb: 61, 255, 208; }
html.cc body[data-state="uploading"],
html.cc body[data-state="thinking"]  { --accent: #7c9cff; --accent-rgb: 124, 156, 255; }
html.cc body[data-state="speaking"]  { --accent: #38d6ff; --accent-rgb: 56, 214, 255; }
html.cc body[data-state="error"]     { --accent: #ff8a3d; --accent-rgb: 255, 138, 61; }

/* ---------------------------------------------- classic layout (no .cc) */
html:not(.cc) .rail, html:not(.cc) .tabbar, html:not(.cc) .globe-wrap, html:not(.cc) .comms-head,
html:not(.cc) .bar-mid, html:not(.cc) .bar-voice, html:not(.cc) .bar-stats, html:not(.cc) .p,
html:not(.cc) .orbit-btns, html:not(.cc) .cam-big { display: none !important; }
html:not(.cc) main.cc, html:not(.cc) .dash { display: flex; flex-direction: column; flex: 1; min-height: 0; }
html:not(.cc) .core, html:not(.cc) .comms, html:not(.cc) .cards { display: contents; }
html:not(.cc) .tiles { order: -3; } html:not(.cc) .focus-banner { order: -2; } html:not(.cc) #stateBox { order: -1; }
html:not(.cc) .quick { order: 0; } html:not(.cc) .log { order: 1; } html:not(.cc) .composer { order: 2; } html:not(.cc) .controls { order: 3; }

/* ------------------------------------------------------------ shared bits */
html.cc .cards { display: none; }                 /* the old tiles: the panels replace them */
html.cc button { transition: transform .15s var(--ease), box-shadow .2s, border-color .2s, background-color .2s, color .2s, opacity .2s; }
html.cc button:not(:disabled):active { transform: scale(.96); }
html.cc .p {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  padding: 11px 13px; border: 1px solid var(--edge); border-radius: 14px;
  background: linear-gradient(170deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 1px 0 rgba(var(--brand-rgb), .08), 0 8px 30px rgba(0, 0, 0, .3);
  animation: pIn .5s var(--ease) both;
}
html.cc .p::after, html.cc .comms::after {
  content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb), .65), transparent);
}
@keyframes pIn { from { opacity: 0; transform: translateY(8px); } }
html.cc .p-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 18px; }
html.cc .p-head b { font: 700 11px/1 var(--hud-font); letter-spacing: .16em; color: var(--text); }
html.cc .p-badge { margin-left: auto; font: 700 9.5px/1 var(--hud-font); letter-spacing: .1em; color: var(--muted); }
html.cc .p-badge.live, html.cc .p-badge.on { color: var(--green); }
html.cc .p-badge.live::before, html.cc .p-badge.on::before, html.cc .p-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; vertical-align: -1px;
  background: var(--green); box-shadow: 0 0 8px var(--green); animation: hudBlink 2.6s ease-in-out infinite;
}
html.cc .p-badge.bad { color: var(--orange); }
html.cc .p-live { margin-left: auto; }
html.cc .p-live.off::before { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
html.cc .p-empty { margin: auto 0; color: var(--muted); font-size: 12.5px; text-align: center; }
@keyframes hudBlink { 50% { opacity: .35; } }
html.cc .mini-btn {
  height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--edge-2);
  background: rgba(var(--brand-rgb), .10); color: var(--cyan); font: 700 10px/1 var(--hud-font); letter-spacing: .08em;
}
html.cc .ch-btn { width: 30px; height: 30px; padding: 6px; border-radius: 9px; border: 1px solid var(--edge); background: rgba(2, 10, 18, .5); color: var(--cyan); flex: none; }
html.cc .ch-btn svg { width: 100%; height: 100%; }
@media (hover: hover) {
  html.cc .p:hover { border-color: rgba(var(--brand-rgb), .3); }
  html.cc .rail-btn:hover, html.cc .qa:hover, html.cc .tool:hover, html.cc .mini-btn:hover, html.cc .ch-btn:hover,
  html.cc .icon-btn:hover, html.cc .q-chip:hover, html.cc .ob:hover, html.cc .cam:hover, html.cc .mini-stat:hover {
    border-color: var(--edge-2); box-shadow: 0 0 16px rgba(var(--brand-rgb), .2);
  }
}

/* -------------------------------------------------------------- header */
html.cc .bar-mid, html.cc .bar-voice, html.cc .bar-stats { display: none; }
html.cc .bs { display: flex; align-items: center; gap: 7px; padding: 0 12px; border-left: 1px solid var(--edge); }
html.cc .bs:first-child { border-left: 0; }
html.cc .bs i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
html.cc .bs b { font: 700 10px/1 var(--hud-font); letter-spacing: .1em; color: var(--text); }
html.cc .bs small { font-size: 11px; color: var(--muted); }
html.cc .bs[data-up="1"] i { background: var(--green); box-shadow: 0 0 8px var(--green); }
html.cc .bs[data-up="1"] small { color: var(--green); }
html.cc .bs[data-up="0"] i { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
html.cc .bs[data-up="0"] small { color: var(--orange); }

/* -------------------------------------------------------------- the Earth */
html.cc .core { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; }
html.cc .globe-wrap { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; border-radius: 16px; overflow: hidden; }
html.cc .globe-wrap::before {          /* the glow pool under the planet */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 50% 48%, rgba(var(--accent-rgb), .13), transparent 72%);
  transition: background .5s;
}
html.cc .globe { position: absolute; inset: 0; }
html.cc .globe canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
html.cc .globe canvas:active { cursor: grabbing; }
html.cc .globe.nogl::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: min(46%, 46vh); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(var(--brand-rgb), .35), rgba(4, 20, 36, .9) 60%);
  box-shadow: 0 0 60px rgba(var(--brand-rgb), .35), inset 0 0 40px rgba(var(--brand-rgb), .4);
}
html.cc .globe-title {
  position: absolute; left: 0; right: 0; top: 8px; text-align: center; pointer-events: none; z-index: 1;
  font: 700 12px/1 var(--hud-font); letter-spacing: .5em; color: rgba(var(--brand-rgb), .85);
  text-shadow: 0 0 12px rgba(var(--brand-rgb), .6);
}
html.cc .proc-ring {
  position: absolute; left: 50%; top: 46%; height: 76%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.9); border-radius: 50%; pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease), transform .5s var(--ease);
}
html.cc .proc-ring i {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(var(--accent-rgb), .9) 98%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 1.6s linear infinite;
}
html.cc .proc-ring i + i { inset: 6%; animation-duration: 2.4s; animation-direction: reverse; opacity: .6; }
html.cc body[data-state="thinking"] .proc-ring,
html.cc body[data-state="uploading"] .proc-ring { opacity: 1; transform: translate(-50%, -50%) scale(1); }
html.cc .core-label {
  position: absolute; left: 0; right: 0; bottom: 40px; text-align: center; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
html.cc .core-label b { font: 800 13px/1 var(--hud-font); letter-spacing: .3em; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), .7); }
html.cc .core-label span { font-size: 11px; color: var(--muted); max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .core-label.swap b { animation: wordIn .35s var(--ease); }
@keyframes wordIn { from { opacity: 0; letter-spacing: .6em; } }
html.cc body[data-state="thinking"] .core-label b::after,
html.cc body[data-state="listening"] .core-label b::after,
html.cc body[data-state="speaking"] .core-label b::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
html.cc .wave { position: absolute; left: 50%; bottom: 8px; width: min(76%, 520px); height: 30px; transform: translateX(-50%); pointer-events: none; }
html.cc .globe-reset {
  position: absolute; right: 10px; top: 10px; z-index: 3; width: 32px; height: 32px; padding: 7px;
  border-radius: 10px; border: 1px solid var(--edge); background: var(--panel); color: var(--cyan);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
html.cc .globe-wrap.moved .globe-reset { opacity: 1; pointer-events: auto; }
html.cc .globe-reset svg { width: 100%; height: 100%; }
/* markers on the globe (family / places) */
html.cc .gmarks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
html.cc .gm {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center;
  transition: opacity .25s; will-change: transform;
}
html.cc .gm b {
  padding: 3px 8px; border-radius: 8px; border: 1px solid rgba(var(--brand-rgb), .6); background: rgba(2, 12, 22, .82);
  font: 700 10px/1.2 var(--hud-font); letter-spacing: .08em; color: #fff; white-space: nowrap;
  box-shadow: 0 0 14px rgba(var(--brand-rgb), .35); animation: gmIn .5s var(--ease) both;
}
html.cc .gm b small { display: block; font: 600 9.5px/1.2 var(--body-font); letter-spacing: 0; color: var(--muted); }
html.cc .gm::after { content: ""; width: 1px; height: 14px; background: linear-gradient(rgba(var(--brand-rgb), .9), transparent); }
html.cc .gm.hidden { opacity: 0; }
@keyframes gmIn { from { opacity: 0; transform: translateY(6px) scale(.9); } }
html.cc .orbit-btns { display: none; }

/* -------------------------------------------------------- panels: content */
/* home systems */
html.cc .gauges { display: flex; justify-content: space-around; gap: 6px; flex: 1 1 auto; min-height: 0; align-items: center; }
html.cc .gauge { position: relative; width: 31%; max-width: 104px; aspect-ratio: 1; display: grid; place-items: center; }
/* fit the rings to the height that's left (the Top story strip shares the panel) so they never spill onto the rooms */
html.cc .p-home .gauges { overflow: hidden; }
html.cc .p-home .gauge { width: auto; height: 100%; max-height: 104px; max-width: 31%; }
html.cc .gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
html.cc .gauge circle { fill: none; stroke-width: 7; }
html.cc .gauge .g-bg { stroke: rgba(var(--brand-rgb), .12); }
html.cc .gauge .g-fg { stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 0 264; filter: drop-shadow(0 0 4px rgba(var(--brand-rgb), .8));
                       transition: stroke-dasharray .9s var(--ease), stroke .4s; }
html.cc .gauge[data-level="warn"] .g-fg { stroke: var(--amber); }
html.cc .gauge[data-level="bad"] .g-fg { stroke: var(--red); }
html.cc .gauge b { font: 700 17px/1 var(--hud-font); color: var(--text); margin-top: -8px; }
html.cc .gauge span { position: absolute; bottom: 24%; font: 700 7.5px/1 var(--hud-font); letter-spacing: .14em; color: var(--muted); }
html.cc .minis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
html.cc .mini-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--edge); background: rgba(2, 10, 18, .45); color: var(--text); text-align: left; min-width: 0;
}
html.cc .mini-stat span { font: 700 8px/1 var(--hud-font); letter-spacing: .14em; color: var(--muted); }
html.cc .mini-stat b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html.cc .mini-stat b[data-level="warn"] { color: var(--amber); } html.cc .mini-stat b[data-level="bad"] { color: var(--orange); }
html.cc .mini-stat b[data-level="good"] { color: var(--green); }

/* weather */
html.cc .wx-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
html.cc .wx-ico { width: 64px; height: 52px; }
html.cc .wx-ico svg { width: 100%; height: 100%; stroke-width: 1.4; }
html.cc .wx-t { font: 600 34px/1 var(--hud-font); color: var(--text); text-shadow: 0 0 18px rgba(var(--brand-rgb), .35); }
html.cc .wx-c { font-size: 13px; color: var(--text); }
html.cc .wx-hl { font-size: 11.5px; color: var(--muted); }

/* family list */
html.cc .fam-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; }
html.cc .fam-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent;
  background: rgba(2, 10, 18, .4); color: var(--text); text-align: left; width: 100%; border-left: 3px solid var(--fc, var(--cyan));
}
html.cc .fam-row .av { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 15px;
  background: rgba(var(--brand-rgb), .12); border: 1px solid var(--fc, var(--edge-2)); }
html.cc .fam-row b { display: block; font-size: 13px; }
html.cc .fam-row small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .fam-row .fr-t { flex: 1; min-width: 0; }
html.cc .fam-row .fr-live { font: 700 8px/1 var(--hud-font); letter-spacing: .1em; color: var(--green); }
html.cc .fam-row .fr-live.old { color: var(--muted); }
html.cc .fam-share { display: flex; gap: 6px; margin-top: 8px; }
html.cc .fam-share select { height: 30px; flex: 0 0 auto; border-radius: 9px; border: 1px solid var(--edge); background: var(--field); color: var(--text); padding: 0 8px; font-size: 12px; }
html.cc .fam-share .mini-btn { flex: 1; }
html.cc .fam-share .mini-btn.on { color: var(--green); border-color: rgba(61, 220, 132, .5); background: rgba(61, 220, 132, .1); }

/* today */
html.cc .today-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
html.cc .td { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: start; padding: 6px 4px; border-bottom: 1px solid rgba(var(--brand-rgb), .08); }
html.cc .td:last-child { border-bottom: 0; }
html.cc .td time { font: 700 11px/1.3 var(--hud-font); color: var(--cyan); }
html.cc .td b { display: block; font-size: 13px; }
html.cc .td small { display: block; font-size: 11px; color: var(--muted); }
html.cc .td.later time { color: var(--muted); }

/* chat */
html.cc .comms {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  padding: 12px 14px 10px; border: 1px solid var(--edge-2); border-radius: 16px;
  background: linear-gradient(170deg, rgba(10, 30, 52, .78), rgba(4, 14, 26, .72));
  box-shadow: 0 0 40px rgba(var(--brand-rgb), .08), inset 0 0 30px rgba(var(--brand-rgb), .04);
}
html.cc .comms-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
html.cc .jr { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb), .8);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .55), inset 0 0 12px rgba(var(--accent-rgb), .45); }
html.cc .jr::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 2px dashed rgba(var(--accent-rgb), .8); animation: spin 8s linear infinite; }
html.cc .jr i { position: absolute; inset: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
html.cc body[data-state="speaking"] .jr i, html.cc body[data-state="listening"] .jr i { animation: corePulse .7s ease-in-out infinite alternate; }
html.cc .ch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
html.cc .ch-text b { font: 700 12px/1 var(--hud-font); letter-spacing: .3em; color: var(--cyan); }
html.cc .ch-text span { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .comms-head #btnReplay { width: 30px; height: 30px; min-width: 0; padding: 6px; border-radius: 9px; flex: none; }
html.cc .comms-head #btnReplay span { display: none; }
html.cc .comms-head #btnReplay svg { width: 100%; height: 100%; }
html.cc .log { flex: 1 1 auto; min-height: 0; scroll-behavior: smooth; margin: 0; }
html.cc .log:empty { display: flex; }
html.cc .log:empty::before {
  content: "Ask me anything \2014  build, plan, search, explain, or control."; display: block; margin: auto;
  color: var(--muted); font-size: 13.5px; text-align: center;
}
html.cc .msg { animation: msgIn .32s var(--ease) both; }
html.cc .msg.me { animation-name: msgInR; }
@keyframes msgIn  { from { opacity: 0; transform: translate(-10px, 6px); } }
@keyframes msgInR { from { opacity: 0; transform: translate(10px, 6px); } }
html.cc .msg.j { position: relative; padding-top: 22px; }
html.cc .msg.j::before { content: "JARVIS"; position: absolute; left: 12px; top: 7px; font: 700 8.5px/1 var(--hud-font); letter-spacing: .24em; color: var(--cyan); opacity: .8; }
html.cc .msg .md p { margin: 0 0 .55em; } html.cc .msg .md p:last-child { margin-bottom: 0; }
html.cc .msg .md ul, html.cc .msg .md ol { margin: .2em 0 .6em; padding-left: 1.3em; }
html.cc .msg .md li { margin: .15em 0; }
html.cc .msg .md h4 { margin: .5em 0 .35em; font: 700 12px/1.3 var(--hud-font); letter-spacing: .12em; color: var(--cyan); text-transform: uppercase; }
html.cc .msg .md code { font: 13px/1.4 ui-monospace, "SF Mono", Consolas, monospace; background: rgba(var(--brand-rgb), .10); padding: 1px 5px; border-radius: 5px; }
html.cc .msg .md a { color: var(--link); }
html.cc .msg .md .code { position: relative; margin: .5em 0; border: 1px solid var(--edge); border-radius: 10px; background: rgba(2, 8, 14, .85); overflow: hidden; }
html.cc .msg .md .code pre { margin: 0; padding: 30px 12px 12px; overflow-x: auto; }
html.cc .msg .md .code code { background: none; padding: 0; font-size: 12.5px; white-space: pre; }
html.cc .msg .md .code .lang { position: absolute; left: 10px; top: 7px; font: 700 8.5px/1 var(--hud-font); letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
html.cc .msg .md .code .copy { position: absolute; right: 6px; top: 5px; height: 22px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--edge); background: var(--panel-2); color: var(--cyan); font: 700 9px/1 var(--hud-font); letter-spacing: .12em; }
html.cc .msg .md .code .copy.done { color: var(--green); border-color: rgba(61, 220, 132, .5); }
html.cc .typing { display: inline-flex; gap: 4px; padding: 2px 0; }
html.cc .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typeDot 1.1s ease-in-out infinite; }
html.cc .typing i:nth-child(2) { animation-delay: .15s; } html.cc .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typeDot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* the composer: [look] [type…] [mic] [send] */
html.cc .composer { align-items: center; gap: 8px; padding: 8px 0 0; }
html.cc .composer input { height: 48px; border-color: var(--edge-2); background: rgba(2, 10, 18, .7); }
html.cc .composer input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14), 0 0 22px rgba(var(--accent-rgb), .12); }
html.cc .composer #btnCamera { width: 44px; height: 44px; min-width: 0; padding: 10px; border-radius: 50%; flex: none; }
html.cc .composer #btnCamera span { display: none; }
html.cc .composer #btnCamera svg { width: 100%; height: 100%; }
html.cc .composer .ptt { width: 52px; height: 52px; flex: none; }
html.cc .composer .ptt .r-ticks, html.cc .composer .ptt .r-thin { display: none; }
html.cc .composer .ptt-core { inset: 14%; }
html.cc .composer .ptt-text { display: none; }
html.cc .composer .ptt-mic { width: 20px; height: 20px; }
html.cc .comms .quick { margin: 8px 0 0; }

/* quick actions */
html.cc .p-quick { gap: 6px; padding: 10px; }
html.cc .qa {
  display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-height: 34px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--edge); background: rgba(2, 10, 18, .45); color: var(--text); font-size: 13px; font-weight: 600; text-align: left;
}
html.cc .qa svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
html.cc .qa-toggles { display: flex; gap: 6px; }
html.cc .qa-toggles .toggles { gap: 6px; width: 100%; }
html.cc .qa-toggles .pill { flex: 1; min-width: 0; height: 32px; padding: 0 8px; font-size: 11px; }

/* cameras */
html.cc .cams { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
html.cc .cam {
  position: relative; min-height: 0; padding: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--edge);
  background: #01060c; color: #fff; text-align: left;
}
html.cc .cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
html.cc .cam.live img { opacity: 1; }
html.cc .cam::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 6, 12, .85)); pointer-events: none; }
html.cc .cam-k, html.cc .cam-t { position: absolute; left: 8px; z-index: 1; }
html.cc .cam-k { bottom: 20px; font: 700 10.5px/1 var(--hud-font); letter-spacing: .1em; }
html.cc .cam-t { bottom: 7px; font-size: 10.5px; color: var(--green); }
html.cc .cam-t::before { content: "\25CF  "; }
html.cc .cam-off { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); z-index: 1; }
html.cc .cam.live .cam-off { display: none; }
html.cc .cam:not(.live) .cam-t { display: none; }
html.cc .cam.down .cam-off { color: var(--orange); }
html.cc .cam.glow { animation: camGlow 1.4s var(--ease); }
@keyframes camGlow { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .0); border-color: var(--green); } 30% { box-shadow: 0 0 22px rgba(61, 220, 132, .6); border-color: var(--green); } }
html.cc .cam-big { position: fixed; inset: 0; z-index: 30; background: rgba(0, 4, 10, .92); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 12px) 14px calc(var(--safe-b) + 12px); animation: sheetIn .26s var(--ease); }
html.cc .cam-big img { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 12px; border: 1px solid var(--edge-2); box-shadow: 0 0 40px rgba(var(--brand-rgb), .2); }
html.cc .cam-big-bar { display: flex; align-items: center; gap: 12px; padding-top: 10px; }
html.cc .cam-big-bar b { font: 700 14px/1 var(--hud-font); letter-spacing: .14em; color: var(--cyan); }
html.cc .cam-big-bar span { font-size: 12px; color: var(--green); margin-right: auto; }

/* family map */
html.cc .fmap { position: relative; flex: 1; min-height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--edge); background: #050b12; }
html.cc .fmap .leaflet-container { background: #050b12; font: inherit; }
html.cc .fmap .leaflet-control-attribution { background: rgba(2, 8, 14, .6); color: var(--muted); font-size: 8px; }
html.cc .fmap .leaflet-control-attribution a { color: var(--muted); }
html.cc .fmap .leaflet-control-zoom a { background: var(--panel-2); color: var(--cyan); border-color: var(--edge); }
html.cc .fmap-note { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; z-index: 500; text-align: center; font-size: 11.5px; color: var(--muted); pointer-events: none; }
html.cc .fpin { display: flex; flex-direction: column; align-items: center; }
html.cc .fpin i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 15px;
  background: rgba(2, 12, 22, .9); border: 2px solid var(--fc, var(--cyan)); box-shadow: 0 0 12px var(--fc, var(--cyan)); }
html.cc .fpin b { margin-top: 2px; padding: 1px 6px; border-radius: 6px; background: rgba(2, 12, 22, .85); font: 700 9px/1.4 var(--hud-font); letter-spacing: .06em; color: #fff; white-space: nowrap; }
html.cc .fpin.live i { animation: pinPulse 2s ease-out infinite; }
@keyframes pinPulse { 0% { box-shadow: 0 0 0 0 var(--fc, var(--cyan)); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* recent activity */
html.cc .act-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
html.cc .act { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid rgba(var(--brand-rgb), .08); animation: msgIn .3s var(--ease) both; }
html.cc .act:last-child { border-bottom: 0; }
html.cc .act .ai { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(var(--brand-rgb), .1); font-size: 13px; }
html.cc .act b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .act small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .act time { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* phone */
html.cc .ph-body { flex: 1; display: flex; align-items: center; gap: 14px; min-height: 0; }
html.cc .ph-orb { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--edge-2); background: radial-gradient(circle, rgba(var(--brand-rgb), .18), transparent 70%); color: var(--cyan); }
html.cc .ph-orb svg { width: 26px; height: 26px; }
html.cc .ph-orb i { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(var(--brand-rgb), .7); opacity: 0; }
html.cc .p-phone[data-call="ringing"] .ph-orb { color: var(--green); border-color: var(--green); animation: ring 1s ease-in-out infinite; }
html.cc .p-phone[data-call="ringing"] .ph-orb i { animation: phWave 1.8s ease-out infinite; border-color: var(--cyan); }
html.cc .p-phone[data-call="ringing"] .ph-orb i:nth-child(2) { animation-delay: .6s; }
html.cc .p-phone[data-call="ringing"] .ph-orb i:nth-child(3) { animation-delay: 1.2s; }
html.cc .p-phone[data-call="active"] .ph-orb { color: var(--green); border-color: var(--green); box-shadow: 0 0 22px rgba(61, 220, 132, .45); }
html.cc .p-phone[data-call="active"] .ph-orb i { animation: phWave 2.6s ease-out infinite; border-color: var(--green); }
html.cc .p-phone[data-call="off"] .ph-orb { color: var(--muted); border-color: var(--edge); }
html.cc .p-phone[data-call="ended"] .ph-orb { color: var(--muted); }
@keyframes phWave { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-10deg); } 20%, 40% { transform: rotate(10deg); } 50% { transform: rotate(0); } }
html.cc .ph-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
html.cc .ph-info b { font: 700 13px/1.2 var(--hud-font); letter-spacing: .14em; color: var(--text); }
html.cc .p-phone[data-call="ringing"] .ph-info b, html.cc .p-phone[data-call="active"] .ph-info b { color: var(--green); }
html.cc .ph-info span { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .ph-info .ph-timer { font: 700 15px/1 var(--hud-font); color: var(--cyan); }
html.cc .ph-info .ph-timer:empty { display: none; }
html.cc .ph-actions { display: flex; gap: 6px; margin-top: 8px; }
html.cc .ph-actions:empty { display: none; }
html.cc .ph-actions button { flex: 1; height: 34px; border-radius: 10px; border: 1px solid var(--edge-2); background: rgba(var(--brand-rgb), .1); color: var(--cyan); font: 700 10px/1 var(--hud-font); letter-spacing: .08em; }
html.cc .ph-actions .go { color: #04120a; background: var(--green); border-color: var(--green); box-shadow: 0 0 16px rgba(61, 220, 132, .45); }
html.cc .ph-actions .no { color: #fff; background: rgba(255, 92, 92, .85); border-color: var(--red); }
html.cc .ph-last { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.cc .ph-last:empty { display: none; }
html.cc .p-phone.slide .ph-info { animation: slideIn .4s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } }

/* tools sheets */
html.cc .tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
html.cc .tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1 / .92;
  padding: 10px 6px; border-radius: 16px; border: 1px solid var(--edge); background: linear-gradient(160deg, var(--panel-2), rgba(2, 8, 14, .85));
  color: var(--cyan); font: 700 10px/1.2 var(--hud-font); letter-spacing: .08em; text-transform: uppercase; text-align: center;
}
html.cc .tool svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), .6)); }
html.cc .tool span { color: var(--text); overflow-wrap: break-word; hyphens: manual; }

/* ========================================================== PHONE (default) */
html.cc .rail { display: none; }
html.cc body { padding-bottom: 0; }
html.cc main.cc { display: block; flex: 1; min-height: 0; position: relative; }
html.cc .dash {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(var(--tab-h) + var(--comp-h) + var(--safe-b) + 16px); scrollbar-width: none;
}
html.cc .dash::-webkit-scrollbar { display: none; }
html.cc .p { flex: none; }
html.cc .core { order: 0; flex: none; }
html.cc .globe-wrap { flex: none; height: min(40vh, 340px); border: 1px solid var(--edge); background: linear-gradient(170deg, var(--panel-2), var(--panel)); }
html.cc .orbit-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-top: 10px; }
html.cc .ob { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; color: var(--text); font-size: 12px; }
html.cc .ob svg { width: 52px; height: 52px; padding: 13px; border-radius: 50%; border: 1.5px solid var(--edge-2); color: var(--cyan);
  background: radial-gradient(circle, rgba(var(--brand-rgb), .16), rgba(2, 10, 18, .6)); box-shadow: 0 0 14px rgba(var(--brand-rgb), .2); }
html.cc .core .state { width: 100%; margin: 8px 0 0; }
html.cc body:not([data-state="error"]) .core .state:not(:has(#btnCancel:enabled)) { display: none; }
html.cc .controls { display: none; }
html.cc .p-fam { order: 1; } html.cc .p-phone { order: 2; } html.cc .p-quick { order: 3; } html.cc .p-cams { order: 4; }
html.cc .p-map { order: 5; } html.cc .p-home { order: 6; } html.cc .p-wx { order: 7; } html.cc .p-today { order: 8; } html.cc .p-act { order: 9; }
html.cc .p-quick { display: grid; grid-template-columns: 1fr 1fr; }
html.cc .p-quick .qa { min-height: 48px; }
html.cc .qa-toggles { grid-column: 1 / -1; }
html.cc .cams { height: 150px; flex: none; }
html.cc .fmap { height: 220px; flex: none; }
html.cc .gauges { padding: 6px 0; }
html.cc .p-wx .wx-body { flex-direction: row; justify-content: flex-start; gap: 14px; }
html.cc .fam-list, html.cc .today-list, html.cc .act-list { max-height: 260px; }
/* chat on the phone: home shows only the composer (fixed above the tabs) */
html.cc .comms { order: 10; position: fixed; left: 10px; right: 10px; z-index: 14; bottom: calc(var(--tab-h) + var(--safe-b) + 6px);
  padding: 0; border: 0; background: none; box-shadow: none; }
html.cc .comms::after { display: none; }
html.cc .comms .comms-head, html.cc .comms .log, html.cc .comms .quick, html.cc .comms .focus-banner { display: none; }
html.cc .comms .composer { padding: 0; }
/* the pinned chat bar gets its own frosted glass strip, so the cards scrolling
   underneath don't show through its buttons */
html.cc body:not([data-tab="chat"]) .comms::before {
  content: ""; position: absolute; inset: -8px -10px -6px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 8, 14, .55), rgba(2, 8, 14, .92) 40%);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-top: 1px solid rgba(var(--brand-rgb), .18);
}
/* phones: icon-only Fast + camera so the text box gets the room */
html.cc .composer .fast-btn { width: 44px; padding: 0; justify-content: center; font-size: 18px; border-radius: 50%; }
html.cc .composer .fast-btn span { display: none; }
html.cc .composer { gap: 6px; }
html.cc .composer input { padding: 0 12px; }
/* header: the version badge and the connection chip used to sit on top of each other */
@media (max-width: 430px) {
  html.cc .mk-badge { display: none; }
  html.cc #connText { display: none; }
  html.cc .conn { padding-right: 6px; }
}
/* the camera sheet's raw "Choose file" control, in JARVIS style */
input[type="file"]#camFile { color: var(--muted); font-size: 13px; max-width: 100%; }
input[type="file"]#camFile::file-selector-button {
  margin-right: 10px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(var(--brand-rgb), .45); background: rgba(var(--brand-rgb), .1); color: var(--cyan);
  font: 700 12px/1 var(--hud-font, system-ui); letter-spacing: .1em; text-transform: uppercase;
}
/* tab: chat */
html.cc body[data-tab="chat"] .dash > :not(.core):not(.comms) { display: none; }
html.cc body[data-tab="chat"] .globe-wrap { height: 26vh; }
html.cc body[data-tab="chat"] .orbit-btns { display: none; }
html.cc body[data-tab="chat"] .comms {
  position: static; display: flex; flex: 1 1 auto; min-height: 50vh; padding: 10px; border: 1px solid var(--edge-2);
  background: linear-gradient(170deg, rgba(10, 30, 52, .78), rgba(4, 14, 26, .72));
}
html.cc body[data-tab="chat"] .comms .log, html.cc body[data-tab="chat"] .comms .quick:not([hidden]) { display: flex; }
html.cc body[data-tab="chat"] .dash { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 10px); }
/* tab: voice */
html.cc body[data-tab="voice"] .dash > :not(.core) { display: none; }
html.cc body[data-tab="voice"] .core { flex: 1 1 auto; }
html.cc body[data-tab="voice"] .globe-wrap { flex: 1 1 auto; height: auto; min-height: 300px; }
html.cc body[data-tab="voice"] .orbit-btns { display: none; }
html.cc body[data-tab="voice"] .controls { display: flex; width: 100%; margin-top: 10px; }
html.cc body[data-tab="voice"] .ptt { width: 150px; height: 150px; }
html.cc body[data-tab="voice"] .dash { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 10px); }
/* typing on the phone: chat gets all the room above the keyboard */
html.cc body.kb .tabbar { display: none; }
html.cc body.kb .comms { bottom: 6px; }

html.cc .tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding: 6px 8px var(--safe-b);
  background: linear-gradient(180deg, rgba(4, 12, 22, .82), rgba(2, 6, 12, .97)); border-top: 1px solid var(--edge);
}
html.cc .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: none; color: var(--muted); font: 700 9px/1 var(--hud-font); letter-spacing: .1em; text-transform: uppercase; }
html.cc .tab svg { width: 22px; height: 22px; }
html.cc .tab.on { color: var(--cyan); }
html.cc .tab.on svg { filter: drop-shadow(0 0 7px rgba(var(--brand-rgb), .8)); }
html.cc .tab.on::before { content: ""; position: absolute; top: -6px; left: 28%; right: 28%; height: 2px; border-radius: 2px;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: tabIn .3s var(--ease); }
@keyframes tabIn { from { transform: scaleX(0); } }

/* ============================================================== DESKTOP */
@media (min-width: 1100px) {
  html.cc body { padding: 10px 14px 12px; }
  html.cc .tabbar { display: none; }
  html.cc .bar { gap: 14px; padding: 0 2px 10px; }
  html.cc .bar-mid { display: flex; flex-direction: column; gap: 4px; margin-left: 22px; }
  html.cc .bar-mid b { font: 700 24px/1 var(--hud-font); letter-spacing: .06em; color: var(--cyan); text-shadow: 0 0 14px rgba(var(--brand-rgb), .45); font-variant-numeric: tabular-nums; }
  html.cc .bar-mid span { font: 600 12px/1 var(--body-font); color: var(--muted); letter-spacing: .04em; }
  html.cc .bar-voice {
    display: flex; align-items: center; gap: 12px; flex: 1 1 auto; max-width: 520px; height: 46px; margin: 0 auto; padding: 0 16px 0 6px;
    border: 1px solid var(--edge-2); border-radius: 24px; background: rgba(4, 14, 26, .7); box-shadow: 0 0 20px rgba(var(--accent-rgb), .12);
  }
  html.cc .bv-mic { width: 34px; height: 34px; padding: 7px; border-radius: 50%; border: 1.5px solid rgba(var(--accent-rgb), .8); color: var(--accent); flex: none; }
  html.cc .bv-mic svg { width: 100%; height: 100%; }
  html.cc .bar-voice b { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; min-width: 92px; }
  html.cc .bar-voice canvas { flex: 1; height: 30px; min-width: 0; }
  html.cc .bar-stats { display: flex; align-items: center; height: 46px; padding: 0 4px; border: 1px solid var(--edge); border-radius: 14px; background: rgba(4, 14, 26, .6); }
  html.cc .bs { flex-direction: column; align-items: flex-start; gap: 3px; }
  html.cc .bs i { position: absolute; margin-left: -12px; margin-top: 2px; }
  html.cc .bs { position: relative; padding-left: 22px; }
  html.cc .bar-right { margin-left: 0; }
  html.cc .chips { display: none; }

  html.cc main.cc { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 12px; min-height: 0; }
  html.cc .rail {
    display: flex; flex-direction: column; gap: 2px; padding: 8px; overflow-y: auto; scrollbar-width: none;
    border: 1px solid var(--edge); border-radius: 16px; background: linear-gradient(170deg, var(--panel-2), var(--panel));
  }
  html.cc .rail-btn {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid transparent; border-radius: 11px;
    background: none; color: var(--muted); font: 600 13px/1 var(--body-font); text-align: left;
  }
  html.cc .rail-btn svg { width: 19px; height: 19px; flex: none; }
  html.cc .rail-btn:hover { color: var(--text); }
  html.cc .rail-btn.on { color: #fff; background: linear-gradient(90deg, rgba(var(--brand-rgb), .26), rgba(var(--brand-rgb), .06)); border-color: var(--edge-2); }
  html.cc .rail-btn.on svg { color: var(--cyan); filter: drop-shadow(0 0 7px rgba(var(--brand-rgb), .8)); }
  html.cc .rail-btn[data-go="set"] { margin-top: auto; }

  html.cc .dash {
    position: static; display: grid; gap: 12px; overflow: visible; padding: 0; min-height: 0;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(250px, 1.12fr) minmax(220px, 1fr) minmax(220px, .96fr);
    grid-template-areas:
      "home home home wx wx core core core fam fam today today"
      "chat chat chat chat chat chat chat chat chat quick quick quick"
      "cams cams cams map map map act act act phone phone phone";
  }
  html.cc .p-home { grid-area: home; } html.cc .p-wx { grid-area: wx; } html.cc .core { grid-area: core; }
  html.cc .p-fam { grid-area: fam; } html.cc .p-today { grid-area: today; } html.cc .comms { grid-area: chat; }
  html.cc .p-quick { grid-area: quick; display: flex; } html.cc .p-cams { grid-area: cams; } html.cc .p-map { grid-area: map; }
  html.cc .p-act { grid-area: act; } html.cc .p-phone { grid-area: phone; }
  html.cc .p, html.cc .core { order: 0; }
  html.cc .globe-wrap { flex: 1 1 auto; height: auto; border: 0; background: none; overflow: visible; }
  html.cc .orbit-btns { display: none; }
  html.cc .core .state { position: absolute; left: 4px; top: 4px; width: auto; max-width: 92%; margin: 0; z-index: 4; background: rgba(2, 10, 18, .8); }
  html.cc .p-wx .wx-body { flex-direction: column; }
  html.cc .cams, html.cc .fmap { height: auto; flex: 1 1 auto; }
  html.cc .fam-list, html.cc .today-list, html.cc .act-list { max-height: none; }

  html.cc .comms { position: relative; left: auto; right: auto; bottom: auto; padding: 12px 14px 10px;
    border: 1px solid var(--edge-2); background: linear-gradient(170deg, rgba(10, 30, 52, .78), rgba(4, 14, 26, .72)); }
  html.cc .comms::after { display: block; }
  html.cc .comms .comms-head, html.cc .comms .log { display: flex; }
  html.cc .comms .quick:not([hidden]) { display: flex; }
  html.cc .comms .focus-banner:not([hidden]) { display: block; }

  /* the chat, bigger (⤢): takes the bottom two rows */
  html.cc body.chatbig .dash { grid-template-areas:
      "home home home wx wx core core core fam fam today today"
      "chat chat chat chat chat chat chat chat chat quick quick quick"
      "chat chat chat chat chat chat chat chat chat quick quick quick"; }
  html.cc body.chatbig .p-cams, html.cc body.chatbig .p-map, html.cc body.chatbig .p-act, html.cc body.chatbig .p-phone { display: none; }

  html.cc .sheet {
    inset: 5vh max(4vw, calc(50vw - 440px)); border-radius: 20px; border: 1px solid var(--edge-2);
    box-shadow: 0 0 0 100vmax rgba(0, 4, 10, .55), 0 0 60px rgba(var(--brand-rgb), .18);
  }
  html.cc .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.cc .cam-big { padding: 4vh 6vw; }
}
@media (min-width: 1100px) and (max-width: 1499px) {
  html.cc main.cc { grid-template-columns: 64px minmax(0, 1fr); }
  html.cc .rail-btn { justify-content: center; padding: 10px 0; }
  html.cc .rail-btn span { display: none; }
  html.cc .bar-stats small { display: none; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  html.cc .dash { grid-template-rows: minmax(210px, 1.1fr) minmax(200px, 1fr) minmax(190px, .9fr); gap: 10px; }
  html.cc .gauge b { font-size: 14px; }
  html.cc .wx-t { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html.cc .proc-ring i, html.cc .p-badge::before, html.cc .jr::before { animation: none; }
  html.cc .msg, html.cc .p { animation: none; }
}

/* -------------------------------------------- fly-to caption + highlights */
html.cc .gcap {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 3; max-width: 92%;
  padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(var(--brand-rgb), .55); background: rgba(2, 12, 22, .78);
  font: 700 10px/1.3 var(--hud-font); letter-spacing: .14em; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 0 18px rgba(var(--brand-rgb), .3); pointer-events: none;
}
html.cc .gcap[hidden] { display: none; }
html.cc .gcap.in { animation: gcapIn .5s var(--ease); }
@keyframes gcapIn { from { opacity: 0; transform: translate(-50%, -6px); letter-spacing: .4em; } }
html.cc .globe-wrap.focused .globe-title { opacity: 0; }
html.cc .globe-title { transition: opacity .4s; }
html.cc .gm b { border-color: var(--mc, rgba(var(--brand-rgb), .6)); }
html.cc .p.flash, html.cc .comms.flash { animation: pFlash 1.3s var(--ease); }
@keyframes pFlash { 0%, 40% { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 30px rgba(var(--brand-rgb), .45); } }
html.cc .bs[data-up=""] i { background: var(--muted); box-shadow: none; }
html.cc .p-phone .ph-actions button:disabled { opacity: .6; }
html.cc .fam-row { cursor: pointer; }
/* the three switches in the chat header */
html.cc .comms-head .toggles { display: flex; gap: 6px; width: auto; margin: 0 0 0 auto; flex-wrap: nowrap; }
html.cc .comms-head .toggles .pill { height: 30px; padding: 0 10px; font-size: 11px; min-width: 0; white-space: nowrap; }
html.cc .comms-head .ch-text { min-width: 0; }
html.cc .comms .coach-card:not([hidden]) { margin: 6px 0; }
html.cc .qa-toggles:empty { display: none; }
@media (max-width: 1099px) { html.cc .comms-head .toggles { display: none; } }
html.cc .comms-head .ch-text { flex: 1 1 auto; min-width: 200px; }
html.cc .comms-head .toggles, html.cc .comms-head .toggles .pill { flex: none; }
@media (min-width: 1100px) {
  html.cc .p-quick { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px; }
  html.cc .p-quick .qa { min-height: 0; padding: 0 10px; font-size: 12.5px; }
}

/* ------------------------------------------------- world cams (Windy) */
html.cc .p-wcams[hidden] { display: none !important; }
html.cc .p-wcams { order: 0; animation: wcIn .5s var(--ease); border-color: var(--edge-2); }
@keyframes wcIn { from { opacity: 0; transform: translateX(18px) scale(.98); } }
html.cc .wc-list { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; }
html.cc .wc-list > :first-child { grid-row: 1 / 3; }
html.cc .wc-list .p-empty { grid-column: 1 / -1; grid-row: 1 / -1; align-self: center; }
html.cc .wc { position: relative; min-height: 0; padding: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--edge); background: #01060c; color: #fff; text-align: left; animation: msgIn .45s var(--ease) both; }
html.cc .wc:nth-child(2) { animation-delay: .08s; } html.cc .wc:nth-child(3) { animation-delay: .16s; }
html.cc .wc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.cc .wc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 6, 12, .9)); pointer-events: none; }
html.cc .wc-k, html.cc .wc-t { position: absolute; left: 8px; right: 8px; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .wc-k { bottom: 20px; font: 700 10.5px/1.2 var(--hud-font); letter-spacing: .06em; }
html.cc .wc-t { bottom: 6px; font-size: 10.5px; color: var(--muted); }
html.cc .wc .wc-live { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 2px 6px; border-radius: 6px; background: rgba(255, 92, 92, .9); font: 700 8.5px/1.3 var(--hud-font); letter-spacing: .1em; }
html.cc .wc-credit { margin-top: 6px; font-size: 10px; color: var(--muted); text-decoration: none; align-self: flex-end; }
html.cc .wc-credit:hover { color: var(--cyan); }
html.cc .wc-big iframe { flex: 1; min-height: 0; width: 100%; border: 1px solid var(--edge-2); border-radius: 12px; background: #000; }
/* phone: three cards you can swipe, right under the Earth */
html.cc .p-wcams .wc-list { grid-template-columns: repeat(3, 72%); grid-template-rows: 150px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
html.cc .p-wcams .wc-list > :first-child { grid-row: auto; }
html.cc .p-wcams .wc { scroll-snap-align: start; }
@media (min-width: 1100px) {
  html.cc .p-wcams { grid-row: 1; grid-column: 9 / 13; z-index: 5; background: linear-gradient(170deg, #0a1e34, #04101c); }
  html.cc .p-wcams .wc-list { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; overflow: visible; }
  html.cc .p-wcams .wc-list > :first-child { grid-row: 1 / 3; }
}
/* phone: a problem message when the chat isn't showing */
html.cc .hud-toast { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t, 0px) + 10px); z-index: 40;
  padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 138, 61, .7); background: rgba(40, 16, 4, .95);
  color: #ffe2cc; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: sheetIn .25s var(--ease); }
html.cc .hud-toast[hidden] { display: none; }
/* phone voice tab: the three switches under the big button */
@media (max-width: 1099px) { html.cc body[data-tab="voice"] .controls .toggles { display: flex; margin-top: 12px; } }

/* ------------------------------------------- the live world on the Earth */
html.cc .glayers {
  position: absolute; left: 50%; top: 26px; transform: translateX(-50%); z-index: 4; max-width: calc(100% - 96px);
  display: flex; gap: 5px; padding: 4px; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--edge); border-radius: 12px; background: rgba(2, 12, 22, .72); backdrop-filter: blur(6px);
}
html.cc .glayers::-webkit-scrollbar { display: none; }
html.cc .glayers button {
  flex: none; display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px;
  border: 1px solid transparent; background: none; color: var(--muted); font: 600 11px/1 var(--body-font); white-space: nowrap; cursor: pointer;
}
html.cc .glayers button i { font-style: normal; font-size: 13px; filter: grayscale(.8) opacity(.75); }
html.cc .glayers button:hover { color: var(--text); }
html.cc .glayers button.on { color: #fff; border-color: var(--edge-2); background: linear-gradient(180deg, rgba(var(--brand-rgb), .3), rgba(var(--brand-rgb), .08)); }
html.cc .glayers button.on i { filter: none; }
html.cc .glayers button[data-v], html.cc .glayers button[data-x] { border-left: 1px solid var(--edge); border-radius: 0 8px 8px 0; }
html.cc .glayers button[data-v].on, html.cc .glayers button[data-x].on { border-radius: 8px; }
/* a small Earth: icons only, names on hover */

html.cc .gstat {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 3; max-width: 94%;
  padding: 3px 10px; border-radius: 8px; background: rgba(2, 12, 22, .66); pointer-events: none;
  font: 600 10px/1.4 var(--body-font); letter-spacing: .02em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
html.cc .gstat[hidden] { display: none; }

html.cc .ginfo {
  position: absolute; right: 10px; top: 66px; z-index: 5; width: min(300px, calc(100% - 20px)); max-height: calc(100% - 140px); overflow-y: auto;
  padding: 12px 14px 10px; border-radius: 14px; border: 1px solid var(--edge-2);
  background: linear-gradient(170deg, rgba(10, 30, 52, .94), rgba(4, 14, 26, .94)); box-shadow: 0 0 28px rgba(var(--brand-rgb), .22);
  font-size: 12px; color: var(--text);
}
html.cc .ginfo[hidden] { display: none; }
html.cc .ginfo.in { animation: giIn .35s var(--ease); }
@keyframes giIn { from { opacity: 0; transform: translateY(-6px); } }
html.cc .ginfo .gx { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--edge); background: none; color: var(--muted); cursor: pointer; }
html.cc .ginfo .gi-k { font: 700 10px/1 var(--hud-font); letter-spacing: .2em; color: var(--cyan); text-transform: uppercase; margin-right: 30px; }
html.cc .ginfo .gi-t { display: block; margin: 6px 30px 8px 0; font-size: 15px; line-height: 1.25; color: #fff; }
html.cc .ginfo .gi-rows { display: grid; gap: 4px; }
html.cc .ginfo .gi-rows > div { display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid rgba(var(--brand-rgb), .1); padding-bottom: 3px; }
html.cc .ginfo .gi-rows span { color: var(--muted); flex: none; }
html.cc .ginfo .gi-rows b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
html.cc .ginfo .gi-about { margin: 8px 0 0; line-height: 1.45; color: var(--text); }
html.cc .ginfo .gi-about[hidden] { display: none; }
html.cc .ginfo .gi-src { margin-top: 8px; font-size: 10px; color: var(--muted); }
html.cc .ginfo a { color: var(--cyan); }

html.cc .glabels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
html.cc .gl {
  position: absolute; left: 0; top: 0; padding: 2px 6px; border-radius: 6px; white-space: nowrap;
  font: 600 10px/1.2 var(--body-font); color: #fff; background: rgba(2, 12, 22, .7); border: 1px solid rgba(var(--brand-rgb), .35);
  transition: opacity .25s;
}
html.cc .gl.off { opacity: 0; }
html.cc .gl.sat { border-color: rgba(255, 90, 209, .6); }
html.cc .gl.quake { border-color: rgba(255, 77, 109, .7); }
html.cc .gl.time { background: rgba(2, 12, 22, .5); border-color: rgba(var(--brand-rgb), .2); color: var(--muted); font-size: 9px; }
html.cc .gl.sel { border-color: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .4); }

/* The Earth is the middle of the dashboard (the Family list and the quick-action
   tiles are gone; the family map stays, with "Share my location" moved onto it). */
html.cc .p-fam, html.cc .p-quick { display: none !important; }
html.cc .p-map .fam-share { margin-top: 6px; flex: none; }
html.cc .p-map .fam-share select, html.cc .p-map .fam-share .mini-btn { height: 26px; }
html.cc .globe-wrap .gcap { top: 66px; }
@media (min-width: 1100px) {
  html.cc .dash, html.cc body .dash {
    grid-template-rows: minmax(170px, 1fr) minmax(150px, .8fr) minmax(160px, 1fr) minmax(190px, 1.05fr);
    grid-template-areas:
      "home  home  home  core core core core core core chat  chat  chat"
      "wx    wx    wx    core core core core core core chat  chat  chat"
      "today today today core core core core core core chat  chat  chat"
      "cams  cams  cams  map  map  map  act  act  act  phone phone phone";
  }
  /* the chat, bigger (⤢) */
  html.cc body.chatbig .dash { grid-template-areas:
      "home  home  home  core core core chat chat chat chat chat chat"
      "wx    wx    wx    core core core chat chat chat chat chat chat"
      "today today today core core core chat chat chat chat chat chat"
      "cams  cams  cams  map  map  map  chat chat chat chat chat chat"; }
  html.cc body.chatbig .p-cams, html.cc body.chatbig .p-map { display: flex; }
  html.cc body.chatbig .p-act, html.cc body.chatbig .p-phone { display: none; }
  /* ⛶ even bigger: the Earth takes three quarters of the top */
  html.cc body.earthbig .dash { grid-template-areas:
      "core core core core core core core core core chat  chat  chat"
      "core core core core core core core core core chat  chat  chat"
      "core core core core core core core core core chat  chat  chat"
      "cams cams cams map  map  map  act  act  act  phone phone phone"; }
  html.cc body.earthbig .p-home, html.cc body.earthbig .p-wx, html.cc body.earthbig .p-today { display: none; }
  /* world webcams pop up over the weather + today column (over the Earth's left side when it's big) */
  html.cc .p-wcams { grid-row: 2 / 4; grid-column: 1 / 4; position: relative; z-index: 6;
    background: linear-gradient(170deg, #0a1e34, #04101c); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
  html.cc body.earthbig .p-wcams { grid-row: 1 / 3; grid-column: 1 / 4; }
  html.cc .p-wx .wx-body { flex-direction: row; align-items: center; justify-content: center; gap: 18px; }
}
/* phone: the Earth card grows to most of the screen */
@media (max-width: 1099px) {
  html.cc body.earthbig .globe-wrap { height: 72vh; }
  html.cc .globe-wrap { height: min(52vh, 460px); }
  html.cc .glayers { top: 24px; gap: 3px; padding: 3px; }
  html.cc .glayers button { height: 30px; padding: 0 8px; font-size: 10px; }
  html.cc .glayers button:not(.on) span { display: none; }      /* icons only, names for the ones that are on */
  html.cc .ginfo { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 46%; padding: 10px 12px 8px; font-size: 11px; }
  html.cc .ginfo .gi-t { font-size: 14px; margin-bottom: 6px; }
  html.cc body.earthbig .ginfo { max-height: 40%; }
  html.cc .gstat { bottom: 66px; }
}
/* a narrower Earth: icons only, except for the layers that are on */
html.cc .globe-wrap { container-type: inline-size; }
@container (max-width: 780px) {
  html.cc .glayers button:not(.on) span { display: none; }
  html.cc .glayers button { padding: 0 8px; }
}

/* ------------------------------------------------ full screen (zoom out of the dashboard) */
html.cc body.has-full { overflow: hidden; }
html.cc .full-back { position: fixed; inset: 0; z-index: 69; display: none; background: rgba(0, 4, 10, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html.cc body.has-full .full-back { display: block; }
html.cc .full-ph { min-height: 0; border-radius: 16px; border: 1px dashed rgba(var(--brand-rgb), .12); }
html.cc .is-full {
  position: fixed !important; inset: 14px; z-index: 70; display: flex !important; flex-direction: column;
  margin: 0 !important; width: auto !important; height: auto !important; max-height: none !important;
  padding: 22px 26px 20px; border-radius: 22px; border: 1px solid var(--edge-2) !important; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(14, 42, 70, .97), rgba(4, 12, 22, .98) 70%) !important;
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .12), 0 30px 90px rgba(0, 0, 0, .6), 0 0 60px rgba(var(--brand-rgb), .16);
}
html.cc .full-x {
  display: none; position: absolute; top: 16px; right: 16px; z-index: 6; width: 40px; height: 40px; padding: 10px;
  border-radius: 50%; border: 1px solid var(--edge-2); background: rgba(4, 14, 26, .9); color: var(--cyan); cursor: pointer;
  transition: background .2s, transform .2s;
}
html.cc .full-x:hover { background: rgba(var(--brand-rgb), .2); transform: rotate(90deg); }
html.cc .full-x svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
html.cc .is-full > .full-x { display: block; }
html.cc .is-full > .p-head { padding-right: 56px; margin-bottom: 16px; }
html.cc .is-full > .p-head b { font-size: 16px; letter-spacing: .26em; }
html.cc .is-full.comms > .comms-head { padding-right: 52px; }

/* chat */
html.cc .comms.is-full .log, html.cc .comms.is-full .composer, html.cc .comms.is-full .focus-banner { width: 100%; max-width: 1100px; margin-left: auto; margin-right: auto; }
html.cc .comms.is-full .log { flex: 1 1 auto; min-height: 0; }
html.cc .comms.is-full .ch-text span { font-size: 20px; }
/* cameras */
html.cc .p-cams.is-full .cams { flex: 1 1 auto; height: auto; gap: 14px; }
html.cc .p-cams.is-full .cam { border-radius: 16px; }
html.cc .p-cams.is-full .cam-k { font-size: 16px; }
/* family map */
html.cc .p-map.is-full .fmap { flex: 1 1 auto; height: auto; min-height: 0; }
html.cc .p-map.is-full .fam-share { max-width: 520px; }
/* today */
html.cc .p-today.is-full .today-list { flex: 1 1 auto; max-height: none; overflow-y: auto; font-size: 16px; max-width: 900px; width: 100%; margin: 0 auto; }

/* the phone */
html.cc .ph-more { display: none; }
html.cc .p-phone.is-full {
  display: grid !important; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.35fr); column-gap: 36px;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  grid-template-areas: "head head" "body list" "acts list" "last list" "cfg list";
}
html.cc .p-phone.is-full > .p-head { grid-area: head; }
html.cc .p-phone.is-full .ph-body { grid-area: body; flex: none; gap: 26px; padding: 18px 0 8px; }
html.cc .p-phone.is-full .ph-actions { grid-area: acts; margin-top: 14px; }
html.cc .p-phone.is-full .ph-actions button { height: 50px; font-size: 13px; border-radius: 14px; }
html.cc .p-phone.is-full .ph-last { grid-area: last; font-size: 13px; margin-top: 14px; }
html.cc .p-phone.is-full .ph-orb { width: 132px; height: 132px; }
html.cc .p-phone.is-full .ph-orb svg { width: 50px; height: 50px; }
html.cc .p-phone.is-full .ph-info b { font-size: 24px; }
html.cc .p-phone.is-full .ph-info span { font-size: 17px; white-space: normal; }
html.cc .p-phone.is-full .ph-info .ph-timer { font-size: 26px; }
html.cc .p-phone.is-full .ph-more { display: contents; }
html.cc .phm-col { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
html.cc .p-phone.is-full .phm-col:first-child { grid-area: cfg; padding-top: 18px; border-top: 1px solid var(--edge); margin-top: 18px; overflow-y: auto; }
html.cc .p-phone.is-full .phm-list { grid-area: list; border-left: 1px solid var(--edge); padding-left: 30px; }
html.cc .phm-col h4 { margin: 4px 0 0; font: 700 11px/1 var(--hud-font); letter-spacing: .22em; color: var(--cyan); text-transform: uppercase; }
html.cc .phm-now { margin: 0; font-size: 15px; color: var(--text); line-height: 1.4; }
html.cc .phm-now.bad { color: var(--orange, #ff8a3d); }
html.cc .phm-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.cc .phm-pre { font-size: 14px; color: var(--muted); white-space: nowrap; }
html.cc .phm-row input, html.cc .phm-row select {
  height: 40px; border-radius: 11px; border: 1px solid var(--edge-2); background: rgba(2, 10, 18, .8); color: var(--text);
  padding: 0 12px; font: 500 15px/1 var(--body-font);
}
html.cc .phm-row input { flex: 1 1 180px; min-width: 0; }
html.cc .phm-row input:focus, html.cc .phm-row select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18); }
html.cc .phm-row label select { height: 34px; padding: 0 8px; margin: 0 4px; }
html.cc .phm-btn {
  height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--edge-2); background: rgba(var(--brand-rgb), .1);
  color: var(--cyan); font: 700 12px/1 var(--hud-font); letter-spacing: .08em; cursor: pointer;
}
html.cc .phm-btn:hover { background: rgba(var(--brand-rgb), .2); }
html.cc .phm-btn.go { color: #04120a; background: var(--green); border-color: var(--green); }
html.cc .phm-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
html.cc .phm-calls { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; }
html.cc .phm-call { padding: 12px 14px; border-radius: 13px; border: 1px solid var(--edge); background: rgba(4, 16, 28, .6); }
html.cc .phm-call.urgent { border-color: rgba(255, 92, 92, .6); }
html.cc .pc-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
html.cc .pc-top b { font-size: 15px; color: #fff; }
html.cc .pc-top span { font-size: 12px; color: var(--muted); white-space: nowrap; }
html.cc .pc-sum { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text); }
html.cc .pc-msg { margin: 4px 0 0; font-size: 13px; color: var(--cyan); font-style: italic; }
html.cc .pc-sum[hidden], html.cc .pc-msg[hidden] { display: none; }

/* phone-size screens: one column, scrolls */
@media (max-width: 1099px) {
  html.cc .is-full { inset: calc(var(--safe-t, 0px) + 8px) 8px calc(var(--safe-b, 0px) + 8px); padding: 18px 16px 14px; border-radius: 18px; }
  html.cc .full-x { top: 12px; right: 12px; }
  html.cc .p-phone.is-full { display: flex !important; overflow-y: auto; }
  html.cc .p-phone.is-full .ph-more { display: flex; flex-direction: column; gap: 18px; }
  html.cc .p-phone.is-full .phm-list { border-left: 0; padding-left: 0; }
  html.cc .p-phone.is-full .phm-col:first-child { overflow: visible; }
  html.cc .p-phone.is-full .ph-orb { width: 96px; height: 96px; }
  html.cc .p-cams.is-full .cams { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
}

/* app panels (living room, poop watch, focus, Minecraft, settings...) zoom open too */
@media (min-width: 1100px) {
  html.cc .sheet { inset: 3vh max(3vw, calc(50vw - 640px)); }
}
html.cc .sheet:not([hidden]) { animation: sheetZoom .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheetZoom { from { opacity: 0; transform: scale(.88); } }

/* the chat header: the switches get their own row when the chat is narrow */
html.cc .comms { container-type: inline-size; }
@container (max-width: 620px) {
  html.cc .comms-head { flex-wrap: wrap; row-gap: 10px; }
  html.cc .comms-head .toggles { order: 9; flex: 1 1 100% !important; margin: 0; }
  html.cc .comms-head .toggles .pill { flex: 1 1 0 !important; justify-content: center; padding: 0 6px; }
  html.cc .comms-head .ch-text { min-width: 0; flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) { html.cc .sheet:not([hidden]) { animation: none; } }
html.cc .comms.is-full #btnChatBig { display: none; }
html.cc .p-cams.is-full .cam { background: #000; }
html.cc .p-cams.is-full .cam img { object-fit: contain; }
html.cc .cam-tools { display: none; margin-left: 14px; height: 30px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--edge-2);
  background: rgba(var(--brand-rgb), .1); color: var(--cyan); font: 700 11px/1 var(--hud-font); letter-spacing: .08em; cursor: pointer; }
html.cc .p-cams.is-full .cam-tools { display: inline-block; }

/* family map: directions in Apple Maps / Google Maps */
html.cc .fpop-wrap .leaflet-popup-content-wrapper { background: rgba(6, 20, 36, .97); color: var(--text); border: 1px solid var(--edge-2); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
html.cc .fpop-wrap .leaflet-popup-tip { background: rgba(6, 20, 36, .97); border: 1px solid var(--edge-2); }
html.cc .fpop-wrap .leaflet-popup-content { margin: 12px 14px; font: 500 13px/1.35 var(--body-font); }
html.cc .fpop-wrap a.leaflet-popup-close-button { color: var(--muted); }
html.cc .fpop { display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
html.cc .fpop b { font-size: 15px; color: #fff; padding-right: 14px; }
html.cc .fpop span { font-size: 12px; color: var(--muted); }
html.cc .fdir-btns { display: flex; gap: 6px; margin-top: 8px; }
html.cc .leaflet-container a.fdir-btn, html.cc a.fdir-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--edge-2); background: rgba(var(--brand-rgb), .12); color: var(--cyan);
  font: 700 11.5px/1 var(--body-font); text-decoration: none; white-space: nowrap;
}
html.cc a.fdir-btn:hover { background: rgba(var(--brand-rgb), .24); }
html.cc a.fdir-btn.google { color: #8fd18f; border-color: rgba(120, 200, 120, .45); background: rgba(120, 200, 120, .1); }
html.cc a.fdir-btn svg { width: 14px; height: 14px; fill: currentColor; }
html.cc .fdir-strip { display: none; }
html.cc .p-map.is-full .fdir-strip:not([hidden]) { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
html.cc .fdir-row { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; min-width: 260px;
  padding: 10px 12px; border-radius: 13px; border: 1px solid var(--edge); border-left: 3px solid var(--fc); background: rgba(4, 16, 28, .7); }
html.cc .fdir-row b { font-size: 14px; color: #fff; }
html.cc .fdir-row span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cc .fdir-row .fdir-btns { grid-column: 1 / -1; }

/* JARVIS Scan: stands out a little (new) */
.rail-btn.rail-scan svg { stroke: #c07bff; filter: drop-shadow(0 0 5px rgba(192, 123, 255, .7)); }
.rail-btn.rail-scan span { color: #e2c9ff; }
.tile.tile-scan { border-color: rgba(192, 123, 255, .55); box-shadow: 0 0 14px rgba(192, 123, 255, .25); }

.tool.tool-scan { position: relative; border-color: rgba(192, 123, 255, .6); box-shadow: 0 0 16px rgba(192, 123, 255, .3); }
.tool.tool-scan svg { stroke: #c07bff; filter: drop-shadow(0 0 5px rgba(192, 123, 255, .8)); }
.tool .tool-new { position: absolute; top: 6px; right: 6px; font: 800 9px/1 system-ui; letter-spacing: .1em; font-style: normal;
  padding: 3px 5px; border-radius: 6px; background: linear-gradient(135deg, #2bc6ff, #9b6bff); color: #04101c; }
html.cc .phm-col h4.phm-gap { margin-top: 14px; }

html.cc .phm-book { border: 1px solid var(--edge); border-radius: 12px; padding: 8px 12px; background: rgba(4, 16, 28, .45); }
html.cc .phm-book summary { cursor: pointer; font: 700 11px/1.6 var(--hud-font); letter-spacing: .16em; color: var(--cyan); text-transform: uppercase; }
html.cc .phm-book[open] summary { margin-bottom: 8px; }
html.cc .phm-book .phm-row + .phm-row, html.cc .phm-book .phm-row + .phm-clist { margin-top: 8px; }
html.cc .phm-book input { flex: 1 1 140px; }
html.cc .phm-clist { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
html.cc .phm-crow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(var(--brand-rgb), .06); }
html.cc .phm-crow span { flex: 1; color: var(--text); font-size: 14px; }
html.cc .phm-crow small { color: var(--muted); font-size: 12px; }
html.cc .phm-crow.blocked span { color: var(--muted); text-decoration: line-through; }
html.cc .phm-x { border: 1px solid var(--edge-2); background: transparent; color: var(--muted); border-radius: 8px; height: 28px; min-width: 28px; padding: 0 8px; cursor: pointer; font-size: 12px; }
html.cc .phm-x[data-sure="1"] { color: #ff8a8a; border-color: rgba(255, 92, 92, .6); }
