:root { --ink:#07080d; --paper:#f4f3ec; --lime:#c7ff2f; --glass:rgba(9,11,18,.72); }
* { box-sizing:border-box; }
html, body { margin:0; width:100%; height:100%; background:var(--ink); color:var(--paper); font-family:"Segoe UI",Arial,sans-serif; overflow:hidden; overscroll-behavior:none; }
button, input { font:inherit; }
button { color:inherit; }
::selection { background:var(--lime); color:var(--ink); }
.fractal-shell { position:relative; width:100vw; height:100svh; overflow:hidden; background:#02030a; isolation:isolate; }
.journey-gate { position:absolute; inset:0; z-index:30; display:grid; place-content:center; justify-items:center; gap:22px; background:radial-gradient(circle at 50% 46%,rgba(48,28,92,.44),rgba(2,3,10,.88) 58%,#02030a); backdrop-filter:blur(9px); text-align:center; }
.journey-gate p { margin:0; color:rgba(255,255,255,.68); font-size:12px; letter-spacing:.08em; }
.journey-gate button { min-width:230px; padding:18px 30px; border:1px solid rgba(199,255,47,.55); border-radius:999px; background:rgba(199,255,47,.11); color:#fff; cursor:pointer; box-shadow:0 0 50px rgba(199,255,47,.1); transition:.35s; }
.journey-gate button:hover { transform:scale(1.04); background:rgba(199,255,47,.18); box-shadow:0 0 70px rgba(199,255,47,.2); }
.journey-gate button span,.journey-gate button small { display:block; }.journey-gate button span { font-size:19px; font-weight:650; }.journey-gate button small { margin-top:4px; color:rgba(255,255,255,.58); font-size:10px; }
.render-error { position:absolute; inset:0; z-index:40; display:grid; place-items:center; padding:30px; background:#02030a; color:#fff; text-align:center; font-size:16px; }
.render-error[hidden] { display:none; }
.fractal-shell:not(.journey-started) .hero-copy h1 { animation-play-state:paused; }
.fractal-shell:not(.journey-started) .hero-copy > p { animation-play-state:paused; }
.fractal-shell:not(.journey-started) .journey-details { animation-play-state:paused; }
.fractal-canvas { position:absolute; inset:0; width:100%; height:100%; cursor:crosshair; touch-action:none; }
.noise { position:absolute; inset:0; pointer-events:none; opacity:.12; z-index:2; 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); mix-blend-mode:soft-light; }
.topbar { position:absolute; z-index:10; top:0; left:0; right:0; height:92px; padding:0 34px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,.15); background:linear-gradient(to bottom,rgba(3,4,10,.65),transparent); direction:ltr; }
.brand { color:white; text-decoration:none; font:700 17px Consolas,"Courier New",monospace; letter-spacing:.08em; }
.brand span { color:var(--lime); }
.top-actions { display:flex; gap:8px; }
.top-actions button { height:42px; min-width:42px; border:1px solid rgba(255,255,255,.2); border-radius:12px; background:rgba(6,8,14,.42); backdrop-filter:blur(14px); cursor:pointer; transition:.25s; }
.top-actions button:hover { border-color:var(--lime); color:var(--lime); transform:translateY(-2px); }
.top-actions .sound-active { color:var(--lime); border-color:rgba(199,255,47,.42); background:rgba(199,255,47,.1); box-shadow:0 0 24px rgba(199,255,47,.08); }
.top-actions button span { margin-left:6px; font-size:12px; }
.mobile-menu { display:none; }
.hero-copy { position:absolute; z-index:5; right:5vw; top:50%; transform:translateY(-52%); pointer-events:none; text-shadow:0 2px 30px rgba(0,0,0,.5); }
.hero-copy p { display:flex; align-items:center; gap:12px; margin:0 0 25px; font-size:11px; letter-spacing:.09em; }
.hero-copy > p { will-change:transform,opacity; animation:details-exit 15s cubic-bezier(.45,0,.75,.7) 7s forwards; }
.hero-copy p i { display:block; width:34px; height:2px; background:var(--lime); box-shadow:0 0 16px var(--lime); }
.hero-copy h1 { margin:0; font-size:clamp(76px,10vw,164px); line-height:.72; letter-spacing:-.075em; font-weight:800; transform-origin:center center; will-change:transform,opacity; animation:title-dive 20s linear 1.5s forwards; }
.hero-copy h1 span { color:transparent; -webkit-text-stroke:1.5px white; }
@keyframes title-dive { 0% { opacity:1; transform:scale(1); } 82% { opacity:1; transform:scale(4.6); } 100% { opacity:0; transform:scale(5.4); } }
.journey-title { margin:30px 0 0; color:var(--lime); font-size:clamp(18px,2vw,31px); font-weight:500; letter-spacing:.02em; }
.journey-details { will-change:transform,opacity; animation:details-exit 15s cubic-bezier(.45,0,.75,.7) 7s forwards; }
@keyframes details-exit { 0%,12% { opacity:1; transform:translateX(0); } 100% { opacity:0; transform:translateX(115vw); } }
.infinite-manifesto { position:relative; max-width:520px; margin:34px 0 0; padding:0 22px 0 0; border-right:2px solid var(--lime); color:rgba(255,255,255,.72); font-size:clamp(15px,1.25vw,20px); line-height:1.65; letter-spacing:.01em; animation:manifesto-in 1.2s cubic-bezier(.2,.8,.2,1) .35s both; }
.infinite-manifesto strong { display:inline-block; color:#fff; font-weight:650; }
@keyframes manifesto-in { from { opacity:0; transform:translateY(18px); filter:blur(8px); } to { opacity:1; transform:translateY(0); filter:blur(0); } }
.hero-copy small { display:block; margin-top:36px; color:rgba(255,255,255,.62); font-size:11px; letter-spacing:.04em; }
.control-panel { position:absolute; z-index:12; left:25px; top:112px; width:min(330px,calc(100vw - 50px)); padding:22px; border:1px solid rgba(255,255,255,.16); border-radius:23px; background:var(--glass); backdrop-filter:blur(24px) saturate(1.3); box-shadow:0 24px 70px rgba(0,0,0,.3); direction:rtl; }
.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; color:rgba(255,255,255,.62); font-size:10px; letter-spacing:.12em; }
.panel-head button { display:none; border:0; background:none; font-size:25px; cursor:pointer; }
.auto-button { width:100%; display:flex; text-align:right; align-items:center; gap:13px; padding:13px; border:1px solid rgba(255,255,255,.14); border-radius:15px; background:rgba(255,255,255,.06); cursor:pointer; transition:.25s; }
.auto-button.active { border-color:rgba(199,255,47,.55); background:rgba(199,255,47,.1); }
.play-icon { width:42px; height:42px; display:grid; place-items:center; flex:none; border-radius:12px; background:var(--lime); color:#080a0c; font-weight:900; box-shadow:0 0 25px rgba(199,255,47,.2); }
.auto-button b,.auto-button small { display:block; }.auto-button b { font-size:13px; }.auto-button small { margin-top:3px; color:rgba(255,255,255,.52); font-size:10px; }
.control-group { margin-top:21px; }
.label-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-size:10px; color:rgba(255,255,255,.58); }
.label-row span { color:var(--lime); font-family:"Space Mono",monospace; }
.destination-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.destination-grid button { display:flex; align-items:center; gap:8px; padding:10px; border:1px solid rgba(255,255,255,.11); border-radius:10px; background:rgba(255,255,255,.045); font-size:11px; cursor:pointer; transition:.2s; }
.destination-grid button:hover { background:rgba(255,255,255,.11); border-color:rgba(255,255,255,.3); }
.destination-grid button span { font:9px "Space Mono",monospace; color:var(--lime); }
.palette-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; direction:ltr; }
.palette-row button { position:relative; height:30px; border:2px solid transparent; border-radius:9px; cursor:pointer; transition:.2s; }
.palette-row button.selected { border-color:white; transform:scale(1.08); }
.cosmic { background:linear-gradient(110deg,#18072d,#7b26f0,#ffc857); }.ocean { background:linear-gradient(110deg,#001b44,#007aff,#5ef4d6); }.solar { background:linear-gradient(110deg,#2e0501,#ff4d00,#ffe94a); }.aurora { background:linear-gradient(110deg,#100b3b,#28e7b4,#b8ff6a); }
input[type="range"] { appearance:none; width:100%; height:3px; border-radius:3px; outline:0; background:linear-gradient(90deg,var(--lime),rgba(255,255,255,.18)); }
input[type="range"]::-webkit-slider-thumb { appearance:none; width:15px; height:15px; border-radius:50%; background:white; border:4px solid #16191e; box-shadow:0 0 0 1px var(--lime); cursor:pointer; }
.reset-button { width:100%; margin-top:22px; padding:11px; border:1px solid rgba(255,255,255,.12); border-radius:11px; background:transparent; font-size:10px; color:rgba(255,255,255,.55); cursor:pointer; transition:.2s; }
.reset-button:hover { color:white; border-color:white; }
.hud { position:absolute; z-index:6; right:34px; bottom:28px; display:flex; gap:45px; direction:ltr; }
.hud div { display:flex; flex-direction:column; gap:4px; }.hud span { font:8px "Space Mono",monospace; color:rgba(255,255,255,.45); letter-spacing:.12em; }.hud strong { font:11px "Space Mono",monospace; font-weight:400; }
.edge-copy { position:absolute; z-index:6; left:28px; bottom:30px; writing-mode:vertical-rl; transform:rotate(180deg); font:8px "Space Mono",monospace; color:rgba(255,255,255,.38); letter-spacing:.15em; }
.event-credit { position:absolute; z-index:7; left:50%; bottom:25px; transform:translateX(-50%); display:flex; align-items:center; gap:14px; white-space:nowrap; font-size:11px; color:rgba(255,255,255,.62); }
.event-credit strong { color:#fff; font-weight:600; }
.event-credit span { padding-right:14px; border-right:1px solid rgba(255,255,255,.3); }

@media (max-width:900px) {
  .topbar { height:calc(72px + env(safe-area-inset-top)); padding:env(safe-area-inset-top) calc(18px + env(safe-area-inset-right)) 0 calc(18px + env(safe-area-inset-left)); }.top-actions button { min-width:44px; height:44px; }.top-actions button span { display:none; }.mobile-menu { display:inline-grid !important; place-items:center; }
  .hero-copy { right:22px; top:44%; }.hero-copy h1 { font-size:clamp(68px,20vw,108px); }.journey-title { margin-top:24px; }.infinite-manifesto { max-width:310px; margin-top:22px; font-size:14px; }.hero-copy small { max-width:270px; margin-top:22px; line-height:1.7; }
  .control-panel { top:calc(84px + env(safe-area-inset-top)); left:calc(14px + env(safe-area-inset-left)); transform:translateX(calc(-100% - 20px)); transition:transform .38s cubic-bezier(.16,1,.3,1); max-height:calc(100svh - 100px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow:auto; }
  .control-panel.open { transform:translateX(0); }.panel-head button { display:block; }
  .hud { right:calc(18px + env(safe-area-inset-right)); bottom:calc(54px + env(safe-area-inset-bottom)); gap:18px; }.hud div:nth-child(2) { display:none; }.edge-copy { display:none; }.event-credit { bottom:calc(16px + env(safe-area-inset-bottom)); font-size:10px; gap:9px; }.event-credit span { padding-right:9px; }
}
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }
