:root {
  /* Shared with proofship/templates/_design/DESIGN.md + Studio Preview */
  --bg: #0f1115;
  --panel: #171a21;
  --line: #2a3040;
  --text: #e8ecf4;
  --muted: #8b93a7;
  --accent: #6ee7b7;
  --warn: #fbbf24;
  --danger: #f87171;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

body.share-mode #executor-fieldset,
body.share-mode #deploy-panel,
body.share-mode #account-panel,
body.share-mode #room-list,
body.share-mode #invite-list,
body.share-mode #cancel,
body.share-mode #disconnect {
  display: none !important;
}

body.share-mode:not(.share-comment):not(.share-command) #composer {
  display: none !important;
}

body.share-mode.share-comment:not(.share-command) #send-prompt,
body.share-mode.share-comment:not(.share-command) #steer {
  display: none !important;
}

.share-badge {
  font-size: 0.4em;
  vertical-align: middle;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  margin-left: 10px;
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: uppercase;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.5 var(--sans);
  background:
    radial-gradient(1000px 520px at 8% -10%, #1c2740, transparent 60%),
    linear-gradient(180deg, #12151c, var(--bg));
}

.top {
  padding: 48px 28px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.brand {
  font-family: var(--font);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.presence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 7.5rem;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 70%, #0c0e13);
}
.presence-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.presence-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.presence-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
.lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #3a4154;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}
.lamp.on { background: var(--accent); }
.lamp.off { background: #3a4154; }
.lamp.unknown { background: var(--warn); }
.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.field-row input { flex: 1; min-width: 0; }
button.tiny {
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}
.device-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.device-line code {
  font-size: 12px;
  color: var(--text);
}
.room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}
.room-list .hint {
  flex: 1 0 100%;
  margin: 0;
}
.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font: 12px/1 var(--mono);
}
.room-chip.live { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.invite-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.invite-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font: 12px/1.3 var(--mono);
  color: var(--muted);
}
.tag {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 28px 64px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .layout { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .panel.span { grid-column: 1 / -1; }
}
textarea {
  border: 1px solid var(--line);
  background: #0c0e13;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: 12px/1.4 var(--mono);
  resize: vertical;
}
.views { display: grid; gap: 10px; margin-top: 14px; }
.view-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.view-card strong { font-family: var(--mono); font-size: 12px; }

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  padding: 20px;
}
h1, h2 { margin: 0 0 10px; font-family: var(--font); letter-spacing: -0.02em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; margin-top: 18px; color: var(--muted); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.lede { margin: 0 0 18px; color: var(--muted); }

.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
input {
  border: 1px solid var(--line);
  background: #0c0e13;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: 13px/1.3 var(--mono);
}
.row { display: flex; gap: 8px; flex-wrap: wrap; }
button {
  appearance: none;
  border: 1px solid #166534;
  background: #134e3a;
  color: #ecfdf5;
  border-radius: 8px;
  padding: 10px 14px;
  font: 13px/1 var(--sans);
  cursor: pointer;
}
button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
a.linkish {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
a.linkish:hover { color: var(--text); border-color: var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.status { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.status.live { color: var(--accent); }
.status.err { color: #f87171; }

.code {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #0c0e13;
  border: 1px solid var(--line);
  font: 12px/1.4 var(--mono);
  overflow: auto;
  max-height: 280px;
}
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.events li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 12px/1.4 var(--mono);
  color: var(--muted);
}
.events strong { color: var(--text); font-weight: 600; }

.hint { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.executor {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.executor legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.radio {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  color: var(--text);
  font-size: 13px;
}
.session-panel { min-height: 420px; display: flex; flex-direction: column; }
.transcript {
  flex: 1;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0e13;
  padding: 10px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.t-line pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.4 var(--mono);
  color: var(--text);
}
.t-kind {
  font: 11px/1 var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.t-session-user .t-kind { color: var(--accent); }
.t-session-agent .t-kind { color: var(--warn); }
.composer { margin-top: auto; }

.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 40px;
  color: var(--muted);
  font-size: 12px;
}
code { font-family: var(--mono); }
