:root {
  --bg: #0d1017;
  --bg-raised: #151a24;
  --border: #262d3d;
  --text: #e6e9f0;
  --text-dim: #8b93a7;
  --side-a: #4fd1e5;
  --side-b: #f5789a;
  --accent: #7c8cff;
  --ok: #4fd18a;
  --warn: #f5b34f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.container.wide {
  max-width: 860px;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.hero .tagline {
  color: var(--text-dim);
  margin: 0;
}

.hero.small {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.hero.small .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.hero.small .tagline {
  margin-top: 0.4rem;
  word-break: break-word;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.side-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 480px) {
  .side-field-row {
    grid-template-columns: 1fr;
  }
}

.optional {
  font-weight: normal;
  opacity: 0.7;
}

input[type="text"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
}

button {
  background: var(--accent);
  color: #0a0c12;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

.link-row {
  margin-bottom: 1rem;
}

.link-row label {
  margin-bottom: 0.3rem;
}

.copy-field {
  display: flex;
  gap: 0.5rem;
}

.copy-field input {
  margin-top: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.watch-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--border);
  color: var(--text-dim);
}

.status-badge.status-active {
  background: rgba(79, 209, 138, 0.15);
  color: var(--ok);
}

.status-badge.status-concluded_agreement {
  background: rgba(79, 209, 138, 0.15);
  color: var(--ok);
}

.status-badge.status-concluded_turncap {
  background: rgba(245, 179, 79, 0.15);
  color: var(--warn);
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  min-height: 100px;
}

.transcript .empty {
  color: var(--text-dim);
  text-align: center;
  padding: 2rem 0;
}

.bubble {
  max-width: 78%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.bubble.side-a {
  align-self: flex-start;
  border-left: 3px solid var(--side-a);
}

.bubble.side-b {
  align-self: flex-end;
  border-right: 3px solid var(--side-b);
}

.bubble-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bubble.side-a .bubble-meta {
  color: var(--side-a);
}

.bubble.side-b .bubble-meta {
  color: var(--side-b);
}

.bubble-content {
  white-space: pre-wrap;
  line-height: 1.4;
}

.bubble-summary {
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.bubble details {
  margin-top: 0;
}

.bubble details summary {
  font-size: 0.75rem;
}

.bubble details .bubble-content {
  margin-top: 0.5rem;
  color: var(--text-dim);
}

.instructions p {
  margin: 0 0 0.6rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

.instructions p:first-child {
  color: var(--text);
  font-weight: 600;
}

details {
  margin-top: 0.75rem;
}

summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.agree-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.agree-label input {
  width: auto;
  margin: 0;
}

.composer-status {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.6rem 0 0;
}
