:root {
  --bg: #000;
  --fg: #f3f0e8;
  --muted: rgba(243, 240, 232, 0.52);
  --faint: rgba(243, 240, 232, 0.3);
  --line: rgba(243, 240, 232, 0.12);
  --glass: rgba(243, 240, 232, 0.035);
  --glow: rgba(243, 240, 232, 0.42);
  --ember: #ff4a3d;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --font: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display: "Unbounded", "Space Grotesk", ui-sans-serif, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --hero: 0;
  --accent: #ff4a3d;
  --accent-soft: rgba(255, 74, 61, 0.35);
}

html[data-sec="1"] { --accent: #6fcfff; --accent-soft: rgba(111, 207, 255, 0.35); }
html[data-sec="2"] { --accent: #6dffa0; --accent-soft: rgba(109, 255, 160, 0.3); }
html[data-sec="3"] { --accent: #ff5a3c; --accent-soft: rgba(255, 90, 60, 0.35); }
html[data-sec="4"] { --accent: #ff8ac0; --accent-soft: rgba(255, 138, 192, 0.35); }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

::selection {
  background: var(--accent);
  color: #000;
}

html.booting body {
  overflow: hidden;
}

/* ---------- background layers ---------- */

#scene,
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#scene {
  z-index: 2;
}

#field {
  z-index: 3;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 40%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36) 0%, transparent 28%, transparent 72%, rgba(0, 0, 0, 0.2) 100%);
}

.lamp {
  position: fixed;
  left: -150vw;
  top: -150vh;
  width: 300vw;
  height: 300vh;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(50vw, 42vh, 0);
  background: radial-gradient(
    ellipse 62vw 52vh at 50% 50%,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.42) 80%,
    rgba(0, 0, 0, 0.56) 100%
  );
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.void {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 80%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: calc(0.3 - var(--hero) * 0.14);
  mask-image: radial-gradient(ellipse 80% 88% at 42% 38%, transparent 0%, transparent 58%, rgba(0, 0, 0, 0.45) 78%, #000 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 88% at 42% 38%, transparent 0%, transparent 58%, rgba(0, 0, 0, 0.45) 78%, #000 100%);
}

.blade {
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1;
  display: block;
  height: 100dvh;
  width: min(42vw, 540px);
  object-fit: cover;
  object-position: 78% 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: calc(0.9 - var(--hero) * 0.62);
  transform: translateX(calc(var(--hero) * 6vw));
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}

.progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 9;
  height: 2px;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, transparent, var(--accent) 70%, var(--fg));
  box-shadow: 0 0 12px var(--accent-soft);
  transition: background 0.6s ease;
}

/* ---------- boot ---------- */

.boot {
  display: none;
}

html.booting .boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  background: #000;
  font-family: var(--mono);
  cursor: pointer;
  transition: opacity 0.6s ease, clip-path 0.9s var(--ease);
  clip-path: inset(0 0 0 0);
}

.boot.out {
  opacity: 0;
  clip-path: inset(50% 0 50% 0);
  pointer-events: none;
}

