/* Kona — minimal look (owner's order 2026-10-10): just the core and what was said; everything else is behind ☰. */
:root {
  /* red, blue and black (owner's order 2026-10-11, "similar to Spider-Man's colors"): --cyan is the main accent and is red now
     (name kept so the rest of the sheet did not have to change), --blue is the second colour and what the core turns while listening */
  --bg: #04050a; --panel: #080b16cc; --panel-solid: #090c18; --row: #0e1529; --line: #1b2c5e; --line-hi: #2f58c8;
  --cyan: #ff2f45; --cyan-dim: #b01e30; --blue: #3f8cff; --text: #f0f3ff; --muted: #8590b6; --warn: #ff9aa5; --ok: #4c9bff; --violet: #7fb2ff;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(900px 520px at 50% 30%, #0d1c4a 0%, transparent 62%), 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: 8px; padding: 10px 14px; position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "top" "center";
}
#top { grid-area: top; } #center { grid-area: center; } /* everything that is brought up shares one side section: one big view on top, the board's cards under it, scrolling together */
#side { grid-area: aside; display: none; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
body.dash #side, #side:has(> .card:not([hidden])) { display: flex; }
#side > .card { flex: 1 0 0; min-height: min(320px, 100%); }
#side > #right { flex: 0 0 auto; overflow: visible; }
#right { display: none; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: inset 0 0 24px #1a2f8026, 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 #ff2f4522; }
.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); }
.more { align-self: flex-start; padding: 2px; color: var(--muted); }
summary.me-h { cursor: pointer; margin: 6px 0; } details[open] > summary { margin-bottom: 10px; }
.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; }

/* ---------- top bar ---------- */
#top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px; }
.pill { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
#statusText { display: none; }
/* date · time · weather, as in the owner's sketch (2026-10-11): quiet, one line, the sky only where there is room */
#dateLine, #wxTop { font-size: 13px; color: var(--muted); letter-spacing: .03em; }
#wxTop b { font-weight: 500; } #wxTop i { font-style: normal; }
@media (max-width: 560px) { #wxTop i { display: none; } }
#termMini { background: #020308; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; }
#termMini div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#termMini .cmd { color: var(--cyan); } #termMini .st { color: var(--muted); } #termMini .ok { color: var(--ok); } #termMini .warn { color: var(--warn); }
#statusDot:not(.on) + #statusText { display: inline; font-size: 12px; font-weight: 400; color: var(--warn); }
#clock { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.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); }
.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); }
#top .chip { background: none; border-color: transparent; color: var(--muted); }
#top .chip:hover { color: var(--text); }
#panelBtn { font-size: 18px; padding: 4px 10px; }
#picBtn { font-size: 16px; padding: 4px 8px; }
#dashBtn { display: none; } body.dash #dashBtn { display: inline-block; color: var(--cyan); }

