/* haa-studio src/ui/theme/tokens.css (verbatim subset) */
:root {
  --bg: #05080f;
  --text: #e8effa;
  --muted: #8093ab;
  --line: rgba(148, 163, 184, .13);
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --pink: #ec4899;
  --amber: #f59e0b;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --module: rgba(13, 21, 37, .94);
  --r-board: 24px;
  --r-card: 12px;
  --r-pill: 999px;
  color-scheme: dark;
}

/* haa-studio src/ui/theme/base.css */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(34, 211, 238, .10), transparent 62%),
    radial-gradient(950px 650px at 96% 4%, rgba(59, 130, 246, .12), transparent 64%),
    radial-gradient(900px 620px at 65% 115%, rgba(34, 197, 94, .07), transparent 62%),
    var(--bg);
  display: grid;
  place-items: center;
}
.hs-board {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-board);
  border: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at 18% 0%, rgba(34, 211, 238, .055), transparent 70%),
    radial-gradient(820px 520px at 86% 22%, rgba(59, 130, 246, .055), transparent 72%),
    linear-gradient(180deg, var(--module), rgba(6, 11, 20, .97));
  box-shadow: 0 40px 110px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.hs-card { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--module); }
.hs-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(10, 17, 30, .6);
  color: var(--muted); font-size: 10.5px; white-space: nowrap;
}
.hs-mono { font-family: var(--mono); }
.hs-grid::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, .14) 1px, transparent 1.3px);
  background-size: 25px 25px; opacity: .5;
  -webkit-mask-image: radial-gradient(90% 90% at 50% 46%, #000 25%, transparent 100%);
  mask-image: radial-gradient(90% 90% at 50% 46%, #000 25%, transparent 100%);
  pointer-events: none;
}

/* widget layout: 480 x 480, no scroll */
.board {
  width: min(100vw, 480px); height: min(100vh, 480px);
  display: flex; flex-direction: column; gap: 7px; padding: 11px 12px 9px;
}
@media (max-width: 480px), (max-height: 480px) { .board { border-radius: 0; border: 0; box-shadow: none; } }
.board > * { position: relative; }
.head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; letter-spacing: .01em; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, .7); }
.brand small { color: var(--muted); font-weight: 400; font-size: 10.5px; }
.head .sp { flex: 1; }
.pill-ep.gpu { color: var(--green); }
.pill-ep.cpu { color: var(--amber); }
.pill-new { color: var(--cyan); cursor: pointer; border-color: rgba(34, 211, 238, .4); }

.card { padding: 7px 9px; }
.text-card { display: flex; flex-direction: column; gap: 5px; }
.row { display: flex; align-items: center; gap: 8px; }
.lbl { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
#example { max-width: 250px; }
textarea {
  width: 100%; height: 40px; resize: none; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 8, 15, .5);
  color: var(--text); font-size: 12.5px; line-height: 1.35; font-family: inherit; outline: none;
}
textarea:focus, select:focus, input[type=number]:focus { border-color: rgba(34, 211, 238, .55); }
select, input[type=number] {
  height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px;
  background: rgba(10, 17, 30, .85); color: var(--text); font-size: 11px; font-family: inherit; outline: none; min-width: 0;
}
input[type=number] { width: 64px; font-family: var(--mono); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; row-gap: 1px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; column-gap: 14px; }
.sec { color: var(--muted); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; height: 22px; }
.sec select { margin-left: auto; height: 21px; font-size: 10.5px; text-transform: none; letter-spacing: 0; }

/* haa-studio src/ui/stub/stub.css .stub-param, larger hit area for touch */
.param { display: flex; flex-direction: column; min-width: 0; }
.param.wide { grid-column: 1 / -1; }
.param > span { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10.5px; height: 14px; }
.param > span strong { color: var(--text); font: 10.5px var(--mono); font-weight: 400; }
.param input[type=range] {
  --range: 50%;
  width: 100%; height: 20px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; touch-action: pan-y;
}
.param input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 5px;
  background: linear-gradient(90deg, var(--cyan) var(--range), rgba(128, 147, 171, .22) var(--range));
}
.param input[type=range]::-moz-range-track {
  height: 4px; border-radius: 5px;
  background: linear-gradient(90deg, var(--cyan) var(--range), rgba(128, 147, 171, .22) var(--range));
}
.param input[type=range]::-webkit-slider-thumb {
  width: 14px; height: 14px; margin-top: -5px; appearance: none; -webkit-appearance: none;
  border: 2px solid var(--text); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, .45);
}
.param input[type=range]::-moz-range-thumb {
  width: 10px; height: 10px; border: 2px solid var(--text); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, .45);
}
.seed { display: flex; align-items: center; gap: 6px; height: 34px; }
.seed .lbl { flex: 1; }

.actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
button, .btn {
  height: 34px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: rgba(10, 17, 30, .6); color: var(--text); font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; touch-action: manipulation;
}
button.small { height: 24px; padding: 0 9px; font-size: 10.5px; font-weight: 500; }
button.play { background: var(--cyan); color: var(--bg); border-color: transparent; min-width: 104px; justify-content: center; box-shadow: 0 0 18px rgba(34, 211, 238, .28); }
button.play.stop { background: var(--pink); box-shadow: 0 0 18px rgba(236, 72, 153, .28); }
button:disabled, .btn.off { opacity: .45; cursor: default; pointer-events: none; }
.status { flex: 1; min-width: 0; color: var(--muted); font-size: 10.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status b { color: var(--text); font-weight: 500; }
.status .warn { color: var(--amber); }
.bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--cyan); width: 0; transition: width .2s; border-radius: 2px; }
.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 9.5px; }
.foot a { color: var(--muted); }

/* tags popover: over the controls, inside the 480 x 480 board */
.tags {
  position: absolute; left: 12px; right: 12px; top: 44px; bottom: 52px; z-index: 5;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  background: rgba(9, 15, 27, .985); box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
.tags b { font-size: 12.5px; font-weight: 600; }
.tags-sec { color: var(--muted); font-size: 10.5px; line-height: 1.35; margin-top: 2px; }
.tags-sec .hs-mono { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
button.chip { height: 23px; padding: 0 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; }
button.chip.emo { color: var(--cyan); }
button.chip.snd { color: var(--amber); }
button.chip.alias { color: var(--muted); }
.foot { align-items: center; }
button.small.linkish { height: 16px; padding: 0 7px; font-size: 9.5px; color: var(--muted); }
