@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}
:root {
  --background: #ffffff;
  --pane: #ffffff;
  --foreground: #000000;
  --card: #f6f6f6;
  --secondary: #ededed;
  --muted: #737373;
  --border: #e2e2e2;
  --sidebar: #f6f6f6;
  --sidebar-border: #e2e2e2;
  --primary: #000000;
  --primary-fg: #ffffff;
  --ring: #0099ff;
  --hover: rgba(0,0,0,.045);
  --active: rgba(0,0,0,.075);
  --ok: #2d9f6f;
  --warn: #d4a017;
  --radius: 10px;
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
}
.dark {
  --background: #090909;
  --pane: #0c0c0c;
  --foreground: #ffffff;
  --card: #141414;
  --secondary: #1c1c1c;
  --muted: #999999;
  --border: #262626;
  --sidebar: #141414;
  --sidebar-border: #1a1a1a;
  --primary: #ffffff;
  --primary-fg: #0c0c0c;
  --hover: rgba(255,255,255,.06);
  --active: rgba(255,255,255,.1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
.gate {
  min-height: 100%;
  display: grid;
  place-items: center;
  background: var(--background);
}
.gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.gate .brand { padding: 0; }
.app { display: flex; height: 100%; }
aside {
  width: 232px;
  flex-shrink: 0;
  min-height: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px 12px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 18px;
  font-weight: 560; letter-spacing: -0.03em; font-size: 15px;
  white-space: nowrap;
}
.mark {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--foreground); color: var(--background);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  padding: 16px 10px 6px; font-size: 11px; font-weight: 500;
  color: var(--muted); letter-spacing: .04em; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 30px; padding: 0 10px; border-radius: 6px;
  color: var(--muted); text-decoration: none; border: 0; background: none;
  font: inherit; cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--hover); color: var(--foreground); }
.nav-item.on {
  background: color-mix(in srgb, var(--ring) 12%, transparent);
  color: var(--foreground); font-weight: 500;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .85; }
#chat-rooms { display: flex; flex-direction: column; gap: 2px; }
.chat-assign {
  font: inherit;
  font-size: 13px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
}
.grow { flex: 1; }
.user-wrap { position: relative; flex-shrink: 0; }
.user {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.user:hover, .user[aria-expanded="true"] { background: var(--hover); color: var(--foreground); }
.user #who-side {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--secondary); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600; color: var(--foreground);
  flex-shrink: 0;
}
.prefs {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 6px);
  background: var(--pane);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  padding: 6px;
  z-index: 20;
}
.prefs-who {
  padding: 8px 10px 6px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prefs-k {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.prefs-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 6px;
}
.prefs-field span {
  width: 36px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}
.prefs-field input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
}
.prefs-field input:focus {
  outline: none;
  border-color: var(--foreground);
}
.prefs-seg {
  display: flex;
  gap: 4px;
  padding: 0 6px 8px;
}
.prefs-seg button {
  flex: 1;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--muted);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.prefs-seg button.on {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}
