body {
  background: var(--surface-bg);
  color: var(--surface-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}

.wrap {
  max-width: 30rem;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 1.25rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.masthead {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--surface-line);
  margin-bottom: 1.5rem;
}

.masthead .on-air {
  margin-bottom: 0.6rem;
}

.masthead h1 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.masthead p {
  margin: 0;
  color: var(--surface-mist);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 34ch;
}

/* --- code entry (no ?code in URL) --- */
.code-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: auto;
  margin-bottom: auto;
}

.code-form label {
  font-size: 0.85rem;
  color: var(--surface-mist);
}

.code-form input {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.9rem 0.5rem;
  border-radius: 14px;
  border: 1.5px solid var(--surface-line);
  background: var(--surface-panel);
  color: var(--surface-text);
}

/* --- composer --- */
.composer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.composer textarea {
  resize: none;
  min-height: 8.5rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1.5px solid var(--surface-line);
  background: var(--surface-panel);
  color: var(--surface-text);
  font-size: 1.02rem;
  line-height: 1.5;
}

.composer input[type="text"] {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--surface-line);
  background: var(--surface-panel);
  color: var(--surface-text);
  font-size: 0.95rem;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--surface-mist);
  text-align: right;
}

button.primary {
  border: none;
  background: var(--signal);
  color: #fff;
  padding: 0.95rem 1.2rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

button.primary:active {
  transform: scale(0.98);
}

button.primary:disabled {
  background: var(--surface-mist);
  cursor: not-allowed;
}

.status-line {
  min-height: 1.4rem;
  font-size: 0.88rem;
  color: var(--surface-mist);
}

.status-line.error {
  color: var(--signal);
}

/* --- history --- */
.history {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--surface-line);
}

.history h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--surface-mist);
  margin: 0 0 0.7rem;
}

.history ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.history li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: var(--surface-overlay);
  font-size: 0.9rem;
  line-height: 1.4;
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.history .dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 50%;
}

.history .dot.pending {
  background: var(--amber);
}
.history .dot.approved {
  background: var(--jade);
}
.history .dot.rejected {
  background: var(--surface-mist);
}
.history .dot.checking {
  background: var(--signal);
  animation: pulse 1.8s ease-out infinite;
}

.history .meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--surface-mist);
  display: block;
  margin-top: 0.15rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-state h1 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.empty-state p {
  color: var(--surface-mist);
  font-size: 0.9rem;
}
