/* Shadowblade83 — fire-and-ash theme. Mobile first. */
:root {
  --coal: #070201;
  --ash: #140806;
  --blood: #8a1010;
  --crimson: #c51b1b;
  --ember: #ff6a1c;
  --ember-hot: #ffc56a;
  --bone: #f3e4c8;
  --mute: #c9b49a;
  --glow: 0 0 18px rgba(255, 70, 20, 0.55);
  --font-display: "Cinzel Decorative", "Cinzel", serif;
  --font-body: "Cinzel", Georgia, serif;
  --font-hud: "Rajdhani", "Segoe UI", sans-serif;
  --font-blackletter: "UnifrakturMaguntia", "Pirata One", serif;
  --font-metal: "Metal Mania", "Pirata One", cursive;
  --panel: rgba(8, 2, 1, 0.72);
  --line: rgba(255, 90, 30, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--coal); color: var(--bone); scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  min-height: 100%;
  overflow-x: hidden;
  background: transparent;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--ember-hot); }
a:hover { color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Fixed background (iOS-safe: position:fixed layer, not attachment) ---------- */
.bg-stage {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
}
.bg-image {
  position: absolute; inset: 0;
  background-color: #0a0201;
  background-image: url("../img/dragon-bg.webp"), url("../img/dragon-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  transform: translateZ(0);
}
.bg-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.08) 0%, rgba(0,0,0,.32) 52%, rgba(0,0,0,.72) 100%),
    linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.12) 22%, rgba(0,0,0,.12) 68%, rgba(0,0,0,.72) 100%);
}
/* Landscape / desktop: the art is a tall portrait, so bias the cover crop
   toward the lower mid so the dragon and the swordsman stay in frame. */
