/* ============================================================
   FATALIA — Character Showcase · v2
   Light palette · Витрина персонажей · BEM
   ============================================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255,255,255,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(232,223,208,0.45) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(232,223,208,0.35) 0%, transparent 70%),
    var(--color-bg-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }

.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;
}

/* skip-to-content */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-ink); color: var(--color-gold-primary);
  padding: 12px 20px; font-family: var(--font-display);
  letter-spacing: var(--tracking-cap); text-transform: uppercase;
  font-size: var(--fs-cap); z-index: 200;
}
.skip-link:focus { left: 24px; top: 24px; outline: 2px solid var(--color-gold-primary); outline-offset: 4px; }

:focus-visible { outline: 2px solid var(--color-gold-primary); outline-offset: 4px; border-radius: 2px; }

/* ============================================================
   Viewport frame
   ============================================================ */
.design-frame {
  margin: 0 auto;
  position: relative;
  background: var(--color-bg-canvas);
  transition: max-width 500ms var(--ease-out-expo);
}
.design-frame[data-viewport="desktop"] { max-width: none; }
.design-frame[data-viewport="tablet"]  { max-width: 1024px; box-shadow: 0 0 0 1px var(--color-ink-hair); }
.design-frame[data-viewport="mobile"]  { max-width: 430px;  box-shadow: 0 0 0 1px var(--color-ink-hair); }

/* ============================================================
   .site-header — transparent on light, sticky, soft blur
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  background: rgba(245,241,232,0.78);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border-bottom: 1px solid var(--color-ink-hair);
}
.site-header__left { display: flex; align-items: center; gap: 12px; }
.site-header__brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: var(--tracking-cap);
  color: var(--color-ink);
  text-transform: uppercase;
  font-weight: 600;
}
.site-header__brand-mark {
  width: 22px; height: 22px;
  display: inline-block; vertical-align: middle; margin-right: 8px;
  color: var(--color-gold-primary);
}

.site-header__nav {
  display: flex; gap: 40px; align-items: center;
  justify-content: center;
}
.site-header__link {
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  letter-spacing: var(--tracking-cap);
  color: var(--color-ink-soft);
  text-transform: uppercase;
  position: relative;
  padding: 6px 2px;
  transition: color var(--dur-fast);
}
.site-header__link::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: -2px;
  height: 1px; background: var(--color-gold-primary);
  transition: left var(--dur-normal) var(--ease-out-expo),
              right var(--dur-normal) var(--ease-out-expo);
}
.site-header__link:hover { color: var(--color-ink); }
.site-header__link:hover::after { left: 0; right: 0; }
.site-header__link--active { color: var(--color-ink); }
.site-header__link--active::after { left: 0; right: 0; background: var(--color-gold-primary); height: 1.5px; }

.site-header__right {
  display: flex; align-items: center; gap: 24px; justify-content: flex-end;
}
.site-header__search {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--color-ink-hair);
  border-radius: 999px;
  font-family: var(--font-tight);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  color: var(--color-ink-soft);
  text-transform: uppercase;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.site-header__search:hover { border-color: var(--color-gold-primary); color: var(--color-ink); }
.site-header__search svg { width: 14px; height: 14px; }

.site-header__lang {
  display: flex; gap: 4px; align-items: center;
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  letter-spacing: var(--tracking-cap);
}
.site-header__lang-btn { color: var(--color-ink-faint); padding: 4px 6px; }
.site-header__lang-btn--active { color: var(--color-gold-deep); }
.site-header__lang-sep { color: var(--color-ink-hair); }

/* tablet/mobile header */
.design-frame[data-viewport="tablet"] .site-header { padding: 0 24px; grid-template-columns: 1fr auto; }
.design-frame[data-viewport="tablet"] .site-header__nav { display: none; }
.design-frame[data-viewport="mobile"] .site-header { padding: 0 16px; height: 60px; grid-template-columns: 1fr auto; }
.design-frame[data-viewport="mobile"] .site-header__nav { display: none; }
.design-frame[data-viewport="mobile"] .site-header__search { display: none; }

/* ============================================================
   .showcase — main character screen
   Layout: [left info 35%] [center portrait + bg fills] [right rail 80px]
   ============================================================ */
.showcase {
  position: relative;
  height: calc(100vh - 76px - 156px);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(440px, 38%) 1fr 96px;
  overflow: hidden;
  background: var(--color-bg-canvas);
  isolation: isolate;
}

/* Atmospheric backdrop — watercolor wash + rune backdrop, behind everything */
.showcase__atmosphere {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.showcase__wash {
  position: absolute;
  /* Confine the wash to the portrait column only — start where left info panel ends */
  left: 38%;
  right: 96px;
  top: 0;
  bottom: 0;
  background:
    radial-gradient(circle 380px at 50% 50%, var(--char-aura, var(--color-crownbearer)) 0%, transparent 60%),
    radial-gradient(ellipse 70% 35% at 50% 95%, var(--char-aura-2, transparent) 0%, transparent 70%);
  opacity: 0.42;
  filter: blur(40px);
  transition: background var(--dur-slow) var(--ease-out-expo), opacity var(--dur-slow);
  mix-blend-mode: multiply;
}
.showcase__rune-backdrop {
  position: absolute;
  right: -8%;
  top: 50%;
  width: 1100px; height: 1100px;
  pointer-events: none;
  opacity: 0.32;
  margin-top: -550px;
  transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -10px), 0);
  transition: transform 320ms var(--ease-out-quart);
  will-change: transform;
  z-index: 0;
}

