:root {
  --accent: #ff385c;
  --accent-pressed: #e00b41;
  --text: #222222;
  --secondary: #6a6a6a;
  --muted: #b0b0b0;
  --background: #ffffff;
  --surface: #f7f7f7;
  --border: #dddddd;
  --hairline: #ebebeb;
  --success: #008a05;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.top {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
  text-decoration: none;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px calc(140px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
}

.hero img,
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .emoji { font-size: 84px; line-height: 1; }

.hero .caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
}

.eyebrow {
  margin: 22px 0 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.facts {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.facts li { display: flex; gap: 14px; align-items: center; }

.facts .icon {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.facts strong { display: block; font-weight: 600; }
.facts span { color: var(--secondary); font-size: 14px; }
.facts a { color: inherit; }

hr { border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }

h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.2px; }

.going { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.faces { display: flex; }
.faces .avatar { margin-left: -10px; border: 2px solid var(--background); }
.faces .avatar:first-child { margin-left: 0; }
.going p { margin: 0; color: var(--secondary); font-size: 15px; }
.going p strong { color: var(--text); }

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  background-size: cover;
  background-position: center;
}

.people { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.people li { display: flex; align-items: center; gap: 12px; }
.people .name { font-weight: 600; }
.people .sub { color: var(--secondary); font-size: 14px; }
.people .open { color: var(--muted); }
.avatar.empty { background: var(--background); border: 1.5px dashed var(--border); color: var(--muted); }

.about { margin: 0; color: var(--text); white-space: pre-line; }
.about.muted { color: var(--secondary); }
.about + .about { margin-top: 10px; font-size: 14px; }

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  border-top: 1px solid var(--hairline);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
}

.bar-inner { max-width: 520px; margin: 0 auto; }
.bar-row { display: flex; align-items: center; gap: 16px; }
.bar-text { flex: 1; min-width: 0; }
.bar-text strong { display: block; }
.bar-text span { color: var(--secondary); font-size: 14px; }

button, .button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 14px 22px;
  min-height: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
  text-align: center;
}

button:active, .button:active { background: var(--accent-pressed); }
button:disabled { background: var(--border); cursor: default; }
button.wide, .button.wide { width: 100%; }
button.outline, .button.outline { background: var(--background); color: var(--text); border: 1px solid var(--text); }
button.link { background: none; color: var(--text); padding: 0; min-height: 0; text-decoration: underline; font-weight: 600; }

form { display: grid; gap: 10px; }
form h3 { margin: 0; font-size: 18px; }
form p { margin: 0 0 4px; color: var(--secondary); font-size: 14px; }

input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--background);
}

input:focus { outline: 2px solid var(--text); outline-offset: -1px; }
input.code { letter-spacing: 6px; font-weight: 600; text-align: center; }

.error { color: #c13515; font-size: 14px; margin: 0; }
.form-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

.joined {
  margin: 22px 0 0;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
}

.joined h3 { margin: 0 0 4px; font-size: 18px; }
.joined p { margin: 0 0 14px; color: var(--secondary); font-size: 15px; }
.joined .actions { display: grid; gap: 10px; }

.state { padding: 64px 0; text-align: center; }
.state h1 { font-size: 24px; }
.state p { color: var(--secondary); margin: 10px 0 0; }

.sk { background: var(--surface); border-radius: 20px; }
.sk.hero { aspect-ratio: 4 / 3; }
.sk.line { height: 22px; border-radius: 8px; margin-top: 18px; width: 45%; }
.sk.line.wide { width: 80%; height: 30px; }

@media (prefers-reduced-motion: no-preference) {
  .sk { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.55; } }
}

form p.legal { margin: 2px 0 0; font-size: 12px; line-height: 1.45; text-align: center; }
form p.legal a { color: var(--text); }

.host { display: flex; gap: 16px; align-items: center; }
.host .avatar { width: 84px; height: 84px; font-size: 34px; }
.host h1 { font-size: 24px; line-height: 1.2; }
.host .who { color: var(--accent); }
.host .soft { font-weight: 400; color: var(--secondary); }
.about-host { margin: 6px 0 0; color: var(--secondary); font-size: 15px; }
