@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=Playfair+Display:wght@500;600&display=swap");

:root {
  --bg: #0a0a0a;
  --card: #141414;
  --ink: #f6f3ee;
  --muted: #b7b1a8;
  --line: rgba(246, 243, 238, 0.14);
  --serif: "Playfair Display", Georgia, serif;
  --sans: Archivo, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #050505;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
}
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.phone {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 18px 18px 14px;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(16px);
}
.brand {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.lede {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.status { margin: 24px 18px; color: var(--muted); }

.card {
  margin: 0 14px 22px;
}
.frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #1b1b1b;
}
.frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
}
.num {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.card-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 0;
}
.card-body > div { min-width: 0; }
.card-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.vote-btn { flex: 0 0 auto; }
.score {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-width: 92px;
  padding: 8px 12px 7px;
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.82);
  text-align: right;
}
.score b {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.score small {
  display: block;
  margin-top: 2px;
  color: #ffb4c1;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.vote-btn, .send, .ghost {
  appearance: none;
  border: 0;
  cursor: pointer;
}
.vote-btn, .send {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #111;
  font-weight: 600;
}
.vote-btn[disabled], .send[disabled] {
  opacity: 0.45;
  cursor: default;
}
.vote-btn.done {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

dialog {
  width: min(480px, 100%);
  max-height: none;
  margin: auto auto 0;
  padding: 22px 18px 24px;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: #161616;
  color: var(--ink);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.66); }
.dialog-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
dialog h2 {
  margin: 6px 0 16px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}
fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
fieldset label:has(input:checked) {
  border-color: var(--ink);
  background: #222;
}
fieldset input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid rgba(246, 243, 238, 0.7);
  border-radius: 50%;
  background: transparent;
}
fieldset label:has(input:checked) input {
  border-color: var(--ink);
  background: radial-gradient(circle, var(--ink) 0 5px, transparent 5.5px);
}
.email-field {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
}
.email-field span {
  color: var(--muted);
  font-weight: 400;
}
input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #101010;
}
input:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.hint, .form-error { margin: 8px 0 0; font-size: 13px; }
.hint { color: var(--muted); }
.form-error { min-height: 1.2em; color: #ffb4b4; }
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.ghost {
  min-height: 46px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
