:root {
  --bg: #06080f;
  --panel: rgba(13, 17, 32, 0.82);
  --panel-solid: #0c101f;
  --line: rgba(140, 160, 255, 0.14);
  --line-strong: rgba(140, 160, 255, 0.30);
  --blue: #4da6ff;
  --pink: #ff66cc;
  --gold: #d9c07a;
  --text: #e8ecf6;
  --muted: #8b96b8;
  --danger: #ff7a7a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #05070b;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5,7,11,0.40), #05070b 72%),
    linear-gradient(120deg, rgba(12,60,72,0.18), rgba(75,16,55,0.14) 47%, rgba(90,69,28,0.12)),
    url("../assets/soulmate-cosmic-background.png") center / cover no-repeat;
  opacity: 0.72;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 20%, transparent 0, rgba(0,0,0,0.18) 44%, rgba(0,0,0,0.72) 100%),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: auto, 5px 5px;
}
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ---------- nav ---------- */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(4,6,11,0.94), rgba(4,6,11,0.76) 76%, transparent);
  border-bottom: 1px solid rgba(215, 192, 122, 0.09);
  backdrop-filter: blur(14px);
}
.brand {
  font-family: var(--serif); letter-spacing: 5px; font-size: 15px;
  color: var(--text); text-decoration: none; text-shadow: 0 0 18px rgba(77,166,255,0.5);
}
.navlinks { display: flex; gap: 4px; flex: 1; }
.navlinks a {
  color: var(--muted); text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 999px; transition: all .25s;
}
.navlinks a:hover { color: var(--text); }
.navlinks a.active {
  color: var(--text);
  background: rgba(90, 110, 200, 0.18);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
#statusChip {
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--text); font-size: 12px; padding: 6px 14px; border-radius: 999px;
  cursor: pointer; white-space: nowrap; font-family: var(--sans);
  transition: box-shadow .3s;
}
#statusChip:hover { box-shadow: 0 0 16px rgba(120,140,255,0.35); }

/* ---------- views ---------- */
.view { display: none; min-height: 100vh; padding-bottom: 60px; }
.view.active { display: block; animation: viewIn .5s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
.wrap { max-width: 900px; margin: 0 auto; padding: 96px 20px 0; }
.wrap.wide { max-width: 1100px; }
.viewTitle { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(120,140,255,0.35); }
.viewSub { color: var(--muted); margin: 8px 0 28px; max-width: 60ch; }
.sectionTitle { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: 3px;
  margin: 68px 0 24px; text-align: center; text-shadow: 0 0 24px rgba(120,140,255,0.3); }

/* ---------- hero ---------- */
.hero { position: relative; height: 92vh; min-height: 480px; overflow: hidden; }
#introVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 38%, transparent 20%, rgba(6,8,15,0.28) 46%, rgba(5,7,11,0.76) 82%),
              linear-gradient(180deg, rgba(6,8,15,0.25), transparent 24%, transparent 58%, #05070b 98%);
}
.hero-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; text-align: center;
  padding-bottom: 9vh;
}
.title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 7vw, 64px);
  letter-spacing: 12px; text-shadow: 0 0 40px rgba(120,140,255,0.6), 0 2px 20px rgba(0,0,0,0.8);
}
.tagline { font-family: var(--serif); font-style: italic; color: var(--muted);
  letter-spacing: 6px; margin-top: 2px; font-size: 15px; }