@media (min-aspect-ratio: 4/5) {
  .bg-image { background-position: center 62%; }
  .bg-vignette {
    background:
      radial-gradient(ellipse at 50% 48%, rgba(0,0,0,.16) 0%, rgba(0,0,0,.38) 55%, rgba(0,0,0,.78) 100%),
      linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.18) 24%, rgba(0,0,0,.2) 64%, rgba(0,0,0,.8) 100%);
  }
}
.bg-firelight {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 115%, rgba(255, 80, 16, 0.38), transparent 58%),
    radial-gradient(ellipse at 18% 88%, rgba(255, 40, 0, 0.16), transparent 42%),
    radial-gradient(ellipse at 82% 92%, rgba(255, 140, 30, 0.14), transparent 44%);
  mix-blend-mode: screen;
  animation: firePulse 3.6s ease-in-out infinite;
  opacity: .9;
}
.bg-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0 2px,
    rgba(0,0,0,.18) 2px 3px
  );
  opacity: .28;
  mix-blend-mode: multiply;
}
.hud-frame {
  position: absolute; inset: 12px;
  border: 1px solid rgba(255, 90, 30, 0.22);
  pointer-events: none;
}
.hud-frame::before, .hud-frame::after,
.hud-frame span::before, .hud-frame span::after {
  content: ""; position: absolute; width: 28px; height: 28px;
  border-color: var(--ember); border-style: solid; opacity: .85;
}
.hud-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hud-frame::after { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.hud-frame span::before { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.hud-frame span::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

@keyframes firePulse {
  0%, 100% { opacity: .72; filter: hue-rotate(0deg) brightness(1); }
  40% { opacity: 1; filter: hue-rotate(-8deg) brightness(1.15); }
  65% { opacity: .8; filter: brightness(0.92); }
}

/* ---------- Intro gate ---------- */
.intro {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(90, 16, 0, .5), transparent 55%),
    #070201;
  transition: opacity .9s ease, visibility .9s ease;
}
.intro.is-gone {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.intro-inner { text-align: center; padding: 1.5rem; }
.intro-mark {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  letter-spacing: .18em;
  color: var(--ember);
  text-shadow: 0 0 18px rgba(255, 50, 0, .8), 0 0 40px rgba(180, 0, 0, .5);
  margin: 0 0 1.6rem;
  animation: flicker 3.8s infinite;
}
.btn-enter {
  position: relative;
  background: linear-gradient(180deg, #3a0a06, #140201);
  color: var(--bone);
  border: 1px solid var(--ember);
  padding: .85rem 1.7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: .82rem;
  box-shadow: 0 0 0 1px #000, var(--glow), inset 0 0 18px rgba(255, 60, 0, .25);
  animation: emberPulse 2.4s ease-in-out infinite;
}
.btn-enter:hover, .btn-enter:focus-visible {
  color: #fff;
  background: linear-gradient(180deg, #5a1208, #220402);
  box-shadow: 0 0 24px rgba(255, 90, 20, .9), inset 0 0 22px rgba(255, 120, 20, .35);
  outline: none;
}
.btn-enter:active { transform: translateY(1px); }

@keyframes emberPulse {
  0%, 100% { box-shadow: 0 0 0 1px #000, 0 0 12px rgba(255, 70, 20, .45), inset 0 0 14px rgba(255, 60, 0, .2); }
  50% { box-shadow: 0 0 0 1px #000, 0 0 28px rgba(255, 110, 30, .85), inset 0 0 22px rgba(255, 140, 40, .38); }
}

/* ---------- HUD controls ---------- */
.hud-controls {
  position: fixed; z-index: 90;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: flex; gap: .45rem;
}
.hud-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 100, 40, .55);
  background: rgba(10, 2, 0, .75);
  color: var(--ember-hot);
  display: grid; place-items: center;
  box-shadow: 0 0 12px rgba(255, 50, 0, .35), inset 0 0 10px rgba(255, 80, 0, .15);
  backdrop-filter: blur(6px);
  padding: 0;
}
.hud-btn svg { width: 20px; height: 20px; fill: currentColor; }
.hud-btn[aria-pressed="false"] { color: #8a7a6a; box-shadow: none; border-color: rgba(180,140,100,.35); }
.hud-btn:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 2px; }
.hud-btn[hidden] { display: none !important; }

/* ---------- Site shell ---------- */
.site { position: relative; z-index: 1; }
body.is-locked { overflow: hidden; height: 100dvh; }

.wrap {
  width: min(1080px, calc(100% - 1.6rem));
  margin-inline: auto;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.55), inset 0 0 40px rgba(80, 10, 0, .18);
  backdrop-filter: blur(3px);
  padding: 1.25rem 1.15rem 1.5rem;
}

/* Charred / burning section dividers */
.burn-rule {
  height: 18px; margin: 0; position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, transparent, #1a0804 8%, #0a0301 50%, #1a0804 92%, transparent),
    repeating-linear-gradient(90deg, #2a0c05 0 7px, #140503 7px 13px, #3a1408 13px 16px);
  clip-path: polygon(0 40%, 3% 20%, 7% 55%, 12% 25%, 18% 60%, 24% 15%, 31% 50%, 38% 20%, 46% 62%, 54% 18%, 61% 58%, 69% 22%, 76% 64%, 83% 28%, 90% 52%, 96% 22%, 100% 45%, 100% 80%, 94% 100%, 80% 70%, 68% 100%, 52% 72%, 40% 100%, 26% 74%, 12% 100%, 0 78%);
}
.burn-rule::after {
  content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 4px;
  background: linear-gradient(90deg, transparent, var(--ember), var(--ember-hot), var(--crimson), var(--ember), transparent);
  filter: blur(1.2px);
  animation: emberLine 2.2s ease-in-out infinite;
  opacity: .95;
}
@keyframes emberLine {
  0%, 100% { opacity: .55; filter: blur(1.2px) brightness(1); }
  50% { opacity: 1; filter: blur(0.6px) brightness(1.35); }
}

/* Headings + fire glow + heat shimmer */
.section { padding: 2.2rem 0 1.4rem; }
.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 5.5vw, 2.4rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 .85rem;
  text-align: center;
  color: var(--ember-hot);
  text-shadow:
    0 0 8px rgba(255, 80, 0, .8),
    0 0 24px rgba(255, 40, 0, .55),
    0 2px 0 #3a0800;
  animation: headingFlicker 4s ease-in-out infinite, heatShimmer 3.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes headingFlicker {
  0%, 100% { text-shadow: 0 0 8px rgba(255,80,0,.8), 0 0 24px rgba(255,40,0,.5), 0 2px 0 #3a0800; }
  18% { text-shadow: 0 0 4px rgba(255,80,0,.4), 0 0 10px rgba(255,40,0,.25), 0 2px 0 #3a0800; }
  22% { text-shadow: 0 0 14px rgba(255,180,80,1), 0 0 32px rgba(255,60,0,.85), 0 2px 0 #3a0800; }
  61% { text-shadow: 0 0 6px rgba(255,80,0,.55), 0 0 16px rgba(255,40,0,.35), 0 2px 0 #3a0800; }
  64% { text-shadow: 0 0 12px rgba(255,140,40,.95), 0 0 28px rgba(255,50,0,.7), 0 2px 0 #3a0800; }
}
@keyframes heatShimmer {
  0%, 100% { transform: translate3d(0,0,0) skewX(0); }
  30% { transform: translate3d(.4px, -0.3px, 0) skewX(.25deg); }
  62% { transform: translate3d(-.4px, .2px, 0) skewX(-.2deg); }
}
.lede {
  max-width: 36rem; margin: 0 auto 1.2rem;
  text-align: center; color: var(--mute); font-size: .98rem;
}

/* ---------- Logo (photoshop / chrome-red) ---------- */
.hero { padding: 0 0 1.5rem; }
.hero-banner {
  position: relative; width: 100%; overflow: hidden;
  border-bottom: 1px solid rgba(255, 80, 20, .4);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.hero-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.08) contrast(1.05);
  display: block;
}
.hero-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 40%, rgba(0,0,0,.85));
  pointer-events: none;
}

.logo-stack {
  position: relative;
  text-align: center;
  margin: -3.2rem 0 1rem;
  padding: 0 .6rem 1rem;
  z-index: 2;
}
.ember-canvas {
  position: absolute; inset: -20% -10% 0; width: 120%; height: 140%;
  left: -10%; pointer-events: none; z-index: 0;
}
.logo-kicker {
  position: relative; z-index: 1;
  font-family: var(--font-hud);
  letter-spacing: .42em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--mute);
  margin: 0 0 .35rem;
}
.logo {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  line-height: .9;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.8));
}
.logo > span {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 8.4vw, 5.4rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo-stroke {
  color: transparent;
  -webkit-text-stroke: 5px #2a0500;
  text-shadow:
    0 1px 0 #000,
    0 3px 0 #1a0000,
    0 6px 0 #0a0000,
    0 0 18px rgba(255, 40, 0, .65);
}
.logo-fill {
  background: linear-gradient(
    180deg,
    #fff6e8 0%,
    #ffd7a0 10%,
    #ff4e3a 26%,
    #8b0000 44%,
    #ffb08a 50%,
    #5a0000 68%,
    #1a0000 86%,
    #c41e1e 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logoFlicker 5s ease-in-out infinite;
}
.logo-shine {
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.5) 50%, transparent 58%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .35;
  animation: shineSlide 7s ease-in-out infinite;
  pointer-events: none;
}
.logo-num {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  margin-top: -.15rem;
  font-family: var(--font-metal);
  font-size: clamp(2.2rem, 10vw, 5.6rem);
  line-height: .8;
  letter-spacing: .08em;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.8));
}
.logo-num > span { grid-area: 1 / 1; }
.logo-num .logo-fill {
  background: linear-gradient(180deg, #fff, #ffd27a 18%, #ff3a1a 45%, #5a0000 72%, #ff8a3a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes logoFlicker {
  0%, 100% { filter: brightness(1); }
  12% { filter: brightness(1.08); }
  14% { filter: brightness(.82); }
  16% { filter: brightness(1.15); }
  52% { filter: brightness(1); }
  54% { filter: brightness(.7); }
  57% { filter: brightness(1.2); }
}
@keyframes shineSlide {
  0%, 55%, 100% { opacity: .15; transform: translateX(-2%); }
  70% { opacity: .7; transform: translateX(2%); }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  7% { opacity: .75; }
  9% { opacity: 1; }
  32% { opacity: .85; }
  34% { opacity: 1; }
  71% { opacity: .6; }
  73% { opacity: 1; }
}

.hero-art {
  width: min(380px, 78vw);
  margin: .2rem auto 1.4rem;
  position: relative;
}
.hero-art img {
  width: 100%;
  border: 2px solid rgba(255, 80, 20, .5);
  box-shadow:
    0 0 0 1px #000,
    0 0 28px rgba(255, 50, 0, .45),
    inset 0 0 30px rgba(0,0,0,.4);
  animation: frameFire 3.8s ease-in-out infinite;
  background: #100402;
}
.hero-art::before {
  content: ""; position: absolute; inset: -10px;
  border: 1px solid rgba(255, 180, 80, .2);
  pointer-events: none;
  clip-path: polygon(0 0, 22px 0, 22px 2px, 2px 2px, 2px 22px, 0 22px, 0 100%, 22px 100%, 22px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 22px), 0 calc(100% - 22px), 0 0, 100% 0, 100% 22px, calc(100% - 2px) 22px, calc(100% - 2px) 2px, calc(100% - 22px) 2px, calc(100% - 22px) 0, 100% 0, 100% 100%, calc(100% - 22px) 100%, calc(100% - 22px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 22px), 100% calc(100% - 22px));
}
@keyframes frameFire {
  0%, 100% { box-shadow: 0 0 0 1px #000, 0 0 20px rgba(255,50,0,.35); }
  50% { box-shadow: 0 0 0 1px #000, 0 0 36px rgba(255,120,20,.7); }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255, 80, 20, .3);
  background: rgba(0,0,0,.55);
  padding: .45rem 0;
  margin: 0 0 .5rem;
}
.marquee-track {
  display: flex; gap: 2.2rem; width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--font-hud);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--ember);
  text-shadow: 0 0 8px rgba(255, 60, 0, .6);
}
.marquee-track span { white-space: nowrap; }
.marquee-track span::before {
  content: "◆"; margin-right: 2.2rem; color: var(--ember-hot); opacity: .7;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Character select ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: .7rem;
}
.card {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 80, 20, .28), transparent 55%),
    linear-gradient(180deg, #1a0806, #080201);
  border: 1px solid rgba(255, 90, 30, .4);
  padding: .7rem .5rem .55rem;
  text-align: center;
  color: var(--bone);
  min-height: 154px;
  box-shadow: inset 0 -18px 28px rgba(255, 50, 0, .08), 0 4px 12px rgba(0,0,0,.45);
  transform: perspective(600px) rotateX(0) rotateY(0);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: cardFirelight 3.6s ease-in-out infinite;
  overflow: hidden;
}
.card:nth-child(3n) { animation-delay: -.8s; }
.card:nth-child(3n+1) { animation-delay: -1.6s; }
.card:nth-child(3n+2) { animation-delay: -2.4s; }
@keyframes cardFirelight {
  0%, 100% { box-shadow: inset 0 -18px 28px rgba(255,50,0,.08), 0 0 0 rgba(255,80,0,0), 0 4px 12px rgba(0,0,0,.45); }
  50% { box-shadow: inset 0 -22px 36px rgba(255,90,20,.22), 0 0 16px rgba(255,70,10,.2), 0 4px 12px rgba(0,0,0,.45); }
}
.card .icon {
  width: 64px; height: 64px; margin: 0 auto .4rem;
  color: var(--ember-hot);
  filter: drop-shadow(0 0 6px rgba(255, 80, 0, .55));
}
.card .icon svg { width: 100%; height: 100%; fill: currentColor; stroke: currentColor; }
.card h3 {
  font-family: var(--font-hud);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 700;
  color: #f6d9b0;
  line-height: 1.2;
}
.card:hover, .card:focus-within {
  transform: perspective(600px) rotateX(4deg) translateY(-4px) scale(1.03);
  border-color: var(--ember-hot);
  box-shadow:
    0 0 0 1px rgba(255, 180, 80, .5),
    0 0 22px rgba(255, 90, 20, .65),
    inset 0 0 22px rgba(255, 80, 0, .22);
  z-index: 2;
  animation: none;
}
.card .sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.spark {
  position: absolute; bottom: 8%; width: 3px; height: 3px; border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 6px 2px var(--ember);
  animation: riseSpark 1.1s ease-out forwards;
}
@keyframes riseSpark {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-70px) scale(.3); }
}

