:root {
  color-scheme: dark;
  --bg: #121418;
  --panel: #1c2028;
  --line: #2d3340;
  --text: #e7ebf2;
  --muted: #9aa3b2;
  --accent: #7eb6ff;
  --danger: #ff8d8d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 "Segoe UI", sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 8px;
}

#session-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#session-tools[hidden] { display: none; }

#clipboard-toggle.pending {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 28px; font-weight: 650; }

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--accent);
  color: #0d1520;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

main { padding: 12px 28px 32px; }

#cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.card h2 { margin: 0 0 4px; font-size: 20px; }
.card p { margin: 0 0 16px; color: var(--muted); }

label {
  display: block;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

input, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101318;
  color: var(--text);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

.card button { margin-top: 16px; }

.error { color: var(--danger); }

#stage[hidden] { display: none; }

#stage {
  height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  padding: 0 12px 12px;
}

#stage:fullscreen {
  height: 100%;
  box-sizing: border-box;
  background: #000;
  padding: 8px;
}

#status {
  margin: 0 16px 8px;
  min-height: 1.2em;
  color: var(--muted);
}

#clipboard {
  margin: 0 16px 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

#clipboard[hidden] { display: none; }

#clipboard textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101318;
  color: var(--text);
  font: 14px/1.4 ui-monospace, monospace;
}

.clipboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#display {
  flex: 1;
  overflow: auto;
  background: #000;
  border-radius: 10px;
  position: relative;
  z-index: 0;
}

#display canvas { display: block; }

#display:focus { outline: none; }
