/* Evie — command-center look (HUD panels around a glowing AI core). */
:root {
  --bg: #030a17; --panel: #071428cc; --panel-solid: #081527; --row: #0b1d36; --line: #12395c; --line-hi: #1d6f9c;
  --cyan: #38d9ff; --cyan-dim: #1b84ad; --text: #dcf3ff; --muted: #7498b4; --warn: #ff8a5c; --ok: #3dffa8; --violet: #a78bfa;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background:
    radial-gradient(900px 520px at 50% 18%, #0c3358 0%, transparent 62%),
    linear-gradient(#0a2a4a22 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, #0a2a4a22 1px, transparent 1px) 0 0 / 34px 100%,
    var(--bg);
  background-attachment: fixed;
  color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.link { background: none; border: 0; color: var(--cyan); padding: 0; font-size: 12px; letter-spacing: .04em; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 13px; margin: 0; }
.err { color: var(--warn); font-size: 13px; min-height: 18px; margin: 0; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ---------- layout ---------- */
#app {
  height: 100dvh; display: grid; gap: 10px; padding: 10px; position: relative;
  grid-template-columns: 212px 268px minmax(0, 1fr) 300px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "side top top top" "side colL center right" "side bottom bottom bottom";
}
#side { grid-area: side; } #top { grid-area: top; } #colL { grid-area: colL; } #center { grid-area: center; } #right { grid-area: right; } #bottom { grid-area: bottom; }
.only-small { display: none; }

.card, #side, #top, #bottom {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: inset 0 0 24px #0a3a6026, 0 0 0 1px #00000040; backdrop-filter: blur(6px);
}
.card { padding: 12px; display: flex; flex-direction: column; min-height: 0; }
.card h3 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
.col .card { flex: 0 0 auto; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; background: var(--row); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; text-align: left; width: 100%; min-width: 0; }
button.row:hover { border-color: var(--line-hi); }
.row.on { border-color: var(--cyan); box-shadow: inset 0 0 14px #38d9ff22; }
.row .ic { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line-hi); font-size: 14px; }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx small.ok { color: var(--ok); } .row .tx small.warn { color: var(--warn); } .row .tx small.cy { color: var(--cyan); }
.row .tag { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; background: none; }
button.tag:hover { color: var(--warn); border-color: var(--warn); }
.empty { color: var(--muted); font-size: 12px; padding: 4px 2px; }
.count { font-size: 11px; color: var(--cyan); border: 1px solid var(--line-hi); border-radius: 999px; padding: 0 7px; letter-spacing: 0; }
.count:empty { display: none; }
.live { color: var(--ok); font-size: 10px; letter-spacing: .1em; }

/* ---------- sidebar ---------- */
#side { padding: 12px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.logo { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.logo b { display: block; letter-spacing: .3em; font-size: 16px; color: var(--cyan); }
.logo small { display: block; font-size: 9px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.logo-ring { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan), inset 0 0 8px var(--cyan); position: relative; }
.logo-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--cyan); }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 0; overflow-y: auto; }
.nav button { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 8px; padding: 9px 10px; text-align: left; font-size: 13.5px; color: #b9d6ea; }
.nav button i { font-style: normal; width: 18px; text-align: center; color: var(--cyan-dim); }
.nav button:hover { background: var(--row); }
.nav button.on { border-color: var(--line-hi); background: var(--row); color: var(--text); box-shadow: inset 2px 0 0 var(--cyan); }
.nav .count { margin-left: auto; }
.voicebox { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; background: var(--row); }
.voicebox h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); text-align: left; }
.voicebox p { margin: 6px 0 8px; font-size: 12px; color: var(--muted); min-height: 17px; }
.voicebox small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
#micBtn { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--cyan); background: radial-gradient(circle, #0f5d80, #062035); font-size: 22px; box-shadow: 0 0 18px #38d9ff66, inset 0 0 12px #38d9ff44; }
.wave { display: flex; justify-content: center; align-items: center; gap: 3px; height: 22px; }
.wave span { width: 3px; height: 4px; background: var(--cyan-dim); border-radius: 2px; }
body.st-listening .wave span, body.st-speaking .wave span { background: var(--cyan); animation: wave 0.9s ease-in-out infinite; }
body.st-listening .wave span { background: var(--warn); }
.wave span:nth-child(2n) { animation-delay: .15s; } .wave span:nth-child(3n) { animation-delay: .3s; } .wave span:nth-child(5n) { animation-delay: .45s; }
@keyframes wave { 50% { height: 20px; } }
body.st-listening #micBtn { border-color: var(--warn); box-shadow: 0 0 22px #ff8a5c88; }