.promise { font-family: var(--serif); font-style: italic; font-size: clamp(14px, 2.4vw, 18px);
  margin: 20px auto 26px; max-width: 46ch; color: #cdd6ee; text-shadow: 0 1px 12px rgba(0,0,0,0.8); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--sans); font-size: 14px; letter-spacing: 1px;
  padding: 12px 26px; border-radius: 999px; cursor: pointer; transition: all .3s;
  border: 1px solid var(--line-strong); background: rgba(10, 14, 28, 0.7); color: var(--text);
}
.btn:hover { box-shadow: 0 0 24px rgba(120,140,255,0.35); transform: translateY(-1px); }
.btn-primary {
  border-color: rgba(77,166,255,0.6);
  background: linear-gradient(135deg, rgba(30,80,160,0.55), rgba(120,40,120,0.55));
  box-shadow: 0 0 24px rgba(90,120,255,0.25);
}
.btn-primary:hover { box-shadow: 0 0 34px rgba(120,140,255,0.55); }
.btn-ghost { background: transparent; }
.btn-pink { border-color: rgba(255,102,204,0.55); }
.btn-pink:hover { box-shadow: 0 0 24px rgba(255,102,204,0.4); }
.btn-tiny { padding: 6px 14px; font-size: 12px; }
.btn-danger { border-color: rgba(255,122,122,0.4); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 26px 22px; text-decoration: none; color: var(--text);
  transition: all .35s; position: relative; overflow: hidden;
}
.glow-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 34px rgba(100,120,255,0.18), inset 0 0 40px rgba(90,110,220,0.06);
  transform: translateY(-3px);
}
.card h3 { font-family: var(--serif); font-weight: 400; letter-spacing: 1.5px; margin: 14px 0 6px; }
.card p { color: var(--muted); font-size: 13.5px; }
.card-orb { height: 54px; display: flex; align-items: center; gap: 6px; }
.solo-orb, .world-orb { width: 40px; border-radius: 50%; height: 40px; }
.solo-orb { background: radial-gradient(circle at 38% 35%, #dff0ff, var(--blue) 55%, rgba(77,166,255,0) 75%);
  box-shadow: 0 0 26px rgba(77,166,255,0.8); }
.world-orb { background: radial-gradient(circle at 38% 35%, #fff6dd, var(--gold) 55%, rgba(217,192,122,0) 75%);
  box-shadow: 0 0 26px rgba(217,192,122,0.7); }
.mini { width: 26px; height: 26px; border-radius: 50%; display: inline-block; }
.mini.b { background: radial-gradient(circle at 38% 35%, #dff0ff, var(--blue) 60%, transparent 78%);
  box-shadow: 0 0 18px rgba(77,166,255,0.8); }
.mini.p { background: radial-gradient(circle at 38% 35%, #ffe6f6, var(--pink) 60%, transparent 78%);
  box-shadow: 0 0 18px rgba(255,102,204,0.8); margin-left: -10px; }
.mini.g { background: radial-gradient(circle at 38% 35%, #fff6dd, var(--gold) 60%, transparent 78%);
  box-shadow: 0 0 18px rgba(217,192,122,0.8); margin-left: -10px; }
.homePrivacyNote { text-align: center; color: var(--muted); font-size: 13px; margin: 34px 0 50px; }
.homePrivacyNote a { color: var(--blue); }

/* ---------- panels & forms ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px; margin-bottom: 18px;
}
.panel h3 { font-family: var(--serif); font-weight: 400; letter-spacing: 1.5px; margin-bottom: 8px; }
.panel .hint { color: var(--muted); font-size: 13px; }
input[type=text], select {
  background: rgba(8, 11, 22, 0.9); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); font-size: 15px; padding: 11px 14px; width: 100%;
  font-family: var(--sans); letter-spacing: 1px; outline: none; transition: box-shadow .3s;
}
input[type=text]:focus, select:focus { box-shadow: 0 0 0 2px rgba(90,120,255,0.3); }
.formRow { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.formRow input, .formRow select { flex: 1; min-width: 140px; }
.codeBig {
  font-family: var(--serif); font-size: clamp(30px, 6vw, 44px); letter-spacing: 12px;
  text-align: center; padding: 18px 0 8px; color: #fff;
  text-shadow: 0 0 24px rgba(120,140,255,0.8);
}
.chip {
  display: inline-block; font-size: 11.5px; letter-spacing: 1px; padding: 4px 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); margin: 2px 4px 2px 0;
}
.chip.on { color: var(--text); background: rgba(90,110,200,0.2); }
.rowActions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.fadedLinks { margin-top: 14px; }
.fadedLinks button { background: none; border: none; color: var(--muted); font-size: 12px;
  cursor: pointer; text-decoration: underline; margin-right: 14px; }
.fadedLinks button:hover { color: var(--danger); }

/* ---------- solo stage ---------- */
.stage {
  position: relative; height: 220px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 120%, rgba(60,50,120,0.5), transparent 60%),
              radial-gradient(ellipse at 80% 0%, rgba(30,50,110,0.4), transparent 50%),
              #080b16;
  margin-bottom: 18px;
}
.soulYou {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  left: 50%; top: 55%; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 35%, #eaf6ff, var(--blue) 55%, rgba(77,166,255,0) 78%);
  box-shadow: 0 0 34px rgba(77,166,255,0.9), 0 0 90px rgba(77,166,255,0.4);
  animation: floatSoul 7s ease-in-out infinite;
}
.soulYou.pinkSoul {
  background: radial-gradient(circle at 38% 35%, #fff0fa, var(--pink) 55%, rgba(255,102,204,0) 78%);
  box-shadow: 0 0 34px rgba(255,102,204,0.9), 0 0 90px rgba(255,102,204,0.4);
}
@keyframes floatSoul {
  0%,100% { transform: translate(-50%,-50%); }
  25% { transform: translate(calc(-50% + 30px), calc(-50% - 18px)); }
  60% { transform: translate(calc(-50% - 26px), calc(-50% + 10px)); }
}
.journeySteps { display: grid; gap: 10px; }
.jstep { display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(10,14,28,0.55); }
.jstep .n { font-family: var(--serif); color: var(--gold); min-width: 22px; }
.jstep.locked { opacity: .45; }
.jstep .s { margin-left: auto; font-size: 11px; letter-spacing: 1px; color: var(--muted); }

/* ---------- couple pairing ---------- */
.bondStage { position: relative; height: 190px; margin: 6px 0 10px; }
.bondOrb { position: absolute; top: 50%; width: 92px; height: 92px; transform: translateY(-50%);
  border-radius: 50%; transition: all 1.6s ease; }
.bondOrb.blue { left: 12%;
  background: radial-gradient(circle at 38% 35%, #eaf6ff, var(--blue) 55%, rgba(77,166,255,0) 78%);
  box-shadow: 0 0 40px rgba(77,166,255,0.85), 0 0 110px rgba(77,166,255,0.35); }
.bondOrb.pink { right: 12%;
  background: radial-gradient(circle at 38% 35%, #fff0fa, var(--pink) 55%, rgba(255,102,204,0) 78%);
  box-shadow: 0 0 40px rgba(255,102,204,0.85), 0 0 110px rgba(255,102,204,0.35); }
.bonded .bondOrb.blue { left: calc(50% - 74px); }
.bonded .bondOrb.pink { right: calc(50% - 74px); }
.bondPromise { text-align: center; font-family: var(--serif); font-style: italic;
  color: #cdd6ee; font-size: 15px; max-width: 46ch; margin: 0 auto 8px; }
.soulPick { display: flex; gap: 14px; margin-top: 14px; }
.soulPick button { flex: 1; padding: 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(10,14,28,0.6); color: var(--text);
  font-size: 14px; letter-spacing: 1px; transition: all .3s; }
.soulPick button.pickBlue:hover, .soulPick button.pickBlue.sel {
  border-color: var(--blue); box-shadow: 0 0 24px rgba(77,166,255,0.4); }
.soulPick button.pickPink:hover, .soulPick button.pickPink.sel {
  border-color: var(--pink); box-shadow: 0 0 24px rgba(255,102,204,0.4); }

/* ---------- groups ---------- */
.groupItem { display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(10,14,28,0.55);
  margin-bottom: 10px; flex-wrap: wrap; }
.groupItem .gicon { width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 38% 35%, #fff6dd, var(--gold) 60%, transparent 80%);
  box-shadow: 0 0 18px rgba(217,192,122,0.6); }
.groupItem .gname { font-family: var(--serif); letter-spacing: 1px; }
.groupItem .gmeta { color: var(--muted); font-size: 12.5px; width: 100%; padding-left: 48px; }
.groupItem .gcode { font-family: var(--serif); letter-spacing: 3px; color: var(--gold); }
.groupItem .gactions { margin-left: auto; }

/* ---------- world ---------- */
.worldFrame { border: 1px solid rgba(215,192,122,0.16); border-radius: 8px; overflow: hidden;
  background: #05070b;
  box-shadow: 0 26px 90px rgba(0,0,0,0.42), 0 0 70px rgba(33,128,140,0.12); }
#worldCanvas { width: 100%; display: block; }
.worldBanner { border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 16px;
  font-size: 13px; color: var(--muted); background: rgba(10,14,28,0.7); margin-bottom: 14px; }
.worldBanner strong { color: var(--text); }
.worldFooter { display: flex; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
.legend { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.db { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.dot.dp { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.dot.dg { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.worldActions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- privacy ---------- */
.pmode { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(10,14,28,0.55);
  margin-bottom: 10px; cursor: pointer; transition: all .3s; }
.pmode:hover { border-color: var(--line-strong); }
.pmode.sel { border-color: rgba(120,140,255,0.6); box-shadow: 0 0 24px rgba(100,120,255,0.18); }
.pmode input { margin-top: 5px; accent-color: var(--blue); }
.pmode .pname { letter-spacing: 1px; }
.pmode .pdesc { color: var(--muted); font-size: 12.5px; }
.subPanel { border-left: 2px solid var(--line-strong); margin: -4px 0 12px 26px; padding: 10px 0 4px 20px; }
.quickRow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.safetyNote { border: 1px solid rgba(217,192,122,0.3); background: rgba(60,50,20,0.15);
  border-radius: 8px; padding: 14px 18px; font-size: 13px; color: #cfc5a5; margin-top: 22px; }

/* ---------- game sections ---------- */
.heroSub { color: #aab6da; font-size: clamp(13px, 2.2vw, 16px); max-width: 52ch;
  margin: 14px auto 0; text-shadow: 0 1px 12px rgba(0,0,0,0.8); }
.btn-pulse { animation: btnPulse 2.6s ease-in-out infinite; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(90,120,255,0.25); }
  50% { box-shadow: 0 0 38px rgba(140,120,255,0.55); }
}
.storyPanel {
  border: 1px solid var(--line); border-left: 2px solid rgba(217,192,122,0.5);
  background: linear-gradient(120deg, rgba(20,20,44,0.7), rgba(10,14,28,0.7));
  border-radius: 0 16px 16px 0; padding: 22px 26px; margin: 44px 0 10px;
}
.storyPanel p { font-family: var(--serif); font-style: italic; color: #c6cfe8;
  font-size: 15.5px; line-height: 1.85; max-width: 68ch; }
.cardBtn {
  display: inline-block; margin-top: 14px; font-size: 12px; letter-spacing: 1.5px;
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--text); transition: all .3s;
}
.glow-card:hover .cardBtn { border-color: rgba(140,160,255,0.7);
  box-shadow: 0 0 18px rgba(120,140,255,0.4); }

.badge { font-size: 10px; letter-spacing: 2px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.badge.on { color: var(--gold); border-color: rgba(217,192,122,0.5);
  box-shadow: 0 0 14px rgba(217,192,122,0.25); animation: badgePulse 3s ease-in-out infinite; }
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(217,192,122,0.2); }
  50% { box-shadow: 0 0 20px rgba(217,192,122,0.45); }
}

.questLog { display: grid; gap: 10px; }
.quest { display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  transition: all .3s; }
.quest.unlocked { border-color: rgba(217,192,122,0.35); }
.quest.unlocked:hover { box-shadow: 0 0 26px rgba(217,192,122,0.18); }
.quest.locked { opacity: .55; }
.quest .qmark { font-size: 16px; color: var(--gold); min-width: 24px; text-align: center; }
.quest .qname { font-family: var(--serif); letter-spacing: 1px; }
.quest .qdesc { color: var(--muted); font-size: 12.5px; }
.quest .badge { margin-left: auto; }

.compassWrap { text-align: center; padding: 6px 0 12px; }
.compass { width: 200px; height: 200px; border-radius: 50%; margin: 0 auto; position: relative;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 50% 42%, rgba(24,30,60,0.95), rgba(7,10,20,0.98) 75%);
  box-shadow: 0 0 44px rgba(90,110,255,0.22), inset 0 0 34px rgba(90,110,255,0.10); }
.cring { position: absolute; inset: 8px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(150,168,255,0.4) 0deg 1.2deg, transparent 1.2deg 15deg);
  -webkit-mask: radial-gradient(closest-side, transparent 84%, #000 86%);
  mask: radial-gradient(closest-side, transparent 84%, #000 86%);
  animation: ringSpin 60s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.needle { position: absolute; left: 50%; top: 50%; width: 3px; height: 76px;
  transform-origin: 50% 100%;
  background: linear-gradient(180deg, var(--pink), rgba(255,102,204,0.05));
  filter: drop-shadow(0 0 8px rgba(255,102,204,0.8));
  animation: seek 9s ease-in-out infinite; }
@keyframes seek {
  0%, 100% { transform: translate(-50%, -100%) rotate(24deg); }
  28% { transform: translate(-50%, -100%) rotate(61deg); }
  52% { transform: translate(-50%, -100%) rotate(38deg); }
  74% { transform: translate(-50%, -100%) rotate(79deg); }
}
.cdot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #eaf6ff, var(--blue) 65%);
  box-shadow: 0 0 16px rgba(77,166,255,0.9); }
.compassSignal { margin-top: 16px; font-size: 12.5px; letter-spacing: 2px; color: var(--gold); }
.compassSignal em { color: var(--text); font-family: var(--serif); }
.compassCopy { color: var(--muted); font-size: 13.5px; font-family: var(--serif);
  font-style: italic; margin-top: 6px; }

.shards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.shardCard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px 20px; text-align: center; transition: all .35s; }
.shardCard:hover { border-color: var(--line-strong); transform: translateY(-3px);
  box-shadow: 0 0 34px rgba(100,120,255,0.18); }
.shardCard h4 { font-family: var(--serif); font-weight: 400; letter-spacing: 2px;
  margin: 14px 0 6px; font-size: 17px; }
.shardCard p { color: var(--muted); font-size: 12.5px; font-style: italic;
  font-family: var(--serif); margin-bottom: 14px; min-height: 3.6em; }
.shard { width: 54px; height: 66px; margin: 0 auto;
  clip-path: polygon(50% 0, 100% 30%, 82% 100%, 18% 100%, 0 30%);
  animation: shardFloat 5s ease-in-out infinite; }
.shardCard:nth-child(2) .shard { animation-delay: -1.6s; }
.shardCard:nth-child(3) .shard { animation-delay: -3.2s; }
@keyframes shardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.shard.sBlue { background: linear-gradient(160deg, #bfe2ff, var(--blue) 45%, #103a80);
  filter: drop-shadow(0 0 16px rgba(77,166,255,0.7)); }
.shard.sGold { background: linear-gradient(160deg, #fff3d0, var(--gold) 45%, #6b5518);
  filter: drop-shadow(0 0 16px rgba(217,192,122,0.7)); }
.shard.sPink { background: linear-gradient(160deg, #ffd7ef, var(--pink) 45%, #7a1a56);
  filter: drop-shadow(0 0 16px rgba(255,102,204,0.7)); }

.veil { margin: 54px 0 10px; padding: 30px 28px; border-radius: 8px; text-align: center;
  border: 1px solid rgba(255,90,140,0.28);
  background: linear-gradient(120deg, rgba(64,12,44,0.35), rgba(22,10,44,0.55));
  box-shadow: inset 0 0 60px rgba(120,20,70,0.15), 0 0 40px rgba(120,20,70,0.12); }
.veilTitle { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: 3px;
  color: #ffb9d4; animation: veilPulse 4s ease-in-out infinite; margin-bottom: 12px; }
@keyframes veilPulse {
  0%, 100% { text-shadow: 0 0 18px rgba(255,102,160,0.4); }
  50% { text-shadow: 0 0 34px rgba(255,102,160,0.8); }
}
.veil p { color: #d4b8c8; font-family: var(--serif); font-style: italic;
  font-size: 14.5px; max-width: 56ch; margin: 0 auto; }

/* ---------- life paths game ---------- */
.lifeBanner { display: block; text-align: center; text-decoration: none; color: var(--text);
  margin: 40px 0 0; padding: 30px 24px; border-radius: 8px; position: relative;
  border: 1px solid rgba(140,160,255,0.35);
  background: linear-gradient(120deg, rgba(20,40,110,0.35), rgba(110,30,90,0.35));
  box-shadow: 0 0 40px rgba(90,110,255,0.18), inset 0 0 60px rgba(90,110,255,0.08);
  transition: all .35s; }
.lifeBanner:hover { box-shadow: 0 0 60px rgba(140,120,255,0.35); transform: translateY(-2px); }
.lifeBanner .lbNew { position: absolute; top: -10px; left: 22px; font-size: 10px; letter-spacing: 3px;
  padding: 4px 14px; border-radius: 999px; color: #06080f; background: var(--gold);
  box-shadow: 0 0 18px rgba(217,192,122,0.7); }
.lifeBanner .lbTitle { display: block; font-family: var(--serif); font-size: clamp(20px, 3.6vw, 30px);
  letter-spacing: 5px; text-shadow: 0 0 24px rgba(120,140,255,0.6); }
.lifeBanner .lbLine { display: block; color: var(--gold); letter-spacing: 3px; font-size: 13px; margin-top: 6px; }
.lifeBanner .lbSub { display: block; color: var(--muted); font-family: var(--serif); font-style: italic;
  font-size: 14px; margin: 10px 0 16px; }

.modeRow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.modeBtn { padding: 10px 20px; border-radius: 999px; cursor: pointer; font-size: 13px; letter-spacing: 1px;
  border: 1px solid var(--line-strong); background: rgba(10,14,28,0.7); color: var(--muted); transition: all .3s; }
.modeBtn.sel { color: var(--text); border-color: rgba(77,166,255,0.6);
  background: rgba(30,60,130,0.35); box-shadow: 0 0 20px rgba(77,166,255,0.3); }

.pathCard { cursor: pointer; }
.pathCard .pathTop { margin-bottom: 10px; }
.pathCard.plocked { opacity: .5; filter: saturate(.5); }
.pathCard.plocked:hover { transform: none; box-shadow: none; }

.lifeHeader { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.lifeChip { font-size: 11.5px; letter-spacing: 1.5px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); background: rgba(10,14,28,0.7); }
.lifeChip.final { border-color: rgba(255,102,160,0.6); color: #ffb9d4;
  box-shadow: 0 0 16px rgba(255,102,160,0.3); animation: badgePulse 3s ease-in-out infinite; }
.lifeChip.soul { border-color: rgba(217,192,122,0.5); color: var(--gold); }
.lifeChip.dim { color: var(--muted); }
.lifeHeader .btn-danger { margin-left: auto; }

.chapterCard { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 30px 28px; margin-bottom: 18px; box-shadow: 0 0 40px rgba(60,70,160,0.15);
  animation: viewIn .5s ease; }
.chapterNum { font-size: 11px; letter-spacing: 3px; color: var(--gold); margin-bottom: 8px; }
.chapterTitle { font-family: var(--serif); font-weight: 400; font-size: 27px; letter-spacing: 2px;
  margin-bottom: 10px; text-shadow: 0 0 22px rgba(120,140,255,0.4); }
.chapterText { color: #c6cfe8; font-family: var(--serif); font-size: 15.5px; line-height: 1.8;
  font-style: italic; margin-bottom: 20px; max-width: 62ch; }
.choiceCol { display: grid; gap: 10px; }
.choiceBtn { text-align: left; padding: 15px 20px; font-size: 14.5px; border-radius: 8px; width: 100%; }
.choiceBtn:hover { border-color: rgba(140,160,255,0.7); background: rgba(30,50,110,0.3); }

.resultBox { animation: viewIn .4s ease; }
.resultLine { font-family: var(--serif); font-style: italic; color: #dfe6f8; font-size: 16px;
  padding: 14px 18px; border-left: 2px solid var(--gold); background: rgba(217,192,122,0.05);
  border-radius: 0 10px 10px 0; margin-bottom: 14px; }
.deltaRow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.delta { font-size: 12px; letter-spacing: 1px; padding: 4px 12px; border-radius: 999px; border: 1px solid; }
.delta.up { color: #9fe0b5; } .delta.down { color: #f0a0a0; }

.statGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 20px; }
.statRow { display: flex; align-items: center; gap: 10px; }
.statLabel { font-size: 11.5px; letter-spacing: 1px; color: var(--muted); width: 78px; flex: none; }
.statTrack { flex: 1; height: 7px; border-radius: 999px; background: rgba(140,160,255,0.10); overflow: hidden; }
.statFill { display: block; height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.statNum { font-size: 11.5px; color: var(--text); width: 26px; text-align: right; flex: none; }

.echoHint { font-family: var(--serif); font-style: italic; color: #cdb8e8; font-size: 14px;
  padding: 12px 18px; margin-bottom: 14px; border-radius: 8px;
  border: 1px solid rgba(197,139,255,0.3); background: rgba(120,80,200,0.08);
  box-shadow: 0 0 24px rgba(150,100,255,0.15); animation: echoGlow 3.5s ease-in-out infinite; }
@keyframes echoGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(150,100,255,0.12); opacity: .85; }
  50% { box-shadow: 0 0 30px rgba(150,100,255,0.3); opacity: 1; }
}
.echoList { margin: 20px 0; }
.echoList h4 { font-family: var(--serif); font-weight: 400; letter-spacing: 1.5px; margin-bottom: 10px; }
.echoItem { font-family: var(--serif); font-style: italic; color: #cdb8e8; font-size: 13.5px;
  padding: 8px 14px; margin-bottom: 6px; border-radius: 10px;
  border: 1px solid rgba(197,139,255,0.22); background: rgba(120,80,200,0.06); }

.endCard { text-align: left; }
.endCard .statGrid { margin: 16px 0; }
.finale { text-align: center; }
.finale .chapterText { margin-left: auto; margin-right: auto; }
.livesRecap { display: grid; gap: 8px; margin: 18px 0; }
.recapRow { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.freshCard { text-align: center; }
.freshCard h3 { margin-top: 0; }

.dreamCard .dreamGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; }
.dreamCard h4 { font-size: 11px; letter-spacing: 2.5px; color: var(--gold); margin-bottom: 4px; font-weight: 400; }
.dreamCard p { color: #c6cfe8; font-family: var(--serif); font-style: italic; font-size: 14px; }

/* ---------- Gateway Run ---------- */
.playIntro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}
.playIntro .viewSub { margin-bottom: 0; }
.playIntroActions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kicker {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.arcadeShell {
  border: 1px solid rgba(215,192,122,0.18);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.86), rgba(8, 9, 14, 0.94));
  box-shadow: 0 26px 80px rgba(0,0,0,0.45), 0 0 60px rgba(33,128,140,0.13);
}
.arcadeStage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  max-height: 670px;
  overflow: hidden;
  background: #05070b;
  border-bottom: 1px solid rgba(140,160,255,0.16);
}
#soulRunCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.arcadeStage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 18%, transparent 74%, rgba(0,0,0,0.28)),
    radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(0,0,0,0.38) 100%);
}
.arcadeHud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.hudStat {
  min-width: 104px;
  border: 1px solid rgba(225,235,255,0.14);
  background: rgba(4,7,13,0.62);
  backdrop-filter: blur(12px);
  padding: 8px 10px;
}
.hudStat span,
.arcadeMeters span {
  display: block;
  color: rgba(214,222,244,0.62);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}
.hudStat strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(77,166,255,0.55);
}
.arcadeMeters {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  width: min(440px, calc(100% - 128px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.arcadeMeters label {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  align-items: center;
}
.arcadeMeters i {
  height: 8px;
  background: rgba(225,235,255,0.12);
  border: 1px solid rgba(225,235,255,0.10);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.45);
}
.arcadeMeters b {
  display: block;
  height: 100%;
  width: 0;
  transition: width .18s linear;
}
#srIntegrity { background: linear-gradient(90deg, #ff785c, #d9c07a); box-shadow: 0 0 14px rgba(255,120,92,0.55); }
#srBoost { background: linear-gradient(90deg, #4da6ff, #63e5cc); box-shadow: 0 0 14px rgba(77,166,255,0.55); }
#srResonance { background: linear-gradient(90deg, #ff66cc, #d9c07a); box-shadow: 0 0 14px rgba(255,102,204,0.52); }
.boostPad {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(99,229,204,0.48);
  border-radius: 50%;
  color: #eefcff;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.16), rgba(33,128,140,0.35) 52%, rgba(4,7,13,0.86));
  box-shadow: 0 0 24px rgba(99,229,204,0.23), inset 0 0 20px rgba(99,229,204,0.12);
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  touch-action: none;
}
.boostPad.held,
.boostPad:active {
  transform: scale(.96);
  box-shadow: 0 0 34px rgba(99,229,204,0.42), inset 0 0 28px rgba(99,229,204,0.22);
}
.arcadeOverlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(ellipse at 50% 45%, rgba(5,7,11,0.10), rgba(5,7,11,0.70));
  transition: opacity .25s ease;
}
.arcadeOverlay.hidden { opacity: 0; pointer-events: none; }
.overlayPanel {
  width: min(420px, 92%);
  border: 1px solid rgba(215,192,122,0.28);
  background: linear-gradient(180deg, rgba(8,11,19,0.86), rgba(5,7,11,0.93));
  box-shadow: 0 24px 70px rgba(0,0,0,0.46), 0 0 40px rgba(99,229,204,0.12);
  padding: 24px;
  text-align: center;
}
.overlayPanel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.overlayPanel p {
  color: #c4cee7;
  font-family: var(--serif);
  font-style: italic;
  margin: 0 auto 18px;
}
.arcadeDeck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.objectiveStrip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #c4cee7;
  font-size: 13px;
}
.objectiveStrip strong {
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
}
.objectiveStrip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signalLight {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(217,192,122,0.9);
}
.arcadeActions { display: flex; gap: 8px; flex: none; }

@media (max-width: 760px) {
  .chapterCard { padding: 22px 18px; }
  .chapterTitle { font-size: 22px; }
  .statGrid { grid-template-columns: 1fr; }
  .lifeHeader .btn-danger { margin-left: 0; }
  .playIntro { display: block; }
  .playIntroActions { justify-content: flex-start; margin-top: 14px; }
  .arcadeStage {
    aspect-ratio: 10 / 13;
    min-height: 520px;
  }
  .arcadeHud {
    flex-wrap: wrap;
    right: 104px;
  }
  .hudStat { min-width: 82px; padding: 7px 8px; }
  .hudStat strong { font-size: 15px; }
  .arcadeMeters {
    width: calc(100% - 124px);
  }
  .arcadeDeck {
    align-items: flex-start;
    flex-direction: column;
  }
  .objectiveStrip {
    width: 100%;
  }
  .objectiveStrip span:last-child {
    white-space: normal;
  }
}

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: 92vw; }
.toast {
  background: rgba(14, 18, 36, 0.95); border: 1px solid var(--line-strong); color: var(--text);
  padding: 10px 22px; border-radius: 999px; font-size: 13.5px; letter-spacing: .3px;
  box-shadow: 0 0 30px rgba(80,100,220,0.3); animation: toastIn .4s ease;
  font-family: var(--serif); font-style: italic;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; } }
.toast.gone { opacity: 0; transition: opacity .6s; }

/* ---------- footer ---------- */
footer { position: relative; z-index: 1; text-align: center; color: var(--muted);
  font-size: 12.5px; padding: 30px 20px 90px; border-top: 1px solid var(--line); }
footer .fine { margin-top: 8px; opacity: .7; }
footer a { color: var(--blue); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  #topnav { padding: 8px 12px; gap: 10px; backdrop-filter: none; }
  .brand { letter-spacing: 3px; font-size: 13px; }
  .navlinks {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(6,8,15,0.96); border-top: 1px solid var(--line);
    justify-content: space-around; padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px);
  }
  .navlinks a { font-size: 12px; padding: 6px 8px; }
  #statusChip { margin-left: auto; font-size: 11px; padding: 5px 10px; }
  .hero { height: 78vh; }
  .title { font-size: clamp(24px, 8.5vw, 40px); letter-spacing: 6px; white-space: nowrap; }
  .promise { font-size: 13.5px; }
  .wrap { padding-top: 76px; }
  .viewTitle { font-size: 26px; }
  .bondOrb { width: 68px; height: 68px; }
  .bonded .bondOrb.blue { left: calc(50% - 56px); }
  .bonded .bondOrb.pink { right: calc(50% - 56px); }
  .worldActions { margin-left: 0; }
}
