@charset "utf-8";

:root { --bg: #040307; --panel: rgba(14,10,20,.78); --line: rgba(255,61,242,.22); --text: #f6f2ff; --muted: #a59cb8; --mag: #ff3df2; --cyan: #2ef2ff; --good: #5dffb0; --bad: #ff5d7a; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0px; background: var(--bg); color: var(--text); font-family: "Space Grotesk", system-ui, sans-serif; touch-action: manipulation; user-select: none; }

html { scroll-behavior: smooth; }

body { overflow-x: hidden; }

#bgwrap { position: fixed; inset: 0px; z-index: 0; overflow: hidden; pointer-events: none; }

#bgvid, #bgimg { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; filter: saturate(1.55) contrast(1.08) brightness(0.62); animation: 26s ease-in-out 0s infinite alternate none running drift; }

#bgimg { background: url("/tetris/media/410e7b467b90f4f4.jpg") center center / cover; }

@keyframes drift { 
  0% { transform: scale(1.04) translate(-1%, 0px); }
  100% { transform: scale(1.12) translate(1.5%, -1%); }
}

#tint { position: absolute; inset: 0px; background: radial-gradient(80% 50% at 50% 0%, rgba(255, 61, 242, 0.22), transparent 70%), radial-gradient(70% 40% at 50% 100%, rgba(46, 242, 255, 0.18), transparent 70%), linear-gradient(rgba(4, 3, 7, 0.35), rgba(4, 3, 7, 0.55) 50%, rgba(4, 3, 7, 0.85)); animation: 12s ease-in-out 0s infinite alternate none running hue; }

@keyframes hue { 
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(-25deg); }
}

.fog { position: absolute; left: -50%; width: 200%; height: 40%; opacity: 0.35; filter: blur(30px); background: radial-gradient(closest-side, rgba(200, 170, 255, 0.35), transparent), radial-gradient(closest-side at 70% 50%, rgba(46, 242, 255, 0.25), transparent); }

.fog.a { bottom: -5%; animation: 38s linear 0s infinite normal none running fog; }

.fog.b { bottom: 10%; opacity: 0.2; animation: 55s linear 0s infinite reverse none running fog; }

@keyframes fog { 
  0% { transform: translateX(-12%); }
  100% { transform: translateX(12%); }
}

#fx { position: fixed; inset: 0px; z-index: 1; pointer-events: none; }

#flash { position: fixed; inset: 0px; z-index: 2; pointer-events: none; background: rgb(221, 255, 255); opacity: 0; }

#game { position: relative; z-index: 3; height: 100svh; display: flex; flex-direction: column; align-items: center; padding: calc(env(safe-area-inset-top) + 8px) 10px 10px; }

header { width: 100%; max-width: 520px; display: flex; align-items: center; gap: 6px; }

.neon { font-family: Monoton, cursive; font-weight: 400; color: rgb(255, 214, 251); letter-spacing: 0.06em; text-shadow: 0 0 4px #fff,0 0 10px var(--mag),0 0 22px var(--mag),0 0 44px var(--mag); animation: 7s ease 0s infinite normal none running flicker; }

.brand { font-size: 15px; line-height: 1.05; }

.brand small { display: block; font-size: 11px; }

@keyframes flicker { 
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.45; }
}

.stats { display: flex; gap: 5px; margin-left: auto; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 7px; min-width: 44px; text-align: center; backdrop-filter: blur(4px); }

.stat b { display: block; font-family: "JetBrains Mono", monospace; font-size: 14px; color: rgb(255, 255, 255); text-shadow: 0 0 8px var(--cyan); }

.stat span { font-size: 8px; color: var(--muted); letter-spacing: 0.12em; }

#nextBox { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px; display: flex; flex-direction: column; align-items: center; }

#nextBox span { font-size: 8px; color: var(--muted); letter-spacing: 0.12em; }

#ticker { width: 100%; max-width: 520px; font-size: 11px; color: var(--muted); text-align: center; margin: 6px 0px 2px; min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#ticker b { color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }

#arena { flex: 1 1 0%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0px; }

#stage { position: relative; transform-origin: 50% 100%; will-change: transform; }

#spinner { will-change: transform; }

#board { display: block; border-radius: 6px; touch-action: none; background: rgba(6, 3, 12, 0.8); box-shadow: rgba(255, 61, 242, 0.5) 0px 0px 0px 1px, rgba(255, 61, 242, 0.35) 0px 0px 18px, rgba(46, 242, 255, 0.15) 0px 0px 40px, rgba(0, 0, 0, 0.7) 0px 30px 60px; }

