:root {
  --black: #050505;
  --bg: #070707;
  --panel: #101010;
  --panel-2: #151515;
  --ink: #f3f3f3;
  --muted: #9a9a9a;
  --soft: #1d1d1d;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --white: #ffffff;
  --glow: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,0.12), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input { font: inherit; }
.hidden { display: none !important; }

.phone-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 220px),
    var(--bg);
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.auth-screen { display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; margin: 0 auto; }
.auth-brand { text-align: center; margin-bottom: 8px; }
.auth-brand img, .app-header img, .avatar-wrap img { object-fit: contain; filter: invert(1); opacity: 0.96; }
.auth-brand img { width: 96px; height: 96px; }
.auth-brand h1 { margin: 8px 0; font-size: 54px; line-height: 1; letter-spacing: -0.08em; }
.auth-brand p { margin: 0 auto; max-width: 390px; color: var(--muted); font-size: 17px; }

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow: 0 22px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.05);
}

.auth-card, .action-card, .profile-card { padding: 24px; }
.black-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
  border-color: var(--line-strong);
}
.black-card p { color: #cfcfcf; }

.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
label { display: block; margin-bottom: 8px; color: #dedede; font-size: 14px; font-weight: 800; }
input {
  width: 100%;
  height: 58px;
  margin-bottom: 14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.055);
  color: var(--ink);
  outline: none;
}
input::placeholder { color: #686868; }
input:focus { border-color: rgba(255,255,255,0.42); background: rgba(255,255,255,0.08); }

button {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-weight: 900;
  cursor: pointer;
}

small { display: block; margin-top: 12px; color: var(--muted); text-align: center; }

.app-screen { position: relative; max-width: 560px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 0 24px; }
.app-header h1 { margin: 0; font-size: 42px; line-height: 1; letter-spacing: -0.07em; }
.app-header img { width: 52px; height: 52px; }
.app-header-actions { display: flex; align-items: center; gap: 10px; }
.command-link { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 900; }

.quote-card {
  padding: 26px;
  margin-bottom: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045));
  border-color: var(--line-strong);
}
.quote-label { margin: 0 0 16px; color: #bdbdbd; font-size: 12px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
blockquote { margin: 0; font-size: clamp(30px, 10vw, 48px); line-height: 0.98; font-weight: 900; letter-spacing: -0.07em; }
.quote-note { margin: 18px 0 0; color: #c9c9c9; }

.tab-panel { display: grid; gap: 16px; }
.action-card h2, .profile-card h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -0.06em; }
.action-card p, .muted { margin: 0; color: var(--muted); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.admin-badge { padding: 7px 10px; border-radius: 999px; background: #fff; color: #050505; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.poll-list { display: grid; gap: 12px; margin-top: 20px; }
.poll-option {
  min-height: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  color: var(--ink);
  text-align: left;
}
.poll-option.voted { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.08); }
.poll-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #050505; font-weight: 900; }
.poll-main { position: relative; display: grid; gap: 3px; overflow: hidden; }
.poll-main strong { position: relative; z-index: 1; }
.poll-main em { position: relative; z-index: 1; color: var(--muted); font-style: normal; font-size: 13px; }
.poll-main i { display: block; height: 5px; margin-top: 8px; border-radius: 999px; background: #fff; }

.inline-form { display: grid; gap: 10px; margin-top: 18px; }
.inline-form input { margin: 0; }

.profile-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.profile-row span { color: var(--muted); }
.secondary-button { margin-top: 22px; background: transparent; color: var(--ink); border-color: var(--line-strong); }
.avatar-wrap { display: grid; place-items: center; gap: 12px; margin: 22px 0; }
.avatar-wrap img { width: 108px; height: 108px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.06); }
.photo-button { margin: 0; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; color: var(--ink); }

.prototype-list { display: grid; gap: 10px; margin-top: 20px; }
.prototype-list span { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,0.055); font-weight: 800; }
.prototype-list.compact { margin-top: 16px; }
.prototype-list.compact span { padding: 11px 14px; }

.bill-card { margin-top: 20px; padding: 20px; border-radius: 22px; background: #fff; color: #050505; }
.bill-card span, .bill-card small { color: #505050; text-align: left; }
.bill-card strong { display: block; margin: 8px 0 2px; font-size: 44px; line-height: 1; letter-spacing: -0.06em; }
.allocation-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.allocation-card div { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.035); }
.allocation-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.allocation-card strong { display: block; margin-top: 4px; font-size: 22px; }

.ladder { display: grid; gap: 10px; margin-top: 18px; }
.ladder div { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,0.055); }
.ladder strong { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #050505; }
.ladder span { font-weight: 850; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(560px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(7,7,7,0.86);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.nav-item { min-height: 48px; padding: 0 8px; border-color: transparent; background: transparent; color: var(--muted); font-size: 13px; }
.nav-item.active { background: #fff; color: #050505; }

@media (max-width: 420px) { .allocation-card { grid-template-columns: 1fr; } }
@media (min-width: 720px) { body { background: #000; } .phone-shell { max-width: 560px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); } }