/* ============================================================
   .character-sigil — heraldic watermark BEHIND the portrait.
   Layer order in .showcase__atmosphere (bottom → top):
     wash → rune-backdrop → character-sigil → rune-vignette
   Sits in the upper-center-ish of the portrait area; persona overlaps its lower third.
   ============================================================ */
.character-sigil {
  position: absolute;
  top: 50%;
  left: calc(38% + (100% - 38% - 96px) / 2);
  transform: translate(-50%, -58%);
  width: 880px;
  height: 880px;
  pointer-events: none;
  opacity: 0;
  animation: sigilFadeIn 800ms var(--ease-out-expo) 200ms forwards;
  z-index: 1;
}
.character-sigil__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: inherit;
  opacity: 0.36;
  filter: drop-shadow(0 0 32px currentColor);
  transform-origin: 50% 50%;
  transition: transform 360ms var(--ease-out-quart);
}
.character-sigil__svg { transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0); }
@keyframes sigilFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sigilSpin {
  to { transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0) rotate(360deg); }
}
@keyframes sigilSpinReverse {
  to { transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0) rotate(-360deg); }
}
@keyframes sigilPulse {
  0%, 100% { transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0) scale(1); }
  50%      { transform: translate3d(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -6px), 0) scale(1.085); }
}
.character-sigil--anim-rotate-60   .character-sigil__svg { animation: sigilSpin 45s linear infinite; }
.character-sigil--anim-rotate-90   .character-sigil__svg { animation: sigilSpin 60s linear infinite; }
.character-sigil--anim-rotate-120  .character-sigil__svg { animation: sigilSpinReverse 75s linear infinite; }
.character-sigil--anim-rotate-180  .character-sigil__svg { animation: sigilSpin 90s linear infinite, sigilPulse 6s ease-in-out infinite; }
.character-sigil--anim-pulse-3     .character-sigil__svg { animation: sigilPulse 3s ease-in-out infinite; }
.character-sigil--anim-pulse-4     .character-sigil__svg { animation: sigilPulse 4s ease-in-out infinite; }
.character-sigil--anim-pulse-5     .character-sigil__svg { animation: sigilPulse 5s ease-in-out infinite; }
/* Drusilla — rotation on wrapper + pulse on svg */
.character-sigil--anim-rotate-pulse                       { animation: sigilFadeIn 800ms var(--ease-out-expo) 200ms forwards, sigilWrapperSpin 80s linear infinite 800ms; }
.character-sigil--anim-rotate-pulse .character-sigil__svg { animation: sigilPulse 3s ease-in-out infinite; }
@keyframes sigilWrapperSpin {
  from { transform: translate(-50%, -58%) rotate(0deg); }
  to   { transform: translate(-50%, -58%) rotate(360deg); }
}

/* tablet/mobile sigil size */
.design-frame[data-viewport="tablet"] .character-sigil {
  width: 560px; height: 560px;
  left: calc(38% + (100% - 38% - 72px) / 2);
}
.design-frame[data-viewport="mobile"] .character-sigil {
  width: 360px; height: 360px;
  left: 50%;
  top: 52%;
}
.showcase__rune-backdrop svg { width: 100%; height: 100%; animation: showcaseRuneSpin 90s linear infinite; }
@keyframes showcaseRuneSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Vignette — stronger edge darkening to focus the centre */
.showcase__rune-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 75% at 50% 45%, transparent 0%, transparent 50%, rgba(232,223,208,0.7) 100%),
    radial-gradient(ellipse 90% 110% at 0% 50%, var(--color-bg-canvas) 0%, transparent 38%),
    linear-gradient(180deg, var(--color-bg-canvas) 0%, transparent 8%, transparent 90%, var(--color-bg-canvas) 100%);
  z-index: 2;
  pointer-events: none;
}

/* ============================================================
   Left info panel
   ============================================================ */
.character-info {
  position: relative;
  z-index: 3;
  padding: 48px 32px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: center;
  max-width: 100%;
  min-width: 0;
  border-left: 1px solid transparent;
}
.character-info::before {
  content: "";
  position: absolute;
  left: 40px;
  top: 60px;
  bottom: 40px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--color-gold-faint) 22%, var(--color-gold-faint) 78%, transparent 100%);
  opacity: 0.6;
  pointer-events: none;
}
/* Top-to-bottom cascade on character swap. Keyed by char.slug on the wrapper
   forces React remount so animations replay every switch. */
.character-info__class-badge { animation: charItemIn 550ms var(--ease-out-expo) backwards; animation-delay: 50ms;  }
.character-info__name        { animation: charItemIn 600ms var(--ease-out-expo) backwards; animation-delay: 130ms; }
.character-info__title       { animation: charItemIn 550ms var(--ease-out-expo) backwards; animation-delay: 240ms; }
.character-info__voice       { animation: charItemIn 500ms var(--ease-out-expo) backwards; animation-delay: 340ms; }
.character-info__stats       { animation: charItemIn 550ms var(--ease-out-expo) backwards; animation-delay: 420ms; }
.character-info__story-block { animation: charItemIn 600ms var(--ease-out-expo) backwards; animation-delay: 520ms; }
.character-info__nav         { animation: charItemIn 500ms var(--ease-out-expo) backwards; animation-delay: 640ms; }
@keyframes charItemIn {
  from { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
/* Subtle letter cascade on the name itself, on top of the row reveal */
.character-info__name-char {
  display: inline-block;
  animation: nameCharIn 500ms var(--ease-out-expo) backwards;
  /* animation-delay applied inline via JS, starts after row delay */
}
@keyframes nameCharIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.character-info__class-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  letter-spacing: var(--tracking-cap);
  color: var(--color-ink-soft);
  text-transform: uppercase;
  width: fit-content;
}
.character-info__class-badge-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--char-aura, var(--color-gold-primary));
  border: 1px solid currentColor;
  border-radius: 50%;
  padding: 4px;
}
.character-info__class-badge-icon svg { width: 100%; height: 100%; }

.character-info__name {
  font-family: var(--font-display-ru);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: 0.002em;
  color: var(--color-ink);
  margin: 0;
  text-wrap: balance;
}
.character-info__name--xl { font-size: clamp(4.25rem, 6.4vw, 5.5rem); line-height: 0.96; font-weight: 600; }
.character-info__name--l  { font-size: clamp(3.5rem, 5.4vw, 4.5rem);  line-height: 1.0;  font-weight: 600; }
.character-info__name--m  { font-size: clamp(2.75rem, 4.2vw, 3.75rem); line-height: 1.05; font-weight: 600; }
.character-info__name--s  { font-size: clamp(2.25rem, 3.3vw, 3rem);   line-height: 1.1;  font-weight: 600; }
.character-info__name--xs { font-size: clamp(1.875rem, 2.6vw, 2.375rem); line-height: 1.15; font-weight: 600; }
.character-info__name-word {
  display: block;
  white-space: nowrap;
}

.character-info__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  color: var(--color-gold-deep);
  margin: 0;
  letter-spacing: 0.02em;
  font-weight: 400;
  position: relative;
  padding-bottom: 0;
}

/* Class-themed ornament divider between subtitle and content */
.character-divider {
  display: block;
  width: 200px;
  height: 14px;
  color: var(--color-gold-primary);
  margin: -6px 0 -2px;
  opacity: 0.85;
}
.character-divider--hollow { color: var(--color-fallen); opacity: 0.75; }
.character-divider--veil   { color: var(--color-veiled-court); opacity: 0.75; }
.character-divider--blade  { color: var(--color-knight); opacity: 0.8; }
.character-divider--free   { color: var(--color-free-sovereign); opacity: 0.8; }
.character-divider--family { color: var(--color-familiar); opacity: 0.85; }
.character-divider--quill  { color: var(--color-witness); opacity: 0.8; }
.character-divider--crown  { color: var(--color-gold-primary); opacity: 0.85; }
.character-info__title::after {
  /* removed — divider is now a separate SVG element below subtitle */
}

.character-info__voice {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-cap);
  color: var(--color-gold-deep);
  text-transform: uppercase;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--color-gold-faint);
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  width: fit-content;
  transition: all var(--dur-fast);
  cursor: pointer;
  font-weight: 500;
}
.character-info__voice:hover {
  background: var(--color-gold-primary);
  color: var(--color-bg-canvas);
  border-color: var(--color-gold-primary);
  transform: translateY(-1px);
}
.character-info__voice-icon {
  display: inline-flex; align-items: center; gap: 3px;
  height: 14px;
}
.character-info__voice-icon i {
  display: inline-block; width: 2px; background: currentColor; border-radius: 1px;
  animation: voiceWave 1.2s ease-in-out infinite;
}
.character-info__voice-icon i:nth-child(1) { height: 6px;  animation-delay: 0s;   }
.character-info__voice-icon i:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.character-info__voice-icon i:nth-child(3) { height: 14px; animation-delay: 0.3s; }
.character-info__voice-icon i:nth-child(4) { height: 8px;  animation-delay: 0.45s; }
@keyframes voiceWave { 0%,100% { transform: scaleY(0.6); } 50% { transform: scaleY(1); } }

/* Stats grid 2x2 */
.character-info__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  margin: 4px 0;
  max-width: 460px;
}
.character-info__stat {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0 4px;
  border-top: 1px solid var(--color-ink-hair);
}
.character-info__stat-key {
  font-family: var(--font-tight);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  color: var(--color-ink-faint);
  text-transform: uppercase;
  font-weight: 500;
}
.character-info__stat-val {
  font-family: var(--font-display-ru);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-ink);
  letter-spacing: 0.005em;
  line-height: 1.35;
}

/* Story teaser */
.character-info__story-label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  color: var(--color-gold-deep);
  text-transform: uppercase;
  margin: 0 0 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.character-info__story-label::before {
  content: ""; display: inline-block; width: 24px; height: 1px;
  background: var(--color-gold-primary);
}
.character-info__story-label::after {
  content: ""; display: inline-block; width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-gold-primary);
  margin-left: -6px;
}
.character-info__story-body {
  font-family: "PT Serif", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  margin: 0;
  max-width: 460px;
  text-wrap: pretty;
  font-weight: 400;
}
.character-info__story-body::first-letter {
  /* subtle drop-emphasis on first character */
  font-family: var(--font-display-ru);
  font-weight: 700;
  color: var(--color-gold-deep);
  font-size: 1.15em;
  letter-spacing: 0.01em;
}
.character-info__story-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  color: var(--color-gold-deep);
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.character-info__story-link::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--color-gold-faint);
  transition: background var(--dur-fast);
}
.character-info__story-link:hover { color: var(--color-ink); }
.character-info__story-link:hover::before { background: var(--color-gold-primary); }
.character-info__story-link::after {
  content: "→"; letter-spacing: 0; transition: transform var(--dur-fast);
  font-size: 1.1em;
}
.character-info__story-link:hover::after { transform: translateX(4px); }

