:root {
  --accent: #7c5cff;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px;

  --bg: #0d0f17;
  --text: #eef0f7;
  --text-dim: #9aa1b5;
  --surface: rgba(24, 27, 40, 0.78);
  --surface-solid: #181b28;
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --menubar-bg: rgba(12, 14, 22, 0.55);
  --menubar-bg-solid: #0c0e16;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --term-bg: #0a0c12;
}

:root[data-theme="light"] {
  --bg: #e9ecf4;
  --text: #171a26;
  --text-dim: #5d6478;
  --surface: rgba(250, 251, 255, 0.82);
  --surface-solid: #fafbff;
  --surface-2: rgba(0, 0, 0, 0.05);
  --border: rgba(0, 0, 0, 0.10);
  --menubar-bg: rgba(255, 255, 255, 0.55);
  --menubar-bg-solid: #ffffff;
  --shadow: 0 24px 60px rgba(30, 35, 60, 0.22), 0 2px 8px rgba(30, 35, 60, 0.12);
  --term-bg: #12141c;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; user-select: text; }

/* ---------- Atria logo ---------- */
.atria-logo { display: inline-flex; align-items: center; gap: .45em; }
.atria-mark { height: 1em; width: auto; fill: currentColor; }
.atria-logo span { font-family: "Michroma", var(--font); letter-spacing: .06em; font-weight: 400; }

/* ---------- wallpapers ---------- */
body[data-wallpaper="capsule"],
:root[data-theme="light"] body[data-wallpaper="capsule"] {
  background: #0a1430 url("assets/wallpaper-capsule.webp") center bottom / cover no-repeat;
}
body[data-wallpaper="aurora"] { background:
  radial-gradient(1200px 700px at 15% 10%, #3b2a8f 0%, transparent 60%),
  radial-gradient(900px 600px at 85% 30%, #0f7a8a 0%, transparent 60%),
  radial-gradient(1000px 800px at 50% 110%, #8a2a6b 0%, transparent 60%), #0b0d18; }
body[data-wallpaper="dusk"] { background:
  radial-gradient(1000px 700px at 80% 0%, #ff8a5b 0%, transparent 55%),
  radial-gradient(1100px 800px at 10% 100%, #5b2a86 0%, transparent 60%), #1c1230; }
body[data-wallpaper="ocean"] { background:
  radial-gradient(1100px 700px at 20% 20%, #1a6fd1 0%, transparent 60%),
  radial-gradient(900px 700px at 90% 90%, #0bb39a 0%, transparent 55%), #071a2e; }
body[data-wallpaper="graphite"] { background:
  radial-gradient(1200px 800px at 50% 0%, #3a3f4f 0%, transparent 65%), #15171d; }
:root[data-theme="light"] body[data-wallpaper="aurora"] { background:
  radial-gradient(1200px 700px at 15% 10%, #c9bcff 0%, transparent 60%),
  radial-gradient(900px 600px at 85% 30%, #a6ecf2 0%, transparent 60%),
  radial-gradient(1000px 800px at 50% 110%, #ffc2e4 0%, transparent 60%), #eef0fa; }
:root[data-theme="light"] body[data-wallpaper="dusk"] { background:
  radial-gradient(1000px 700px at 80% 0%, #ffcfb6 0%, transparent 55%),
  radial-gradient(1100px 800px at 10% 100%, #dcc4ff 0%, transparent 60%), #f6eef8; }
:root[data-theme="light"] body[data-wallpaper="ocean"] { background:
  radial-gradient(1100px 700px at 20% 20%, #b3d6ff 0%, transparent 60%),
  radial-gradient(900px 700px at 90% 90%, #b2f1e6 0%, transparent 55%), #eaf4fb; }
:root[data-theme="light"] body[data-wallpaper="graphite"] { background:
  radial-gradient(1200px 800px at 50% 0%, #ffffff 0%, transparent 65%), #dfe2ea; }

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: radial-gradient(900px 500px at 50% 120%, #3a2a55 0%, transparent 60%), #0a1430; transition: opacity .5s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-logo { display: grid; justify-items: center; gap: 22px; color: #fff; }
.boot-wordmark { font-size: 44px; color: #f2f3f6; }
.boot-bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--accent); animation: boot 1s ease forwards; }
@keyframes boot { to { width: 100%; } }

/* ---------- menubar ---------- */
#menubar {
  position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 1000;
  display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: var(--menubar-bg); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.mb-logo { background: none; border: 0; cursor: pointer; padding: 0; font-size: 12px; }
.mb-app { font-weight: 600; }
.mb-spacer { flex: 1; }
.mb-ask {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 2px 8px; cursor: pointer; font-size: 12px;
}
.mb-ask:hover { border-color: var(--accent); }
.mb-ask kbd { font-family: var(--font); opacity: .6; margin-left: 4px; font-size: 11px; }
.mb-ai { font-size: 10px; color: #8a8f9f; }
.mb-ai.online { color: #3ddc97; }
.mb-clock { font-variant-numeric: tabular-nums; }

/* ---------- desktop ---------- */
#desktop { position: fixed; inset: 30px 0 0 0; }
#desktop-icons {
  position: absolute; top: 16px; right: 16px; display: grid; gap: 8px; justify-items: center;
  grid-auto-flow: row;
}
.desk-icon {
  width: 84px; padding: 6px 4px; border-radius: 10px; display: grid; justify-items: center; gap: 4px;
  background: none; border: 1px solid transparent; cursor: default; text-align: center;
}
.desk-icon:hover { background: rgba(255,255,255,.08); }
.desk-icon:focus { border-color: var(--accent); outline: none; background: rgba(255,255,255,.12); }
.desk-icon .glyph { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.desk-icon .label { font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); word-break: break-word; }
:root[data-theme="light"] .desk-icon .label { color: var(--text); text-shadow: 0 1px 2px rgba(255,255,255,.8); }

/* ---------- dock ---------- */
#dock {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; gap: 6px; padding: 7px; border-radius: 20px;
  background: var(--menubar-bg); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.dock-item {
  position: relative; width: 50px; height: 50px; border-radius: 13px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 26px;
  background: var(--surface-2); transition: transform .15s ease;
}
.dock-item:hover { transform: translateY(-6px) scale(1.12); }
.dock-item .tip {
  position: absolute; bottom: 62px; white-space: nowrap; font-size: 12px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-solid); border: 1px solid var(--border); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.dock-item:hover .tip { opacity: 1; }
.dock-item.running::after {
  content: ""; position: absolute; bottom: -4px; width: 4px; height: 4px; border-radius: 50%; background: var(--text);
}
.dock-item.ai { background: linear-gradient(135deg, var(--accent), #2fc7d6); color: #fff; }

/* ---------- windows ---------- */
#windows { position: absolute; inset: 0; pointer-events: none; }
.window {
  pointer-events: auto;
  position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 180px;
  background: var(--surface); backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; animation: win-in .16s ease;
}
@keyframes win-in { from { opacity: 0; transform: scale(.97); } }
.window.focused { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 78px) !important; border-radius: 0; }
.window.minimized { display: none; }
.titlebar {
  height: 38px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-bottom: 1px solid var(--border); cursor: grab;
}
.titlebar:active { cursor: grabbing; }
.traffic { display: flex; gap: 7px; }
.traffic button { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; }
.traffic .close { background: #ff5f57; } .traffic .min { background: #febc2e; } .traffic .max { background: #28c840; }
.titlebar .title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-right: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }

/* ---------- shared controls ---------- */
.btn {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.toolbar { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.toolbar .path { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- files app ---------- */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; padding: 12px; }
.file-item { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: default; text-align: center; }
.file-item:hover { background: var(--surface-2); }
.file-item.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.file-item .glyph { font-size: 32px; }
.file-item .label { font-size: 12px; word-break: break-word; }
.empty { padding: 30px; text-align: center; color: var(--text-dim); }

/* ---------- notes ---------- */
.notes { display: flex; flex-direction: column; height: 100%; }
.notes textarea {
  flex: 1; border: 0; resize: none; outline: none; padding: 16px 18px; background: transparent;
  font-size: 14px; line-height: 1.6;
}
.notes .status { font-size: 12px; color: var(--text-dim); }

/* ---------- terminal ---------- */
.terminal { height: 100%; background: var(--term-bg); color: #d6dbe8; font-family: var(--mono); font-size: 13px; padding: 10px 12px; overflow: auto; user-select: text; }
.terminal .line { white-space: pre-wrap; word-break: break-word; }
.terminal .prompt { color: #7ee0b5; }
.terminal .err { color: #ff8a8a; }
.terminal .ai { color: #c9b8ff; }
.terminal .input-row { display: flex; gap: 8px; }
.terminal input { flex: 1; background: none; border: 0; outline: none; color: inherit; font-family: inherit; font-size: inherit; padding: 0; }

/* ---------- settings ---------- */
.settings { padding: 18px; display: grid; gap: 20px; }
.settings h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 88px; height: 56px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; position: relative; }
.swatch.active { border-color: var(--accent); }
.swatch span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--text-dim); }
.accent-dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.accent-dot.active { border-color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 6px 16px; cursor: pointer; }
.seg button.active { background: var(--accent); color: #fff; }

/* ---------- calculator ---------- */
.calc { padding: 12px; display: grid; gap: 8px; height: 100%; grid-template-rows: auto 1fr; }
.calc .display { font-size: 32px; text-align: right; padding: 8px 6px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.calc .keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc .keys button { border: 0; border-radius: 12px; background: var(--surface-2); font-size: 18px; cursor: pointer; }
.calc .keys button:hover { filter: brightness(1.2); }
.calc .keys .op { background: var(--accent); color: #fff; }

/* ---------- rig monitor ---------- */
.rig { padding: 16px; display: grid; gap: 16px; }
.rig-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rig-dot { width: 14px; height: 14px; border-radius: 50%; background: #8a8f9f; flex: none; }
.rig-hero[data-tone="ok"] { border-color: rgba(61, 220, 151, .5); }
.rig-hero[data-tone="ok"] .rig-dot { background: #3ddc97; box-shadow: 0 0 0 5px rgba(61, 220, 151, .18); }
.rig-hero[data-tone="busy"] .rig-dot { background: #f5a524; box-shadow: 0 0 0 5px rgba(245, 165, 36, .18); }
.rig-hero-text { flex: 1; min-width: 0; }
.rig-state { font-size: 18px; font-weight: 700; }
.rig-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.rig-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rig-card { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rig-card-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.rig-card-head b { font-size: 26px; color: var(--text); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rig-card.hot .rig-card-head b { color: #f5a524; }
.spark { width: 100%; height: 54px; display: block; margin: 8px 0 6px; }
.spark-threshold { stroke: #f5a524; stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.rig-meta { font-size: 12px; color: var(--text-dim); }
.rig-section h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.rig-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rig-form label { display: grid; gap: 4px; font-size: 12px; color: var(--text-dim); }
.rig-form input { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 6px 8px; outline: none; color: var(--text); }
.rig-form input:focus { border-color: var(--accent); }
.rig-saved { margin-left: 8px; font-size: 12px; color: #3ddc97; }
.rig-endpoint { display: block; font-family: var(--mono); font-size: 12px; padding: 8px 10px; border-radius: 8px; background: var(--term-bg); color: #d6dbe8; user-select: all; overflow-wrap: anywhere; }
.rig-note { font-size: 12px; color: var(--text-dim); margin: 6px 0 0; line-height: 1.5; }
.rig-note code { font-family: var(--mono); }
.rig-system { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rig-system div { display: grid; gap: 2px; font-size: 12px; }
.rig-system span { color: var(--text-dim); }
.switch { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: rgba(140, 145, 160, .45); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: #3ddc97; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* menubar rig chip */
.mb-rig { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-size: 12px; font-variant-numeric: tabular-nums; padding: 0; }
.mb-rig i { width: 8px; height: 8px; border-radius: 50%; background: #8a8f9f; }
.mb-rig[data-tone="ok"] i { background: #3ddc97; }
.mb-rig[data-tone="busy"] i { background: #f5a524; }
@media (max-width: 640px) { .mb-rig .mb-rig-text { display: none; } .rig-form, .rig-system { grid-template-columns: 1fr; } }

/* ---------- assistant ---------- */
.assistant { display: flex; flex-direction: column; height: 100%; }
.chat { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; user-select: text; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.err { align-self: flex-start; background: rgba(255, 90, 90, .12); border: 1px solid rgba(255, 90, 90, .35); }
.tool-chip { align-self: flex-start; font-size: 12px; font-family: var(--mono); color: var(--text-dim); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); }
.tool-chip.fail { color: #ff8a8a; }
.typing { align-self: flex-start; color: var(--text-dim); font-size: 12px; }
.typing::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.composer input { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; outline: none; }
.composer input:focus { border-color: var(--accent); }
.suggestions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.suggestions button { font-size: 12px; }
.welcome { color: var(--text-dim); text-align: center; padding: 18px 10px 4px; }
.welcome .big { font-size: 30px; }

/* ---------- command bar ---------- */
#command {
  position: fixed; top: 18%; left: 50%; transform: translateX(-50%); z-index: 2000;
  width: min(640px, calc(100vw - 32px));
}
#command.hidden { display: none; }
.command-box {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px;
  background: var(--surface); backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: var(--shadow);
}
.command-spark { color: var(--accent); font-size: 20px; }
#command-input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; }
.command-hint { text-align: center; font-size: 12px; color: #fff; opacity: .7; margin-top: 8px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- dialogs ---------- */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 4000; display: grid; place-items: start center; padding: 18vh 16px 0;
  background: rgba(5, 8, 18, .35); animation: fade-in .12s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.dialog {
  width: min(400px, 100%); display: grid; gap: 12px; padding: 18px;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: win-in .14s ease;
}
.dialog-title { font-size: 15px; font-weight: 700; }
.dialog-message { color: var(--text-dim); line-height: 1.5; }
.dialog-input {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; outline: none;
  font-family: var(--mono); font-size: 13px;
}
.dialog-input:focus { border-color: var(--accent); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn.danger { background: #e5484d; color: #fff; border-color: transparent; }

.btn.danger-ghost { color: #ff6b70; border-color: rgba(229, 72, 77, .45); background: none; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font-size: inherit; }

/* form dialog */
.dialog-form { width: min(520px, 100%); max-height: 78vh; overflow: auto; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.dialog-field { display: grid; gap: 4px; font-size: 12px; color: var(--text-dim); border: 0; padding: 0; margin: 0; min-width: 0; }
.dialog-field.wide { grid-column: 1 / -1; }
.dialog-field legend { padding: 0; margin-bottom: 6px; }
.dialog-field input, .dialog-field select, .dialog-field textarea {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 7px 9px; outline: none;
  color: var(--text); font-size: 13px; width: 100%; resize: vertical; color-scheme: dark;
}
:root[data-theme="light"] .dialog-field :is(input, select, textarea) { color-scheme: light; }
.dialog-field :is(input, select, textarea):focus { border-color: var(--accent); }
.dialog-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; color: var(--text); font-size: 12px; }
.check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.check input { margin: 0; accent-color: var(--accent); }
.dialog-error { color: #ff6b70; font-size: 12px; min-height: 0; }
.dialog-error:empty { display: none; }
@media (max-width: 520px) { .dialog-grid { grid-template-columns: 1fr; } }

/* ---------- creator UI shared ---------- */
.avatar {
  position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * .36); color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #0a1430));
}
.avatar i { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; border-radius: 50%; border: 2px solid var(--surface-solid); }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }

/* ---------- talent ---------- */
.talent { display: flex; flex-direction: column; min-height: 100%; }
.talent .toolbar { flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { border: 1px solid transparent; background: none; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.tab span { color: var(--text-dim); font-size: 11px; margin-left: 2px; }
.tab.active { background: var(--surface-2); border-color: var(--border); font-weight: 600; }
.search { flex: 1; min-width: 140px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; outline: none; }
.search:focus { border-color: var(--accent); }
.live-strip { margin: 10px 12px 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: rgba(239, 68, 102, .12); border: 1px solid rgba(239, 68, 102, .35); }
.live-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #fff; background: #ef4466; padding: 2px 6px; border-radius: 4px; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.talent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 12px; }
.talent-card {
  display: grid; gap: 8px; padding: 12px; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color .12s, transform .12s;
}
.talent-card:hover, .talent-card:focus-visible { border-color: var(--accent); outline: none; transform: translateY(-1px); }
.talent-top { display: flex; align-items: center; gap: 10px; }
.talent-id { flex: 1; min-width: 0; display: grid; }
.talent-id b, .talent-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-id span { font-size: 12px; color: var(--text-dim); }
.talent-focus { font-size: 13px; }
.talent-focus span { color: var(--text-dim); }
.talent-platforms { display: flex; gap: 4px; flex-wrap: wrap; min-height: 20px; }
.talent-platforms span { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.talent-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); }
.talent-stats b { color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.talent-social { display: flex; flex-wrap: wrap; gap: 4px; }
.soc { font-size: 11px; padding: 1px 7px; border-radius: 6px; color: var(--text-dim); border: 1px dashed var(--border); }
.soc.live { color: #fff; background: #ef4466; border: 1px solid #ef4466; }
.soc.warn { color: #f5a524; border-color: rgba(245,165,36,.5); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.live-strip a { color: inherit; font-weight: 600; }
.conn { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.conn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8a8f9f; }
.conn.on::before { background: #3ddc97; }
.conn-list { display: grid; gap: 6px; font-size: 13px; color: var(--text-dim); }
.conn-list .conn { color: var(--text); }
.conn-steps { margin: 10px 0 0; padding-left: 20px; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.conn-steps code, .rig-note code { font-family: var(--mono); font-size: 11px; }
.warn-text { color: #f5a524; }
.talent-foot div + div { margin-top: 4px; }
.talent-next { font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-card .btn.small { justify-self: start; }
.talent-foot { margin-top: auto; padding: 8px 14px 12px; font-size: 12px; color: var(--text-dim); }
.talent-foot:empty { display: none; }

/* ---------- schedule ---------- */
.schedule .toolbar { flex-wrap: wrap; }
.schedule .week-label { font-family: var(--font); font-size: 13px; color: var(--text); font-weight: 600; min-width: 150px; }
.who { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 5px 8px; color: var(--text); color-scheme: dark; }
:root[data-theme="light"] .who { color-scheme: light; }
.agenda { padding: 8px 12px 14px; display: grid; gap: 12px; }
.day h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.day.today h4 { color: var(--accent); }
.day-empty { font-size: 12px; color: var(--text-dim); padding: 4px 2px; opacity: .7; }
.event {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 6px; text-align: left; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--border); border-left: 4px solid var(--c); background: var(--surface-2);
}
.event:hover { border-color: var(--c); }
.event-time { display: grid; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; min-width: 46px; }
.event-time small, .event-main small { font-weight: 400; font-size: 11px; color: var(--text-dim); }
.event-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.event-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.event-people { display: flex; }
.event-people .avatar + .avatar { margin-left: -8px; }

/* ---------- sketch ---------- */
.sketch { display: flex; flex-direction: column; height: 100%; }
.sketch-tools { flex-wrap: wrap; }
.swatches-row { display: flex; gap: 4px; align-items: center; }
.color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.color.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.swatches-row input[type="color"] { width: 26px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.sketch .size { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.sketch .size input { width: 90px; accent-color: var(--accent); }
.sketch .seg button { padding: 5px 10px; font-size: 12px; }
.canvas-wrap { flex: 1; min-height: 0; overflow: auto; padding: 12px; background: repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 20px 20px; display: grid; place-items: center; }
.canvas-wrap canvas { width: 100%; max-width: 1600px; aspect-ratio: 16 / 10; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.35); touch-action: none; cursor: crosshair; }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 40px; right: 14px; z-index: 3000; display: grid; gap: 8px; }
.toast {
  max-width: 340px; padding: 10px 14px; border-radius: 12px; font-size: 13px;
  background: var(--surface); backdrop-filter: blur(24px); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: win-in .2s ease;
}
.toast b { color: var(--accent); }

@media (max-width: 640px) {
  .mb-ask kbd, .mb-app { display: none; }
  .dock-item { width: 42px; height: 42px; font-size: 22px; }
  .window { left: 8px !important; width: calc(100vw - 16px) !important; }
}

.talent-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn.twitch { background: #9146ff; border-color: #9146ff; color: #fff; }
.btn.twitch:hover { background: #a970ff; }
.tw-ok { font-size: 11px; font-weight: 600; color: #a970ff; }
.acct-row { display: flex; align-items: center; gap: 8px; }

/* ---------- sign-in ---------- */
#login { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(rgba(6,10,24,.55), rgba(6,10,24,.75)), url(assets/wallpaper-capsule.webp) center 75% / cover; }
.login-card { width: min(360px, 100%); display: grid; gap: 12px; padding: 28px 26px; border-radius: 16px;
  background: rgba(18,22,34,.82); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.1); color: #f2f3f6; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.login-card .boot-wordmark { font-size: 26px; justify-self: center; margin-bottom: 4px; }
.login-card h2 { margin: 0; font-size: 18px; text-align: center; }
.login-sub { margin: 0 0 4px; font-size: 13px; line-height: 1.45; color: #aab0c0; text-align: center; }
.login-card label { display: grid; gap: 5px; font-size: 12px; color: #aab0c0; }
.login-card input { font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.3); color: #fff; }
.login-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.login-card .btn { justify-content: center; padding: 10px; font-size: 14px; }
.login-error { min-height: 1em; font-size: 13px; color: #ff7a8a; }
.login-error:empty { display: none; }

/* ---------- menubar account ---------- */
.mb-user { background: none; border: 0; color: inherit; font: inherit; font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.mb-user:hover { background: rgba(255,255,255,.1); }
.mb-admin { font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--accent); color: #fff; margin-left: 3px; }
.user-menu { position: fixed; top: 30px; right: 12px; z-index: 8000; min-width: 210px; padding: 6px; border-radius: 10px;
  background: var(--surface-solid); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0,0,0,.35); display: grid; color: var(--text); }
.user-menu-head { display: grid; padding: 6px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 13px; }
.user-menu-head span { font-size: 11px; color: var(--text-dim); }
.user-menu button { text-align: left; background: none; border: 0; color: inherit; font: inherit; font-size: 13px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.user-menu button:hover { background: var(--accent); color: #fff; }

/* ---------- Users app ---------- */
.users { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.users-list { overflow: auto; padding: 8px 12px; display: grid; gap: 6px; align-content: start; }
.user-row { display: grid; grid-template-columns: auto 1fr auto auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.user-id { display: grid; min-width: 0; }
.user-id span { font-size: 12px; color: var(--text-dim); }
.users-foot { padding: 10px 14px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); }
@media (max-width: 520px) { .user-row { grid-template-columns: auto 1fr auto; } .user-row .btn { grid-column: span 1; } }

.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(0,0,0,.3); }
.login-tabs button { font: inherit; font-size: 12px; padding: 7px; border: 0; border-radius: 8px; background: none; color: #aab0c0; cursor: pointer; }
.login-tabs button.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.scan-box { display: grid; gap: 6px; justify-items: center; font-size: 12px; color: #aab0c0; }
.scan-box[hidden] { display: none; }
.scan-box video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #000; border: 2px solid var(--accent); }

.badge-view { display: grid; gap: 12px; justify-items: center; padding: 16px; overflow: auto; height: 100%; align-content: start; }
.badge-card { width: 400px; aspect-ratio: 85.6 / 54; box-sizing: border-box; display: grid; grid-template-columns: 140px 1fr; grid-template-rows: 1fr auto; gap: 8px 14px; padding: 16px; border-radius: 14px; background: #fff; color: #111; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.badge-qr svg { width: 140px; height: 140px; display: block; }
.badge-info { display: grid; align-content: space-between; padding: 4px 0; }
.badge-head { display: flex; justify-content: space-between; font-size: 11px; color: #555; }
.badge-head b { letter-spacing: .2em; color: #0b1638; }
.badge-name { display: grid; font-size: 20px; font-weight: 700; }
.badge-name span { font-size: 12px; font-weight: 400; color: #666; }
.badge-bar { grid-column: 1 / -1; }
.badge-bar svg { width: 100%; height: 62px; display: block; }
.badge-warn { margin: 0; max-width: 360px; font-size: 12px; line-height: 1.45; color: var(--text-dim); text-align: center; }
.badge-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- Capsules map ---------- */
.caps { position: relative; height: 100%; overflow: hidden; background: #070b18; border-radius: 0 0 12px 12px; }
.caps-map, .caps > .caps-map.maplibregl-map { position: absolute; inset: 0; }
.caps-map.picking .maplibregl-canvas { cursor: crosshair; }
.caps-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #aab0c0; font-size: 13px; pointer-events: none;
  background: radial-gradient(circle at 60% 45%, #1b2350 0%, #070b18 60%); }
.caps-panel { position: absolute; top: 12px; left: 12px; bottom: 12px; width: 300px; display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 14px; background: rgba(12, 16, 32, .72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.09); color: #eef0f6; box-shadow: 0 18px 50px rgba(0,0,0,.4); z-index: 2; }
.caps-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.caps-head > div { display: grid; }
.caps-head b { font-size: 16px; letter-spacing: .02em; }
.caps-total { font-size: 11px; color: #9aa3bd; margin-top: 2px; }
.caps-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.caps-stat { display: grid; justify-items: center; padding: 7px 2px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.caps-stat b { font-size: 17px; color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.caps-stat span { font-size: 9.5px; color: #9aa3bd; text-transform: uppercase; letter-spacing: .05em; }
.caps-search, .caps-find input, .caps-form input, .caps-form select, .caps-form textarea {
  font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.3); color: #fff; width: 100%; box-sizing: border-box; }
.caps-search:focus, .caps-form input:focus, .caps-form select:focus, .caps-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.caps-list { flex: 1; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; margin: 0 -4px; padding: 0 4px; }
.caps-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-align: left;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); color: inherit; font: inherit; cursor: pointer; transition: background .15s, border-color .15s; }
.caps-item:hover { background: rgba(255,255,255,.07); }
.caps-item.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.caps-item > i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.caps-item-main { display: grid; min-width: 0; }
.caps-item-main b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caps-item-main b em { font-style: normal; font-size: 9px; padding: 1px 5px; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: 2px; }
.caps-item-main span { font-size: 11px; color: #9aa3bd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caps-item-side { display: grid; justify-items: end; font-size: 12px; }
.caps-item-side small { font-size: 10px; color: #9aa3bd; }
.caps-empty { display: grid; gap: 4px; padding: 18px 8px; text-align: center; font-size: 12px; line-height: 1.5; color: #9aa3bd; }
.caps-empty b { color: #eef0f6; font-size: 14px; }

.caps-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; overflow: auto; align-content: start; flex: 1; margin: 0 -4px; padding: 0 4px; }
.caps-panel [hidden] { display: none !important; }
.caps-panel > * { min-width: 0; }
.caps-form-title { display: grid; gap: 2px; }
.caps-form-title span { font-size: 11px; color: #9aa3bd; }
.caps-form label { display: grid; gap: 4px; font-size: 11px; color: #9aa3bd; }
.caps-form label.check { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; color: #dfe3ee; }
.caps-form label.check input { width: auto; }
.caps-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.caps-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.caps-results { display: grid; gap: 4px; }
.caps-result { display: grid; text-align: left; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); color: inherit; font: inherit; cursor: pointer; }
.caps-result:hover { border-color: var(--accent); }
.caps-result b { font-size: 12px; }
.caps-result span { font-size: 10.5px; color: #9aa3bd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caps-hint { font-size: 11px; color: #9aa3bd; padding: 4px 2px; }
.caps-picked { font-size: 12px; padding: 7px 9px; border-radius: 8px; background: rgba(124,92,255,.12); border: 1px dashed rgba(124,92,255,.5); }
.caps-picked span { color: #9aa3bd; font-size: 11px; }
.caps-form-actions { display: flex; gap: 6px; align-items: center; padding-top: 4px; }

.caps-card { position: absolute; right: 14px; top: 14px; width: 290px; border-radius: 14px; overflow: hidden; z-index: 2; color: #eef0f6;
  background: rgba(12, 16, 32, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: capsIn .35s ease; }
.caps-card[hidden] { display: none; }
@keyframes capsIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.caps-card-top { padding: 16px 16px 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); }
.caps-card-top h3 { margin: 8px 0 4px; font-size: 18px; }
.caps-card-top p { margin: 0; font-size: 12px; color: #aab3cc; line-height: 1.4; }
.caps-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  color: #071018; background: var(--c); margin-right: 4px; }
.caps-badge.hq { background: var(--accent); color: #fff; }
.caps-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: #cfd5e6; font-size: 20px; cursor: pointer; z-index: 1; }
.caps-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 16px 12px; }
.caps-facts div { display: grid; gap: 2px; }
.caps-facts .wide { grid-column: 1 / -1; }
.caps-facts span { font-size: 10px; color: #8c95b0; text-transform: uppercase; letter-spacing: .05em; }
.caps-facts b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.caps-facts b.notes { font-weight: 400; line-height: 1.4; white-space: pre-wrap; }
.caps-facts .tone-ok { color: #3ddc97; } .caps-facts .tone-busy { color: #f5a524; } .caps-facts .tone-off { color: #aab0c0; }
.caps-card-actions { display: flex; gap: 6px; padding: 10px 16px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.caps-card-actions a.btn { text-decoration: none; color: #eef0f6; }

.caps-tools { position: absolute; right: 10px; bottom: 150px; display: grid; gap: 6px; z-index: 1; }
.caps-tool { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(12,16,32,.75); color: #fff; font-size: 15px; cursor: pointer; backdrop-filter: blur(10px); }
.caps-tool:hover { border-color: var(--accent); }
.caps .maplibregl-ctrl-group { background: rgba(12,16,32,.75); border: 1px solid rgba(255,255,255,.12); }
.caps .maplibregl-ctrl-group button + button { border-top-color: rgba(255,255,255,.1); }
.caps .maplibregl-ctrl-icon { filter: invert(1); }
.caps .maplibregl-ctrl-attrib, .caps .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(12,16,32,.72); color: #9aa3bd; }
.caps .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: transparent; }
.caps .maplibregl-ctrl-attrib a { color: #c9cfe0; }

/* pins */
.cap-marker { position: relative; width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.cap-marker .dot { position: absolute; inset: 3px; border-radius: 50%; background: var(--c, #7c5cff); box-shadow: 0 0 0 2px rgba(7,11,24,.9), 0 0 14px 3px var(--c, #7c5cff);
  display: grid; place-items: center; font-size: 8px; color: #071018; font-weight: 800; }
.cap-marker .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c, #7c5cff); opacity: 0; animation: capPulse 2.6s ease-out infinite; }
.cap-marker .ring.r2 { animation-delay: 1.3s; }
.cap-marker.s-planned .ring, .cap-marker.s-offline .ring { animation: none; }
.cap-marker.s-planned .dot { background: transparent; border: 2px dashed var(--c); box-shadow: 0 0 10px var(--c); }
.cap-marker.hq { width: 24px; height: 24px; }
.cap-marker.hq .dot { inset: 2px; font-size: 11px; }
@keyframes capPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
.cap-label { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; color: #fff; background: rgba(12,16,32,.82); border: 1px solid rgba(255,255,255,.14); pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s; }
.cap-marker:hover .cap-label, .cap-marker.selected .cap-label, .cap-marker.hq .cap-label, .cap-marker.draft .cap-label { opacity: 1; }
.cap-marker.selected .dot { box-shadow: 0 0 0 3px #fff, 0 0 22px 6px var(--c); }
.cap-marker.draft { --c: #ffffff; cursor: grab; }
.cap-marker.draft .dot { background: var(--accent); color: #fff; font-size: 12px; }
@media (max-width: 700px) {
  .caps-panel { width: auto; right: 12px; bottom: auto; max-height: 45%; }
  .caps-card { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
}