/* ---------- 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(--muted); font-size: 13px; letter-spacing: .08em; min-height: 20px; text-align: center; }
body.st-thinking #orbHint, body.st-speaking #orbHint { color: var(--cyan); }
#jobChip { display: flex; flex-direction: column; gap: 3px; max-width: 100%; }
.jobline { display: flex; gap: 12px; align-items: baseline; justify-content: center; min-width: 0; }
.jobline .link { color: var(--muted); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.jobline .cancel { color: var(--warn); flex: 0 0 auto; }
.jobline .confirm { color: var(--blue); flex: 0 0 auto; font-weight: 600; }
button.tag.go { color: var(--blue); border-color: var(--blue); margin-right: 6px; } button.tag.go:hover { color: #fff; border-color: #fff; }
#jobChip .empty { text-align: center; padding: 0; }
body.st-listening #orbHint { color: #9cc2ff; }
#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); }
#capKona { font-size: 20px; line-height: 1.45; min-height: 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
#capKona.long { font-size: 16px; text-align: left; }
#capKona.sys { font-size: 14px; color: var(--muted); }
#capKona.builder { font-size: 15px; color: #c9d8ff; text-align: left; }
#capKona a { color: var(--cyan); }
/* the core: Jarvis-style rings turning in opposite directions (owner's order 2026-10-11) */
#orb { color: var(--cyan); container-type: inline-size; }
.rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px currentColor); transition: transform .2s; }
.rings circle { fill: none; stroke: currentColor; transform-box: fill-box; transform-origin: center; }
.rings .glow { fill: currentColor; stroke: none; opacity: .1; }
.r1 { animation: spin 60s linear infinite; }
.r2 { animation: spin 14s linear infinite reverse; }
.r3 { animation: spin 30s linear infinite; }
.r4 { animation: spin 9s linear infinite; }
.r5 { animation: spin 20s linear infinite reverse; }
.r6 { animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.06); } }
.core-name { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 8cqw; font-weight: 700; letter-spacing: .12em; color: #fff4f5; text-shadow: 0 0 14px var(--cyan), 0 0 2px #fff; pointer-events: none; }
#orb:not(.listening) .r4, #orb:not(.listening) .r5, #orb:not(.listening) .r6 { stroke: var(--blue); }
#orb.listening { color: var(--blue); } #orb.listening .rings { animation: pulse .7s ease-in-out infinite; }
#orb.thinking .r2 { animation-duration: 2s; } #orb.thinking .r4 { animation-duration: 1.4s; } #orb.thinking .r5 { animation-duration: 3s; }
#orb.speaking .rings { 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 { 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: #05070f; 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; }

/* calendar: lies over the core while it is open, like the mind map */
#modelView , like the mind map */
#artView { z-index: 3; background: var(--panel-solid); gap: 8px; }
#modelView h3 { margin: 0; }
#artView h3 { margin: 0; }
#teamCanvas { flex: 0 0 auto; width: 100%; max-height: 230px; aspect-ratio: 4 / 3; display: block; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle at 50% 46%, #0b1230, #030409 75%); }
#teamCanvas .tline { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 4 5; animation: tflow 1s linear infinite; }
#teamCanvas .tline.done { stroke: var(--cyan); stroke-dasharray: none; animation: none; opacity: .8; } #teamCanvas .tline.failed { stroke: var(--muted); animation: none; opacity: .5; }
#teamCanvas .tnode circle { fill: #0e1529; stroke: var(--blue); stroke-width: 1.6; } #teamCanvas .tnode.working circle { animation: tpulse 1.1s ease-in-out infinite; }
#teamCanvas .tnode.done circle { stroke: var(--cyan); fill: #5c0f1c; } #teamCanvas .tnode.failed circle { stroke: var(--muted); stroke-dasharray: 3 4; }
#teamCanvas .tnode.main circle { stroke: var(--cyan); stroke-width: 2.2; fill: #2a0a12; } #teamCanvas .tnode.main.waiting circle { stroke: var(--blue); fill: #0e1529; } #teamCanvas .tnode.main.merging circle { animation: tpulse .8s ease-in-out infinite; }
#teamCanvas text { text-anchor: middle; fill: var(--text); font-size: 11px; } #teamCanvas .tnum { font-size: 13px; font-weight: 700; } #teamCanvas .tsub { fill: var(--muted); font-size: 9.5px; } #teamCanvas .tlabel { font-size: 10.5px; }
@keyframes tflow { to { stroke-dashoffset: -18; } } @keyframes tpulse { 50% { stroke-width: 4; opacity: .7; } }
#teamSay { margin: 8px 0; font-size: 13px; color: var(--muted); } #teamSay:empty { display: none; } #teamEmpty { margin: auto 0; text-align: center; }
#modelForms { display: flex; flex-wrap: wrap; gap: 6px; }
#modelForms .chip.on { border-color: var(--cyan); color: var(--cyan); }
#modelCanvas { flex: 1; min-height: 0; width: 100%; display: block; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle at 50% 50%, #0b1230, #030409 75%); touch-action: none; cursor: grab; }
#modelCanvas:active { cursor: grabbing; }
/* the article section (owner's order 2026-10-12): Kona's copy of the page, in a frame that cannot run scripts */
#artBody { flex: 1; min-height: 0; overflow: auto; font-size: 14px; line-height: 1.5; color: var(--text, #f0f3ff); padding-right: 4px; }
#artBody .ia-h { margin: 18px 0 8px; font-size: 13px; }
#artBody h4 { margin: 0 0 3px; font-size: 14px; }
#artBody p { margin: 0; color: #8590b6; }
#artBody .ia-lead { margin-top: 4px; }
#artBody .ia-card { background: #0e1529; border: 1px solid #1b2c5e; border-radius: 12px; padding: 10px 12px; }
#artBody .ia-step { display: flex; gap: 10px; padding-bottom: 10px; }
#artBody .ia-step .ia-card { flex: 1; }
#artBody .ia-num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #ff2f45; color: #fff; font-weight: 700; display: grid; place-items: center; }
#artBody .ia-path, #artBody .ia-flow span { display: inline-block; font-size: 12px; border: 1px solid #1b2c5e; border-radius: 8px; padding: 3px 7px; background: #04050a; color: #f0f3ff; }
#artBody .ia-path { margin-top: 6px; }
#artBody .ia-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
#artBody .ia-flow i { font-style: normal; color: #8590b6; }
#artBody .ia-two { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
#artBody .ia-tag { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 2px 8px; margin-bottom: 6px; color: #fff; background: #ff2f45; }
#artBody .ia-b .ia-tag { background: #3f8cff; }
#artBody ul { margin: 6px 0 0; padding-left: 18px; color: #8590b6; }
#artBody .ia-do h4 { color: #4c9bff; } #artBody .ia-dont h4 { color: #ff9aa5; }
#artBody .ia-note { border-left: 3px solid #3f8cff; margin-top: 10px; } #artBody .ia-note b { color: #f0f3ff; }
#artBody .ia-check label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #1b2c5e; }
#artBody .ia-check label:last-child { border: 0; } #artBody .ia-check input { accent-color: #ff2f45; margin-top: 3px; }
#artBody .ia-more { display: block; margin-top: 14px; text-align: center; text-decoration: none; font-weight: 600; color: #fff; background: linear-gradient(135deg, #ff2f45, #3f8cff); border-radius: 10px; padding: 10px; }
#artBody .ia-foot { margin-top: 14px; font-size: 12px; }
#artView .map-acts a { text-decoration: none; }
#picView { z-index: 3; background: var(--panel-solid); gap: 8px; }
#picView h3 { margin: 0; }
#picBox { flex: 1; min-height: 0; overflow: auto; display: flex; border: 1px solid var(--line); border-radius: 10px; background: #030409; }
#picDrop { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; border: 1.5px dashed var(--line-hi); border-radius: 12px; background: #030409; color: var(--text); font: inherit; cursor: pointer; }
#picDrop:hover, #picDrop:focus-visible { border-color: var(--cyan); }
#picDrop b { font-size: 34px; font-weight: 400; } #picDrop span { font-size: 16px; } #picDrop small { font-size: 12px; color: var(--muted); }
#picPaste { align-self: center; padding: 8px 16px; }
#picSay { margin: 0; font-size: 13px; color: var(--muted); text-align: center; } #picSay:empty { display: none; }
#picStrip { display: flex; gap: 6px; overflow-x: auto; flex: 0 0 auto; }
#picStrip button { flex: 0 0 46px; height: 46px; padding: 0; border: 1.5px solid var(--line); border-radius: 8px; background: #030409; overflow: hidden; cursor: pointer; }
#picStrip button.on { border-color: var(--cyan); }
#picStrip img { width: 100%; height: 100%; object-fit: cover; display: block; }
#picImg { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
#picView.zoom #picImg { max-width: none; max-height: none; cursor: zoom-out; }
#calView { z-index: 3; background: var(--panel-solid); gap: 10px; }
#calView h3 { margin: 0; }
#calBody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
#calMonth, #calDay { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
#calDay { 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: 34px; flex: 0 0 auto; 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: #5c0f1c; border-color: #ff7a88; 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; flex-wrap: wrap; align-items: center; gap: 6px; }
#calForm label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#calForm input { min-width: 0; background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; outline: none; }
#calWhat { flex: 1 0 100%; } #calTime, #calEnd { flex: 1; color-scheme: dark; }
#calForm .btn { padding: 6px 12px; }
#calForm label { flex: 1 0 40%; }
#calRepeat { flex: 1 0 55%; min-width: 0; background: var(--row); color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; outline: none; color-scheme: dark; font: inherit; font-size: 13px; }
.cal-sub { margin-top: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-dim); }
#calAsk { border: 1px solid var(--warn); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
#calAsk .cal-btns { flex-wrap: wrap; } #calAsk .btn { padding: 6px 10px; }
#calUntil { flex: 1; color-scheme: dark; } #calUntilRow[hidden] { display: none; }
#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; }