/* Inline mini-prev/next thumbnail carousel under info */
/* Minimal nav: arrows + counter (the big thumb-strip below handles thumbnails) */
.character-info__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.character-info__nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--color-ink-hair);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-ink-soft);
  transition: all var(--dur-fast);
  background: rgba(250,247,240,0.4);
}
.character-info__nav-btn:hover {
  border-color: var(--color-gold-primary); color: var(--color-gold-deep);
  background: var(--color-bg-paper);
}
.character-info__nav-counter {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  color: var(--color-ink-faint);
}
.character-info__nav-counter strong {
  color: var(--color-gold-deep);
  font-weight: 600;
}

/* ============================================================
   Center: portrait area
   ============================================================ */
.showcase__portrait-area {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 32px 130px;
  min-height: 0;
}
.showcase__portrait {
  position: relative;
  width: 100%;
  max-width: 820px;
  height: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.showcase__portrait-img {
  position: relative;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 14px rgba(42,31,24,0.25));
  transition: filter var(--dur-slow), transform 260ms var(--ease-out-quart);
  transform: translate3d(calc(var(--mx, 0) * 22px), calc(var(--my, 0) * 16px), 0);
  will-change: transform;
  z-index: 40;
}

/* Atmospheric back-shadow — dark warm pool BEHIND the figure, separate from class wash */
.showcase__back-shadow {
  position: absolute;
  left: 50%; bottom: 12%;
  width: 420px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(42,31,24,0.18) 0%, transparent 65%);
  filter: blur(60px);
  z-index: 15;
  pointer-events: none;
}

/* Ground contact shadow — sits ON THE FLOOR under the figure */
.showcase__ground-shadow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 50px;
  background: radial-gradient(ellipse at center,
    rgba(42,31,24,0.55) 0%,
    rgba(42,31,24,0.25) 45%,
    transparent 75%);
  filter: blur(12px);
  z-index: 18;
  pointer-events: none;
}
.showcase__ground-shadow--standing { bottom: 6%; }
.showcase__ground-shadow--sitting  { bottom: 8%; width: 460px; height: 60px;
  background: radial-gradient(ellipse at center,
    rgba(42,31,24,0.6) 0%,
    rgba(42,31,24,0.28) 45%,
    transparent 75%);
}
.showcase__ground-shadow--floating { bottom: 10%; width: 360px; height: 30px; opacity: 0.75;
  background: radial-gradient(ellipse at center,
    rgba(42,31,24,0.35) 0%,
    rgba(42,31,24,0.14) 50%,
    transparent 80%);
}
.showcase__ground-shadow--jumping  { bottom: 4%; width: 420px; height: 28px; opacity: 0.55;
  background: radial-gradient(ellipse at center,
    rgba(42,31,24,0.36) 0%,
    rgba(42,31,24,0.10) 50%,
    transparent 80%);
}

/* Astra placeholder */
.showcase__portrait-placeholder {
  position: relative;
  width: 420px; max-width: 100%;
  aspect-ratio: 3/4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 32px 24px 48px;
  text-align: center;
  background: transparent;
  border: 0;
  animation: portraitIn 700ms var(--ease-out-expo) both;
  z-index: 40;
}
.showcase__portrait-placeholder-sigil { display: none; }
.showcase__portrait-placeholder-sigil {
  width: 200px; height: 200px;
  color: var(--color-gold-primary);
  margin-bottom: 24px;
  animation: sigilSpin 60s linear infinite;
}
@keyframes sigilSpin { to { transform: rotate(360deg); } }
.showcase__portrait-placeholder-title {
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  letter-spacing: var(--tracking-meta);
  color: var(--color-gold-deep);
  text-transform: uppercase;
  margin: 0 0 6px;
}
.showcase__portrait-placeholder-name {
  font-family: var(--font-display-ru);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--color-ink);
  margin: 0 0 16px;
}
.showcase__portrait-placeholder-note {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--color-ink-faint);
  line-height: 1.6;
  max-width: 280px;
}