.boot-log {
  margin: 0;
  max-width: 720px;
  font: inherit;
  font-size: clamp(0.62rem, 1.6vw, 0.78rem);
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.boot-log b {
  font-weight: 400;
  color: var(--fg);
}

.boot-log em {
  font-style: normal;
  color: var(--ember);
}

.boot-bar {
  margin-top: 18px;
  height: 1px;
  max-width: 720px;
  background: var(--line);
}

.boot-bar span {
  display: block;
  height: 100%;
  width: var(--boot, 0%);
  background: var(--fg);
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.12s linear;
}

/* ---------- chrome ---------- */

.sound,
.chip {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  z-index: 10;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(14, 14, 14, 0.78);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.sound {
  left: max(18px, env(safe-area-inset-left));
  color: var(--fg);
}

.top-right {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 10;
  display: flex;
  gap: 8px;
}

.chip {
  position: static;
}

a.chip { text-decoration: none; }

.js-term.chip {
  font-family: var(--mono);
  letter-spacing: 0;
}

.sound:hover,
.sound:focus-visible,
.chip:hover,
.chip:focus-visible {
  color: var(--fg);
  border-color: rgba(243, 240, 232, 0.32);
  box-shadow: 0 0 22px rgba(243, 240, 232, 0.12);
  outline: none;
}

.sound svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.sound .i-on,
.sound .eq { display: none; }
.sound[aria-pressed="true"] .i-off { display: none; }
.sound[aria-pressed="true"] .eq { display: flex; }

.eq {
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq i {
  width: 3px;
  height: 14px;
  border-radius: 1px;
  background: var(--fg);
  transform-origin: 50% 100%;
  transform: scaleY(0.3);
  box-shadow: 0 0 6px var(--accent-soft);
  animation: eq 1.1s ease-in-out infinite;
}

.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; background: var(--accent); }
.eq i:nth-child(4) { animation-delay: -0.85s; }

.sound.live .eq i {
  animation: none;
}

.sound.live {
  border-color: var(--accent-soft);
  box-shadow: 0 0 18px var(--accent-soft);
}

.dots {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-50%);
}

.dots a {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.dots span {
  width: 5px;
  height: 5px;
  border: 1px solid var(--faint);
  transform: rotate(45deg);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease), box-shadow 0.3s ease;
}

.dots a:hover span,
.dots a:focus-visible span {
  border-color: var(--fg);
}

.dots a.on span {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg) scale(1.35);
  box-shadow: 0 0 12px var(--accent);
}

.dots a:focus-visible {
  outline: none;
}

/* ---------- layout ---------- */

main {
  position: relative;
  z-index: 5;
}

section {
  position: relative;
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 120px;
  text-align: center;
}

.sigil {
  width: clamp(72px, 16vw, 108px);
  height: auto;
  margin: 0 0 20px;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.28))
    drop-shadow(0 0 28px rgba(255, 255, 255, 0.12));
  animation: glow 6.5s ease-in-out infinite;
}

html.gl .sigil {
  display: none;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 7.4vw, 4.6rem);
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  text-transform: lowercase;
  line-height: 1;
  text-shadow: 0 0 28px var(--glow), 0 0 90px rgba(255, 74, 61, 0.28), 0 0 160px rgba(255, 138, 192, 0.14);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
  touch-action: manipulation;
}

h1 span {
  display: inline-block;
  will-change: transform;
  transition: transform 0.7s var(--ease), opacity 0.7s ease, filter 0.7s ease;
}

html.booting h1 span,
h1.pre span {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.4em);
}

.status {
  margin: 20px 0 0;
  min-height: 1.2em;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
}

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--fg);
  opacity: 0.8;
  animation: blink 1.05s steps(1) infinite;
}

.when {
  margin: 14px 0 0;
  max-width: 28rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem 0.85rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.when span,
.hours span {
  white-space: nowrap;
}

.when-home,
.hours-now {
  color: var(--muted);
}

.hours-now::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #7dffa8;
  box-shadow: 0 0 8px #7dffa8;
  vertical-align: 0.1em;
  animation: pulse 2s ease-in-out infinite;
}

.hours {
  margin: 6px 0 0;
  max-width: 30rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.22rem 0.8rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--faint);
}

.socials {
  display: flex;
  gap: 6px;
  margin: 30px 0 0;
}

.socials a,
.socials button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.2s ease, transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}

.socials button {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.socials a:hover,
.socials a:focus-visible,
.socials button:hover,
.socials button:focus-visible {
  color: var(--fg);
  transform: translateY(-3px);
  border-color: var(--line);
  background: var(--glass);
  outline: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

.socials svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.cue {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: var(--faint);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: calc(1 - var(--hero) * 3);
}

.cue i {
  position: relative;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: var(--line);
}

.cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--fg);
  animation: drip 2.2s var(--ease) infinite;
}

.block {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18vh 24px 10vh;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

.kicker b {
  font-weight: 400;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-soft);
  transition: color 0.6s ease;
}

.kicker::after {
  content: "";
  flex: 0 1 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}

