/* NETWORK_INDEX — strict-CSP friendly: no inline styles, no external fonts. */
:root {
  --bg: #070b1a; --bg2: #0b1126; --surface: #111935; --surface2: #18224a;
  --line: rgba(160, 175, 255, .16); --text: #eef1ff; --muted: #a3acd1;
  --gold: #ffc857; --gold-ink: #2a1c00; --cyan: #6fe3ea; --focus: #ffe08a;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 20px; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f2ea; --bg2: #ece7db; --surface: #ffffff; --surface2: #f3efe6;
  --line: rgba(30, 35, 80, .14); --text: #151936; --muted: #565d80;
  --gold: #f4b63a; --cyan: #0e7c86; --focus: #b45309;
  --shadow: 0 16px 40px rgba(40, 35, 20, .14); color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--body); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--gold); color: var(--gold-ink); padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }

/* ---------- top bar ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: .7rem max(1rem, env(safe-area-inset-left)); padding-top: max(.7rem, env(safe-area-inset-top));
  background: linear-gradient(rgba(7, 11, 26, .82), rgba(7, 11, 26, 0)); color: #eef1ff; transition: background .3s; }
.top.solid { background: rgba(7, 11, 26, .9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(160, 175, 255, .16); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 12%, #ffc857 30%, #ff7a59 70%, transparent 72%); box-shadow: 0 0 18px #ffc857aa; }
.top-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.top-nav a { text-decoration: none; opacity: .82; font-size: .95rem; }
.top-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.top-actions { display: flex; gap: .6rem; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: inherit; font-size: 1rem; }
.icon-btn:hover { background: rgba(255, 255, 255, .18); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .62rem 1.1rem; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.02rem; }
.btn-gold { background: linear-gradient(135deg, #ffd978, #ffb23a); color: var(--gold-ink); box-shadow: 0 8px 26px rgba(255, 184, 60, .32); }
.btn-ghost { border-color: var(--line); background: rgba(255, 255, 255, .06); color: inherit; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--cyan); }

/* ---------- hero (always night) ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; color: #eef1ff; overflow: hidden;
  background: radial-gradient(1200px 700px at 72% 45%, #1a2260 0%, #0b1030 45%, #070b1a 80%); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hero-copy { position: relative; z-index: 2; width: min(1180px, 100% - 2rem); margin-inline: auto; padding: 7rem 0 4rem; pointer-events: none; }
.hero-copy > * { max-width: 30rem; }
.hero-copy a, .hero-copy button { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #cfd6ff; margin-bottom: 1.1rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #5cf2a0; box-shadow: 0 0 0 0 #5cf2a088; animation: pulse 2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 14px #5cf2a000; } }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); text-shadow: 0 2px 30px rgba(7, 11, 26, .8); }
.hero h1 em { font-style: italic; background: linear-gradient(100deg, #ffd978, #ff8f6b 55%, #c58bff); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.lede { margin-top: 1.3rem; font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: #d3d9f7; text-shadow: 0 1px 14px rgba(7, 11, 26, .9); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.stats { display: flex; gap: 2.4rem; margin: 2.6rem 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #a9b2dd; }
.stats dd { margin: 0; font: 600 2.3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.star-tip { position: absolute; z-index: 3; transform: translate(-50%, -135%); pointer-events: none; background: rgba(10, 14, 36, .94); border: 1px solid rgba(255, 255, 255, .22);
  padding: .5rem .8rem; border-radius: 12px; font-size: .86rem; max-width: 15rem; text-align: center; box-shadow: var(--shadow); }
.star-tip strong { display: block; font-family: var(--display); font-size: 1rem; }
.hero-hint { position: absolute; z-index: 2; right: max(1.2rem, 4vw); bottom: 1.4rem; font-size: .8rem; color: #a9b2dd; letter-spacing: .06em; }

/* ---------- bands ---------- */
.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band-alt { background: var(--bg2); border-block: 1px solid var(--line); }
.kicker { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin-bottom: .7rem; font-weight: 600; }
.band h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; }