.prefs-item {
  display: flex; align-items: center;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: none;
  border-radius: 6px;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.prefs-item:hover { background: var(--hover); }
.prefs-item:disabled { color: var(--muted); cursor: default; }
.prefs-item:disabled:hover { background: none; }
.prefs-status {
  padding: 4px 10px 8px;
  font-size: 11px;
  color: var(--muted);
}
main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--background); }
.chip {
  height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--secondary);
  color: var(--foreground); font: inherit; font-size: 12px; cursor: pointer;
}
.chip.primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
.view { display: none; flex: 1; min-height: 0; }
.view.on { display: flex; flex-direction: column; }
.chat {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.chat-log {
  flex: 1; min-height: 0;
  overflow: auto;
  overflow-anchor: none;
  padding: 20px 28px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-grow {
  flex: 1 0 0;
  min-height: 0;
}
.chat-welcome {
  margin: auto;
  text-align: center;
  padding: 24px;
}
.chat-mark {
  width: 36px; height: 36px; border-radius: 10px; margin: 0 auto 12px;
  background: var(--foreground); color: var(--background);
  display: grid; place-items: center; font-size: 16px; font-weight: 700;
}
.chat-welcome h1 {
  margin: 0 0 6px; font-size: 24px; font-weight: 560;
  letter-spacing: -0.04em; color: var(--foreground);
}
.chat-welcome p { margin: 0; color: var(--muted); font-size: 14px; }
.row {
  display: flex;
  width: min(760px, 100%);
  margin: 0 auto;
}
.row.you { justify-content: flex-end; }
.row.chief { justify-content: flex-start; }
.bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: min(560px, 82%);
  min-width: 0;
}
.bubble-from {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 6px 4px;
  letter-spacing: .01em;
}
.bubble-wrap .bubble { max-width: 100%; }
.bubble {
  max-width: min(560px, 82%);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.you {
  background: var(--primary);
  color: var(--primary-fg);
  border-bottom-right-radius: 4px;
}
.bubble.chief {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble.error { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.bubble-link {
  color: var(--ring);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.bubble.you .bubble-link { color: inherit; }
.bubble-src {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}
.bubble.pending {
  min-width: 48px;
  color: var(--muted);
  white-space: normal;
}
.bubble.pending .bubble-src {
  margin-top: 6px;
}
.bubble-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: normal;
}
.bubble-steps:not(:first-child) { margin-top: 8px; }
.bubble-step {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}
.bubble-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}
.bubble-step.on { color: var(--foreground); }
.bubble-step.on::before { background: var(--foreground); }
.bubble.pending span {
  display: inline-block;
  animation: chat-dot 1.2s infinite;
}
.bubble.pending span:nth-child(2) { animation-delay: .15s; }
.bubble.pending span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot {
  0%, 80%, 100% { opacity: .25; }
  40% { opacity: 1; }
}
.composer-bar {
  flex-shrink: 0;
  padding: 8px 20px 16px;
  background: var(--background);
}
.composer-row {
  width: min(804px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.composer-tools { position: relative; flex-shrink: 0; }
.composer-tools-btn {
  width: 36px; height: 36px;
  border: 0;
  background: none;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
}
.composer-tools-btn:hover,
.composer-tools-btn[aria-expanded="true"] {
  background: var(--hover);
  color: var(--foreground);
}
.composer-tools-btn svg { width: 16px; height: 16px; }
.composer-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 176px;
  background: var(--pane);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  padding: 6px;
  z-index: 20;
}
.composer {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 12px 10px 16px;
  display: flex; align-items: flex-end; gap: 8px;
}
.composer textarea {
  flex: 1; resize: none; border: 0; background: transparent;
  color: var(--foreground); font: inherit; outline: none;
  min-height: 24px; max-height: 160px; line-height: 1.4;
}
.send {
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--primary); color: var(--primary-fg); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.send:disabled { opacity: .4; cursor: default; }
.pad { padding: 8px 28px 28px; overflow: auto; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-head .sub { margin-bottom: 12px; max-width: 52rem; }
.page-actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 6px; }
h2 { font-size: 18px; font-weight: 560; letter-spacing: -0.03em; margin: 4px 0 4px; }
h3 { font-size: 13px; font-weight: 560; letter-spacing: -0.02em; margin: 22px 0 8px; }
.fold { margin: 18px 0 0; }
.fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: -0.02em;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--muted);
  transform-origin: 40% 50%;
}
.fold[open] > summary::before { transform: rotate(90deg); }
.fold-count { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .04em; }
.fold .sub { margin: 10px 0 12px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.kpi {
  border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; background: var(--card);
}
.kpi .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 22px; font-weight: 560; letter-spacing: -0.03em; margin-top: 6px; }
.kpi .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.off { background: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
select.license-map-select {
  max-width: 260px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--pane);
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
}
tr:hover td { background: var(--hover); }
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; background: var(--secondary); color: var(--foreground);
}
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.audit { font-size: 13px; }
.audit li { list-style: none; padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.audit time { color: var(--muted); width: 64px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 12px; margin-top: 16px; }
.hidden, [hidden] { display: none !important; }
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}
.workspace .chat { flex: 1; min-width: 0; }
.rail {
  width: 280px;
  flex-shrink: 0;
  padding: 0;
  border-right: 0;
  border-left: 1px solid var(--border);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rail.rail-off { width: 40px; }
.rail.rail-edit { width: 360px; }
.rail.rail-edit .rail-block:not(#routine-rail) { display: none; }
.rail-toggle {
  flex-shrink: 0;
  height: 36px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center start;
  padding: 0 12px;
}
.rail.rail-off .rail-toggle {
  height: auto;
  flex: 1;
  border-bottom: 0;
  place-items: center;
  padding: 0;
}
.rail-toggle svg { width: 16px; height: 16px; }
.rail-toggle:hover { color: var(--foreground); background: var(--hover); }
.rail:not(.rail-off) .rail-toggle svg { transform: rotate(180deg); }
.rail-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rail.rail-off .rail-body { display: none; }
.rail-block { padding: 14px 14px 10px; border-bottom: 1px solid var(--border); }
.grow-col { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.rail-k {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rail-head .rail-k { margin: 0; }
.rail-plus {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--foreground); font: inherit; cursor: pointer; line-height: 1;
}
.rail-screen {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  min-height: 0;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #c8c8c8;
  font: inherit;
  font-size: 12px;
  text-align: left;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.rail-screen-live {
  position: absolute;
  inset: 0;
  background: #111;
}
.rail-screen-live > div {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  overflow: hidden !important;
}
.rail-screen-live canvas {
  margin: 0 !important;
}
#rail-computer-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  pointer-events: none;
}
.rail-screen.is-live #rail-computer-status { display: none; }
.routine-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.routine-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}
.routine-list li:hover { background: var(--hover); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.routine-list .muted { color: var(--muted); border: 0; cursor: default; }
.routine-list .muted:hover { background: none; margin: 0; padding-left: 0; padding-right: 0; }
.routine-list .when { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
#routine-list-view { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#routine-list-view[hidden] { display: none !important; }
.routine-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  gap: 12px;
  padding-bottom: 16px;
}
.routine-editor[hidden] { display: none !important; }
.routine-editor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 560;
}
.routine-editor-bar button {
  width: 28px; height: 28px; border: 0; background: none;
  color: var(--foreground); cursor: pointer; border-radius: 6px;
  display: grid; place-items: center; padding: 0;
}
.routine-editor-bar button:hover { background: var(--hover); }
.routine-editor-bar svg { width: 16px; height: 16px; }
.routine-editor-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#routine-save-status {
  margin: 0;
  min-height: 1.2em;
}
.routine-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.routine-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.routine-switch {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--secondary); border: 1px solid var(--border);
  position: relative; flex-shrink: 0;
}
.routine-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted);
}
.routine-toggle input:checked + .routine-switch {
  background: #12b5a0; border-color: #12b5a0;
}
.routine-toggle input:checked + .routine-switch::after {
  left: 18px; background: #fff;
}
.routine-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.routine-field input, .routine-field textarea, .routine-picker input, #routine-fire-url {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
}
.routine-field textarea { resize: vertical; min-height: 120px; line-height: 1.4; }
.routine-when-block, .routine-history-block { display: flex; flex-direction: column; gap: 8px; }
.routine-sched-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
}
.routine-sched-card.on {
  border-color: var(--foreground);
}
.routine-sched-card .clock { color: var(--muted); }
.routine-sched-card button {
  margin-left: auto;
  border: 0; background: none; color: var(--muted);
  cursor: pointer; font: inherit; font-size: 16px; line-height: 1;
}
.routine-add-when {
  border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 13px; text-align: left;
  padding: 4px 0; cursor: pointer;
}
.routine-add-when:hover { color: var(--foreground); }
.routine-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.routine-picker[hidden] { display: none !important; }
.routine-triggers { display: flex; flex-wrap: wrap; gap: 6px; }
.routine-triggers button {
  height: 26px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--secondary);
  color: var(--foreground); font: inherit; font-size: 11px; cursor: pointer;
}
.routine-triggers button.on {
  background: var(--foreground); color: var(--background); border-color: var(--foreground);
}
.routine-days { display: flex; flex-wrap: wrap; gap: 4px; }
.routine-days button {
  height: 24px; padding: 0 7px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--background);
  color: var(--muted); font: inherit; font-size: 11px; cursor: pointer;
}
.routine-days button.on { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.routine-quiet-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 4px;
}
.routine-quiet-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.routine-quiet-times[hidden] { display: none !important; }
.routine-quiet-times label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.routine-quiet-times input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
}
#routine-clock, #routine-cadence {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
}
#routine-clock[hidden] { display: none !important; }
.routine-hint { margin: 0; font-size: 12px; color: var(--muted); }
.routine-hint[hidden] { display: none !important; }
.routine-hook-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.routine-history { list-style: none; margin: 0; padding: 0; }
.routine-history li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.routine-history .muted { color: var(--muted); border: 0; }
.routine-history .ok { margin-left: auto; color: var(--ok); font-size: 14px; }
.routine-history .bad { margin-left: auto; color: #c45c5c; font-size: 14px; }
.routine-card {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--secondary);
  font-size: 12px;
}
.routine-card button { margin-top: 6px; }
.confirm-card .row-actions { display: flex; gap: 8px; margin-top: 8px; }
.confirm-card .row-actions button { margin-top: 0; }
.computer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.computer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.computer-status { font-size: 13px; color: var(--muted); }
.computer-screen {
  flex: 1;
  min-height: 0;
  background: var(--background);
  position: relative;
  overflow: hidden;
  container-type: size;
  display: grid;
  place-items: center;
}
.computer-screen > div:not(.computer-empty) {
  width: min(100%, calc(100cqh * 16 / 10));
  max-height: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  background: transparent !important;
  overflow: hidden !important;
}
.computer-screen canvas {
  margin: 0 !important;
}
.computer-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #c8c8c8;
}
.computer-empty p { margin: 0 0 8px; font-size: 14px; }
.computer-empty .sub { color: #8a8a8a; margin: 0; }
.portal-box {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.portal-box .sub { margin: 0; font-size: 12px; color: var(--muted); }
.portal-list { list-style: none; margin: 0; padding: 0; max-height: 140px; overflow: auto; }
.portal-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.portal-list .muted { color: var(--muted); border: 0; }
.portal-list .when { color: var(--muted); font-size: 12px; }
.portal-form { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; }
.portal-form input {
  border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  border-radius: 8px; font: inherit; font-size: 13px; padding: 8px 10px;
}
@media (max-width: 900px) {
  .portal-form { grid-template-columns: 1fr; }
}