/* Per-character particles container */
.showcase__particles {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
  transform: translate3d(calc(var(--mx, 0) * -32px), calc(var(--my, 0) * -22px), 0);
  transition: transform 280ms var(--ease-out-quart);
  will-change: transform;
}
.showcase__particle {
  position: absolute;
  will-change: transform, opacity;
}
/* Particle variants */
.showcase__particle--petal {
  width: 8px; height: 14px;
  background: linear-gradient(180deg, var(--color-gold-soft), var(--color-gold-deep));
  border-radius: 50% 0 50% 0;
  opacity: 0.7;
  animation: petalFall var(--p-dur, 14s) linear infinite;
  filter: drop-shadow(0 0 4px rgba(201,169,97,0.5));
}
.showcase__particle--ember {
  width: 4px; height: 4px;
  background: var(--color-rel-love);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-rel-love), 0 0 14px rgba(213,76,45,0.6);
  animation: emberRise var(--p-dur, 8s) ease-out infinite;
  opacity: 0;
}
.showcase__particle--bubble {
  width: 8px; height: 8px;
  border: 1px solid rgba(74,157,184,0.7);
  background: rgba(74,157,184,0.15);
  border-radius: 50%;
  animation: bubbleRise var(--p-dur, 12s) ease-in-out infinite;
  opacity: 0;
}
.showcase__particle--sakura {
  width: 10px; height: 8px;
  background: radial-gradient(ellipse, #f4c2d6, #d97ca6);
  border-radius: 100% 0 100% 0;
  opacity: 0.75;
  animation: sakuraFall var(--p-dur, 16s) linear infinite;
}
.showcase__particle--spark {
  width: 3px; height: 12px;
  background: linear-gradient(180deg, transparent, #b8e6e8, transparent);
  filter: drop-shadow(0 0 4px #61c7d4);
  animation: sparkFlick var(--p-dur, 3s) ease-out infinite;
  opacity: 0;
}
.showcase__particle--leaf {
  width: 10px; height: 14px;
  background: linear-gradient(135deg, #6B8E4E, #3d5a2e);
  clip-path: ellipse(50% 60% at 50% 50%);
  opacity: 0.7;
  animation: petalFall var(--p-dur, 18s) linear infinite;
}
.showcase__particle--star {
  width: 3px; height: 3px;
  background: #b9a3d4;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(123,45,92,0.7);
  animation: starDrift var(--p-dur, 8s) ease-in-out infinite;
}
.showcase__particle--ash {
  width: 7px; height: 7px;
  background: radial-gradient(circle, rgba(80,80,80,0.95), rgba(120,120,120,0.5) 60%, transparent 100%);
  border-radius: 50%;
  filter: blur(0.5px);
  animation: ashFloat var(--p-dur, 14s) linear infinite;
  opacity: 0;
}
.showcase__particle--blood {
  width: 5px; height: 9px;
  background: linear-gradient(180deg, #6e0a0a, #2a0303);
  border-radius: 60% 60% 50% 50% / 80% 80% 30% 30%;
  filter: drop-shadow(0 0 4px rgba(110,10,10,0.5));
  animation: petalFall var(--p-dur, 10s) linear infinite;
}
.showcase__particle--feather {
  width: 8px; height: 16px;
  background: linear-gradient(180deg, #d8d2c0, #8d8473);
  clip-path: polygon(50% 0, 70% 35%, 100% 50%, 70% 65%, 50% 100%, 30% 65%, 0 50%, 30% 35%);
  opacity: 0.7;
  animation: petalFall var(--p-dur, 16s) linear infinite;
}
.showcase__particle--snow {
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(180,210,230,0.9);
  opacity: 0.85;
  animation: petalFall var(--p-dur, 14s) linear infinite;
}
.showcase__particle--eye {
  width: 8px; height: 5px;
  background: radial-gradient(ellipse, #c8b3d8, #5e3a76);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(123,45,92,0.7);
  animation: eyeDrift var(--p-dur, 7s) ease-in-out infinite;
}
.showcase__particle--bolt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255,210,127,0.65));
  mix-blend-mode: screen;
  /* opacity flashes (overall on/off) layered on top of the trace animation */
  opacity: 0;
  animation: boltFlash var(--p-dur, 7s) ease-out infinite;
}
.showcase__bolt-trace {
  animation-name: boltTrace;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  animation-iteration-count: infinite;
}
@keyframes boltTrace {
  0%   { stroke-dashoffset: var(--path-len, 1200); }
  6%   { stroke-dashoffset: 0; }
  18%  { stroke-dashoffset: 0; }
  26%  { stroke-dashoffset: calc(var(--path-len, 1200) * -1); }
  100% { stroke-dashoffset: calc(var(--path-len, 1200) * -1); }
}
@keyframes boltFlash {
  /* matches boltTrace timing: visible only while the trace shows */
  0%   { opacity: 0; }
  3%   { opacity: 1;   }
  6%   { opacity: 0.5; }
  9%   { opacity: 1;   }
  14%  { opacity: 0.65;}
  20%  { opacity: 0;   }
  100% { opacity: 0;   }
}

/* Bolt container sits ABOVE the showcase top — bolts emerge from off-screen
   sky (above header), clipped by .showcase overflow:hidden. */
.showcase__particles--bolt {
  z-index: 1;
  top: -260px;
  height: calc(100% + 260px);
}

@keyframes petalFall {
  0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  100% { transform: translateY(110vh) translateX(var(--drift, 60px)) rotate(540deg); opacity: 0; }
}
@keyframes emberRise {
  0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateY(-90vh) translateX(var(--drift, 20px)) scale(0); opacity: 0; }
}
@keyframes bubbleRise {
  0%   { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  15%  { opacity: 0.7; }
  100% { transform: translateY(-90vh) translateX(var(--drift, 30px)) scale(1.2); opacity: 0; }
}
@keyframes sakuraFall {
  0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.75; }
  100% { transform: translateY(110vh) translateX(var(--drift, 80px)) rotate(720deg); opacity: 0; }
}
@keyframes sparkFlick {
  0%   { opacity: 0; transform: scale(0.6); }
  20%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.4) translateY(-40px); }
}
/* Lightning bolts use boltFlash above. Removed legacy keyframe block. */
@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.4); }
}
@keyframes starDrift {
  0%   { opacity: 0;   transform: translateY(0)     translateX(0)   scale(0.7); }
  20%  { opacity: 1;   transform: translateY(-12vh) translateX(8px) scale(1.3); }
  60%  { opacity: 0.7; transform: translateY(-40vh) translateX(-6px) scale(1); }
  100% { opacity: 0;   transform: translateY(-70vh) translateX(var(--drift, 10px)) scale(0.6); }
}
@keyframes eyeDrift {
  0%   { opacity: 0;   transform: translateY(0)    translateX(0)   scale(0.7) rotate(0deg); }
  15%  { opacity: 1;   transform: translateY(-8vh) translateX(10px) scale(1.2) rotate(2deg); }
  50%  { opacity: 0.85; transform: translateY(-26vh) translateX(-8px) scale(1) rotate(-3deg); }
  100% { opacity: 0;   transform: translateY(-55vh) translateX(var(--drift, 16px)) scale(0.6) rotate(0deg); }
}
@keyframes ashFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.75; }
  50%  { opacity: 0.85; }
  90%  { opacity: 0.45; }
  100% { transform: translateY(-70vh) translateX(var(--drift, 40px)); opacity: 0; }
}

