:root {
  --void: #07050a;
  --plum: #140c14;
  --card: #181018;
  --card-2: #21161f;
  --line: #3d2c38;
  --ink: #f6efe8;
  --mute: #b7a4ae;
  --hot: #ff4d8d;
  --hot-2: #ff7aa8;
  --gold: #e7c7a0;
  --ice: #c9d7ff;
  --ok: #7dcea0;
  --danger: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --nav: 72px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
}
body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 10% -10%, #3a152c 0%, transparent 55%),
    radial-gradient(700px 400px at 110% 0%, #1c1838 0%, transparent 50%),
    var(--void);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 40;
  background: #fff;
  color: #111;
  padding: 8px 12px;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(var(--nav) + 18px + env(safe-area-inset-bottom));
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-kicker {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
}
.brand h1 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 2.35rem;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.count {
  text-align: right;
}
.count b {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--hot-2);
}
.count span { color: var(--mute); font-size: 0.78rem; font-weight: 600; }

.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 280px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.hero img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.hero-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(7,5,10,0.92));
}
.hero-copy p { margin: 0; color: var(--mute); font-size: 0.92rem; }
.hero-copy strong {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  margin-top: 2px;
}

.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin: 0 -4px 8px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.chip, .story {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.86rem;
  min-height: 40px;
}
.chip.on, .story.on {
  background: var(--ink);
  color: var(--void);
  border-color: var(--ink);
}
.story {
  border-radius: 16px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255,77,141,0.16), transparent 60%),
    var(--card);
}

.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 2px 10px;
}
.section-h h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
}
.section-h button, .text-btn {
  background: none;
  border: 0;
  color: var(--gold);
  font-weight: 650;
  padding: 6px 0;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.slot {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 18px;
  min-height: 148px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  color: inherit;
}
.slot img { width: 100%; height: 110px; object-fit: cover; }
.slot .who {
  display: block;
  padding: 8px 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.slot.empty { padding: 12px 8px; color: var(--mute); }
.slot.empty .who { padding: 0 0 6px; color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  padding: 0;
  color: inherit;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
.card img { width: 100%; height: 210px; object-fit: cover; background: #11080f; }
.card .meta { padding: 10px 10px 12px; }
.card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
}
.card .sub { color: var(--mute); font-size: 0.78rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,77,141,0.16);
  color: var(--hot-2);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  text-align: left;
}
.row h3 { margin: 0 0 2px; font-size: 1rem; }
.row p { margin: 0; color: var(--mute); font-size: 0.82rem; }
.pill {
  margin-left: auto;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}

.search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  outline: none;
}
.search:focus { border-color: var(--gold); }

.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--plum) 88%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}
.nav button {
  background: none;
  border: 0;
  color: var(--mute);
  font-size: 0.68rem;
  font-weight: 650;
  padding: 8px 0 4px;
  display: grid;
  gap: 2px;
  justify-items: center;
}
.nav button.on { color: var(--ink); }
.nav .ico { font-size: 1.15rem; line-height: 1; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-card {
  width: min(480px, 100%);
  max-height: 92dvh;
  overflow: auto;
  background: var(--plum);
  border-radius: 28px 28px 0 0;
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
}
.grab {
  width: 42px;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  margin: 6px auto 10px;
}
.sheet img.heroish {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 12px;
  font-weight: 700;
  background: var(--ink);
  color: var(--void);
  text-align: center;
  text-decoration: none;
}
.btn.ghost {
  background: var(--card-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.hot { background: var(--hot); color: #fff; }
.note {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  color: var(--mute);
  font-size: 0.9rem;
  margin-top: 10px;
}
.note b { color: var(--ink); }

.form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.form input, .form textarea, .form select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  width: 100%;
}
.form textarea { min-height: 80px; resize: vertical; }

.sign-preview {
  width: 100%;
  border-radius: 16px;
  background: #000;
  margin-top: 8px;
  display: block;
}
.try {
  position: relative;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  min-height: 360px;
}
.try video, .try canvas, .try img.overlay {
  width: 100%;
  display: block;
}
.try img.overlay {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  width: 70%;
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: 0.92;
}
.hint { color: var(--mute); font-size: 0.85rem; margin: 8px 0 0; }

.install {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--mute);
  font-size: 0.85rem;
}

.setup h1 { font-size: 2.1rem; }
.lab {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 10px 2px 0;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.split3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.school-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
}
.school-list button {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: inherit;
}
.school-list button.on {
  border-color: var(--gold);
  background: var(--card-2);
}
.school-list small { color: var(--mute); display: block; }
.you-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--gold);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.78rem;
  min-height: 40px;
}
.idea {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  color: inherit;
  margin-top: 8px;
}
.idea h3 { margin: 0 0 4px; font-size: 1rem; }
.idea p { margin: 0; color: var(--mute); font-size: 0.82rem; }
.ex-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--gold);
  font-weight: 650;
  font-size: 0.82rem;
}

@media (min-width: 720px) {
  .app { max-width: 430px; }
}

@media print {
  body { background: #fff; color: #111; }
  .nav, .top, .rail, .actions, .install { display: none !important; }
  .app { padding: 0; }
  canvas.sign-preview { width: 8.5in; height: 11in; }
}
