:root {
  color-scheme: dark;
  --bg: #100e0c;
  --ink: #f6f1ea;
  --muted: #b7aa9c;
  --line: rgba(246, 241, 234, 0.14);
  --card: #1b1714;
  --accent: #e36a3a;
  --accent-ink: #2a1008;
  --admin: #e2b657;
  --editor: #7eb6c9;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(227, 106, 58, 0.2), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(226, 182, 87, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, Tahoma, sans-serif;
}

button, input { font: inherit; touch-action: manipulation; }

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--ink);
  color: #1a120e;
  font-weight: 800;
  cursor: pointer;
}

button.primary { background: var(--accent); color: var(--accent-ink); }
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.small { padding: 8px 12px; font-size: 0.86rem; }
button:disabled { opacity: 0.45; cursor: default; }

.app {
  width: min(520px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

#who {
  color: var(--muted);
  font-size: 0.85rem;
}

.stage { display: grid; gap: 16px; }

.hero, .card {
  background: rgba(27, 23, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px 18px 18px;
}

.disc-wrap { display: grid; place-items: center; margin-bottom: 8px; }

.disc {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f6f1ea 0 8px, #1a120e 9px 16px, transparent 17px),
    repeating-radial-gradient(circle at 50% 50%, #2a211c 0 2px, #14110f 3px 7px);
  box-shadow: inset 0 0 0 10px rgba(227, 106, 58, 0.85), 0 20px 50px rgba(0, 0, 0, 0.35);
}

.disc.is-on { animation: spin 4.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .disc.is-on { animation: none; }
}

h1 {
  margin: 8px 0 4px;
  font-size: 1.55rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sub, .hint, .banner { color: var(--muted); line-height: 1.7; }

.sub { margin: 0; min-height: 1.7em; }

.progress {
  direction: ltr;
  height: 8px;
  border-radius: 99px;
  background: rgba(246, 241, 234, 0.12);
  overflow: hidden;
  cursor: pointer;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e2b657, var(--accent));
}

.time {
  direction: ltr;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.row { display: flex; gap: 10px; }
.row > button { flex: 1; }

.stack { display: grid; gap: 10px; }

.drop, .banner, label.field { display: block; width: 100%; }

.drop {
  border: 1.5px dashed rgba(246, 241, 234, 0.28);
  border-radius: 18px;
  padding: 22px 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #14110f;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(246, 241, 234, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
}

.badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--editor);
  display: block;
}

.badge.admin i { background: var(--admin); }
.badge.live i { background: #e15b56; box-shadow: 0 0 0 4px rgba(225, 91, 86, 0.15); }

.meter {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 46px;
}

.meter i {
  flex: 1;
  height: 100%;
  display: block;
  border-radius: 99px;
  background: var(--accent);
  transform: scaleY(0.12);
  transform-origin: bottom;
}

.people { list-style: none; margin: 0; padding: 0; }
.people li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(488px, calc(100% - 32px));
  margin: 0 auto;
  background: #2a211c;
  color: var(--ink);
  border: 1px solid rgba(227, 106, 58, 0.55);
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.6;
}

.banner {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(226, 182, 87, 0.08);
  border: 1px solid rgba(226, 182, 87, 0.25);
}

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