.fulcrum { width: 0px; height: 0px; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 16px solid var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); margin-top: -1px; }

.beam { width: 60%; max-width: 260px; height: 3px; border-radius: 3px; background: linear-gradient(90deg,transparent,var(--mag),transparent); box-shadow: 0 0 12px var(--mag); }

#streak { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-weight: 700; font-size: 28px; letter-spacing: 0.06em; white-space: nowrap; pointer-events: none; opacity: 0; color: rgb(255, 255, 255); text-shadow: 0 0 10px var(--mag),0 0 26px var(--mag); }

#streak.show { animation: 0.9s ease-out 0s 1 normal none running pop; }

@keyframes pop { 
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

#count { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 8; font-family: Monoton, cursive; font-size: 84px; color: rgb(255, 255, 255); text-shadow: 0 0 12px var(--cyan),0 0 40px var(--cyan); pointer-events: none; opacity: 0; }

#remote { width: 100%; max-width: 420px; margin-top: 8px; background: linear-gradient(rgba(24, 14, 34, 0.9), rgba(10, 6, 16, 0.92)); border: 1px solid var(--line); border-radius: 26px; padding: 10px 12px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; box-shadow: rgba(255, 61, 242, 0.15) 0px 0px 24px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset; }

#remote button { height: 54px; border-radius: 16px; border: 1px solid rgba(46, 242, 255, 0.25); background: rgb(20, 15, 29); color: var(--text); font-size: 22px; font-family: inherit; box-shadow: rgb(0, 0, 0) 0px 3px 0px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset; touch-action: none; }

#remote button:active, #remote button.held { transform: translateY(2px); box-shadow: rgb(0, 0, 0) 0px 1px 0px, rgba(46, 242, 255, 0.5) 0px 0px 14px; background: rgb(27, 20, 48); }

#remote .drop { background: linear-gradient(rgb(255, 124, 246), rgb(194, 31, 184)); color: rgb(255, 255, 255); border-color: rgb(255, 156, 248); text-shadow: rgb(255, 255, 255) 0px 0px 6px; }

#remote .tiny { grid-column: span 5; display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; padding: 0px 4px; }

#remote .tiny button { height: 28px; font-size: 11px; padding: 0px 12px; border-radius: 10px; box-shadow: none; }

.hint { font-size: 10px; color: var(--muted); letter-spacing: 0.14em; margin-top: 6px; opacity: 0.8; animation: 2.4s ease-in-out 0s infinite normal none running bob; }

@keyframes bob { 
  50% { transform: translateY(3px); }
}

#vault { position: relative; z-index: 3; min-height: 100vh; padding: 40px 14px calc(env(safe-area-inset-bottom) + 90px); overflow: hidden; }

#vault::before { content: ""; position: absolute; inset: 0px; background: url("/tetris/media/c4c819e65e95ddf4.jpg") center top / cover; filter: saturate(1.6) brightness(0.55); z-index: -2; }

#vault::after { content: ""; position: absolute; inset: 0px; z-index: -1; background: linear-gradient(rgb(4, 3, 7) 0%, rgba(4, 3, 7, 0.35) 18%, rgba(4, 3, 7, 0.7) 60%, rgb(4, 3, 7) 100%); }

.vault-inner { max-width: 560px; margin: 0px auto; }

.term { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--cyan); text-shadow: 0 0 8px var(--cyan); white-space: pre-line; min-height: 56px; }

.term::after { content: "▌"; animation: 1s steps(1) 0s infinite normal none running blink; }

@keyframes blink { 
  50% { opacity: 0; }
}

#vault h2 { font-size: 34px; margin: 10px 0px 4px; }

#vault .sub { color: rgb(217, 208, 234); font-size: 14px; line-height: 1.5; margin: 0px 0px 18px; }

#gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.cab { position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(rgba(26, 16, 38, 0.92), rgba(10, 6, 16, 0.95)); border: 1px solid hsla(var(--h),100%,65%,.45); box-shadow: 0 0 18px hsla(var(--h),100%,60%,.18); transition: transform 0.3s, box-shadow 0.3s; }

.cab .marquee { font-family: "JetBrains Mono", monospace; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 4px; border-radius: 8px; margin-bottom: 8px; color: rgb(255, 255, 255); background: hsla(var(--h),90%,45%,.35); text-shadow: 0 0 8px hsl(var(--h) 100% 70%); letter-spacing: 0.2em; }