.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: .5rem .95rem; border-radius: 999px; font-size: .9rem; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--cyan); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.chip small { opacity: .6; margin-left: .35rem; }
.search { flex: 1 1 16rem; max-width: 24rem; }
.search input { width: 100%; padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }
.result-line { margin-top: 1.2rem; color: var(--muted); font-size: .92rem; min-height: 1.5em; }
.empty { margin-top: 2rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1rem; perspective: 1200px; }
.card { --c1: #5b6cff; --c2: #c58bff; --rx: 0deg; --ry: 0deg; position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); color: var(--text); overflow: hidden; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .18s ease-out, box-shadow .25s, border-color .25s, opacity .5s, translate .5s; opacity: 0; translate: 0 22px; }
.card.in { opacity: 1; translate: 0 0; }
.card:hover, .card:focus-visible { box-shadow: 0 22px 50px -18px var(--c1), var(--shadow); border-color: var(--c1); }
.card-band { position: relative; height: 118px; background: linear-gradient(135deg, var(--c1), var(--c2)); overflow: hidden; }
.card-band::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .5), transparent 42%); transition: transform .6s; }
.card:hover .card-band::before { transform: translate(18%, 12%); }
.card-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .28)); }
.card-emoji { position: absolute; left: 1.1rem; bottom: .7rem; z-index: 1; font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.card:hover .card-emoji { transform: translateY(-8px) scale(1.12) rotate(-6deg); }
.card-cat { position: absolute; right: .8rem; top: .8rem; z-index: 1; background: rgba(0, 0, 0, .42); color: #fff; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 999px; backdrop-filter: blur(4px); }
.card-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card h3 { font-size: 1.4rem; }
.card-tag { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.card-more { margin-top: auto; padding-top: .8rem; font-size: .85rem; font-weight: 600; color: var(--cyan); display: flex; justify-content: space-between; }
.card-more span:last-child { color: var(--muted); font-weight: 400; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #ffd978, #ff8f6b); color: #2a1c00; font: 600 1.3rem var(--display); margin-bottom: 1rem; }
.steps h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); }
.reveal { opacity: 0; translate: 0 24px; transition: opacity .7s, translate .7s; }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- app ---------- */
.app-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.app-copy p { color: var(--muted); margin-top: 1rem; max-width: 34rem; }
.app-actions { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.install-note { font-size: .92rem; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; padding: 0; margin: 1.6rem 0 0; }
.badge { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: .5rem 1rem; font-weight: 600; background: var(--surface); }
.badge small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.phone { justify-self: center; width: min(280px, 78vw); aspect-ratio: 9 / 18.5; border-radius: 40px; padding: 11px; background: linear-gradient(160deg, #2b335f, #0a0e22); box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .12); rotate: 4deg; }
.phone-screen { height: 100%; border-radius: 30px; background: #070b1a; overflow: hidden; display: flex; flex-direction: column; gap: 9px; padding: 34px 11px 11px; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.mini { --c1: #5b6cff; --c2: #c58bff; flex: none; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-weight: 600; font-size: .86rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); animation: rise 26s linear infinite; }
.mini span { font-size: 1.5rem; }
@keyframes rise { to { transform: translateY(-640px); } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--muted); font-size: .92rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot strong { color: var(--text); }

/* ---------- detail dialog ---------- */
.detail { --c1: #5b6cff; --c2: #c58bff; width: min(760px, 100% - 1.5rem); max-height: min(92svh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); color: var(--text); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); overflow: hidden; }
.detail[open] { display: flex; flex-direction: column; animation: pop .35s cubic-bezier(.2, 1.2, .4, 1); }
.detail::backdrop { background: rgba(4, 6, 18, .72); backdrop-filter: blur(6px); }
@keyframes pop { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.tour-bar { height: 4px; background: rgba(255, 255, 255, .2); flex: none; }
.tour-bar span { display: block; height: 100%; width: 0; background: var(--gold); }
.tour-bar.run span { width: 100%; transition: width 6s linear; }
.d-band { position: relative; flex: none; padding: 1.6rem 1.6rem 1.4rem; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); overflow: hidden; }
.d-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, .5)); }
.d-band > * { position: relative; z-index: 1; }
.d-close { position: absolute !important; right: 1rem; top: 1rem; background: rgba(0, 0, 0, .35); z-index: 2 !important; }
.d-emoji { position: absolute !important; right: 1.4rem; bottom: -1.2rem; font-size: 7.5rem; line-height: 1; opacity: .9; z-index: 0 !important; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .4)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(4deg); } }
.d-cat { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; opacity: .92; }
.d-band h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: .3rem 0 .4rem; max-width: 75%; }
.d-tag { font-size: 1.05rem; max-width: 72%; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.d-body { padding: 1.5rem 1.6rem; overflow-y: auto; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1.5rem; overflow-wrap: anywhere; }
.d-body h3 { font: 600 .76rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: .7rem; }
.d-desc { font-size: 1.08rem; }
.d-who { border-left: 3px solid var(--gold); padding-left: 1rem; color: var(--muted); }
.d-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .8rem; list-style: none; padding: 0; margin: 0; }
.d-feats li { background: var(--surface2); border-radius: 14px; padding: .9rem 1rem; }
.d-feats strong { display: block; margin-bottom: .2rem; }
.d-feats span { color: var(--muted); font-size: .92rem; }
.d-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .55rem; }
.d-steps li { counter-increment: s; display: flex; gap: .8rem; align-items: baseline; }
.d-steps li::before { content: counter(s); flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .82rem; font-weight: 700; }
.d-subs { display: flex; flex-wrap: wrap; gap: .5rem; }
.d-subs a { text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem; font-size: .9rem; }
.d-subs a:hover { border-color: var(--cyan); }
.d-subs small { display: block; color: var(--muted); }
.d-foot { flex: none; display: flex; align-items: center; gap: .5rem; padding: .9rem 1.2rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.d-pos { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.d-visit { margin-left: auto; }
.d-pos { white-space: nowrap; }
.v-short { display: none; }
.noscript { padding: 2rem; text-align: center; }

@media (max-width: 860px) {
  .top-nav { display: none; }
  .top-actions { margin-left: auto; }
  .hero { align-items: start; }
  .hero-copy { padding: 350px 0 3rem; }
  .hero-hint { display: none; }
  .stats { gap: 1.6rem; }
  .stats dd { font-size: 1.8rem; }
  .app-wrap { grid-template-columns: 1fr; }
  .search { max-width: none; flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding: 0 1rem .4rem; scrollbar-width: none; }
  .chip { flex: none; }
  .detail { width: 100%; max-width: 100%; max-height: 100svh; height: 100svh; border-radius: 0; margin: 0; border: 0; }
  .d-foot .btn-ghost { padding-inline: .8rem; }
  .d-pos, .v-long { display: none; }
  .v-short { display: inline; }
}
@media (max-width: 420px) { #signup-top { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card, .reveal { opacity: 1; translate: 0 0; }
}