/* ---------- top bar ---------- */
#top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.pill { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.pill b { color: var(--warn); font-weight: 600; } .pill .dot.on + b { color: var(--ok); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.clock { text-align: center; line-height: 1.15; }
.clock small { display: block; font-size: 11px; color: var(--muted); }
.clock b { font-size: 20px; color: var(--cyan); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.actions { display: flex; align-items: center; gap: 8px; }
.chip { background: var(--row); border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; font-size: 13px; }
.chip:hover { border-color: var(--line-hi); }
.who { border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; text-align: right; line-height: 1.15; }
.who b { display: block; font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- centre: the AI core and what was just said (voice first) ---------- */
#center { display: flex; flex-direction: column; min-height: 0; }
#stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; }
#orbHint { margin: 6px 0 0; color: var(--cyan); font-size: 15px; letter-spacing: .2em; text-transform: uppercase; min-height: 22px; text-align: center; }
body.st-listening #orbHint { color: #ffb08f; }
#orb { position: relative; flex: 0 0 auto; width: clamp(200px, 38vh, 340px); aspect-ratio: 1; border: 0; background: none; padding: 0; border-radius: 50%; }
#captions { width: min(680px, 100%); min-height: 0; display: flex; flex-direction: column; gap: 8px; text-align: center; }
#captions p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
#capYou { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#capYou:not(:empty)::before { content: "You · "; color: var(--cyan-dim); }
#capEvie { font-size: 20px; line-height: 1.45; min-height: 0; overflow-y: auto; }
#capEvie.long { font-size: 16px; text-align: left; }
#capEvie.sys { font-size: 14px; color: var(--muted); }
#capEvie.builder { font-size: 15px; color: #ffcdb5; text-align: left; }
#capEvie a { color: var(--cyan); }
.globe { position: absolute; inset: 10%; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 13px, #38d9ff24 13px 14px),
    repeating-conic-gradient(from 0deg, transparent 0 14deg, #38d9ff2e 14deg 15deg),
    radial-gradient(circle at 38% 30%, #1d7fb0 0%, #0a3a5e 45%, #04162b 78%);
  box-shadow: 0 0 46px #38d9ff88, inset 0 0 34px #38d9ff66, inset 0 0 4px #c9f4ff; border: 1px solid #7fe6ff; transition: transform .2s; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px solid #38d9ff66; }
.o1 { transform: rotateX(72deg); animation: orbit1 14s linear infinite; border-top-color: var(--cyan); border-width: 2px; }
.o2 { transform: rotateX(72deg) rotateY(55deg); animation: orbit2 18s linear infinite; border-bottom-color: var(--cyan); }
.o3 { inset: 8px; border-style: dashed; border-color: #38d9ff40; animation: spin 40s linear infinite; }
@keyframes orbit1 { to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes orbit2 { to { transform: rotateX(72deg) rotateY(55deg) rotateZ(-360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.07); } }
.core-name { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: clamp(22px, 4.2vh, 36px); font-weight: 700; letter-spacing: .12em; color: #eafaff; text-shadow: 0 0 14px var(--cyan), 0 0 2px #fff; pointer-events: none; }
.core-name small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .5em; color: var(--cyan); margin-top: 4px; padding-left: .5em; }
#orb.listening .globe { animation: pulse .7s ease-in-out infinite; border-color: #ffc7b0; box-shadow: 0 0 52px #ff8a5caa, inset 0 0 34px #ff8a5c88; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 13px, #ff8a5c30 13px 14px), repeating-conic-gradient(from 0deg, transparent 0 14deg, #ff8a5c35 14deg 15deg), radial-gradient(circle at 38% 30%, #b0562f 0%, #5e2410 45%, #2b0c04 78%); }
#orb.thinking .o1 { animation-duration: 1.6s; } #orb.thinking .o2 { animation-duration: 2.2s; } #orb.thinking .o3 { animation-duration: 5s; }
#orb.speaking .globe { animation: pulse 1.1s ease-in-out infinite; }

/* the chat is a small section in the drawer (owner: "my main reason is to chat in voice") */
#tab-chat { overflow: hidden; }
#tab-chat h3 { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
/* mind map: lies over the core while it is open */
#mapView { grid-area: center / center / center / right; z-index: 3; background: var(--panel-solid); gap: 8px; }
#mapView h3 { margin: 0; }
.map-acts { display: flex; gap: 14px; }
#mapSaved { display: flex; gap: 6px; flex-wrap: wrap; }
#mapSaved:empty { display: none; }
#mapSaved button { background: var(--row); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mapSaved button.on { color: var(--cyan); border-color: var(--cyan-dim); }
#mapCanvas { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #030b18; display: grid; grid-template-columns: minmax(760px, 1fr); align-content: center; }
#mapCanvas.none { grid-template-columns: 1fr; justify-items: center; }
#mapCanvas svg { display: block; width: 100%; height: auto; }
#mapCanvas .empty { padding: 20px; text-align: center; color: var(--muted); max-width: 420px; }
#mapCanvas text { font: 15px system-ui, sans-serif; fill: var(--text); pointer-events: none; }
#mapCanvas .node { cursor: pointer; }
#mapCanvas .node:hover rect, #mapCanvas .node.sel rect { stroke-width: 2.5; filter: drop-shadow(0 0 6px currentColor); }
#mapCanvas .leaf:hover text, #mapCanvas .leaf.sel text { fill: #fff; }
#mapPick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
#mapPick b { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
#mapPick .btn { padding: 5px 12px; font-size: 13px; }
#mapSay { margin: 0; font-size: 14px; line-height: 1.45; max-height: 5.8em; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
#mapSay:empty { display: none; }
#mapForm { display: flex; gap: 8px; }
#mapForm input { flex: 1; min-width: 0; background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: none; }
#mapForm .btn { padding: 6px 14px; }
body.dash #mapView { display: none; }

/* calendar: lies over the core while it is open, like the mind map */
#calView { grid-area: center / center / center / right; z-index: 3; background: var(--panel-solid); gap: 10px; }
#calView h3 { margin: 0; }
#calBody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
#calMonth, #calDay { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
#calDay { overflow-y: auto; padding-right: 2px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head .link { font-size: 22px; padding: 0 12px; line-height: 1; }
#calGrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(34px, 1fr); gap: 4px; }
#calGrid span { align-self: end; text-align: center; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#calGrid button { position: relative; background: var(--row); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; padding: 0; }
#calGrid button.out { opacity: .35; }
#calGrid button.today { border-color: var(--cyan-dim); color: var(--cyan); font-weight: 700; }
#calGrid button.sel { background: #0e4a68; border-color: #7fe6ff; color: #fff; }
#calGrid button i { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; gap: 2px; }
#calGrid button i::before, #calGrid button.many i::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
#calForm { display: flex; gap: 6px; }
#calForm input { min-width: 0; background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; outline: none; }
#calWhat { flex: 1; } #calTime { flex: 0 0 auto; color-scheme: dark; }
#calForm .btn { padding: 6px 12px; }
.cal-sub { margin-top: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-dim); }
#calPending { border: 1px solid var(--warn); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 45%; overflow-y: auto; }
.cal-btns { display: flex; gap: 8px; } .cal-btns .btn { padding: 6px 14px; font-size: 13px; }
#calSay { margin: 0; font-size: 14px; line-height: 1.45; max-height: 4.4em; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
#calSay:empty { display: none; }
body.dash #calView { display: none; }

/* terminal: a console view of the build queue (orders go to the builder, never to a raw shell) */
#tab-term { overflow: hidden; }
#termOut { flex: 1; min-height: 0; overflow-y: auto; background: #01060d; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#termOut .cmd { color: var(--cyan); } #termOut .st { color: var(--muted); } #termOut .ok { color: var(--ok); } #termOut .warn { color: #ffb08f; }
#termOut div + .cmd { margin-top: 10px; }
#termForm { align-items: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#termForm span { color: var(--cyan); }
#termForm input { font-family: inherit; font-size: 13px; }
#log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 13px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg.evie { align-self: flex-start; background: var(--row); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; background: #0e4a68; border: 1px solid #1a6e96; border-top-right-radius: 4px; }
.msg.sys { align-self: center; color: var(--muted); font-size: 12px; background: none; padding: 2px 8px; text-align: center; }
.msg.builder { align-self: flex-start; background: #1c1410; border: 1px solid #7a3a22; border-top-left-radius: 4px; }
.msg a { color: var(--cyan); }
.msg img.pic { display: block; max-width: 190px; max-height: 190px; border-radius: 8px; margin-bottom: 6px; }

/* ---------- bottom bar ---------- */
#bottom { display: flex; align-items: center; gap: 10px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.wx { flex: 0 1 250px; min-width: 0; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--row); }
.wx span { color: var(--text); }
.tip { flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#composer { flex: 0 0 auto; display: flex; gap: 6px; border: 1px solid var(--line-hi); border-radius: 999px; padding: 3px; background: var(--row); }
#composer input[type=text] { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 8px 6px; }
#composer input::placeholder { color: #6fa3c0; }
#attachBtn { background: none; border: 0; font-size: 17px; padding: 0 4px 0 10px; }
#sendBtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--cyan); color: #04202c; font-size: 14px; flex: 0 0 34px; }
#attachChip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--line-hi); border-radius: 9px; background: var(--row); font-size: 12px; }
#attachChip img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
#attachChip button { background: none; border: 0; color: var(--muted); }

/* ---------- drawer (tasks / notes / memory / skills / me) ---------- */
#panel { position: absolute; inset: 10px 10px 10px auto; width: min(380px, calc(100% - 20px)); background: #061224f2; backdrop-filter: blur(10px); border: 1px solid var(--line-hi); border-radius: 12px; display: flex; flex-direction: column; z-index: 5; box-shadow: -10px 0 40px #000a; }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 6px 7px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.tabs button.on { color: var(--cyan); background: var(--row); }
.tabs .x { margin-left: auto; }
.tab { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tab form { display: flex; gap: 8px; }
.tab input, .tab textarea, #loginForm input { width: 100%; background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
.tab textarea { flex: 1; min-height: 240px; resize: none; }
.tab form button, .btn { border: 1px solid var(--cyan-dim); background: none; border-radius: 10px; padding: 8px 14px; color: var(--cyan); white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.list li { display: flex; gap: 10px; align-items: flex-start; background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.list li span { flex: 1; overflow-wrap: anywhere; }
.list li.done span { text-decoration: line-through; color: var(--muted); }
.list li button { background: none; border: 0; color: var(--muted); padding: 0 2px; }
.skill { background: var(--row); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.skill h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 400; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.skill .row { display: flex; gap: 6px; flex-wrap: wrap; background: none; border: 0; padding: 0; }
.skill .btn { font-size: 13px; padding: 6px 10px; }
.me-h { margin: 14px 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-dim); }

/* ---------- login ---------- */
#login { position: fixed; inset: 0; background: #02060eee; display: grid; place-items: center; padding: 20px; z-index: 10; }
#loginForm { width: min(380px, 100%); background: var(--panel-solid); border: 1px solid var(--line-hi); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 12px; text-align: center; box-shadow: 0 0 60px #38d9ff22; }
#loginForm h2 { margin: 0; font-size: 20px; color: var(--cyan); }
#loginBtn { background: var(--cyan); color: #04202c; border: 0; border-radius: 10px; padding: 12px; font-weight: 600; }
#loginBtn:disabled { opacity: .6; }
.mini-orb { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c9f4ff, var(--cyan) 35%, #0a5f80 75%); box-shadow: 0 0 26px var(--cyan); }

/* ---------- medium screens: the left column swaps in for the right one (▦) ---------- */
@media (max-width: 1280px) {
  #app { grid-template-columns: 200px minmax(0, 1fr) 290px; grid-template-areas: "side top top" "side center right" "side bottom bottom"; }
  #colL { display: none; }
  body.dash #colL { display: flex; grid-area: right; }
  body.dash #right { display: none; }
  #dashBtn { display: inline-block; }
}

/* ---------- phones / small tablets: just the core; panels behind ▦ and ☰ ---------- */
@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "center" "bottom"; gap: 8px; padding: 8px; }
  #side, #colL, #right { display: none; }
  .only-small { display: inline-block; }
  .pill span:first-child, .who, .wx, .tip { display: none; }
  .clock small, .pill b { display: none; }
  .clock b { font-size: 15px; white-space: nowrap; }
  .pill { padding: 8px; }
  #top { padding: 8px; gap: 6px; }
  .actions { gap: 6px; }
  .chip { padding: 6px 9px; }
  #orb { width: clamp(170px, 30vh, 250px); }
  #capEvie { font-size: 17px; } #capEvie.long { font-size: 15px; }
  #bottom { justify-content: center; }
  #bottom .chip { padding: 9px 16px; }
  #mapView, #calView { grid-area: center; }
  #calBody { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; }
  #calDay { overflow: visible; }
  #calGrid { grid-template-rows: auto; grid-auto-rows: 38px; flex: 0 0 auto; }
  #bottom .lbl { display: none; }
  #mapCanvas { grid-template-columns: minmax(900px, 1fr); }
  #mapView h3 { letter-spacing: .08em; }
  .map-acts { gap: 10px; white-space: nowrap; }
  body.dash #center { display: none; }
  body.dash #app { height: auto; min-height: 100dvh; grid-template-rows: auto auto auto auto; grid-template-areas: "top" "right" "colL" "bottom"; }
  body.dash #colL, body.dash #right { display: flex; overflow: visible; }
  body.dash #colL { grid-area: colL; }
  body.dash #bottom { position: sticky; bottom: 8px; }
  #panel { inset: 0; width: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .orbit, .globe, .wave span { animation: none !important; } }