.cab .screen { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1; background: rgb(0, 0, 0); box-shadow: rgb(0, 0, 0) 0px 0px 20px inset; }

.cab .screen::after { content: ""; position: absolute; inset: 0px; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0px, rgba(0, 0, 0, 0.25) 2px, transparent 2px, transparent 4px); }

.cab .screen img { width: 100%; height: 100%; object-fit: cover; display: block; animation: 6s ease-in-out 0s infinite alternate none running breathe; }

@keyframes breathe { 
  0% { transform: scale(1); }
  100% { transform: scale(1.07); }
}

.cab .ring { position: absolute; inset: 0px; border-radius: 10px; padding: 2px; pointer-events: none; background: conic-gradient(from var(--a,0deg),transparent 0 70%,hsl(var(--h) 100% 70%) 85%,#fff 90%,transparent 95%); mask: linear-gradient(rgb(0, 0, 0) 0px, rgb(0, 0, 0) 0px) content-box exclude, linear-gradient(rgb(0, 0, 0) 0px, rgb(0, 0, 0) 0px); animation: 3.2s linear 0s infinite normal none running ring; }

@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@keyframes ring { 
  100% { --a: 360deg; }
}

.cab .nid { position: absolute; left: 6px; bottom: 6px; font-family: "JetBrains Mono", monospace; font-size: 10px; padding: 3px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); color: hsl(var(--h) 100% 75%); letter-spacing: 0.08em; }

.floor { grid-column: 1 / -1; font-size: 11px; letter-spacing: 0.2em; color: var(--cyan); text-shadow: 0 0 8px var(--cyan); margin: 14px 2px 0px; text-transform: uppercase; }

.floor:first-child { margin-top: 0px; }

.cab .meta { margin: 8px 2px; }

.cab .meta b { display: block; font-size: 15px; }

.cab .meta span { font-size: 12px; color: var(--muted); }

.cab a, .cab .soon { display: flex; text-align: center; white-space: nowrap; align-items: center; justify-content: center; height: 38px; border-radius: 10px; font-size: 12px; letter-spacing: 0.1em; text-decoration: none; }

.cab a { color: rgb(6, 4, 10); font-weight: 700; background: linear-gradient(hsl(var(--h) 100% 75%),hsl(var(--h) 90% 55%)); box-shadow: 0 0 14px hsla(var(--h),100%,60%,.5); }

.cab .soon { letter-spacing: 0.04em; font-size: 11px; color: var(--muted); border: 1px dashed rgba(255, 255, 255, 0.18); }

.cab.focus { transform: scale(1.03); animation: 1.1s ease-in-out 0s 4 normal none running focus; }

@keyframes focus { 
  50% { box-shadow: 0 0 0 2px hsl(var(--h) 100% 70%),0 0 40px hsla(var(--h),100%,60%,.8); }
}

#btnBackUp { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%) translateY(140%); z-index: 6; height: 50px; padding: 0px 22px; border-radius: 999px; border: 1px solid var(--cyan); background: rgba(8, 20, 26, 0.9); color: rgb(255, 255, 255); font-family: inherit; font-weight: 700; white-space: nowrap; letter-spacing: 0.1em; font-size: 14px; box-shadow: rgba(46, 242, 255, 0.5) 0px 0px 22px; transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1); }

#btnBackUp.on { transform: translateX(-50%) translateY(0px); }

.overlay { position: fixed; inset: 0px; background: rgba(4, 2, 8, 0.78); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px); z-index: 10; }

.overlay.on { display: flex; }

.card { width: 100%; max-width: 440px; max-height: 100%; overflow: auto; background: linear-gradient(rgba(24, 14, 34, 0.96), rgba(10, 6, 16, 0.97)); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: rgba(255, 61, 242, 0.2) 0px 0px 40px, rgba(0, 0, 0, 0.7) 0px 30px 80px; user-select: text; }

.card h1 { margin: 4px 0px 8px; font-size: 32px; line-height: 1.1; }

.card h2 { margin: 6px 0px 10px; font-size: 22px; line-height: 1.2; }

.card p { color: rgb(221, 213, 236); line-height: 1.5; font-size: 15px; margin: 0px 0px 10px; }

.card ul { padding-left: 18px; color: rgb(221, 213, 236); line-height: 1.5; font-size: 14px; margin: 8px 0px 14px; }

.chip { display: inline-block; font-size: 10px; letter-spacing: 0.14em; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(46, 242, 255, 0.4); color: var(--cyan); margin: 0px 4px 4px 0px; }