/* ---------- Battle / gallery ---------- */
.battle-frame {
  position: relative; margin-top: .6rem;
}
.battle-frame img {
  width: 100%; max-height: 70vh; object-fit: cover;
  border: 1px solid rgba(255, 80, 20, .45);
  box-shadow: 0 0 40px rgba(255, 50, 0, .25);
  animation: frameFire 4.4s ease-in-out infinite;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.gallery-grid a {
  display: block; overflow: hidden;
  border: 1px solid rgba(255, 80, 20, .35);
  background: #100402;
  box-shadow: 0 0 16px rgba(255, 40, 0, .15);
}
.gallery-grid a:hover img, .gallery-grid a:focus img { transform: scale(1.05); }
.gallery-grid img {
  width: 100%; height: 28vw; min-height: 110px; max-height: 220px;
  object-fit: cover; transition: transform .4s ease;
}
.gallery-grid a:nth-child(2) img { object-position: center 58%; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.88);
  display: grid; place-items: center;
  padding: 1rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 86vh;
  box-shadow: 0 0 40px rgba(255, 60, 0, .35);
  border: 1px solid rgba(255, 120, 40, .4);
}
.lightbox-close {
  position: absolute; top: 12px; right: 16px;
  background: transparent; border: 0; color: var(--bone);
  font-size: 2rem; line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 1rem;
  padding: 2rem 1rem 3rem;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
  font-family: var(--font-hud);
}
.site-footer .brand {
  font-family: var(--font-display);
  letter-spacing: .16em;
  color: var(--ember);
  text-shadow: 0 0 12px rgba(255,50,0,.6);
  margin: 0 0 .4rem;
  animation: headingFlicker 5s ease-in-out infinite;
}
.site-footer p { margin: .2rem 0; color: var(--mute); font-size: .92rem; }
.site-footer a { color: var(--ember-hot); text-decoration: none; border-bottom: 1px solid rgba(255,180,80,.35); }

/* ---------- Flame OFF / reduced motion: static warm glow, no flicker ---------- */
html[data-flame="off"] .bg-firelight,
html[data-flame="off"] .btn-enter,
html[data-flame="off"] .intro-mark,
html[data-flame="off"] .logo-fill,
html[data-flame="off"] .logo-shine,
html[data-flame="off"] .hero-art img,
html[data-flame="off"] .battle-frame img,
html[data-flame="off"] .section h2,
html[data-flame="off"] .site-footer .brand,
html[data-flame="off"] .card,
html[data-flame="off"] .burn-rule::after,
html[data-flame="off"] .marquee-track {
  animation: none !important;
}
html[data-flame="off"] .bg-firelight { opacity: .62; filter: none; }
html[data-flame="off"] .ember-canvas { display: none; }
html[data-flame="off"] .card:hover { box-shadow: 0 0 0 1px rgba(255,180,80,.5), 0 0 16px rgba(255,90,20,.4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
  .ember-canvas { display: none !important; }
  .intro { transition: none; }
}

/* Light on mobile: fewer heavy effects */
@media (max-width: 700px) {
  .bg-scanlines { opacity: .16; }
  .card { animation-duration: 5.5s; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: .5rem; }
  .logo-stroke { -webkit-text-stroke-width: 3px; }
  .section { padding: 1.6rem 0 1rem; }
  .ember-canvas { opacity: .65; }
}

@media (min-width: 800px) {
  .panel { padding: 1.8rem 2rem 2rem; }
  .hero-art { width: min(420px, 50vw); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid img { height: 160px; max-height: none; }
  .about-grid {
    display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; align-items: center;
  }
  .about-grid .lede, .about-copy { text-align: left; max-width: none; margin: 0; }
  .about-grid img {
    border: 1px solid rgba(255,80,20,.4);
    box-shadow: 0 0 20px rgba(255,50,0,.25);
  }
}

@media (hover: hover) and (min-width: 800px) {
  .card.tilt-on { transition: transform .08s linear, border-color .2s, box-shadow .2s; }
}

@media (min-width: 800px) {
  .cards { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 0.7rem - 58px);
    margin-left: 0.55rem;
    margin-right: 58px;
  }
  .hero-banner { width: 100%; }
}

/* ---------- R2: albums, counts, gamer desk ---------- */
a.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.card:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 2px; }
.moment-count {
  margin: .35rem 0 0;
  font-family: var(--font-hud);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ember);
  text-shadow: 0 0 8px rgba(255, 70, 0, .45);
}
.title-long {
  font-size: clamp(1.15rem, 4.4vw, 2.15rem);
  letter-spacing: .06em;
  line-height: 1.2;
  padding-inline: .4rem;
}
.card-misc .icon { color: var(--ember-hot); }

