:root {
  --night: #07080c;
  --ivory: #f3eee4;
  --ivory-dim: rgba(243, 238, 228, 0.66);
  --gold: #c6a56a;
  --gold-2: #e7d7b4;
  --line: rgba(198, 165, 106, 0.45);
  --latin: "Cormorant Garamond", Georgia, serif;
  --sans: Outfit, sans-serif;
  --phone: 440px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, textarea { font: inherit; color: inherit; }

button {
  background: transparent;
  border: 0;
  appearance: none;
  cursor: pointer;
}

[hidden] { display: none !important; }

.phone {
  position: relative;
  width: min(100%, var(--phone));
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #05060a;
}

#wall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.top, .dock {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.top {
  top: 0;
  padding: calc(10px + env(safe-area-inset-top)) 18px 28px;
  background: linear-gradient(to bottom, rgba(7, 8, 12, 0.9) 30%, rgba(7, 8, 12, 0));
}

.dock {
  bottom: 0;
  padding: 32px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(7, 8, 12, 0.94) 42%, rgba(7, 8, 12, 0));
}

.bar, .langs, .top button, .dock button, .tip, .toast {
  pointer-events: auto;
}

.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.domain {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.mode {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ivory-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.mode i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.mode.live i { background: #9dcea0; }

.langs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.langs button {
  min-width: 44px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--ivory-dim);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.langs button[aria-pressed="true"] {
  background: rgba(198, 165, 106, 0.18);
  color: var(--gold-2);
}

.banner {
  margin: 8px 0 0;
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1.4;
}

h1 {
  margin: 6px 0 0;
  font-family: var(--latin);
  font-style: italic;
  font-weight: 500;
  font-size: 38px;
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
}

.lede, .hope {
  margin: 8px 0 0;
  color: var(--ivory-dim);
  font-size: 13.5px;
  line-height: 1.35;
  text-wrap: balance;
}

.hope {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.caption {
  margin: 10px 0 0;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stat {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.big {
  margin: 0;
  font-family: var(--latin);
  font-weight: 500;
  font-size: 52px;
  line-height: 0.8;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.kicker, .meta, .quota, .explain {
  margin: 0;
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.meta, .quota, .explain {
  color: var(--ivory-dim);
  font-size: 12px;
  line-height: 1.35;
}

.meta.dim { opacity: 0.8; }

.meter {
  height: 2px;
  margin: 10px 0 8px;
  background: rgba(243, 238, 228, 0.12);
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #9d1a38, #c6a56a 55%, #0b4ea8);
}

.explain {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.primary, .ghost {
  min-height: 44px;
  border-radius: 999px;
}

.primary {
  width: 100%;
  background: var(--gold);
  color: #1a140c;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.primary:disabled {
  opacity: 0.45;
}

.ghost {
  border: 1px solid var(--line);
  color: var(--gold-2);
  background: transparent;
  padding: 0 10px;
}

.row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.row .ghost, .row .primary { flex: 1; font-size: 12px; line-height: 1.15; }

.tip {
  position: absolute;
  z-index: 3;
  width: min(220px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.92);
}

.tip strong { display: block; font-weight: 500; font-size: 13px; }

.tip p { margin: 4px 0 8px; color: var(--ivory-dim); font-size: 13px; }

.tip button {
  min-height: 32px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(188px + env(safe-area-inset-bottom));
  z-index: 4;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(243, 238, 228, 0.94);
  color: #1a140c;
  text-align: center;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.toast.show { opacity: 1; }

dialog.sheet {
  width: min(var(--phone), calc(100vw - 28px));
  max-height: min(78dvh, 680px);
  margin: auto;
  padding: 22px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 14, 18, 0.96);
  color: var(--ivory);
}

dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.62); }

.sheet h2 {
  margin: 0 0 8px;
  font-family: var(--latin);
  font-weight: 500;
  font-style: italic;
  font-size: 30px;
  line-height: 1;
}

.sheet p { color: var(--ivory-dim); font-size: 14px; line-height: 1.4; }

.sheet label {
  display: block;
  margin: 14px 0;
  color: var(--gold-2);
  font-size: 13px;
}

.sheet input, .sheet textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
}

.sheet textarea { resize: none; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.share-grid button { min-height: 44px; }

.wide { width: 100%; margin-top: 8px; }

.lines-sheet { overflow: auto; }

.voices { list-style: none; margin: 0; padding: 0; }

.voices li {
  padding: 10px 0;
  border-top: 1px solid rgba(243, 238, 228, 0.08);
}

.voices .who { margin: 0; font-size: 13px; }

.voices .msg { margin: 4px 0 0; color: var(--ivory); }

.voices .when { margin: 2px 0 0; color: var(--ivory-dim); font-size: 11px; }

.voices button {
  margin-top: 4px;
  min-height: 32px;
  padding: 0;
  color: var(--gold);
  font-size: 12px;
}

.fine {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.45;
}

.noscript {
  padding: 24px;
  text-align: center;
}