.cta { width: 100%; height: 52px; border-radius: 14px; border: 0px; background: linear-gradient(rgb(255, 124, 246), rgb(194, 31, 184)); color: rgb(255, 255, 255); font-weight: 700; font-size: 16px; font-family: inherit; letter-spacing: 0.08em; margin-top: 6px; box-shadow: rgba(255, 61, 242, 0.45) 0px 0px 22px; text-shadow: rgba(255, 255, 255, 0.6) 0px 0px 6px; }

.cta:disabled { opacity: 0.35; box-shadow: none; }

.action { background: rgba(46, 242, 255, 0.07); border: 1px solid rgba(46, 242, 255, 0.3); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: rgb(201, 251, 255); margin: 8px 0px 14px; }

.quizq { font-weight: 600; margin: 6px 0px 8px; }

.opt { display: block; width: 100%; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: var(--text); font-family: inherit; font-size: 14px; margin-bottom: 8px; }

.opt.right { border-color: var(--good); background: rgba(93, 255, 176, 0.1); }

.opt.wrong { border-color: var(--bad); background: rgba(255, 93, 122, 0.1); }

.feedback { font-size: 13px; min-height: 18px; margin: 2px 0px 6px; }

.timer { height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; margin: 4px 0px 12px; }

.timer i { display: block; height: 100%; width: 0px; background: linear-gradient(90deg,var(--mag),var(--cyan)); transition: width 0.25s linear; box-shadow: 0 0 8px var(--cyan); }

.fine { font-size: 11px; color: var(--muted); margin-top: 10px; }
.overlay .card{max-height:88dvh;overflow:auto} .cab a{min-height:44px;display:flex;align-items:center;justify-content:center}

#stage,#spinner{will-change:transform;backface-visibility:hidden} @media(max-width:700px){.fog{display:none}#bgimg{animation:none}} @media(prefers-reduced-motion:reduce){.fog{display:none}#bgimg{animation:none}}

/* Salt Stack: one video decoder, opacity fades and two inexpensive still echoes. */
#bgvid{opacity:0;animation:none;transition:opacity 2.4s ease;filter:saturate(.55) contrast(1.05);}
#bgvid.visible{opacity:.22}#bgvid.inverse{filter:invert(1) saturate(.25);}
#bgimg{opacity:.32;animation:drift 40s ease-in-out infinite alternate;}
#ghostTrail{position:absolute;inset:-5%;pointer-events:none;background:url('/tetris/media/410e7b467b90f4f4.jpg') center/cover;filter:invert(1) grayscale(1);opacity:.045;animation:saltGhost 28s ease-in-out infinite alternate;}
#ghostTrail::after{content:'';position:absolute;inset:0;background:inherit;transform:translate(3%,2%);opacity:.4;}
@keyframes saltGhost{from{transform:translate(-2%,1%) scale(1.02);opacity:.025}to{transform:translate(2%,-1%) scale(1.08);opacity:.085}}
#bgwrap.still *,#bgwrap.held *{animation-play-state:paused!important}
#bgwrap.still #bgvid{display:none}#bgwrap.still #ghostTrail{opacity:.035}
@media(max-width:600px){#bgvid.visible{opacity:.16}.fog{filter:none;opacity:.15}#ghostTrail::after{display:none}}
@media(prefers-reduced-motion:reduce){#bgwrap *{animation:none!important;transition:none!important}#bgvid{display:none}}

/* Approved Salt Stack entry artwork. Controls retain their existing handlers. */
#ovStart .card{max-width:940px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:26px;align-items:center;background:#050d10;border-color:#42dce466;box-shadow:0 0 44px #32e3ef18,0 30px 80px #000b;}
.salt-entry-art{display:block;width:100%;height:auto;max-height:76dvh;object-fit:contain;border-radius:12px;}
.salt-entry-copy{min-width:0;}#ovStart .neon{color:#ecffff;text-shadow:0 0 16px #48e7ee66;animation:none;}#ovStart .cta{background:linear-gradient(120deg,#bbffff,#45e5c0);color:#042427;border-color:#baffef;box-shadow:0 0 24px #40eed322;}
.salt-instructions{margin:14px 0;color:#d6eeee;}.salt-instructions summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;}.salt-instructions summary::before{content:'+';color:#65efcf;}.salt-instructions[open] summary::before{content:'−';}
@media(max-width:640px){#ovStart .card{display:block;max-width:440px;padding:16px;}.salt-entry-art{max-height:34dvh;margin:0 auto 16px;width:100%;}#ovStart .card h1{font-size:26px;}}