.title {
  margin: 0;
  background: linear-gradient(100deg, var(--fg) 40%, var(--accent) 75%, var(--fg) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 14em;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.9rem, 5.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.title-xl {
  font-size: clamp(2.6rem, 11vw, 7.6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.lead {
  margin: 26px 0 0;
  max-width: 34rem;
  font-size: clamp(0.98rem, 1.9vw, 1.14rem);
  line-height: 1.7;
  color: rgba(243, 240, 232, 0.76);
}

/* scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

html:not(.js) .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- about ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 44px;
}

.fact {
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.72), rgba(10, 10, 10, 0.78));
}

.fact b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px var(--glow);
}

.fact span {
  display: block;
  margin-top: 10px;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--faint);
}

.marquee {
  margin: 56px calc(50% - 50vw) 0;
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  transform: rotate(-1.6deg);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee span {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 240, 232, 0.6);
  white-space: nowrap;
}

.marquee span:nth-of-type(3n + 1) {
  color: var(--fg);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 18px var(--glow);
}

.marquee span:nth-of-type(5n + 3) {
  -webkit-text-stroke: 1px var(--accent);
}

.marquee i {
  color: var(--accent);
}

.marquee i {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--faint);
}

/* ---------- works ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
  perspective: 1100px;
}

.card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-height: 100%;
  padding: 14px 14px 22px;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.74), rgba(10, 10, 10, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 70px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.card.reveal.in {
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity 1s var(--ease), filter 1s var(--ease), transform 0.5s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}

.card.tilting {
  transition: opacity 1s var(--ease), filter 1s var(--ease), transform 0.08s linear, border-color 0.4s ease, box-shadow 0.4s ease;
}

.card:hover,
.card:focus-within {
  border-color: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 50px var(--accent-soft);
  outline: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, var(--accent) 85%, #fff 90%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover::before {
  opacity: 1;
  animation: spin-border 2.6s linear infinite;
}

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

@keyframes spin-border {
  to { --spin: 360deg; }
}

.card-cover {
  color: inherit;
  text-decoration: none;
  transform: none;
}

.card-cover:focus-visible {
  outline: none;
}

.card-links {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.card-links a {
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(243, 240, 232, 0.04);
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.card-links a:hover,
.card-links a:focus-visible {
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 18px var(--accent-soft);
  outline: none;
}

.card-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.13), transparent 45%);
  transition: opacity 0.4s ease;
}

.card:hover .card-glare {
  opacity: 1;
}

.card-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(243, 240, 232, 0.14);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(243, 240, 232, 0.05), transparent 42%), #040404;
  transform: translateZ(28px);
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  transform: translateZ(18px);
}

.card-name {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px var(--glow);
  transform: translateZ(36px);
}

.card-text {
  margin-top: 10px;
  max-width: 26rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
  transform: translateZ(18px);
}

.card-go {
  position: absolute;
  right: 18px;
  bottom: 22px;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--faint);
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}

.card:hover .card-go,
.card:focus-visible .card-go {
  color: var(--fg);
  transform: translate(3px, -3px);
}

.piece-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(243, 240, 232, 0.1), transparent);
  animation: scan 4.8s ease-in-out infinite;
  pointer-events: none;
}

.piece-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: -14px 0 0 -9px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--fg);
  filter: drop-shadow(0 0 14px var(--glow));
  opacity: 0.85;
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}

.card:hover .piece-play {
  transform: scale(1.18);
  opacity: 1;
}

.art-watch {
  background:
    repeating-linear-gradient(0deg, rgba(243, 240, 232, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 60%, rgba(243, 240, 232, 0.09), transparent 60%),
    #050505;
}

.rec {
  position: absolute;
  left: 10px;
  top: 8px;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  animation: pulse 1.6s ease-in-out infinite;
}

.art-game img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 28%;
  opacity: 0.85;
  transform: scale(1.04);
  transition: transform 0.8s var(--ease);
}

.card:hover .art-game img {
  transform: scale(1.12) rotate(-1deg);
}

.slash {
  position: absolute;
  left: -30%;
  top: 50%;
  width: 160%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 18px #fff;
  transform: rotate(-24deg) scaleX(0);
  opacity: 0;
}

.card:hover .slash {
  animation: slash 0.7s var(--ease) forwards;
}

.art-term {
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 20% 100%, rgba(125, 255, 168, 0.08), transparent 60%), #030503;
}

.mini-term {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: rgba(214, 255, 226, 0.82);
  text-shadow: 0 0 10px rgba(125, 255, 168, 0.4);
}

.mini-term i {
  font-style: normal;
  animation: blink 1s steps(1) infinite;
}

.art-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    linear-gradient(rgba(243, 240, 232, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(243, 240, 232, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 60%, rgba(243, 240, 232, 0.08), transparent 65%),
    #040404;
}

.art-mark b {
  position: relative;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 240, 232, 0.75);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

.art-mark b::after {
  content: attr(data-mark);
  position: absolute;
  inset: 0;
  color: var(--fg);
  -webkit-text-stroke: 0;
  clip-path: inset(0 100% 0 0);
  text-shadow: 0 0 24px var(--glow);
  transition: clip-path 0.8s var(--ease);
}

.card:hover .art-mark b::after,
.card:focus-visible .art-mark b::after {
  clip-path: inset(0 0 0 0);
}

.mark-sub {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.art-chat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: radial-gradient(ellipse at 80% 20%, rgba(243, 240, 232, 0.07), transparent 60%), #040404;
}

.bubble {
  max-width: 62%;
  padding: 7px 12px;
  font-size: 0.78rem;
  line-height: 1.3;
  border-radius: 14px;
  border: 1px solid rgba(243, 240, 232, 0.16);
  background: rgba(243, 240, 232, 0.06);
  color: rgba(243, 240, 232, 0.85);
}

.bubble.out {
  align-self: flex-end;
  color: #000;
  background: var(--fg);
  border-color: var(--fg);
  box-shadow: 0 0 20px rgba(243, 240, 232, 0.2);
}

.bubble.typing {
  display: flex;
  gap: 4px;
  width: max-content;
}

.bubble.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.2s ease-in-out infinite;
}

.bubble.typing i:nth-child(2) { animation-delay: 0.2s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.4s; }

.card-static {
  cursor: default;
}

.art-inbox {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: repeat(4, 1fr);
  align-items: center;
  column-gap: 18%;
  padding: 16px 22px;
  background: radial-gradient(ellipse at 75% 50%, rgba(243, 240, 232, 0.08), transparent 55%), #040404;
}

.inbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1;
}

.inbox-row b {
  width: 3.2em;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.inbox-row i {
  position: relative;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), rgba(243, 240, 232, 0.4));
  overflow: hidden;
}

.inbox-row i::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -20%;
  width: 20%;
  height: 3px;
  border-radius: 2px;
  background: var(--fg);
  box-shadow: 0 0 8px var(--glow);
  animation: flow 2.4s linear infinite;
}

.inbox-row:nth-child(2) i::after { animation-delay: 0.6s; }
.inbox-row:nth-child(3) i::after { animation-delay: 1.2s; }
.inbox-row:nth-child(4) i::after { animation-delay: 1.8s; }

.inbox-one {
  grid-column: 2;
  grid-row: 1 / -1;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: #000;
  background: var(--fg);
  border-radius: 3px;
  box-shadow: 0 0 26px rgba(243, 240, 232, 0.25);
}

.art-menubar {
  background: radial-gradient(ellipse at 70% 0%, rgba(243, 240, 232, 0.08), transparent 60%), #050505;
}

.mb-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 22px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  background: rgba(243, 240, 232, 0.07);
  border-bottom: 1px solid var(--line);
}

.mb-bar i {
  width: 38%;
  height: 5px;
  border-radius: 3px;
  background: rgba(243, 240, 232, 0.1);
}

.mb-bar b {
  font-weight: 400;
  color: var(--fg);
}

.mb-pop {
  position: absolute;
  right: 10px;
  top: 30px;
  display: grid;
  gap: 9px;
  width: min(62%, 220px);
  padding: 12px 14px;
  border: 1px solid rgba(243, 240, 232, 0.16);
  border-radius: 8px;
  background: rgba(18, 18, 18, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.mb-row {
  display: grid;
  grid-template-columns: 3.8em 1fr;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.mb-row em {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(243, 240, 232, 0.1);
  overflow: hidden;
}

.mb-row em::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  background: var(--fg);
  transition: width 0.8s var(--ease);
}

.card:hover .mb-row em::after {
  width: calc(var(--v) * 70%);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-right: 34px;
  transform: translateZ(14px);
}

.card:hover .chips i {
  border-color: var(--accent-soft);
  color: var(--fg);
}

.chips i {
  padding: 4px 8px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.more-head {
  margin: 44px 0 14px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
}

.minis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  text-align: left;
  text-decoration: none;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.72), rgba(10, 10, 10, 0.8));
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.mini:hover,
.mini:focus-visible {
  border-color: var(--accent-soft);
  box-shadow: 0 0 30px var(--accent-soft);
  background: rgba(243, 240, 232, 0.05);
  outline: none;
}

.mini-name {
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.mini-text {
  flex: 1;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.mini-stack {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- play ---------- */

.play .title-xl {
  max-width: none;
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--ember);
  mix-blend-mode: screen;
  clip-path: inset(0 0 60% 0);
  animation: glitch-a 3.2s steps(1) infinite;
  opacity: 0.8;
}

.glitch::after {
  color: #9ef;
  mix-blend-mode: screen;
  clip-path: inset(55% 0 0 0);
  animation: glitch-b 2.7s steps(1) infinite;
  opacity: 0.7;
}

.play-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 34px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 30px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  text-decoration: none;
  color: #000;
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 2px;
  box-shadow: 0 0 40px rgba(243, 240, 232, 0.25);
  transition: box-shadow 0.4s ease, transform 0.4s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.9) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.6s var(--ease) infinite;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  box-shadow: 0 0 70px rgba(243, 240, 232, 0.45);
  transform: translateY(-2px);
  outline: none;
}

.btn:hover svg {
  transform: translateX(4px);
}

/* hero: кнопка на /portfolio — контурная, чтобы не спорить с именем */
.btn-cv {
  margin-top: 26px;
  padding: 14px 24px;
  font-size: 0.78rem;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(243, 240, 232, 0.5);
  box-shadow: none;
}

.btn-cv::after {
  background: linear-gradient(110deg, transparent 30%, rgba(243, 240, 232, 0.18) 50%, transparent 70%);
}

.btn-cv:hover,
.btn-cv:focus-visible {
  color: #000;
  background: var(--fg);
  box-shadow: 0 0 50px rgba(243, 240, 232, 0.3);
}

.best {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--faint);
}