/* Album overlay */
.album-view {
  position: fixed;
  inset: 0;
  z-index: 48;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #070201;
  padding: 4.2rem 0 3rem;
  overscroll-behavior: contain;
}
body.album-open { overflow: hidden; }
.album-inner { padding-bottom: 2rem; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-hud);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--ember-hot);
  text-decoration: none;
  border: 1px solid rgba(255, 100, 40, .55);
  background: rgba(10, 2, 0, .75);
  padding: .45rem .8rem;
  box-shadow: 0 0 12px rgba(255, 50, 0, .3);
  margin-bottom: .8rem;
}
.btn-back::before { content: "‹"; font-size: 1.1rem; line-height: 1; }
.btn-back:hover, .btn-back:focus-visible {
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 90, 20, .6);
  outline: none;
}
.album-empty {
  text-align: center;
  color: var(--mute);
  padding: 2.4rem 1rem;
  border: 1px dashed rgba(255, 90, 30, .35);
  background: rgba(8, 2, 1, .45);
  font-family: var(--font-body);
}
.album-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
}
@media (min-width: 600px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .album-grid { grid-template-columns: repeat(3, 1fr); }
}
.album-tile {
  position: relative;
  background: linear-gradient(180deg, #1a0806, #080201);
  border: 1px solid rgba(255, 90, 30, .4);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.45), inset 0 -16px 24px rgba(255, 50, 0, .08);
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 0;
}
.album-tile img,
.album-tile video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #100402;
}
.album-tile video { height: auto; max-height: 260px; background: #000; }
.album-tile figcaption,
.album-cap {
  font-family: var(--font-hud);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--mute);
  padding: .45rem .6rem .55rem;
  margin: 0;
}
.yt-thumb {
  position: relative;
  display: block;
  cursor: pointer;
  border: 0;
  padding: 0;
  width: 100%;
  background: #100402;
  color: inherit;
}
.yt-thumb img { width: 100%; height: 200px; object-fit: cover; display: block; }
.yt-thumb .yt-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(140, 16, 8, .86);
  box-shadow: 0 0 18px rgba(255, 60, 0, .65);
  display: grid; place-items: center;
  pointer-events: none;
}
.yt-thumb .yt-play::after {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.yt-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Lightbox arrows + caption */
.lightbox-figure { margin: 0; text-align: center; max-width: min(1100px, 100%); }
.lightbox-figure img { max-width: 100%; max-height: 80vh; }
#lightbox-cap {
  color: var(--bone);
  font-family: var(--font-hud);
  margin-top: .5rem;
  text-shadow: 0 1px 4px #000;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 2, 0, .7);
  color: var(--ember-hot);
  border: 1px solid rgba(255, 100, 40, .5);
  width: 44px; height: 64px;
  font-size: 2rem;
  line-height: 1;
  z-index: 2;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover, .lightbox-next:hover,
.lightbox-prev:focus-visible, .lightbox-next:focus-visible {
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 80, 20, .55);
  outline: none;
}