/* 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: #020308; 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: var(--warn); }
#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.sukona { align-self: flex-start; background: var(--row); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; background: #5c0f1c; border: 1px solid #a32233; 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: #0b1226; border: 1px solid #27418f; 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; }

/* ---------- typing box (inside the drawer's Chat tab) ---------- */
#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: #7480a8; }
#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: #fff; 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 { flex-wrap: wrap; max-width: 100%; } #attachThumbs { display: inline-flex; gap: 3px; }
#attachChip img { width: 30px; height: 30px; 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: #070a15f2; 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; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 10px 0; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.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 0 200px; 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: #030409ee; 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 #ff2f4522; }
#loginForm h2 { margin: 0; font-size: 20px; color: var(--cyan); }
#loginBtn { background: var(--cyan); color: #fff; 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%, #ffd0d5, var(--cyan) 35%, #7a0f1d 75%); box-shadow: 0 0 26px var(--cyan); }

/* ---------- the board: a second main page; cards are brought up or removed by asking ("show my chats", "remove the tasks") ---------- */
/* Whatever is brought up — board cards, calendar, mind map — is a small section beside the core, never over it
   (owner's order 2026-10-11: "show only a small section … to avoid covering the main interface"). */
body.dash #app, #app:has(#calView:not([hidden])), #app:has(#mapView:not([hidden])), #app:has(#picView:not([hidden])), #app:has(#modelView:not([hidden])) , #app:has(#artView:not([hidden])) { grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 400px); grid-template-areas: "top top" "center aside"; }
#app:has(#mapView:not([hidden])) { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr); }
#app:has(#picView:not([hidden])), #app:has(#modelView:not([hidden])) , #app:has(#artView:not([hidden])) { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.2fr); }
body.dash #right { display: flex; }
body.dash .card.off { display: none; }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  #app { padding: 8px; }
  #orb { width: clamp(170px, 30vh, 250px); }
  #capKona { font-size: 17px; } #capKona.long { font-size: 15px; }
  /* phone: the section sits under the core, which shrinks to make room */
  body.dash #app, #app:has(#calView:not([hidden])), #app:has(#mapView:not([hidden])), #app:has(#picView:not([hidden])), #app:has(#modelView:not([hidden])) , #app:has(#artView:not([hidden])) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 46dvh); grid-template-areas: "top" "center" "aside"; }
  body.dash #orb, #app:has(#calView:not([hidden])) #orb, #app:has(#mapView:not([hidden])) #orb, #app:has(#picView:not([hidden])) #orb, #app:has(#modelView:not([hidden])) #orb , #app:has(#artView:not([hidden])) #orb { width: clamp(90px, 15vh, 150px); }
  body.dash #capKona, #app:has(#calView:not([hidden])) #capKona, #app:has(#mapView:not([hidden])) #capKona, #app:has(#picView:not([hidden])) #capKona, #app:has(#modelView:not([hidden])) #capKona , #app:has(#artView:not([hidden])) #capKona { -webkit-line-clamp: 3; font-size: 15px; }
  body.dash #orbHint, #app:has(#calView:not([hidden])) #orbHint, #app:has(#mapView:not([hidden])) #orbHint, #app:has(#picView:not([hidden])) #orbHint, #app:has(#modelView:not([hidden])) #orbHint , #app:has(#artView:not([hidden])) #orbHint { display: none; }
  #calGrid { grid-auto-rows: 38px; }
  #mapCanvas { grid-template-columns: minmax(900px, 1fr); }
  #mapView h3 { letter-spacing: .08em; }
  .map-acts { gap: 10px; white-space: nowrap; }
  #panel { inset: 0; width: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .rings, .rings circle { animation: none !important; } }
.msg img.pic:not(:only-of-type) { display: inline-block; max-width: 84px; max-height: 84px; margin-right: 4px; vertical-align: top; }
