:root {
  --bg: #f5f4f1;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6e6e73;
  --accent: #2563eb;
  --border: #e3e2de;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101014;
    --card: #1b1b21;
    --text: #ececf0;
    --muted: #9a9aa2;
    --accent: #7aa2ff;
    --border: #2c2c34;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

main {
  width: 100%;
  max-width: 34rem;
  padding: 2rem 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.center { text-align: center; }

.mark { font-size: 3rem; margin: 0; }

h1 { font-size: 1.5rem; margin: 1rem 0 0.5rem; }
h2 { font-size: 1rem; margin: 0 0 0.5rem; }

.muted { color: var(--muted); }

.cover {
  display: block;
  width: 100%;
  max-width: 16rem;
  margin: 0 auto;
  border-radius: 12px;
}

.description { color: var(--muted); margin: 0.5rem 0 1.5rem; }

.subscribe {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.9rem;
}

.feed-url {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}

.error { color: #d43d3d; }
.warn { color: var(--accent); }

.join { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }

.join label { font-size: 0.9rem; color: var(--muted); }

.join input {
  padding: 0.6rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.join button {
  padding: 0.6rem 0.9rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.creds dt { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }

.creds dd {
  margin: 0.25rem 0 0;
}

.creds code {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
}

.panel {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.panel h3 { font-size: 0.85rem; margin: 1rem 0 0.25rem; }

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.actions input {
  flex: 1;
  min-width: 12rem;
  padding: 0.45rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.actions button, .invite-row button {
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

button.danger { background: #d43d3d; }
button.copy { background: var(--muted); }

.invite-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0;
}

.invite-row code { flex: 1; }

.episode {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.ep-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.msg { font-size: 0.85rem; margin: 0.25rem 0 0; }