/* ============================================================
   Right sticky class rail
   ============================================================ */
.class-rail {
  position: relative;
  z-index: 5;
  border-left: 1px solid var(--color-ink-hair);
  background: linear-gradient(180deg,
    rgba(245,241,232,0) 0%,
    rgba(245,241,232,0.5) 20%,
    rgba(245,241,232,0.5) 80%,
    rgba(245,241,232,0) 100%);
  display: flex; align-items: center; justify-content: center;
}
.class-rail__inner {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
}
.class-rail__inner::before {
  /* gold vertical timeline behind icons */
  content: "";
  position: absolute;
  left: 50%; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--color-gold-faint) 12%, var(--color-gold-faint) 88%, transparent);
  transform: translateX(-50%);
  opacity: 0.7;
  z-index: 0;
}
.class-rail__connector { display: none; }
.class-rail__btn {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-gold-deep);
  background: var(--color-bg-paper);
  border: 1px solid var(--color-gold-faint);
  transition: all var(--dur-normal) var(--ease-out-expo);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(42,31,24,0.06);
}
.class-rail__btn svg { width: 30px; height: 30px; }
.class-rail__btn:hover {
  transform: scale(1.1);
  border-color: var(--color-gold-primary);
  box-shadow: 0 6px 18px rgba(201,169,97,0.25);
}
.class-rail__btn--active {
  background: var(--color-gold-primary);
  color: var(--color-bg-deep);
  border-color: var(--color-gold-deep);
  box-shadow: 0 0 0 4px rgba(201,169,97,0.18), 0 8px 20px rgba(42,31,24,0.18);
}
.class-rail__btn--active::before {
  content: ""; position: absolute; left: -30px; top: 50%;
  width: 22px; height: 1.5px;
  background: var(--color-gold-primary);
  transform: translateY(-50%);
  box-shadow: 0 0 6px var(--color-gold-primary);
  pointer-events: none;
}
.class-rail__btn--active::after {
  content: ""; position: absolute; left: -40px; top: 50%;
  width: 6px; height: 6px;
  background: var(--color-gold-primary);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--color-gold-primary);
  pointer-events: none;
}
/* Suppress the hover tooltip on the active rail button — the gold
   connector + dot already communicate the state, and a wide pill there
   collides with the connector. */
.class-rail__btn--active .class-rail__btn-tooltip { display: none; }
.class-rail__btn-tooltip {
  position: absolute;
  right: calc(100% + 12px); top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  background: var(--color-ink);
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-cap);
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.class-rail__btn:hover .class-rail__btn-tooltip {
  opacity: 1; transform: translateY(-50%) translateX(0);
}

.design-frame[data-viewport="mobile"] .class-rail { display: none; }

/* ============================================================
   Skill rail — 4 medallions row
   ============================================================ */