/* Gamer desk extras */
.gamer-desk {
  margin-top: 1.15rem;
  display: grid;
  gap: .7rem;
}
.gamer-row {
  display: grid;
  gap: .7rem;
}
@media (min-width: 800px) {
  .gamer-row.pair { grid-template-columns: 1fr 1fr; }
}
.gamer-card {
  background: rgba(8, 2, 1, .45);
  border: 1px solid rgba(255, 90, 30, .3);
  padding: .7rem .8rem .8rem;
  box-shadow: inset 0 0 20px rgba(80, 10, 0, .18);
}
.gamer-card h3 {
  font-family: var(--font-hud);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 .4rem;
  text-shadow: 0 0 8px rgba(255, 70, 0, .4);
}
.now-game {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ember-hot);
  margin: 0;
  letter-spacing: .04em;
}
.now-status { margin: .2rem 0 0; color: var(--mute); font-size: .92rem; }
.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .55rem;
}
.tag-chip {
  font-family: var(--font-hud);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--bone);
  text-decoration: none;
  border: 1px solid rgba(255, 90, 30, .35);
  background: rgba(0,0,0,.35);
  padding: .22rem .55rem;
}
.tag-chip strong { color: var(--ember-hot); font-weight: 600; margin-right: .3rem; }
.tag-chip[href]:hover { border-color: var(--ember-hot); color: #fff; }
.grind-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.grind-list li { margin: 0; }
.grind-meta {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  font-family: var(--font-hud);
  font-size: .85rem;
  color: var(--bone);
}
.grind-pct { color: var(--ember-hot); }
.grind-bar {
  height: 7px;
  margin-top: .28rem;
  background: rgba(40, 8, 4, .9);
  border: 1px solid rgba(255, 80, 20, .25);
  overflow: hidden;
}
.grind-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a1010, var(--ember), var(--ember-hot));
  box-shadow: 0 0 8px rgba(255, 80, 0, .55);
  width: 0;
}
.grind-note { margin: .15rem 0 0; font-size: .8rem; color: var(--mute); }
.clip-tile { margin: 0; }
.clip-tile .album-tile { border: 0; box-shadow: none; background: transparent; }
.clip-tile img, .clip-tile video, .clip-tile .yt-thumb img { height: 160px; }

@media (max-width: 700px) {
  .album-tile img, .yt-thumb img { height: 180px; }
  .lightbox-prev, .lightbox-next { width: 36px; height: 56px; }
}

#album-title:focus { outline: none; }
#album-title:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 4px; }
