:root {
  --bg: #08090c;
  --surface: #111318;
  --surface-2: #171a20;
  --line: rgba(255, 255, 255, 0.11);
  --soft-line: rgba(255, 255, 255, 0.065);
  --text: #f4f1ea;
  --muted: #96999f;
  --red: #f0443a;
  --red-bright: #ff5c50;
  --cream: #d9d1c2;
  --green: #65d69a;
  --display: "Unbounded", sans-serif;
  --body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--body);
  min-width: 320px;
  font-size: 16px;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.noscript-message { position: relative; z-index: 30; color: var(--text); background: #171a20; border-bottom: 1px solid var(--red); padding: 18px clamp(22px, 4vw, 70px); }
.noscript-message strong { font: 600 14px var(--display); }
.noscript-message p { color: #b1b3b7; max-width: 900px; font-size: 13px; line-height: 1.6; margin: 7px 0 0; }

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.045;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.site-header {
  height: 82px;
  padding: 0 clamp(22px, 4vw, 70px);
  border-bottom: 1px solid var(--soft-line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 5;
}

.brand { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; width: max-content; }
.brand-mark { width: 36px; height: 28px; display: grid; place-items: center; background: var(--red); font: 700 12px var(--display); transform: skew(-6deg); }
.brand-name { font: 700 15px var(--display); letter-spacing: 0.1em; }
.universe-switcher { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--cream); letter-spacing: 0.04em; }
.universe-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; box-shadow: 0 0 14px var(--red); }
.chevron { color: var(--muted); margin-left: 4px; }
.icon-button { justify-self: end; width: 34px; height: 34px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: 180ms ease; }
.icon-button:hover { border-color: var(--text); color: var(--text); }

.hero {
  min-height: 760px;
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 70px;
  background:
    radial-gradient(circle at 50% 53%, rgba(203, 53, 44, 0.17), transparent 17%),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.055), transparent 38%),
    linear-gradient(180deg, #090a0e 0%, #08090c 100%);
}

.hero::before {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  top: 33%;
  background: rgba(240, 68, 58, 0.1);
  filter: blur(70px);
}

.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 620px; height: 620px; transform: rotate(20deg) scaleY(.35); }
.orbit-two { width: 930px; height: 930px; transform: rotate(-28deg) scaleY(.28); border-color: rgba(240,68,58,.12); }
.hero-orbit::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--red); top: 50%; left: -4px; box-shadow: 0 0 20px var(--red); }

