/* Type: Sora for numbers and titles, Manrope for reading, Noto Sans SC for Chinese, JetBrains Mono for times.
   The bundled Oxanium / IBM Plex stay as offline fallbacks. */
:root {
  --font-display: "Sora", "Noto Sans SC", "Oxanium", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-ui: "Manrope", "Noto Sans SC", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: var(--font-ui);
}
:lang(zh-CN) body { --font-ui: "Noto Sans SC", "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .01em; }
body { font-feature-settings: "tnum" 1; }
.brand-name { font-family: "Sora", sans-serif; font-weight: 300; letter-spacing: .3em; }
.tl-v { font-family: "Sora", sans-serif; font-weight: 200; letter-spacing: .02em; }
.state-label { font-family: var(--font-display); font-weight: 300; letter-spacing: .14em; }
.cap-me { font-family: var(--font-display); font-weight: 300; }
.deck .tile-t, .cc-head h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: .01em; }
.cc-head h2 { font-weight: 400; }

/* Lemnix Command Center: module rail, module sheets, change bar, first minute.
   Same language as the HUD: near-black glass, warm-white text, champagne gold for what you can act on, ion blue for instruments,
   amber only for things that need a decision, red only for real problems. */

/* ---------- rail (re-uses the deck tiles) ---------- */
.glance .cc-collapse { display: none; }
.deck .tile.current { border-color: rgba(var(--gold-rgb), .7); background: linear-gradient(90deg, rgba(var(--gold-rgb), .12), rgba(10,12,24,.6) 60%); }
.deck .tile.current .tile-ic { stroke: var(--gold); }
.deck .cc-more .tile-s { color: var(--dust); }
@media (min-width: 1100px) and (min-height: 700px) {
  .view-immersive.cc-open .hud { padding-left: 270px; }
  .view-immersive.cc-open .dock { left: 270px; right: min(460px, 40vw); width: auto; } /* command bar stays clear of the rail and the sheet */
  .view-immersive .dock .deck { top: 250px; max-height: calc(100vh - 270px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 2px 2px 4px; }
  .view-immersive .dock .deck::-webkit-scrollbar { display: none; }
  .view-immersive .dock .deck .tile { min-height: 44px; padding: .34rem .75rem; }
  .glance .cc-collapse { display: inline-flex; align-self: flex-end; align-items: center; justify-content: center; width: 30px; min-height: 24px; height: 24px; padding: 0; border: 1px solid var(--hair); border-radius: 4px; background: transparent; color: var(--dust); cursor: pointer; backdrop-filter: none; }
  .cc-collapse svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
  .glance .cc-collapse:hover { color: var(--star); border-color: var(--hair-2); }
  .view-immersive .dock .deck.cc-collapsed { width: 50px; }
  .view-immersive .dock .deck.cc-collapsed .tile { grid-template-columns: 22px; padding: .34rem .6rem; }
  .view-immersive .dock .deck.cc-collapsed .tile-t, .view-immersive .dock .deck.cc-collapsed .tile-s { display: none; }
  .view-immersive .dock .deck.cc-collapsed .cc-collapse { align-self: center; }
  .view-immersive .dock .deck.cc-collapsed .cc-collapse svg { transform: rotate(180deg); }
}
@media (min-width: 1100px) and (min-height: 700px) and (max-height: 900px) {
  .view-immersive .dock .deck .tile-s { display: none; }
  .view-immersive .dock .deck .tile { min-height: 36px; }
}
@media (max-width: 600px) { .view-immersive .dock .deck { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- module sheet ---------- */
.cc-sheet { position: fixed; z-index: 30; top: 66px; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(10,12,26,.93), rgba(5,6,16,.95)); border-left: 1px solid rgba(var(--ion-rgb), .18);
  backdrop-filter: blur(22px) saturate(1.15); -webkit-backdrop-filter: blur(22px) saturate(1.15); box-shadow: -30px 0 80px rgba(0,0,0,.45);
  animation: ccIn .22s cubic-bezier(.2,.7,.2,1) both; color: var(--star); text-align: left; }
@keyframes ccIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.cc-sheet[hidden] { display: none; }
@media (min-width: 1100px) {
  .view-immersive.cc-open .hud { padding-right: min(460px, 40vw); transition: padding .25s; }
  .view-immersive.cc-open .tele .tl-b, .view-immersive.cc-open .tele .tl-d { display: none; } /* the sheet covers that side */
  .view-immersive.cc-open .tele .tl-c { display: none; } /* the sheet shows today's numbers; this block would sit on the disk */
}
.cc-head { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: 1.1rem 1.2rem .9rem; border-bottom: 1px solid rgba(var(--ion-rgb), .12); }
.cc-head h2 { font-family: var(--font-display, var(--font-ui)); font-weight: 400; font-size: 1.15rem; letter-spacing: .04em; outline: none; }
.cc-head-ic { width: 24px; height: 24px; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cc-sub { margin: .2rem 0 0; color: var(--dust); font-size: .84rem; line-height: 1.45; }
.cc-x { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--hair); background: transparent; color: var(--dust); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cc-x:hover { color: var(--star); border-color: var(--hair-2); }
.cc-body { flex: 1; overflow-y: auto; padding: .9rem 1.2rem 2rem; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(var(--ion-rgb), .25) transparent; }
.cc-sec { margin: 1.1rem 0 0; }
.cc-h3 { margin: 1.1rem 0 .45rem; font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(var(--ion-rgb), .8); }
:lang(zh-CN) .cc-h3 { letter-spacing: .12em; text-transform: none; font-size: .8rem; }
.cc-fine { display: block; margin: .25rem 0 0; color: var(--dust); font-size: .8rem; line-height: 1.45; }
.cc-conn { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px dashed var(--hair); }
.cc-empty { color: var(--dust); font-size: .9rem; padding: .6rem 0; }
.cc-k { color: var(--dust); font-size: .8rem; }
.gold { color: var(--gold); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn, #f0c674); }
.cc-sheet p { margin: .2rem 0 .4rem; }

/* rows (overview) */
.cc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; width: 100%; padding: .75rem .2rem; border: 0; border-bottom: 1px solid var(--hair); background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.cc-row:hover { background: rgba(var(--gold-rgb), .04); }
.cc-row .cc-v { text-align: right; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.cc-row strong { font-weight: 500; }
.cc-pad { padding: .2rem .2rem .5rem; }

/* stats */
.cc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.cc-stats > div { display: grid; gap: .1rem; padding: .6rem .7rem; border: 1px solid var(--hair); border-radius: 6px; background: rgba(var(--ion-rgb), .03); }
.cc-stats strong { font-family: var(--font-display, var(--font-ui)); font-weight: 300; font-size: 1.25rem; }

/* bars */
.cc-bar { display: block; height: 4px; border-radius: 2px; background: rgba(var(--star-rgb), .08); overflow: hidden; margin: .3rem 0; }
.cc-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(var(--gold-rgb), .6), var(--gold)); border-radius: 2px; }
.cc-bar.amber i { background: #ffb347; }
.cc-bar.red i { background: var(--flare); }
.cc-spark { display: block; width: 100%; height: 44px; }
.cc-spark rect { fill: rgba(var(--gold-rgb), .7); }

/* lists */
.cc-list { list-style: none; margin: 0; padding: 0; }
.cc-item { border-bottom: 1px solid var(--hair); }
.cc-item.sel { background: linear-gradient(90deg, rgba(var(--gold-rgb), .09), transparent 80%); box-shadow: inset 2px 0 0 var(--gold); }
.cc-item-main { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto; gap: .7rem; align-items: baseline; width: 100%; padding: .65rem .4rem; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.cc-item-main:hover { background: rgba(var(--star-rgb), .03); }
.cc-when { color: var(--dust); font-size: .8rem; white-space: nowrap; }
.cc-item.sel .cc-when { color: var(--gold); }
.cc-what { min-width: 0; overflow-wrap: anywhere; }
.cc-meta { display: block; color: var(--dust); font-size: .78rem; }
.cc-cd { color: rgba(var(--star-rgb), .55); font-size: .8rem; }
.cc-item.warn .cc-when { color: var(--warn, #f0c674); }
.cc-item-acts { padding: 0 .4rem .7rem 6.3rem; }
.cc-line { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto auto; gap: .6rem; align-items: baseline; padding: .5rem .2rem; border-bottom: 1px solid var(--hair); font-size: .9rem; }
.cc-link { border: 0; background: none; color: var(--dust); cursor: pointer; font-size: 1.05rem; padding: 0 .3rem; min-width: 28px; min-height: 28px; }
.cc-link:hover { color: var(--star); }
.cc-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.cc-cats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .8rem; font-size: .9rem; }
.cc-cats .cc-bar { grid-column: 1 / -1; margin: .1rem 0 .2rem; }

/* timeline */
.cc-tl { margin: .6rem 0 .8rem; }
.cc-tl-track { position: relative; height: 26px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgba(var(--ion-rgb), .07) 0 1px, transparent 1px calc(100% / 18)), rgba(var(--ion-rgb), .03); border: 1px solid rgba(var(--ion-rgb), .14); }
.cc-tl-b { position: absolute; top: 4px; bottom: 4px; min-width: 4px; border: 0; padding: 0; border-radius: 2px; background: rgba(var(--star-rgb), .55); cursor: pointer; }
.cc-tl-b.tick { width: 3px !important; background: rgba(var(--star-rgb), .8); }
.cc-tl-b.warn { background: #ffb347; }
.cc-tl-b.sel, .cc-tl-b:hover { background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb), .6); }
.cc-tl-ghost { position: absolute; top: 2px; bottom: 2px; min-width: 4px; border: 1px dashed var(--gold); border-radius: 3px; background: rgba(var(--gold-rgb), .12); pointer-events: none; }
.cc-tl-now { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--ion); box-shadow: 0 0 6px var(--ion); }
.cc-tl-h { position: relative; height: 1rem; margin-top: .2rem; font-family: var(--mono); font-size: .66rem; color: var(--dust); }
.cc-tl-h span { position: absolute; transform: translateX(-50%); }
.cc-tl-h span:first-child { transform: none; }

/* forms */
.cc-form, .cc-edit { display: grid; gap: .6rem; }
.cc-edit { padding: .6rem .6rem .8rem; margin: 0 0 .4rem; border: 1px solid rgba(var(--gold-rgb), .28); border-radius: 6px; background: rgba(var(--gold-rgb), .03); }
.cc-edit-title { margin: 0; }
.cc-field { display: grid; gap: .25rem; min-width: 0; }
.cc-field label, .cc-lbl { font-size: .78rem; color: var(--dust); }
.cc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cc-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
.cc-sheet input:not([type=checkbox]):not([type=radio]), .cc-sheet select, .cc-fr input:not([type=checkbox]):not([type=radio]), .cc-fr select {
  width: 100%; min-height: 40px; padding: .4rem .6rem; border-radius: 6px; border: 1px solid var(--hair-2); background: rgba(4,6,14,.8); color: var(--star); font: inherit; font-size: .92rem; color-scheme: dark; }
.cc-sheet input:focus-visible, .cc-sheet select:focus-visible, .cc-fr input:focus-visible, .cc-fr select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.cc-inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.cc-inline input { flex: 1 1 120px; width: auto !important; }
.cc-inline select { width: auto !important; }
.cc-preview { padding: .55rem .7rem; border-left: 2px solid var(--gold); background: rgba(var(--gold-rgb), .05); border-radius: 0 6px 6px 0; font-size: .9rem; }
.cc-preview p { margin: .15rem 0; }
.cc-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.cc-chip { min-height: 32px; padding: .2rem .65rem; border-radius: 5px; border: 1px solid var(--hair-2); background: rgba(255,255,255,.02); color: #c9cdd9; font: inherit; font-size: .82rem; cursor: pointer; }
.cc-chip:hover { border-color: rgba(var(--gold-rgb), .5); color: var(--star); }
.cc-chip.on, .cc-chip[aria-checked="true"], .cc-chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(var(--gold-rgb), .08); }
.cc-radio { display: inline-flex; gap: .35rem; align-items: center; font-size: .9rem; margin-right: .8rem; }
.cc-check { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; }
.cc-check input, .cc-radio input, .cc-switch input { accent-color: var(--gold); width: 18px; height: 18px; }
.cc-switch { display: inline-flex; gap: .5rem; align-items: center; min-height: 36px; cursor: pointer; margin-right: 1rem; font-size: .9rem; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.cc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .35rem .9rem; border-radius: 6px; border: 1px solid var(--hair-2); background: rgba(255,255,255,.03); color: var(--star); font: inherit; font-size: .88rem; cursor: pointer; }
.cc-btn:hover { border-color: rgba(var(--gold-rgb), .55); }
.cc-btn.primary { background: var(--gold); border-color: var(--gold); color: #140d02; font-weight: 600; }
.cc-btn.primary:hover { background: #ffd795; }
.cc-btn.primary[aria-disabled="true"] { opacity: .45; }
.cc-btn.ghost { background: transparent; border-color: transparent; color: var(--dust); }
.cc-btn.ghost:hover { color: var(--star); border-color: var(--hair-2); }
.cc-btn.danger { border-color: rgba(var(--flare-rgb), .5); color: #ffb3a6; }
.cc-file { position: relative; overflow: hidden; }
.cc-tag { display: inline-block; padding: 0 .4rem; border-radius: 3px; border: 1px solid var(--hair-2); font-size: .7rem; color: var(--dust); line-height: 1.5; }

/* goals */
.cc-goals { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .8rem; }
.cc-goal { padding: .8rem .9rem; border: 1px solid var(--hair); border-radius: 6px; background: rgba(var(--ion-rgb), .025); }
.cc-goal-h { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.cc-ms { list-style: none; margin: .4rem 0; padding: 0; }
.cc-ms li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .15rem 0; font-size: .9rem; }
.cc-ms input:checked + span { color: var(--dust); text-decoration: line-through; }
.cc-hz { padding: .6rem .7rem; border: 1px solid rgba(var(--gold-rgb), .3); border-radius: 6px; }

/* sentinels, journal, privacy */
.cc-sen { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--hair); }
.cc-sen > div:first-child { display: grid; gap: .05rem; min-width: 0; }
.cc-sen.paused strong { color: var(--dust); }
.cc-j { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .55rem 0; border-bottom: 1px solid var(--hair); font-size: .9rem; }
.cc-j-main { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.cc-j.undone .cc-j-main > span:first-child { color: var(--dust); text-decoration: line-through; }
.cc-j.bad { box-shadow: inset 2px 0 0 #ffb347; padding-left: .4rem; }
.cc-perm { width: 100%; border-collapse: collapse; margin: .4rem 0; }
.cc-perm th { text-align: left; font-weight: 400; font-size: .9rem; padding: .3rem .6rem .3rem 0; }
.cc-perm td { padding: .25rem 0; width: 55%; }
.cc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; background: var(--hair-2); }
.cc-dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.cc-status { font-size: 1rem; }

/* ---------- change bar ---------- */
.cc-toast { position: fixed; z-index: 40; left: 50%; bottom: 128px; transform: translate(-50%, 8px); display: flex; align-items: center; gap: .6rem; max-width: min(720px, calc(100vw - 24px));
  padding: .45rem .5rem .45rem .9rem; border-radius: 8px; border: 1px solid rgba(var(--gold-rgb), .4); background: rgba(8,9,20,.92); backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0,0,0,.55); opacity: 0; transition: opacity .2s, transform .2s; font-size: .9rem; }
.cc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.cc-toast[hidden] { display: none; }
.cc-toast-mark { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.cc-toast-mark.err { background: var(--flare); box-shadow: 0 0 10px var(--flare); }
.cc-toast-text { min-width: 0; flex: 1 1 auto; overflow-wrap: break-word; }
/* left:50% would cap the toast's natural width at half the screen; size it to its content up to the max instead */
.cc-toast { width: max-content; box-sizing: border-box; }
.cc-toast .cc-btn { flex: none; }
@media (max-width: 520px) { .cc-toast { width: calc(100vw - 24px); flex-wrap: wrap; } .cc-toast-text { flex-basis: calc(100% - 24px); } .cc-toast .cc-btn:first-of-type { margin-left: auto; } }
.cc-toast strong { font-weight: 500; }
.cc-arrow { color: var(--gold); font-family: var(--mono); font-size: .82rem; }
@media (min-width: 1100px) and (min-height: 700px) { .cc-open .cc-toast { left: calc(270px + (100vw - min(460px, 40vw) - 270px) / 2); max-width: calc(100vw - min(460px, 40vw) - 300px); } }

/* ---------- first minute ---------- */
.welcome.cc-first { width: min(480px, calc(100vw - 24px)); }
@media (min-width: 1000px) {
  .welcome.cc-first { margin: auto max(3vw, 24px) auto auto; }
  .welcome.cc-first::backdrop { background: linear-gradient(90deg, rgba(0,0,0,.15), rgba(0,0,0,.6)); }
}
.cc-fr { text-align: left; }
.cc-fr h2 { text-align: left; }
.cc-fr .wl-mark { display: block; margin: 0 0 .6rem; width: 150px; height: 54px; }
.cc-fr-opts { display: grid; gap: .5rem; margin: .8rem 0; }
.cc-fr-opt { display: grid; gap: .1rem; text-align: left; padding: .75rem .9rem; border-radius: 8px; border: 1px solid var(--hair-2); background: rgba(255,255,255,.02); color: var(--star); font: inherit; cursor: pointer; }
.cc-fr-opt:hover, .cc-fr-opt:focus-visible { border-color: var(--gold); background: rgba(var(--gold-rgb), .06); }
.cc-fr-opt strong { font-weight: 500; }
.cc-fr-opt span { color: var(--dust); font-size: .85rem; }
.cc-fr .cc-form { margin-top: .6rem; }

/* AI confirm card */
.cc-ai-card { border-color: rgba(255,179,71,.6) !important; }

body.cc-pointer { cursor: pointer; }

/* ---------- small screens: the sheet becomes a bottom panel ---------- */
@media (max-width: 760px) {
  .cc-sheet { top: auto; left: 0; width: 100%; height: min(80vh, 80dvh); border-left: 0; border-top: 1px solid rgba(var(--gold-rgb), .35); border-radius: 14px 14px 0 0; animation-name: ccUp; }
  @keyframes ccUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .cc-head { padding: .9rem 1rem .7rem; }
  .cc-body { padding: .7rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
  .cc-grid3 { grid-template-columns: 1fr 1fr; }
  .cc-stats strong { font-size: 1.05rem; }
  .cc-toast { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .cc-open .cc-toast { bottom: calc(min(80vh, 80dvh) + 10px); }
  .cc-item-acts { padding-left: .4rem; }
  .view-immersive.cc-open .dock { display: none; } /* one surface at a time on a phone; closing the sheet brings the command bar back */
  .cc-sheet { z-index: 35; }
}
@media (prefers-reduced-motion: reduce) { .cc-sheet, .cc-toast { animation: none; transition: none; } }
.motion-paused .cc-sheet { animation: none; }

/* the 3D scene couldn't run: say so plainly */
.scene-note { position: fixed; z-index: 25; left: 50%; top: 74px; transform: translateX(-50%); max-width: min(680px, calc(100vw - 24px)); padding: .55rem .9rem; border-radius: 8px;
  border: 1px solid rgba(255,179,71,.5); background: rgba(10,10,20,.92); color: var(--star); font-size: .88rem; line-height: 1.45; }
.scene-note[hidden] { display: none; }
.scene-note .fine { color: var(--dust); }

/* ---------- the dial: life modules in orbit around the core (wide screens) ---------- */
/* nav.cc-dial is the dial's own layer. body.cc-dial is only a flag ("dial mode is on"); this rule must never reach the
   body, or the whole page (top bar included) would stop taking clicks once the dial appears. */
nav.cc-dial { position: fixed; inset: 0; z-index: 11; pointer-events: none; }
/* Dial mode is a one-screen layout: the page itself never scrolls (panels, the drawer and sheets scroll inside themselves). */
html:has(body.cc-dial), body.cc-dial { height: 100%; overflow: hidden; }
/* the main area's bottom padding only reserves room under the floating dock; clip it to the window so nothing can
   scroll the scene out from under the dial (overflow: clip, unlike hidden, can't be scrolled even by script or focus) */
body.cc-dial main.hud { height: calc(100vh - 70px); height: calc(100dvh - 70px); overflow: clip; }
nav.cc-dial[hidden] { display: none; }
body.cc-dial .dock .deck { display: none; }
.cc-node { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: .6rem; padding: 0; border: 0; background: none; color: var(--star); cursor: pointer; pointer-events: auto; font: inherit; text-align: left;
  transform: var(--core) translate(-18px, -50%) scale(.6); opacity: 0; }
.cc-node.left { flex-direction: row-reverse; text-align: right; transform: var(--core) translate(calc(-100% + 18px), -50%) scale(.6); }
.cc-dial.in .cc-node { transform: var(--pos) translate(-18px, -50%); opacity: 1;
  transition: transform .9s cubic-bezier(.2,.75,.2,1) calc(var(--i) * 70ms), opacity .6s ease calc(var(--i) * 70ms); }
.cc-dial.in .cc-node.left { transform: var(--pos) translate(calc(-100% + 18px), -50%); }
.cc-dial.settled .cc-node { transition: opacity .3s; }
.cc-planet { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(var(--ion-rgb), .4); background: radial-gradient(circle at 35% 30%, rgba(var(--ion-rgb), .18), rgba(4,6,16,.88) 70%);
  box-shadow: 0 0 0 4px rgba(0,0,0,.25), 0 0 18px rgba(var(--ion-rgb), .12); transition: transform .2s, border-color .2s, box-shadow .2s; }
.cc-planet svg { width: 18px; height: 18px; fill: none; stroke: var(--ion); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cc-node.live .cc-planet { border-color: rgba(var(--gold-rgb), .85); box-shadow: 0 0 0 4px rgba(0,0,0,.25), 0 0 20px rgba(var(--gold-rgb), .35); }
.cc-node.live .cc-planet svg { stroke: var(--gold); }
.cc-nl { display: grid; gap: .05rem; padding: .28rem .6rem; border-radius: 8px; background: rgba(3,5,12,.58); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); max-width: 210px; }
.cc-nt { font-family: var(--font-display); font-weight: 500; font-size: .9rem; line-height: 1.25; white-space: nowrap; }
.cc-ns { font-size: .74rem; line-height: 1.3; color: var(--dust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-node.live .cc-ns { color: var(--gold); }
.cc-node:hover .cc-planet, .cc-node:focus-visible .cc-planet { transform: scale(1.14); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(0,0,0,.25), 0 0 26px rgba(var(--gold-rgb), .5); }
.cc-node:hover .cc-nl, .cc-node:focus-visible .cc-nl { background: rgba(10,10,22,.85); }
.cc-node:focus-visible { outline: none; }
.cc-node:focus-visible .cc-nl { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cc-dial.in .cc-node, .cc-planet { transition: none; } }

/* A reminder that rang or was missed must be seen: it sits under the top bar, above the scene, the dock and any sheet. */
.view-immersive .attention { position: fixed; z-index: 36; top: 76px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); margin: 0; pointer-events: none; }
.view-immersive .attention .att-card { pointer-events: auto; box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 40px rgba(var(--flare-rgb), .15); }
.att-card .att-text { flex: 1 1 12rem; font-weight: 500; }
/* Compact alert card: what + when on the left, actions on the right (below on narrow screens). */
.att-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem .75rem; }
.att-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .55rem; min-width: 0; }
.att-main .att-text { flex: 1 1 10rem; min-width: 0; }
.att-main .att-when { flex-basis: 100%; }
.att-acts { display: flex; gap: .4rem; justify-content: flex-end; }
.att-more { display: flex; justify-content: flex-end; gap: 1rem; pointer-events: auto; padding: 0 .4rem; font-size: .85rem; }
.view-immersive .attention .att-more { text-shadow: 0 1px 6px #000; }
@media (max-width: 520px) {
  .view-immersive .attention { top: 64px; }
  .att-card { grid-template-columns: 1fr; padding: .55rem .7rem; }
  .att-acts { justify-content: flex-start; }
  .att-acts .btn.small { padding: .3rem .7rem; }
}
/* Top bar: language, voice, motion and More. The dashboard layout stays available in Settings. */
.view-immersive #btn-view { display: none; }
/* The old panel drawer keeps what has no module of its own (conversation, protocols, lists, notes, settings).
   Reminders, sentinels and personal numbers now live in Orbit, Sentinels, Finance and Vital. */
.view-immersive #sec-reminders, .view-immersive #sec-sentinels, .view-immersive #sec-log { display: none; }
/* corner readouts */
.tele.warn-overlap #tele-net-s { color: #ffb347; }

/* ---------- Today: a line under the core ---------- */
.cc-today { width: min(760px, 100%); margin: 0 auto .6rem; padding: .45rem .7rem .3rem; border: 1px solid rgba(var(--ion-rgb), .16); border-radius: 10px; background: rgba(4,6,16,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: left; }
.cc-td-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .78rem; color: var(--dust); margin-bottom: .3rem; }
.cc-td-t { color: rgba(var(--ion-rgb), .85); letter-spacing: .04em; }
.cc-td-f { color: var(--star); font-family: var(--mono); font-size: .76rem; }
.cc-td-track { position: relative; height: 30px; border-radius: 5px; cursor: copy; touch-action: none;
  background: repeating-linear-gradient(90deg, rgba(var(--ion-rgb), .08) 0 1px, transparent 1px calc(100% / 18)), rgba(var(--ion-rgb), .035); }
.cc-td-b { position: absolute; top: 4px; bottom: 4px; min-width: 6px; padding: 0 .35rem; border: 1px solid rgba(var(--star-rgb), .35); border-radius: 4px; background: rgba(var(--star-rgb), .16); color: var(--star);
  font: 500 .7rem/20px var(--font-ui); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; transform: translateX(0); }
.cc-td-b span { pointer-events: none; }
.cc-td-b.tick { width: 4px; padding: 0; margin-left: -2px; background: var(--star); border: 0; }
.cc-td-b.tick span { display: none; }
.cc-td-b.warn { border-color: #ffb347; background: rgba(255,179,71,.18); }
.cc-td-b.sel, .cc-td-b:hover, .cc-td-b:focus-visible { border-color: var(--gold); background: rgba(var(--gold-rgb), .25); outline: none; }
.cc-td-b.tick.sel, .cc-td-b.tick:hover { background: var(--gold); }
.cc-td-b:active { cursor: grabbing; }
.cc-td-now { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ion); box-shadow: 0 0 8px var(--ion); pointer-events: none; }
.cc-td-ghost { position: absolute; top: -18px; transform: translateX(-50%); padding: 0 .3rem; border-radius: 3px; background: var(--gold); color: #140d02; font: 600 .7rem/16px var(--mono); pointer-events: none; }
.cc-td-ghost::after { content: ""; position: absolute; left: 50%; top: 16px; width: 2px; height: 30px; margin-left: -1px; background: var(--gold); }
.cc-td-h { position: relative; height: .95rem; font: .62rem/1 var(--mono); color: var(--dust); margin-top: .2rem; }
.cc-td-h span { position: absolute; transform: translateX(-50%); }
.cc-td-h span:first-child { transform: none; } .cc-td-h span:last-child { transform: translateX(-100%); }
.cc-td-empty { margin: .25rem 0 0; font-size: .74rem; color: var(--dust); }
.view-immersive.has-answer .cc-today { display: none; }
.view-dashboard .cc-today { display: none; }
@media (max-width: 600px) { .cc-today { display: none; } }
@media (max-height: 700px) { .cc-today .cc-td-h, .cc-today .cc-td-empty { display: none; } }

/* ---------- command suggestions ---------- */
.cc-suggest { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; margin: 0; padding: .3rem; list-style: none; border-radius: 8px; border: 1px solid rgba(var(--ion-rgb), .25);
  background: rgba(6,8,20,.97); box-shadow: 0 -16px 40px rgba(0,0,0,.5); text-align: left; }
.cc-suggest[hidden] { display: none; }
.cc-suggest li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem .6rem; border-radius: 5px; cursor: pointer; font-size: .92rem; }
.cc-suggest li:hover, .cc-suggest li[aria-selected="true"] { background: rgba(var(--gold-rgb), .12); }

/* ---------- frame rate ---------- */
.cc-fps { position: fixed; z-index: 45; right: max(12px, env(safe-area-inset-right, 0px)); top: 70px; padding: .2rem .5rem; border-radius: 4px; background: rgba(0,0,0,.7); border: 1px solid rgba(var(--ion-rgb), .3); color: var(--ion); font: 500 .72rem/1.4 var(--mono); pointer-events: none; }
.cc-fps[hidden] { display: none; }

/* ---------- phone: four modules and More ---------- */
.deck .cc-phmore { display: none; }
@media (max-width: 600px) {
  .view-immersive .dock .deck .cc-phmore { display: flex; }
  .view-immersive .dock .deck:not(.cc-phone-all) .tile:not([data-cc-open="orbit"]):not([data-cc-open="finance"]):not([data-cc-open="vital"]):not([data-cc-open="logbook"]):not(.cc-phmore) { display: none; }
  .view-immersive .dock .deck.cc-phone-all .cc-phmore { order: 99; }
}

/* room for the Today line under the core */
@media (min-width: 601px) { body.view-immersive:not(.has-answer) .core { padding-bottom: 300px; } }
@media (min-width: 601px) and (max-height: 760px) { body.view-immersive:not(.has-answer) .core { padding-bottom: 270px; } .cc-td-track { height: 24px; } }
.cc-td-empty { font-family: var(--font-ui); color: var(--dust); }

/* Privacy policy / terms dialog: readable length, scrolls inside, sits above the first-run screen */
.legal-dlg { width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 86dvh); padding: 0; overflow: hidden; }
.legal-dlg .dlg-form { display: flex; flex-direction: column; max-height: min(86vh, 86dvh); padding: 1.2rem 1.3rem 1rem; box-sizing: border-box; }
.legal-dlg .legal-body { overflow-y: auto; outline: none; min-height: 0; flex: 1 1 auto; padding-right: .4rem; line-height: 1.55; text-align: left; }
.legal-dlg .legal-body h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .3rem; }
.legal-dlg .legal-body h3:first-child { margin-top: .2rem; }
.legal-dlg .legal-body p { margin: 0 0 .4rem; font-size: .9rem; }
.legal-dlg .dlg-actions { padding-top: .8rem; }
.wl-legal { margin: .9rem 0 0; font-size: .78rem; opacity: .75; text-align: center; }
.wl-legal .link-btn { font-size: inherit; padding: 0; }

/* Finance: currency picker under the heading */
.cc-cur { display: flex; align-items: center; gap: .6rem; margin: 0 0 .6rem; }
.cc-cur label { margin: 0; }
.cc-cur select { width: auto; min-width: 6rem; }

/* ---------- Lemnix Pro ---------- */
.pro-chip { border-color: rgba(var(--gold-rgb), .55) !important; color: var(--gold) !important; }
.pro-chip.on { color: var(--star, #e9ecf5) !important; border-color: rgba(var(--gold-rgb), .3) !important; }
.pro-dlg { width: min(860px, calc(100vw - 20px)); max-height: min(92vh, 92dvh); padding: 0; overflow: auto; border: 1px solid rgba(var(--gold-rgb), .35); border-radius: 18px;
  background: linear-gradient(180deg, rgba(12,13,26,.98), rgba(5,6,14,.98)); color: var(--star, #e9ecf5); }
.pro-dlg::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
.pro-wrap { padding: 1.3rem 1.5rem 1.1rem; text-align: left; }
.pro-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.pro-head h2 { margin: 0; font-weight: 400; font-size: 1.5rem; letter-spacing: .03em; }
.pro-tag { color: var(--gold); font-weight: 600; }
.pro-x { background: none; border: 0; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .7; }
.pro-lede { margin: .2rem 0 .7rem; opacity: .85; }
.pro-list { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .93rem; }
.pro-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: .4rem 0 .9rem; }
.pro-plan { position: relative; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 1rem .9rem .8rem; display: flex; flex-direction: column; gap: .35rem; background: rgba(255,255,255,.02); }
.pro-plan.hot { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .35), 0 10px 40px rgba(var(--gold-rgb), .12); background: rgba(var(--gold-rgb), .05); }
.pro-plan.full { opacity: .55; }
.pro-ribbon { position: absolute; top: -.7rem; left: .9rem; background: var(--gold); color: #140d02; font-weight: 600; font-size: .72rem; padding: .12rem .5rem; border-radius: 999px; }
.pro-pname { margin: 0; font-weight: 600; }
.pro-price { margin: 0; font-size: 1.9rem; font-weight: 500; }
.pro-price span { font-size: .85rem; opacity: .7; margin-left: .25rem; font-weight: 400; }
.pro-note { margin: 0; font-size: .85rem; opacity: .85; }
.pro-spots { margin: 0; font-size: .8rem; color: var(--gold); font-weight: 600; }
.pro-plan .btn { margin-top: auto; }
.pro-renew { margin: .2rem 0 0; font-size: .72rem; opacity: .6; }
.pro-trust { margin: 0 0 .5rem; font-size: .82rem; opacity: .85; text-align: center; }
.pro-fine, .pro-legal { font-size: .78rem; opacity: .7; margin: .3rem 0 0; }
.pro-legal .link-btn, .pro-fine .link-btn { font-size: inherit; padding: 0; }
.pro-msg { margin: .5rem 0 0; padding: .5rem .7rem; border-radius: 8px; background: rgba(var(--gold-rgb), .1); border: 1px solid rgba(var(--gold-rgb), .3); font-size: .9rem; }
.pro-big { font-size: 1.25rem; margin: .4rem 0 .2rem; }
.pro-badge { font-size: .75rem; background: var(--gold); color: #140d02; padding: .1rem .45rem; border-radius: 999px; vertical-align: middle; }
.pro-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.pro-email input { width: 100%; box-sizing: border-box; margin-top: .6rem; }
.pro-email input.pro-code { font-size: 1.4rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .pro-plans { grid-template-columns: 1fr; } .pro-wrap { padding: 1rem; } .pro-plan.hot { order: -1; } }
.pro-renew { min-height: 2.6em; }
.pro-push { border: 1px solid rgba(var(--gold-rgb), .35); border-radius: 12px; padding: .8rem .9rem; margin: .8rem 0; background: rgba(var(--gold-rgb), .05); } .pro-push .pro-actions { margin-top: .5rem; }