.skill-rail {
  position: absolute;
  bottom: 8px;
  left: calc(38% + (100% - 38% - 96px) / 2);
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.skill-rail__divider {
  display: block;
  width: 340px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-gold-faint) 20%, var(--color-gold-primary) 50%, var(--color-gold-faint) 80%, transparent 100%);
  opacity: 0.7;
  margin-bottom: 4px;
}
.skill-rail__label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.34em;
  color: var(--color-gold-deep);
  text-transform: uppercase;
  margin: 0 0 6px;
  font-weight: 500;
}
.skill-rail__grid {
  display: flex;
  align-items: center;
  gap: 18px;
}
.skill-rail__dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-gold-faint);
  opacity: 0.7;
}
.skill-medallion {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--color-bg-paper), var(--color-bg-shadow) 70%),
    var(--color-bg-paper);
  border: 1.5px solid var(--color-gold-primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-gold-deep);
  transition: transform var(--dur-normal) var(--ease-out-expo),
              box-shadow var(--dur-normal),
              border-color var(--dur-normal);
  cursor: pointer;
}
.skill-medallion::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--color-gold-faint);
  opacity: 0.7;
  pointer-events: none;
}
.skill-medallion svg { width: 40px; height: 40px; transition: transform 4s linear; }
.skill-medallion:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(42,31,24,0.15), 0 0 0 4px rgba(201,169,97,0.10);
  border-color: var(--color-gold-deep);
}
.skill-medallion:hover svg { transform: rotate(360deg); }
.skill-medallion--ultimate {
  background:
    radial-gradient(circle at 35% 30%, #f8e9c2, #d4b576 70%),
    #d4b576;
  border-color: var(--color-gold-deep);
  color: var(--color-bg-deep);
}
.skill-medallion__label {
  position: absolute;
  top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-cap);
  color: var(--color-ink-faint);
  text-transform: uppercase;
  white-space: nowrap;
}
.skill-medallion__tooltip {
  position: absolute;
  bottom: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 220px;
  padding: 12px 14px;
  background: var(--color-ink);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: 1.55;
  text-align: left;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  z-index: 10;
}
.skill-medallion__tooltip strong {
  display: block; font-family: var(--font-display);
  font-size: var(--fs-cap); color: var(--color-gold-soft);
  letter-spacing: var(--tracking-cap); text-transform: uppercase;
  margin-bottom: 4px;
}
.skill-medallion:hover .skill-medallion__tooltip {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

.design-frame[data-viewport="mobile"] .skill-rail { display: none; }

/* ============================================================
   Thumbnail strip — all 25 characters at bottom
   ============================================================ */
.thumb-strip {
  position: relative;
  z-index: 7;
  background: linear-gradient(180deg, transparent 0%, var(--color-bg-paper) 30%, var(--color-bg-paper) 100%);
  border-top: 1px solid var(--color-ink-hair);
  padding: 16px 40px 20px;
  height: 156px;
  box-sizing: border-box;
}
.thumb-strip__inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.thumb-strip__arrow {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--color-ink-hair);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-ink-soft);
  transition: all var(--dur-fast);
  background: var(--color-bg-paper);
}
.thumb-strip__arrow:hover {
  border-color: var(--color-gold-primary);
  color: var(--color-gold-deep);
  transform: scale(1.04);
}
.thumb-strip__track {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold-faint) transparent;
  scroll-behavior: smooth;
  padding: 8px 4px;
}
.thumb-strip__track::-webkit-scrollbar { height: 4px; }
.thumb-strip__track::-webkit-scrollbar-thumb { background: var(--color-gold-faint); border-radius: 2px; }
.thumb-strip__track::-webkit-scrollbar-track { background: transparent; }
.thumb-strip__counter {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  color: var(--color-ink-soft);
  min-width: 56px;
  text-align: right;
}
.thumb-strip__counter strong {
  color: var(--color-gold-deep);
  font-weight: 600;
}

.thumb {
  flex-shrink: 0;
  width: 78px; height: 100px;
  position: relative;
  border-radius: 2px;
  background-size: cover;
  background-position: center top;
  background-color: var(--color-bg-shadow);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur-fast), opacity var(--dur-fast);
  opacity: 0.7;
  filter: saturate(0.7);
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26,20,16,0.7));
}
.thumb__label {
  position: absolute;
  left: 6px; right: 6px; bottom: 4px;
  font-family: var(--font-display-ru);
  font-size: 0.6rem;
  color: var(--color-cream);
  line-height: 1.1;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  z-index: 2;
}
.thumb:hover { opacity: 1; transform: translateY(-2px); filter: saturate(1); }
.thumb--active {
  opacity: 1;
  filter: saturate(1);
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 2px;
  transform: translateY(-2px);
}
.thumb--active::before {
  /* vertical golden connector from the top of the active thumb upward */
  content: "";
  position: absolute;
  top: -64px; left: 50%;
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent 0%, var(--color-gold-faint) 30%, var(--color-gold-primary) 100%);
  transform: translateX(-50%);
  pointer-events: none;
}
.thumb--active::after {
  /* glowing dot at top of the connector */
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 6px; height: 6px;
  background: var(--color-gold-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--color-gold-primary);
  pointer-events: none;
  z-index: 2;
}
/* override .thumb::after on active */
.thumb--active .thumb__label { z-index: 3; }
.thumb--placeholder {
  background: linear-gradient(135deg, var(--color-bg-shadow), var(--color-bg-canvas));
  display: flex; align-items: center; justify-content: center;
  color: var(--color-gold-primary);
}
.thumb--placeholder::after { background: linear-gradient(180deg, transparent 60%, rgba(26,20,16,0.6)); }
.thumb--placeholder .thumb__placeholder-sigil {
  width: 30px; height: 30px;
  color: var(--color-gold-primary);
  opacity: 0.55;
}

/* tablet/mobile thumb strip */
.design-frame[data-viewport="tablet"] .thumb-strip { padding: 16px 24px 20px; }
.design-frame[data-viewport="mobile"] .thumb-strip { padding: 12px 16px 16px; }
.design-frame[data-viewport="mobile"] .thumb-strip__arrow { width: 36px; height: 36px; }
.design-frame[data-viewport="mobile"] .thumb { width: 60px; height: 80px; }

/* portrait fade on swap: keyed on slug, replays each character */
.showcase__portrait {
  animation: portraitIn 700ms var(--ease-out-expo) both;
}
@keyframes portraitIn {
  from { opacity: 0; transform: translateX(40px) scale(0.985); filter: blur(8px); }
  to   { opacity: 1; transform: translateX(0)   scale(1);      filter: blur(0); }
}

.showcase--swapping .character-info,
.showcase--swapping .showcase__portrait,
.showcase--swapping .skill-rail {
  opacity: 0;
  transition: opacity 220ms var(--ease-out-quart);
}

/* ============================================================
   Site footer (dark — only place dark is used)
   ============================================================ */