.best b {
  font-weight: 400;
  color: var(--fg);
}

/* ---------- crypto ---------- */

.pay {
  width: min(100%, 560px);
  margin: 0;
  padding: 12px 6px 4px 16px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.74), rgba(10, 10, 10, 0.82));
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.pay-head {
  margin: 0 10px 6px 0;
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
}

.pay-row {
  display: grid;
  grid-template-columns: 5.8rem 1fr 36px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(243, 240, 232, 0.06);
  transition: background 0.25s ease;
}

.pay-row:hover {
  background: rgba(243, 240, 232, 0.025);
}

.pay-row:last-child {
  border-bottom: 0;
}

.pay-k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
}

.pay-k:hover,
.pay-k:focus-visible {
  color: var(--fg);
  outline: none;
}

.coin {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.pay-v {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(243, 240, 232, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.copy::before {
  content: "";
  position: absolute;
  inset: 11px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='8' width='12' height='12' rx='1' fill='none' stroke='black' stroke-width='1.8'/><path d='M16 8V5.5A1.5 1.5 0 0 0 14.5 4h-9A1.5 1.5 0 0 0 4 5.5v9A1.5 1.5 0 0 0 5.5 16H8' fill='none' stroke='black' stroke-width='1.8'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='8' width='12' height='12' rx='1' fill='none' stroke='black' stroke-width='1.8'/><path d='M16 8V5.5A1.5 1.5 0 0 0 14.5 4h-9A1.5 1.5 0 0 0 4 5.5v9A1.5 1.5 0 0 0 5.5 16H8' fill='none' stroke='black' stroke-width='1.8'/></svg>") center / contain no-repeat;
}

.copy:hover,
.copy:focus-visible {
  color: var(--fg);
  outline: none;
}

/* ---------- contact ---------- */

.contact.block {
  padding-bottom: 20vh;
}

.mail {
  display: inline-block;
  margin-top: 34px;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 5.2vw, 3.2rem);
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  text-shadow: 0 0 30px var(--glow);
  background: linear-gradient(var(--fg), var(--fg)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
  word-break: break-all;
}

.mail {
  background-image: linear-gradient(90deg, var(--accent), var(--fg));
}

.mail:hover,
.mail:focus-visible {
  background-size: 100% 1px;
  outline: none;
}

p.contact {
  margin: 24px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
}

p.contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

p.contact a:hover,
p.contact a:focus-visible {
  color: var(--fg);
  border-bottom-color: rgba(243, 240, 232, 0.45);
  outline: none;
}

.sep {
  color: var(--faint);
}

/* ---------- footer ---------- */

footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 22px max(20px, env(safe-area-inset-left)) max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.hint {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.views {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.views svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  opacity: 0.9;
}

.dot-sep {
  opacity: 0.45;
}

.sess {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sess:hover,
.sess:focus-visible {
  color: var(--fg);
  outline: none;
}

.echo {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 6;
  font-family: var(--display);
  font-size: clamp(8rem, 30vw, 22rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 240, 232, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.9s ease, transform 1.2s var(--ease);
}

.echo.on {
  opacity: 0.4;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

/* ---------- terminal ---------- */

.term {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.78);
  animation: fade 0.25s ease;
}

.term[hidden] {
  display: none;
}

.term-win {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  height: min(78dvh, 520px);
  overflow: hidden;
  border: 1px solid rgba(243, 240, 232, 0.18);
  border-radius: 8px;
  background: rgba(6, 7, 6, 0.9);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), 0 0 60px rgba(125, 255, 168, 0.05);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(226, 240, 230, 0.88);
  animation: pop 0.4s var(--ease);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(243, 240, 232, 0.08);
  font-size: 0.68rem;
  color: var(--faint);
}

.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(243, 240, 232, 0.16);
}

.term-bar i:first-child {
  background: var(--ember);
}

.term-bar span {
  flex: 1;
  text-align: center;
  margin-right: 30px;
}

.term-x {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.term-x:hover {
  color: var(--fg);
}

.term-out {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 4px;
  white-space: pre-wrap;
  word-break: break-word;
  overscroll-behavior: contain;
}

.term-out .cmd {
  color: var(--fg);
}

.term-out .ok {
  color: #7dffa8;
}

.term-out .err {
  color: var(--ember);
}

.term-out .dim {
  color: var(--faint);
}

.term-out a {
  color: var(--fg);
}

.term-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 14px;
}

.term-line label {
  flex: none;
  color: #7dffa8;
}

.term-line input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  caret-color: #7dffa8;
}

html.shake body {
  animation: shake 0.5s steps(2) 2;
}

/* ---------- qr sheet + toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 60;
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--fg);
  background: rgba(10, 10, 12, 0.72);
  border: 1px solid var(--line);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sheet {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(calc(100vw - 2rem), 280px);
  max-width: calc(100vw - 2rem);
  max-height: min(86dvh, 560px);
  overflow: auto;
  padding: 22px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.92);
  color: var(--fg);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.sheet:not([open]) {
  display: none;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.sheet img {
  width: min(168px, 56vw);
  height: auto;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
}

.sheet-name {
  margin: 14px 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.sheet-addr {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: rgba(243, 240, 232, 0.78);
  word-break: break-all;
}

.sheet-copy,
.sheet-open {
  margin: 16px 6px 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.sheet-open[hidden] {
  display: none;
}

.sheet-copy:hover,
.sheet-copy:focus-visible,
.sheet-open:hover,
.sheet-open:focus-visible {
  color: var(--fg);
  outline: none;
}

/* ---------- keyframes ---------- */

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.22)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.08)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 36px rgba(255, 255, 255, 0.16)); }
}

