@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --paper: #f3f1ea;
  --ink: #111110;
  --muted: #6b6a64;
  --line: #d9d6cc;
  --accent: #82AFCF;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app { min-height: 100dvh; display: flex; flex-direction: column; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.screen.center { justify-content: center; align-items: stretch; }

/* type */
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.display {
  font-weight: 900; letter-spacing: -0.04em; line-height: 0.92;
  font-size: clamp(54px, 17vw, 96px);
}
.display em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; line-height: 1.4; color: var(--muted); max-width: 30ch; }

.spacer { flex: 1; }

/* buttons */
.btn {
  appearance: none; border: none; cursor: pointer;
  width: 100%; padding: 20px 24px; border-radius: 100px;
  font-family: inherit; font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--ink); color: var(--paper);
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.975); }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }

/* form */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label {
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
}
.field .hint { font-weight: 500; color: var(--muted); }
.field input, .field textarea {
  font-family: inherit; font-size: 17px; color: var(--ink);
  background: #fbfaf6; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 15px 16px; resize: none; width: 100%;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 84px; line-height: 1.35; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.brand { font-weight: 900; letter-spacing: -0.03em; font-size: 20px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 2px; }

/* waiting */
.pulse-wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.pulse {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.82); opacity: 0.55; }
}
.count-pill {
  font-size: 14px; font-weight: 700; color: var(--muted);
  border: 1.5px solid var(--line); border-radius: 100px; padding: 8px 16px;
}

/* reveal (full-color takeover) */
.reveal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  padding: 34px 26px calc(34px + env(safe-area-inset-bottom));
  color: #fff;
  animation: flood 0.5s ease both;
}
@keyframes flood { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.reveal .r-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
.reveal .r-code {
  font-weight: 900; letter-spacing: -0.045em; line-height: 0.92;
  font-size: clamp(38px, 11vw, 96px); margin-top: 10px;
  overflow-wrap: break-word; hyphens: auto;
}
.reveal .r-desc { font-size: 20px; font-weight: 600; line-height: 1.32; margin-top: 18px; max-width: 26ch; }
.reveal .r-members { margin-top: 26px; display: flex; flex-direction: column; gap: 4px; }
.reveal .r-members .m-label { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-bottom: 6px; }
.reveal .r-members .m {
  font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.16;
}
.reveal .r-instruct {
  margin-top: auto; font-size: 17px; font-weight: 700; line-height: 1.35;
  background: rgba(0,0,0,0.18); border-radius: 18px; padding: 16px 18px; backdrop-filter: blur(2px);
}

/* admin */
.admin-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding: 40px 0;
}
.admin-stat .num { font-size: clamp(90px, 30vw, 180px); font-weight: 900; letter-spacing: -0.05em; line-height: 0.9; }
.admin-stat .lbl { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.pod-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.pod-card { border-radius: 18px; padding: 16px 18px; color: #fff; }
.pod-card .pc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pod-card .pc-code { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.pod-card .pc-n { font-size: 13px; font-weight: 800; opacity: 0.9; }
.pod-card .pc-desc { font-size: 14px; font-weight: 600; opacity: 0.95; margin: 6px 0 8px; line-height: 1.3; }
.pod-card .pc-members { font-size: 14px; font-weight: 700; opacity: 0.95; }

.toast { font-size: 14px; color: var(--accent); font-weight: 700; min-height: 20px; }
.hide { display: none !important; }
.muted-link { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; text-align: center; padding: 8px; }