.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; position: relative; }
.eyebrow i { width: 24px; height: 1px; background: var(--red); }
h1 { font: 600 clamp(45px, 6.8vw, 98px)/1.04 var(--display); letter-spacing: -.055em; margin: 30px 0 24px; position: relative; }
h1 span { color: transparent; -webkit-text-stroke: 1px rgba(244, 241, 234, .5); }
.hero-copy { max-width: 650px; color: #b4b4b7; line-height: 1.75; font-size: 17px; margin: 0 0 34px; position: relative; }
.primary-action, .secondary-action { border: 0; color: white; background: var(--red); min-height: 56px; padding: 0 24px; display: inline-flex; gap: 24px; align-items: center; justify-content: center; text-decoration: none; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; cursor: pointer; transition: 180ms ease; position: relative; }
.primary-action:hover, .secondary-action:hover { background: var(--red-bright); transform: translateY(-2px); }
.primary-action svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.journey { max-width: 1240px; margin: 0 auto; padding: 110px 32px 150px; }
.section-intro { display: grid; grid-template-columns: 1fr 410px; align-items: end; gap: 80px; padding-bottom: 55px; }
.section-kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; }
.section-intro h2, .info-dialog h2 { font: 600 clamp(30px, 4vw, 50px)/1.15 var(--display); letter-spacing: -.04em; margin: 0; }
.section-intro > p { color: #a9abb0; font-size: 16px; line-height: 1.7; margin: 0; }

.journey-tools { border: 1px solid var(--line); min-height: 92px; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; background: rgba(17,19,24,.68); backdrop-filter: blur(10px); position: sticky; top: 12px; z-index: 10; }
.progress-panel { display: flex; align-items: center; gap: 14px; }
.progress-panel > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.progress-panel strong { font-size: 14px; }
.muted-label { color: #a1a4aa; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.progress-ring { --progress: 0deg; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--red) var(--progress), #282a2f 0); position: relative; }
.progress-ring::before { content: ""; position: absolute; inset: 4px; background: var(--surface); border-radius: inherit; }
.progress-ring strong { position: relative; font-size: 11px; }
.filters { padding: 4px; background: #090a0d; display: flex; gap: 2px; }
.filter { color: #a4a7ac; background: transparent; border: 0; padding: 11px 14px; font-size: 12px; font-weight: 700; cursor: pointer; transition: 150ms ease; }
.filter:hover { color: var(--text); }
.filter.active { color: var(--text); background: var(--surface-2); }
.search-box { justify-self: end; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 9px 2px; width: min(100%, 220px); }
.search-box:focus-within { border-color: var(--red); }
.search-box svg { width: 15px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.search-box input { min-width: 0; width: 100%; background: none; border: 0; outline: 0; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #686b71; }

.timeline-mode { display: grid; grid-template-columns: 1fr 1fr; max-width: 720px; margin: 44px auto 10px; padding: 4px; background: #0c0e12; border: 1px solid var(--soft-line); }
.mode-button { min-height: 70px; color: #777b82; background: transparent; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 10px 20px; text-align: left; cursor: pointer; transition: 200ms ease; }
.mode-button:hover { color: var(--text); }
.mode-button.active { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.mode-button > span:last-child { font: 600 12px/1.45 var(--display); }
.mode-button small { color: #9da0a6; display: block; font: 700 11px/1.7 var(--body); letter-spacing: .09em; text-transform: uppercase; }
.mode-icon { width: 42px; height: 42px; flex: 0 0 42px; position: relative; display: block; }
.sacred-icon::before { content: ""; position: absolute; left: 20px; top: 3px; bottom: 3px; width: 2px; background: var(--red); box-shadow: 0 0 12px rgba(240,68,58,.65); }
.sacred-icon i { position: absolute; width: 8px; height: 8px; left: 17px; top: 17px; border: 2px solid var(--red); border-radius: 50%; background: var(--surface-2); }
.branch-icon::before { content: ""; position: absolute; width: 2px; height: 34px; left: 20px; top: 4px; background: linear-gradient(#d4a1ff, #66d9e8); }
.branch-icon i { position: absolute; width: 19px; height: 2px; left: 21px; transform-origin: left; background: currentColor; box-shadow: 0 0 9px currentColor; }
.branch-icon i:nth-child(1) { top: 10px; color: #d4a1ff; transform: rotate(-27deg); }
.branch-icon i:nth-child(2) { top: 21px; color: #f2aa5e; transform: rotate(13deg); }
.branch-icon i:nth-child(3) { top: 31px; color: #66d9e8; transform: rotate(-18deg); }

.chapter-nav { display: flex; justify-content: center; align-items: center; overflow-x: auto; scrollbar-width: none; margin: 42px 0 25px; }
.chapter-nav::-webkit-scrollbar { display: none; }
.chapter-link { flex: 0 0 auto; display: flex; align-items: center; color: #85888e; background: transparent; border: 0; padding: 10px 0; cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chapter-link::after { content: ""; width: clamp(20px, 5vw, 70px); height: 1px; background: var(--line); margin: 0 9px; }
.chapter-link:last-child::after { display: none; }
.chapter-link:hover, .chapter-link.active { color: var(--text); }
.chapter-link.active::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-right: 7px; box-shadow: 0 0 10px var(--red); }

.timeline { position: relative; padding: 24px 0; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(180deg, transparent, rgba(255,255,255,.17) 2%, rgba(255,255,255,.17) 98%, transparent); }
.chapter-heading { position: relative; z-index: 2; width: max-content; margin: 70px auto 54px; padding: 11px 16px; background: var(--bg); border: 1px solid var(--line); color: #a3a5aa; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; scroll-margin-top: 130px; }
.chapter-heading:first-child { margin-top: 12px; }
.timeline-item { width: 50%; padding: 0 56px 70px 0; position: relative; }
.timeline-item.side-right { margin-left: 50%; padding: 0 0 70px 56px; }
.timeline-node { position: absolute; right: -6px; top: 57px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid #666970; z-index: 2; transition: 180ms ease; }
.side-right .timeline-node { right: auto; left: -6px; }
.timeline-item.watched .timeline-node { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px rgba(101,214,154,.09); }
.sequence { position: absolute; right: 19px; top: 55px; color: #777a80; font: 500 11px var(--display); }
.side-right .sequence { right: auto; left: 19px; }

.story-card { display: grid; grid-template-columns: 145px 1fr; min-height: 215px; background: var(--surface); border: 1px solid var(--line); position: relative; transition: transform 220ms ease, border-color 220ms ease, background 220ms ease; overflow: hidden; }
.story-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.23); background: #14171c; }
.poster { min-height: 215px; position: relative; overflow: hidden; background: var(--poster, linear-gradient(145deg, #34201e, #0a0b0d)); }
.poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, transparent 25%, rgba(0,0,0,.48)); }
.poster::after { content: attr(data-monogram); position: absolute; inset: auto -5px -10px auto; font: 700 52px/1 var(--display); color: rgba(255,255,255,.13); letter-spacing: -.12em; }
.poster-number { position: absolute; top: 10px; left: 10px; border: 1px solid rgba(255,255,255,.3); padding: 5px 6px; font: 600 10px var(--display); color: rgba(255,255,255,.9); }
.card-body { padding: 23px 20px 19px; min-width: 0; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: 7px; color: #a2a5aa; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.type-pill { color: var(--tag, var(--cream)); }
.type-pill::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.card-meta i { width: 1px; height: 9px; background: var(--line); }
.story-card h3 { font: 600 18px/1.4 var(--display); letter-spacing: -.025em; margin: 16px 0 8px; }
.episode-range { display: block; color: var(--red-bright); font: 700 11px var(--body); letter-spacing: .07em; margin-bottom: 9px; text-transform: uppercase; }
.card-note { color: #a0a2a7; font-size: 13px; line-height: 1.55; margin: 0 0 18px; }
.timeline-event { color: #c1c3c7; font-size: 13px; line-height: 1.55; margin: 0 0 18px; padding-left: 12px; border-left: 2px solid var(--tag, var(--red)); }
.timeline-event span { display: block; color: var(--red-bright); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.watch-button { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; color: #c3c4c7; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 13px 0 0; cursor: pointer; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.watch-button:hover { color: white; }
.check-box { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #55585e; transition: 150ms ease; }
.check-box svg { width: 12px; fill: none; stroke: transparent; stroke-width: 2.2; }
.watched .check-box { border-color: var(--green); background: var(--green); }
.watched .check-box svg { stroke: #09110d; }
.watched .watch-button { color: var(--green); }
.watched .story-card { border-color: rgba(101,214,154,.22); }

.timeline.branch-mode { padding-top: 0; }
.timeline.branch-mode::before { display: none; }
.multiverse-tree { position: relative; padding: 38px 0 30px; }
.tree-intro { max-width: 630px; margin: 0 auto 34px; text-align: center; }
.tree-intro .section-kicker { color: #d4a1ff; }
.tree-intro h3 { font: 600 clamp(25px, 3.5vw, 40px)/1.15 var(--display); letter-spacing: -.04em; margin: 0 0 14px; }
.tree-intro p { color: #a7a9ae; max-width: 600px; margin: 0 auto; font-size: 15px; line-height: 1.7; }
.reality-map { max-width: 1040px; margin: 0 auto; padding-top: 5px; position: relative; }
.reality-origin { width: 118px; height: 118px; margin: 0 auto 78px; border-radius: 50%; display: grid; place-content: center; gap: 7px; text-align: center; position: relative; color: var(--text); background: radial-gradient(circle, rgba(240,68,58,.2), rgba(8,9,12,.98) 68%); border: 1px solid rgba(240,68,58,.5); box-shadow: 0 0 50px rgba(240,68,58,.13), inset 0 0 24px rgba(240,68,58,.08); }
.reality-origin::before { content: ""; position: absolute; inset: -13px; border: 1px solid rgba(240,68,58,.15); border-radius: inherit; animation: originPulse 3.5s ease-in-out infinite; }
.reality-origin::after { content: ""; position: absolute; top: 100%; left: calc(50% - 1px); width: 2px; height: 79px; background: linear-gradient(var(--red), rgba(240,68,58,.22)); }
.reality-origin span { font: 600 23px var(--display); }
.reality-origin small { color: #b28b88; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.reality-buttons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.reality-buttons::before { content: ""; position: absolute; height: 1px; left: 10%; right: 10%; top: -1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2) 12%, rgba(255,255,255,.2) 88%, transparent); }
.reality-button { --branch: #d4a1ff; min-width: 0; min-height: 105px; color: #85888e; background: rgba(17,19,24,.72); border: 1px solid var(--line); padding: 22px 13px 13px; display: grid; grid-template-columns: 1fr auto; gap: 10px; text-align: left; position: relative; cursor: pointer; opacity: .68; transition: transform 260ms ease, opacity 260ms ease, border-color 260ms ease, background 260ms ease; }
.reality-button::before { content: ""; position: absolute; width: 1px; height: 24px; left: 50%; bottom: 100%; background: var(--branch); opacity: .55; }
.reality-button:hover { opacity: 1; transform: translateY(-4px); border-color: var(--branch); }
.reality-button.active { opacity: 1; color: var(--text); border-color: var(--branch); background: linear-gradient(145deg, color-mix(in srgb, var(--branch) 12%, #111318), #111318 58%); transform: translateY(-7px); box-shadow: 0 14px 35px color-mix(in srgb, var(--branch) 12%, transparent); }
.reality-button > i { position: absolute; width: 9px; height: 9px; left: calc(50% - 4px); top: -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--branch); box-shadow: 0 0 10px var(--branch); }
.reality-button span { font: 600 11px/1.5 var(--display); }
.reality-button small { display: block; color: var(--branch); font: 700 11px/1.55 var(--body); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.reality-button b { color: var(--branch); font: 600 11px var(--display); }

.selected-branch { --branch: #d4a1ff; max-width: 920px; margin: 110px auto 0; padding: 45px; border: 1px solid color-mix(in srgb, var(--branch) 28%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--branch) 7%, #0e1014), #0e1014 45%); position: relative; scroll-margin-top: 120px; animation: branchReveal 550ms cubic-bezier(.2,.75,.2,1) both; }
.selected-branch::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--branch); box-shadow: 0 0 18px var(--branch); }
.selected-thread { position: absolute; width: 2px; height: 111px; bottom: 100%; left: 50%; overflow: hidden; }
.selected-thread i { display: block; width: 100%; height: 100%; background: linear-gradient(transparent, var(--branch)); box-shadow: 0 0 12px var(--branch); transform-origin: bottom; animation: threadGrow 500ms ease-out both; }
.branch-header { text-align: center; padding: 0 5px 34px; }
.branch-code { color: var(--branch); font: 700 10px var(--display); letter-spacing: .11em; text-transform: uppercase; }
.branch-header h3 { font: 600 26px/1.3 var(--display); letter-spacing: -.03em; margin: 12px 0 9px; }
.branch-header p { color: #a8aaaf; max-width: 560px; font-size: 14px; line-height: 1.65; margin: 0 auto; }
.branch-progress { display: inline-flex; gap: 5px; color: var(--branch); font-size: 11px; margin-top: 11px; }
.branch-items { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.branch-item { position: relative; opacity: 0; animation: cardEnter 440ms cubic-bezier(.2,.75,.2,1) calc(120ms + var(--item-index) * 75ms) forwards; }
.branch-item .story-card { grid-template-columns: 110px 1fr; min-height: 190px; border-color: color-mix(in srgb, var(--branch) 23%, transparent); }
.branch-item .poster { min-height: 190px; }
.branch-item .card-body { padding: 18px 16px 15px; }
.branch-item .story-card h3 { font-size: 15px; margin: 12px 0 7px; }
.branch-item .card-note, .branch-item .timeline-event { font-size: 12px; margin-bottom: 13px; }
.branch-item .timeline-event { border-color: var(--branch); }
.branch-item .timeline-event span { color: var(--branch); }
.branch-item .episode-range { font-size: 11px; color: var(--branch); }
.branch-item.watched .story-card { border-color: rgba(101,214,154,.28); }
.branch-empty { color: #92959b; border: 1px dashed var(--line); padding: 25px 18px; font-size: 13px; line-height: 1.6; }
.branch-explorer { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 26px; align-items: start; }
.branch-directory { position: sticky; top: 120px; max-height: calc(100vh - 140px); min-height: 560px; display: flex; flex-direction: column; overflow: hidden; background: #0e1014; border: 1px solid var(--line); }
.branch-directory-head { flex: 0 0 auto; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); background: #121419; }
.branch-directory-head > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.branch-directory-head > div span { font: 600 13px var(--display); }
.branch-directory-head > div b { min-width: 30px; height: 26px; display: grid; place-items: center; color: var(--red-bright); background: rgba(240,68,58,.1); font-size: 12px; }
.branch-search { display: flex; align-items: center; gap: 9px; padding: 10px 11px; background: #090a0d; border: 1px solid var(--soft-line); }
.branch-search:focus-within { border-color: var(--red); }
.branch-search svg { width: 16px; flex: 0 0 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.branch-search input { min-width: 0; width: 100%; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 12px; }
.branch-directory-list { padding: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3c3f45 transparent; }
.branch-directory-group h4 { color: #7d8086; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin: 15px 9px 8px; }
.branch-list-button { --branch: #d4a1ff; width: 100%; min-height: 65px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 11px; color: #a2a5aa; background: transparent; border: 1px solid transparent; padding: 10px; text-align: left; cursor: pointer; transition: 180ms ease; }
.branch-list-button:hover { color: var(--text); background: rgba(255,255,255,.035); }
.branch-list-button.active { color: var(--text); background: color-mix(in srgb, var(--branch) 9%, #15171b); border-color: color-mix(in srgb, var(--branch) 35%, transparent); }
.branch-list-button > i { width: 7px; height: 7px; border-radius: 50%; background: var(--branch); box-shadow: 0 0 9px var(--branch); }
.branch-list-button span { min-width: 0; }
.branch-list-button strong { display: block; font-size: 12px; line-height: 1.35; }
.branch-list-button small { display: block; overflow: hidden; color: #777a80; font-size: 10px; line-height: 1.45; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; }
.branch-list-button b { color: var(--branch); font-size: 11px; }
.branch-search-result { color: var(--muted); padding: 24px 18px; margin: 0; text-align: center; font-size: 12px; }
.branch-explorer .selected-branch { width: 100%; margin: 0; padding: 38px 30px 30px; }
.branch-explorer .branch-items { grid-template-columns: 1fr; }
.branch-explorer .branch-header { text-align: left; }
.branch-explorer .branch-header p { margin-left: 0; }
.data-error { margin: 50px auto; max-width: 600px; padding: 45px; text-align: center; border: 1px solid rgba(240,68,58,.35); background: rgba(240,68,58,.06); }
.data-error strong { font: 600 15px var(--display); }
.data-error p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 12px 0 0; }

@keyframes originPulse { 0%, 100% { transform: scale(.96); opacity: .4; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes threadGrow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes branchReveal { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cardEnter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.empty-state { text-align: center; border: 1px solid var(--line); margin-top: 32px; padding: 70px 20px; }
.empty-state span { font: 600 20px var(--display); }
.empty-state p { color: var(--muted); font-size: 12px; }
.empty-state button { color: var(--red); background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 11px; }

footer { border-top: 1px solid var(--soft-line); padding: 40px clamp(24px, 5vw, 76px); display: flex; align-items: center; gap: 36px; color: #85888e; font-size: 12px; }
footer p { margin-right: auto; }
.footer-brand { opacity: .65; }

.info-dialog { width: min(520px, calc(100% - 32px)); color: var(--text); background: #121419; border: 1px solid var(--line); padding: 48px; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.info-dialog::backdrop { background: rgba(4,5,7,.8); backdrop-filter: blur(6px); }
.info-dialog h2 { font-size: 28px; margin-bottom: 22px; }
.info-dialog > p:not(.section-kicker) { color: #aaacb1; font-size: 15px; line-height: 1.7; }
.dialog-close { position: absolute; right: 16px; top: 16px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 24px; }
.secondary-action { margin-top: 16px; width: 100%; }

.bug-widget { position: fixed; right: 26px; bottom: 26px; z-index: 18; }
.bug-button { width: 58px; height: 58px; display: grid; place-items: center; color: #090a0d; background: var(--red); border: 0; border-radius: 50%; box-shadow: 0 12px 35px rgba(240,68,58,.3); cursor: pointer; transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease; }
.bug-button:hover, .bug-button:focus-visible { transform: translateY(-4px) rotate(-5deg); background: var(--red-bright); box-shadow: 0 17px 42px rgba(240,68,58,.42); outline: none; }
.bug-button svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bug-tooltip { position: absolute; right: 0; bottom: calc(100% + 12px); width: max-content; max-width: 240px; color: var(--text); background: #171a20; border: 1px solid var(--line); padding: 11px 14px; font-size: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; visibility: hidden; transform: translateY(7px); transition: 180ms ease; pointer-events: none; }
.bug-tooltip::after { content: ""; position: absolute; right: 22px; top: 100%; border: 6px solid transparent; border-top-color: #171a20; }
.bug-widget:hover .bug-tooltip, .bug-widget:focus-within .bug-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }

.feedback-dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; color: var(--text); background: #111318; border: 1px solid var(--line); padding: 44px 48px 40px; box-shadow: 0 30px 100px rgba(0,0,0,.72); }
.feedback-dialog::backdrop { background: rgba(4,5,7,.82); backdrop-filter: blur(7px); }
.feedback-dialog h2 { font: 600 27px/1.3 var(--display); letter-spacing: -.035em; margin: 0 0 12px; }
.feedback-lead { color: #a8aaaf; font-size: 14px; line-height: 1.65; margin: 0 0 28px; }
.feedback-dialog form { display: grid; gap: 19px; }
.form-field { display: grid; gap: 8px; }
.form-field > span { color: #d5d3ce; font-size: 12px; font-weight: 700; }
.form-field > span i { color: #777a80; font-style: normal; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea { width: 100%; color: var(--text); background: #090a0d; border: 1px solid var(--line); border-radius: 0; outline: 0; padding: 13px 14px; font-size: 14px; line-height: 1.5; transition: border-color 150ms ease; }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field select { cursor: pointer; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--red); }
.form-field textarea:invalid:not(:placeholder-shown) { border-color: #d07171; }
.form-field small { justify-self: end; color: #777a80; font-size: 10px; }
.feedback-context { color: #898c92; background: rgba(255,255,255,.025); border-left: 2px solid #54575d; padding: 11px 13px; font-size: 11px; line-height: 1.55; }
.feedback-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.feedback-actions .primary-action { width: 100%; }
.feedback-actions .primary-action:disabled { cursor: wait; opacity: .65; transform: none; }
.copy-action { min-height: 56px; color: #c4c5c8; background: transparent; border: 1px solid var(--line); padding: 0 18px; cursor: pointer; font-size: 12px; font-weight: 700; transition: 150ms ease; }
.copy-action:hover { color: var(--text); border-color: #777a80; }
.feedback-status { min-height: 20px; color: var(--green); font-size: 12px; line-height: 1.5; margin: -6px 0 0; }
.feedback-status.error { color: #ef7772; }

@media (max-width: 900px) {
  .journey-tools { grid-template-columns: 1fr 1fr; }
  .filters { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .search-box { width: 100%; }
  .story-card { grid-template-columns: 120px 1fr; }
  .timeline-item { padding-right: 36px; }
  .timeline-item.side-right { padding-left: 36px; }
  .sequence { display: none; }
  .reality-buttons { grid-template-columns: repeat(3, 1fr); gap: 32px 12px; }
  .reality-buttons::before { display: none; }
  .reality-button::before { height: 32px; }
  .branch-item .story-card { grid-template-columns: 82px 1fr; }
  .branch-explorer { grid-template-columns: 270px minmax(0, 1fr); gap: 18px; }
  .branch-explorer .selected-branch { padding: 30px 20px 22px; }
}

@media (max-width: 680px) {
  .site-header { height: 68px; grid-template-columns: 1fr auto; }
  .universe-switcher { display: none; }
  .hero { min-height: 700px; padding-top: 100px; }
  .hero-copy { font-size: 16px; max-width: 480px; }
  .journey { padding: 80px 16px 100px; }
  .section-intro { grid-template-columns: 1fr; gap: 18px; padding: 0 5px 38px; }
  .section-intro > p { max-width: 440px; }
  .journey-tools { position: relative; top: auto; grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .search-box { grid-row: 2; justify-self: stretch; }
  .filters { grid-row: 3; grid-column: 1; justify-content: stretch; overflow-x: auto; }
  .filter { flex: 1 0 auto; }
  .chapter-nav { justify-content: flex-start; margin-top: 25px; }
  .timeline-mode { margin-top: 28px; }
  .mode-button { min-height: 64px; padding: 8px; gap: 8px; }
  .mode-icon { display: none; }
  .timeline::before { left: 11px; }
  .chapter-heading, .chapter-heading:first-child { margin: 42px 0 28px 11px; transform: translateX(-1px); }
  .timeline-item, .timeline-item.side-right { width: 100%; margin-left: 0; padding: 0 0 26px 31px; }
  .timeline-node, .side-right .timeline-node { left: 5px; right: auto; top: 43px; }
  .story-card { grid-template-columns: 112px 1fr; min-height: 205px; }
  .poster { min-height: 205px; }
  .card-body { padding: 17px 14px 14px; }
  .story-card h3 { font-size: 16px; margin-top: 12px; }
  .card-note { display: block; font-size: 12px; }
  .tree-intro { margin-bottom: 26px; }
  .reality-origin { width: 94px; height: 94px; margin-bottom: 52px; }
  .reality-origin::after { height: 53px; }
  .reality-buttons { display: flex; gap: 10px; overflow-x: auto; padding: 7px 2px 18px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .reality-buttons::-webkit-scrollbar { display: none; }
  .reality-button { flex: 0 0 172px; min-height: 94px; scroll-snap-align: center; }
  .reality-button::before, .reality-button > i { display: none; }
  .selected-branch { margin-top: 60px; padding: 32px 14px 20px 20px; }
  .selected-thread { height: 61px; }
  .branch-header { text-align: left; padding-right: 10px; }
  .branch-header h3 { font-size: 22px; }
  .branch-header p { margin: 0; }
  .branch-items { grid-template-columns: 1fr; }
  .branch-item .story-card { grid-template-columns: 92px 1fr; }
  .branch-explorer { grid-template-columns: 1fr; }
  .branch-directory { position: relative; top: auto; min-height: 0; max-height: 390px; }
  .branch-directory-list { max-height: 275px; }
  .branch-explorer .selected-branch { margin-top: 0; padding: 30px 14px 20px 20px; }
  footer { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  footer p { width: 100%; order: 3; }
  .info-dialog { padding: 38px 24px 28px; }
  .bug-widget { right: 16px; bottom: 16px; }
  .bug-button { width: 52px; height: 52px; }
  .bug-tooltip { display: none; }
  .feedback-dialog { padding: 38px 20px 25px; }
  .feedback-dialog h2 { font-size: 22px; }
  .feedback-actions { grid-template-columns: 1fr; }
  .copy-action { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