@keyframes scan {
  0%, 100% { transform: translateY(-80%); }
  50% { transform: translateY(260%); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes drip {
  0% { top: -40%; }
  100% { top: 100%; }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, 3%); }
  50% { transform: translate(4%, -6%); }
  75% { transform: translate(-3%, 5%); }
  100% { transform: translate(0, 0); }
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(0.9); }
}

@keyframes flow {
  to { left: 100%; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes slash {
  0% { transform: rotate(-24deg) scaleX(0); opacity: 1; }
  60% { transform: rotate(-24deg) scaleX(1); opacity: 1; }
  100% { transform: rotate(-24deg) scaleX(1); opacity: 0; }
}

@keyframes sheen {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes glitch-a {
  0%, 86%, 100% { transform: none; }
  88% { transform: translate(-4px, 1px); }
  91% { transform: translate(3px, -1px); }
  94% { transform: translate(-2px, 0); }
}

@keyframes glitch-b {
  0%, 80%, 100% { transform: none; }
  83% { transform: translate(4px, 0); }
  86% { transform: translate(-3px, 1px); }
}

@keyframes fade {
  from { opacity: 0; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
}

@keyframes shake {
  0% { transform: translate(3px, -2px); }
  50% { transform: translate(-3px, 2px); }
}

/* ---------- responsive ---------- */

@media (min-width: 1100px) {
  .hero {
    transform: translateX(-6vw);
  }
}

@media (max-width: 860px) {
  .blade {
    width: min(90vw, 380px);
    height: 42dvh;
    top: auto;
    bottom: 0;
    opacity: calc(0.2 - var(--hero) * 0.1);
    transform: none;
    mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 62%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 62%, transparent 100%);
    object-position: 85% 80%;
  }

  .void {
    opacity: 0.18;
  }

  .dots {
    display: none;
  }

  .hero {
    padding: max(80px, calc(20px + env(safe-area-inset-top))) 16px 110px;
  }

  h1 {
    font-size: clamp(1.7rem, 9.6vw, 2.6rem);
    letter-spacing: 0.16em;
    margin-right: -0.16em;
  }

  .status {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .when,
  .hours {
    max-width: 100%;
    gap: 0.2rem 0.55rem;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .block {
    padding: 12vh 16px 6vh;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 32px;
  }

  .fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
  }

  .fact span {
    margin-top: 0;
    text-align: right;
  }

  .cards {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .minis {
    grid-template-columns: 1fr;
  }

  .pay {
    width: 100%;
    padding: 10px 4px 4px 12px;
  }

  .pay-row {
    grid-template-columns: 4.8rem minmax(0, 1fr) 32px;
    min-height: 34px;
  }

  .btn {
    padding: 16px 24px;
  }

  footer {
    justify-content: center;
    text-align: center;
  }

  .hint {
    display: none;
  }

  .sheet {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    padding: 18px 16px 16px;
  }

  .term-win {
    height: min(70dvh, 520px);
    font-size: 0.72rem;
  }
}

@media (max-aspect-ratio: 4/5) {
  html.gl .hero {
    justify-content: flex-end;
    padding-bottom: max(120px, calc(96px + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 480px) {
  .pay-row {
    grid-template-columns: 4.6rem minmax(0, 1fr) 32px;
  }

  .pay-k {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  .pay-v {
    font-size: 0.64rem;
  }
}

@media (hover: none) {
  .card-glare {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sigil,
  h1 span,
  .echo,
  .piece-scan,
  .grain,
  .bubble.typing i,
  .inbox-row i::after,
  .art-mark b::after,
  .marquee-track,
  .btn::after,
  .glitch::before,
  .glitch::after,
  .cue i::after,
  .rec,
  .hours-now::before {
    animation: none;
    transition: none;
    will-change: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .lamp {
    background: radial-gradient(ellipse 70% 55% at 50% 42%, transparent 20%, rgba(0, 0, 0, 0.5) 100%);
  }

  .socials a,
  .sound,
  .chip,
  .copy,
  .card,
  .card-go,
  .toast {
    transition: none;
  }
}