.site-footer {
  position: relative;
  background: var(--color-bg-deep);
  color: var(--color-cream-soft);
  padding: 64px 40px 48px;
  text-align: center;
}
.site-footer__divider {
  height: 1px; max-width: 520px; margin: 0 auto 40px;
  background: linear-gradient(90deg, transparent, var(--color-gold-primary), transparent);
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: var(--tracking-cap);
  color: var(--color-cream);
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 600;
}
.site-footer__meta {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-cap);
  color: var(--color-cream-soft);
  margin: 0 0 4px;
}
.site-footer__quiet {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  color: rgba(245,230,197,0.4);
  letter-spacing: 0.06em;
  margin: 0;
}

/* ============================================================
   Tablet/Mobile overrides
   ============================================================ */
.design-frame[data-viewport="tablet"] .showcase {
  grid-template-columns: 38% 1fr 72px;
}
.design-frame[data-viewport="tablet"] .character-info { padding: 40px 32px 32px; gap: 22px; }
.design-frame[data-viewport="tablet"] .character-info__name { font-size: 4rem; }
.design-frame[data-viewport="tablet"] .showcase__portrait { min-height: 460px; }
.design-frame[data-viewport="tablet"] .skill-rail {
  left: calc(38% + (100% - 38% - 72px) / 2);
  bottom: 24px; gap: 22px;
}
.design-frame[data-viewport="tablet"] .skill-medallion { width: 68px; height: 68px; }
.design-frame[data-viewport="tablet"] .skill-medallion svg { width: 32px; height: 32px; }

.design-frame[data-viewport="mobile"] .showcase {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}
.design-frame[data-viewport="mobile"] .character-info {
  padding: 28px 20px 16px;
  gap: 14px;
  text-align: left;
  order: 1;
}
.design-frame[data-viewport="mobile"] .character-info__name { font-size: 2.75rem; }
.design-frame[data-viewport="mobile"] .character-info__title { font-size: 1.125rem; }
.design-frame[data-viewport="mobile"] .character-info__stats { grid-template-columns: 1fr; gap: 6px; }
.design-frame[data-viewport="mobile"] .character-info__stat { grid-template-columns: 90px 1fr; }
.design-frame[data-viewport="mobile"] .character-info__nav { display: flex; }
.design-frame[data-viewport="mobile"] .showcase__portrait-area {
  order: 2;
  padding: 8px 16px;
  min-height: 480px;
}
.design-frame[data-viewport="mobile"] .showcase__portrait { min-height: 460px; max-width: 100%; height: 480px; }
.design-frame[data-viewport="mobile"] .showcase__rune-backdrop { width: 600px; height: 600px; right: -20%; opacity: 0.2; }
.design-frame[data-viewport="mobile"] .showcase__portrait-placeholder { width: 280px; }
.design-frame[data-viewport="mobile"] .showcase__portrait-placeholder-sigil { width: 140px; height: 140px; }

/* ============================================================
   BEM annotation overlay
   ============================================================ */
.bem-tag {
  position: absolute;
  top: 6px; left: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-gold-deep);
  background: rgba(250,247,240,0.94);
  padding: 3px 8px;
  border: 1px solid var(--color-gold-faint);
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 80;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.bem-tag--anim {
  color: #2A5A6F;
  border-color: rgba(74,157,184,0.4);
  background: rgba(225,240,245,0.94);
  top: auto; left: auto;
  bottom: 6px; right: 6px;
  white-space: normal;
  max-width: 320px;
}
[data-show-bem="true"] .bem-tag { opacity: 1; }
[data-show-bem="true"] .showcase,
[data-show-bem="true"] .character-info,
[data-show-bem="true"] .class-rail,
[data-show-bem="true"] .skill-rail,
[data-show-bem="true"] .thumb-strip,
[data-show-bem="true"] .site-header,
[data-show-bem="true"] .site-footer,
[data-show-bem="true"] .showcase__portrait-area {
  outline: 1px dashed rgba(201,169,97,0.45);
  outline-offset: -1px;
}

/* ============================================================
   .design-toolbar — floating control panel
   ============================================================ */
.design-toolbar {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 100;
  background: rgba(26,20,16,0.94);
  border: 1px solid rgba(201,169,97,0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px;
  width: 220px;
  font-family: var(--font-body);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.design-toolbar__title {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-meta);
  color: var(--color-gold-soft);
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,169,97,0.2);
}
.design-toolbar__group { margin-bottom: 12px; }
.design-toolbar__label {
  font-family: var(--font-tight);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: rgba(245,230,197,0.4);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.design-toolbar__row { display: flex; gap: 4px; }
.design-toolbar__btn {
  flex: 1;
  padding: 7px 8px;
  font-family: var(--font-tight);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--color-cream-soft);
  background: rgba(245,230,197,0.05);
  border: 1px solid rgba(201,169,97,0.15);
  text-transform: uppercase;
  transition: all var(--dur-fast);
}
.design-toolbar__btn:hover { color: var(--color-cream); border-color: rgba(201,169,97,0.4); }
.design-toolbar__btn--active {
  background: rgba(201,169,97,0.18);
  color: var(--color-gold-soft);
  border-color: rgba(201,169,97,0.6);
}
.design-toolbar__note {
  font-size: 0.625rem;
  color: rgba(245,230,197,0.4);
  font-style: italic;
  line-height: 1.4;
  margin: 6px 0 0;
}
