/* ==========================================================================
 * EarnWay Games — Design System v2
 * /public/css/earnway.css
 *
 * Dual theme: light (default) + dark, toggle persists in localStorage.
 * Palette derived from the EarnWay flame logo:
 *   crimson #B41414 → orange #C82800 → fiery #E85D2F → royal blue #3A5FBC
 * ========================================================================== */

/* ---------- Theme: Light (default) ----------------------------------- */
:root {
  --c-bg:           #FFFAF5;
  --c-bg-deep:      #FBF1E8;
  --c-surface:      #FFFFFF;
  --c-surface-2:    #FFF5F0;
  --c-surface-3:    #FFF0F4;

  --c-text:         #2A1810;
  --c-text-soft:    #5C4438;
  --c-text-muted:   #8B7466;
  --c-text-dim:     #B0A095;

  --c-line:         #F2E6DC;
  --c-line-strong:  #E5D2C2;

  --c-pink-50:  #FFF0F4;  --c-pink-100: #FFE4ED;  --c-pink-200: #FFCAD9;
  --c-pink-300: #F8B6CB;  --c-pink-500: #EC6C9E;  --c-pink-600: #D8528A;  --c-pink-700: #B83C72;

  --c-flame-50:  #FFEFE8; --c-flame-100: #FFD9C2; --c-flame-300: #F19370;
  --c-flame-500: #E85D2F; --c-flame-600: #C82800; --c-flame-700: #B41414; --c-flame-800: #780028;

  --c-royal-50:  #EEF1FA; --c-royal-100: #D6DEF4; --c-royal-300: #7E94D4;
  --c-royal-500: #3A5FBC; --c-royal-600: #2C4A99; --c-royal-700: #1F3677;

  --c-iris-100: #E6DCEF; --c-iris-500: #5B3F7A; --c-iris-600: #3D2952;

  --c-success: #15803D;  --c-success-bg: #F0FDF4;
  --c-error:   #B91C1C;  --c-error-bg:   #FEF2F2;

  --sh-1: 0 1px 3px rgba(180, 20, 20, 0.06), 0 1px 2px rgba(42, 24, 16, 0.04);
  --sh-2: 0 4px 14px rgba(180, 20, 20, 0.08), 0 2px 6px rgba(42, 24, 16, 0.05);
  --sh-3: 0 14px 36px rgba(180, 20, 20, 0.12), 0 6px 14px rgba(42, 24, 16, 0.07);
  --sh-4: 0 28px 70px rgba(180, 20, 20, 0.18), 0 10px 28px rgba(42, 24, 16, 0.10);
  --sh-flame: 0 8px 30px rgba(232, 93, 47, 0.35), 0 2px 8px rgba(180, 20, 20, 0.25);

  --bg-blob-1: rgba(255, 202, 217, 0.45);
  --bg-blob-2: rgba(187, 221, 241, 0.32);
  --bg-blob-3: rgba(255, 176, 136, 0.32);
  --bg-blob-4: rgba(232, 93, 47, 0.10);
}

/* ---------- Theme: Dark --------------------------------------------- */
[data-theme="dark"] {
  --c-bg:           #0E0814;
  --c-bg-deep:      #07040C;
  --c-surface:      #19132A;
  --c-surface-2:    #221A38;
  --c-surface-3:    #2A2042;

  --c-text:         #F5EEFF;
  --c-text-soft:    #C8BCD8;
  --c-text-muted:   #8A7FA0;
  --c-text-dim:     #5F546E;

  --c-line:         #2A2138;
  --c-line-strong:  #3A2F4C;

  --c-pink-50:  #2A1626;  --c-pink-100: #3A1F36;  --c-pink-200: #5C3252;
  --c-pink-300: #80457C;  --c-pink-500: #EC6C9E;  --c-pink-600: #F291B5;  --c-pink-700: #F8B6CB;

  --c-flame-50:  #2D1410; --c-flame-100: #4A1E18; --c-flame-300: #B85940;
  --c-flame-500: #E85D2F; --c-flame-600: #FF7A4A; --c-flame-700: #FF8E5C; --c-flame-800: #FFA67C;

  --c-royal-50:  #0F1530; --c-royal-100: #1A2350; --c-royal-300: #5B7BD0;
  --c-royal-500: #6F8FE0; --c-royal-600: #98B0EE; --c-royal-700: #C0D0F5;

  --c-iris-100: #2A1B3A;  --c-iris-500: #9075B0;  --c-iris-600: #B095CC;

  --c-success-bg: #0E2C1A;  --c-error-bg: #2C0E0E;

  --sh-1: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-2: 0 4px 14px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --sh-3: 0 14px 36px rgba(0, 0, 0, 0.6), 0 6px 14px rgba(0, 0, 0, 0.4);
  --sh-4: 0 28px 70px rgba(0, 0, 0, 0.65), 0 10px 28px rgba(0, 0, 0, 0.45);
  --sh-flame: 0 8px 30px rgba(232, 93, 47, 0.45), 0 2px 8px rgba(180, 20, 20, 0.35);

  --bg-blob-1: rgba(180, 20, 20, 0.20);
  --bg-blob-2: rgba(58, 95, 188, 0.22);
  --bg-blob-3: rgba(232, 93, 47, 0.18);
  --bg-blob-4: rgba(91, 63, 122, 0.20);
}

/* ---------- Shared tokens ------------------------------------------ */
:root {
  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --f-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --f-body:    'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --t: 220ms cubic-bezier(.4,0,.2,1);
  --t-slow: 380ms cubic-bezier(.4,0,.2,1);
  --w-narrow: 720px; --w-content: 1100px; --w-wide: 1320px;
  --pad: clamp(16px, 4vw, 32px);
  --g-flame: linear-gradient(135deg, #B41414 0%, #C82800 35%, #E85D2F 70%, #F19370 100%);
  --g-flame-soft: linear-gradient(135deg, rgba(180, 20, 20, 0.10), rgba(232, 93, 47, 0.06));
  --g-aurora: linear-gradient(135deg, #B41414 0%, #C82800 30%, #E85D2F 55%, #5B3F7A 80%, #3A5FBC 100%);
}

/* ---------- Reset & base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; background: var(--c-bg); color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
body {
  background: var(--c-bg); color: var(--c-text);
  font-family: var(--f-body); font-size: 15px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: background-color var(--t-slow), color var(--t-slow);
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 12% 8%,  var(--bg-blob-1), transparent 70%),
    radial-gradient(ellipse 50% 50% at 88% 14%, var(--bg-blob-2), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, var(--bg-blob-3), transparent 75%),
    radial-gradient(ellipse 40% 30% at 80% 60%, var(--bg-blob-4), transparent 70%);
  transition: opacity var(--t-slow);
}
img { max-width: 100%; display: block; }
a { color: var(--c-flame-600); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-flame-700); }
[data-theme="dark"] a { color: var(--c-flame-700); }
[data-theme="dark"] a:hover { color: var(--c-flame-800); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display); font-weight: 600;
  color: var(--c-text); letter-spacing: -0.012em; line-height: 1.18;
}
h1 { font-size: clamp(36px, 6vw, 68px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: 18px; }
p { color: var(--c-text-soft); }
::selection { background: var(--c-flame-300); color: #fff; }
* { scrollbar-color: var(--c-flame-500) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c-flame-500), var(--c-flame-700));
  border-radius: var(--r-pill); border: 2px solid var(--c-bg);
}

/* ---------- Layout helpers ----------------------------------------- */
.ew-main { flex: 1; padding: 28px 0 80px; }
.ew-section { padding: 48px 0; }
.ew-section-tight { padding: 28px 0; }
.ew-narrow  { max-width: var(--w-narrow);  margin: 0 auto; padding: 0 var(--pad); }
.ew-content { max-width: var(--w-content); margin: 0 auto; padding: 0 var(--pad); }
.ew-wide    { max-width: var(--w-wide);    margin: 0 auto; padding: 0 var(--pad); }
.ew-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--c-line-strong), transparent); margin: 36px 0; border: 0; }

/* ---------- Top nav ------------------------------------------------ */
.ew-nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
}
.ew-nav-inner {
  max-width: var(--w-wide); margin: 0 auto; padding: 12px var(--pad);
  display: flex; align-items: center; gap: 18px;
}
.ew-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ew-brand-logo {
  height: 46px; width: 46px;
  object-fit: contain;
  transition: transform var(--t);
}
.ew-brand:hover .ew-brand-logo { transform: scale(1.04); }
.ew-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.ew-brand-name {
  font-family: var(--f-display); font-size: 22px; font-weight: 700;
  color: var(--c-text); letter-spacing: -0.02em;
}
.ew-brand-tag {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ew-nav-toggle {
  display: none; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm); cursor: pointer; position: relative; flex-shrink: 0;
}
.ew-nav-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--c-text); border-radius: 2px;
  position: absolute; left: 11px; transition: all var(--t);
}
.ew-nav-toggle span:nth-child(1) { top: 13px; }
.ew-nav-toggle span:nth-child(2) { top: 19px; }
.ew-nav-toggle span:nth-child(3) { top: 25px; }
.ew-nav-toggle.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.ew-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.ew-nav-toggle.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
.ew-nav-links { display: flex; align-items: center; gap: 2px; }
.ew-nav-link {
  font-size: 14px; font-weight: 600; color: var(--c-text-soft);
  padding: 9px 14px; border-radius: var(--r-pill);
  transition: all var(--t); white-space: nowrap;
}
.ew-nav-link:hover { background: var(--c-flame-50); color: var(--c-flame-700); }
.ew-nav-link.is-active { background: var(--c-flame-100); color: var(--c-flame-700); }
.ew-nav-search {
  display: flex; align-items: center;
  background: var(--c-flame-50);
  border: 1px solid color-mix(in srgb, var(--c-flame-100) 60%, transparent);
  border-radius: var(--r-pill);
  padding: 4px 4px 4px 16px;
  min-width: 240px; margin-left: auto;
  transition: all var(--t);
}
.ew-nav-search:focus-within {
  background: var(--c-surface);
  border-color: var(--c-flame-500);
  box-shadow: 0 0 0 4px rgba(232, 93, 47, 0.14);
}
.ew-nav-search input {
  border: 0; background: transparent;
  font-family: var(--f-body); font-size: 14px;
  color: var(--c-text); outline: none;
  flex: 1; min-width: 0; padding: 6px 0;
}
.ew-nav-search input::placeholder { color: var(--c-text-muted); }
.ew-nav-search button {
  width: 32px; height: 32px; border: 0;
  background: var(--g-flame); border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; box-shadow: var(--sh-1);
  transition: transform var(--t);
}
.ew-nav-search button:hover { transform: scale(1.06); }
.ew-nav-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.ew-theme-toggle {
  width: 40px; height: 40px;
  border: 1px solid var(--c-line-strong); border-radius: 50%;
  background: var(--c-surface); color: var(--c-text-soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t); flex-shrink: 0;
  position: relative; overflow: hidden;
}
.ew-theme-toggle:hover {
  border-color: var(--c-flame-500); color: var(--c-flame-600);
  transform: rotate(15deg);
}
.ew-theme-toggle svg { width: 18px; height: 18px; transition: opacity var(--t), transform var(--t); position: absolute; }
[data-theme="dark"] .ew-theme-toggle .icon-sun  { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .ew-theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg); }
:root:not([data-theme="dark"]) .ew-theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg); }
:root:not([data-theme="dark"]) .ew-theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }

.ew-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--g-flame);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 700; font-size: 15px;
  color: #fff; border: 2px solid var(--c-surface);
  box-shadow: var(--sh-2); transition: transform var(--t);
}
.ew-avatar:hover { transform: scale(1.07); color: #fff; }

@media (max-width: 1100px) {
  .ew-nav-search { min-width: 180px; }
  .ew-nav-link { padding: 9px 10px; font-size: 13.5px; }
}
@media (max-width: 920px) {
  .ew-nav-toggle { display: block; order: 99; }
  .ew-nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 4px;
    background: var(--c-surface); border-bottom: 1px solid var(--c-line);
    padding: 10px; display: none; box-shadow: var(--sh-3);
  }
  .ew-nav-links.is-open { display: flex; }
  .ew-nav-link { width: 100%; text-align: left; }
  .ew-nav-search { order: 50; min-width: 0; flex: 1; }
}
@media (max-width: 600px) {
  .ew-nav-search { display: none; }
  .ew-brand-name { font-size: 19px; }
  .ew-brand-logo { height: 38px; width: 38px; }
  .ew-nav-cta .ew-btn-ghost { display: none; }
}

/* ---------- Buttons ----------------------------------------------- */
.ew-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-pill);
  font-family: var(--f-body); font-weight: 700; font-size: 14px;
  line-height: 1; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--t); white-space: nowrap;
  position: relative; overflow: hidden;
}
.ew-btn-primary { background: var(--g-flame); color: #fff; box-shadow: var(--sh-flame); }
.ew-btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.ew-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(232, 93, 47, 0.45), 0 4px 12px rgba(180, 20, 20, 0.3); color: #fff; }
.ew-btn-secondary { background: var(--c-royal-500); color: #fff; box-shadow: var(--sh-2); }
.ew-btn-secondary:hover { transform: translateY(-1px); background: var(--c-royal-600); color: #fff; }
.ew-btn-ghost { background: transparent; color: var(--c-text-soft); border-color: var(--c-line-strong); }
.ew-btn-ghost:hover { background: var(--c-flame-50); color: var(--c-flame-700); border-color: var(--c-flame-300); }
.ew-btn-block { width: 100%; }
.ew-btn-lg { padding: 14px 30px; font-size: 15px; }
.ew-btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Forms ------------------------------------------------- */
.ew-input,
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="search"],
textarea, select {
  display: block; width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-family: var(--f-body); font-size: 14.5px;
  color: var(--c-text); transition: all var(--t);
}
.ew-input:focus,
input:focus, textarea:focus, select:focus {
  border-color: var(--c-flame-500);
  box-shadow: 0 0 0 4px rgba(232, 93, 47, 0.12);
  outline: none;
}
.ew-label {
  display: block; font-size: 11.5px; font-weight: 700;
  color: var(--c-text); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 7px;
}
.ew-form-group { margin-bottom: 18px; }
.ew-form-help { font-size: 12.5px; color: var(--c-text-muted); margin-top: 6px; }
.ew-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .ew-form-row { grid-template-columns: 1fr; } }

.ew-alert {
  padding: 12px 16px; border-radius: var(--r-sm);
  font-size: 13.5px; margin-bottom: 16px; border: 1px solid;
}
.ew-alert-success { background: var(--c-success-bg); border-color: rgba(21, 128, 61, 0.3); color: var(--c-success); }
.ew-alert-error { background: var(--c-error-bg); border-color: rgba(185, 28, 28, 0.3); color: var(--c-error); }

/* ---------- Cards ------------------------------------------------- */
.ew-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: 32px; box-shadow: var(--sh-1);
}
.ew-card.is-elevated { box-shadow: var(--sh-2); }
.ew-card.is-tinted { background: linear-gradient(135deg, var(--c-flame-50), var(--c-pink-50)); border-color: var(--c-flame-100); }
.ew-card.is-royal { background: linear-gradient(135deg, var(--c-royal-50), var(--c-flame-50)); border-color: var(--c-royal-100); }

.ew-mini {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r); padding: 24px; transition: all var(--t);
}
.ew-mini:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--c-flame-300); }
.ew-mini-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 22px;
}
.ew-mini-icon-flame { background: var(--c-flame-100); color: var(--c-flame-700); }
.ew-mini-icon-royal { background: var(--c-royal-100); color: var(--c-royal-700); }
.ew-mini-icon-pink { background: var(--c-pink-100); color: var(--c-pink-700); }
.ew-mini h4 { font-family: var(--f-display); font-size: 19px; margin-bottom: 4px; }
.ew-mini p { font-size: 13.5px; color: var(--c-text-soft); line-height: 1.65; }

/* ---------- Eyebrow / pills --------------------------------------- */
.ew-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--c-flame-50); border: 1px solid var(--c-flame-100);
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-flame-700);
}
.ew-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--g-flame);
  box-shadow: 0 0 8px var(--c-flame-500);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.ew-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600;
  background: var(--c-flame-50); color: var(--c-flame-700);
  border: 1px solid var(--c-flame-100);
  text-decoration: none; transition: all var(--t);
}
.ew-pill:hover { background: var(--c-flame-500); color: #fff; border-color: var(--c-flame-500); transform: translateY(-1px); }
.ew-pill.is-royal { background: var(--c-royal-50); color: var(--c-royal-700); border-color: var(--c-royal-100); }
.ew-pill.is-royal:hover { background: var(--c-royal-500); color: #fff; border-color: var(--c-royal-500); }
.ew-pill.is-pink { background: var(--c-pink-50); color: var(--c-pink-700); border-color: var(--c-pink-200); }
.ew-pill.is-pink:hover { background: var(--c-pink-500); color: #fff; border-color: var(--c-pink-500); }

/* ---------- Hero -------------------------------------------------- */
.ew-hero {
  position: relative;
  padding: clamp(56px, 10vw, 110px) 0 clamp(48px, 8vw, 88px);
  text-align: center; overflow: hidden;
}
.ew-hero-inner { max-width: var(--w-narrow); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }
.ew-hero-logo {
  width: clamp(120px, 16vw, 180px); height: auto;
  object-fit: contain;
  margin: 0 auto 28px; display: block;
  filter: drop-shadow(0 12px 40px rgba(232, 93, 47, 0.35)) drop-shadow(0 4px 12px rgba(180, 20, 20, 0.2));
  animation: heroLogoFloat 6s ease-in-out infinite;
}
@keyframes heroLogoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ew-hero h1 { margin: 8px auto 18px; max-width: 16ch; position: relative; }
.ew-hero h1 .accent {
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; position: relative;
}
.ew-hero h1 .accent::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 3px; background: var(--g-flame); border-radius: 2px; opacity: 0.3;
}
.ew-hero p {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--c-text-soft); max-width: 56ch;
  margin: 0 auto 28px; line-height: 1.7;
}
.ew-hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ew-hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--c-line);
}
.ew-hero-stat-value {
  font-family: var(--f-display);
  font-size: 32px; font-weight: 600;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.ew-hero-stat-label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-text-muted); margin-top: 6px;
}
.ew-hero-spark {
  position: absolute; font-family: var(--f-display);
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.5; pointer-events: none;
  animation: sparkle 4s ease-in-out infinite;
}
.ew-hero-spark.s1 { left: 8%; top: 20%; font-size: 28px; animation-delay: 0s; }
.ew-hero-spark.s2 { right: 10%; top: 28%; font-size: 22px; animation-delay: 1.5s; }
.ew-hero-spark.s3 { left: 14%; bottom: 26%; font-size: 18px; animation-delay: 3s; }
.ew-hero-spark.s4 { right: 8%; bottom: 32%; font-size: 24px; animation-delay: 0.8s; }
@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.85); }
  50% { opacity: 0.7; transform: scale(1.1); }
}
@media (max-width: 720px) { .ew-hero-spark { display: none; } }

/* ---------- Section heads ----------------------------------------- */
.ew-section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.ew-section-head .head-text { display: flex; flex-direction: column; gap: 6px; }
.ew-section-head h2 { position: relative; margin: 0; display: inline-block; }
.ew-section-head .head-sub {
  font-size: 14px; color: var(--c-text-muted);
  font-family: var(--f-body); font-weight: 500;
}
.ew-section-head .more-link {
  font-size: 13.5px; font-weight: 700;
  color: var(--c-flame-600);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--c-flame-50); border: 1px solid var(--c-flame-100);
  transition: all var(--t);
}
.ew-section-head .more-link:hover {
  background: var(--c-flame-500); color: #fff;
  border-color: var(--c-flame-500); transform: translateX(4px);
}

/* ---------- Game grid --------------------------------------------- */
.ew-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}
.ew-game-grid.is-large { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.ew-game-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.ew-game-grid.is-tight { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

.ew-card-game {
  position: relative; display: block;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-1); transition: all var(--t);
  text-decoration: none; color: inherit;
}
.ew-card-game:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-3);
  border-color: var(--c-flame-300);
  color: inherit;
}
.ew-card-game-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-surface-2); }
.ew-card-game-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.ew-card-game:hover .ew-card-game-thumb img { transform: scale(1.1); }
.ew-card-game-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 8, 20, 0.7));
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 14px;
  opacity: 0; transition: opacity var(--t);
}
.ew-card-game:hover .ew-card-game-overlay { opacity: 1; }
.ew-card-game-play {
  background: var(--g-flame); color: #fff;
  padding: 8px 18px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700;
  box-shadow: var(--sh-flame);
  display: inline-flex; align-items: center; gap: 6px;
}
.ew-card-game-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--g-flame); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
  display: inline-flex; align-items: center; gap: 4px;
}
.ew-card-game-meta { padding: 12px 14px 14px; }
.ew-card-game-meta h3 {
  font-family: var(--f-body); font-size: 14px; font-weight: 700;
  color: var(--c-text); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0;
}
.ew-card-game-plays {
  display: flex; align-items: center; gap: 4px;
  margin-top: 4px; font-size: 12px;
  color: var(--c-text-muted); font-weight: 500;
}

/* Spotlight — featured editorial card */
.ew-spotlight {
  position: relative; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--sh-2);
  display: grid; grid-template-columns: 1.4fr 1fr;
  min-height: 360px; margin-bottom: 32px;
  text-decoration: none; color: inherit;
  transition: transform var(--t), box-shadow var(--t);
}
.ew-spotlight:hover { transform: translateY(-3px); box-shadow: var(--sh-3); color: inherit; }
.ew-spotlight-image { position: relative; background: var(--c-bg-deep); overflow: hidden; }
.ew-spotlight-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.ew-spotlight:hover .ew-spotlight-image img { transform: scale(1.04); }
.ew-spotlight-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 50%, var(--c-surface));
  pointer-events: none;
}
.ew-spotlight-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.ew-spotlight-body h3 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 42px); font-weight: 600; line-height: 1.1;
  margin: 14px 0 12px; color: var(--c-text);
}
.ew-spotlight-body p {
  font-size: 15px; line-height: 1.7;
  color: var(--c-text-soft); margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ew-spotlight-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
@media (max-width: 880px) {
  .ew-spotlight { grid-template-columns: 1fr; min-height: 0; }
  .ew-spotlight-image { aspect-ratio: 16 / 9; }
  .ew-spotlight-image::after { background: linear-gradient(0deg, var(--c-surface) 0%, transparent 50%); }
  .ew-spotlight-body { padding: 28px; }
}

/* Empty state */
.ew-empty { padding: 60px 24px; text-align: center; color: var(--c-text-muted); }
.ew-empty-icon {
  font-size: 48px; margin-bottom: 12px;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.5;
}
.ew-empty h3 { color: var(--c-text); margin-bottom: 8px; }
.ew-empty p { max-width: 380px; margin: 0 auto; font-size: 14px; }

/* Pagination */
.ew-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; }
.ew-pagination a, .ew-pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  background: var(--c-surface); border: 1px solid var(--c-line);
  color: var(--c-text-soft); transition: all var(--t);
}
.ew-pagination a:hover { background: var(--c-flame-50); color: var(--c-flame-700); border-color: var(--c-flame-300); }
.ew-pagination .is-current { background: var(--g-flame); color: #fff; border-color: transparent; box-shadow: var(--sh-1); }
.ew-pagination .is-disabled { opacity: 0.4; pointer-events: none; }

/* Stats row */
.ew-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ew-stat { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 26px; }
.ew-stat-value {
  font-family: var(--f-display); font-size: 40px; font-weight: 600;
  line-height: 1; color: var(--c-text); margin-bottom: 4px;
}
.ew-stat-label {
  font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--c-text-muted);
}

/* Marquee */
.ew-marquee {
  position: relative; overflow: hidden; padding: 16px 0;
  background: linear-gradient(90deg, var(--c-flame-50), var(--c-pink-50), var(--c-royal-50));
  border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  margin: 24px 0;
}
.ew-marquee-track { display: flex; gap: 28px; animation: marquee 50s linear infinite; white-space: nowrap; }
.ew-marquee:hover .ew-marquee-track { animation-play-state: paused; }
.ew-marquee-item {
  font-family: var(--f-display); font-size: 22px; font-weight: 600;
  color: var(--c-text);
  display: inline-flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.ew-marquee-item::after { content: '✦'; color: var(--c-flame-500); font-size: 16px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Game player */
.ew-play { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.ew-play-stage {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-2); position: relative;
}
.ew-play-frame { aspect-ratio: 16 / 10; width: 100%; background: #000; }
.ew-play-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ew-play-toolbar {
  padding: 16px 20px; border-top: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--c-surface-2);
}
.ew-play-toolbar h1 { font-size: clamp(20px, 2.4vw, 28px); margin: 0; flex: 1; min-width: 200px; }
.ew-play-side { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 980px) { .ew-play { grid-template-columns: 1fr; } }
.ew-game-info {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: 28px; margin-top: 24px;
}
.ew-game-info h2 { margin-bottom: 12px; }
.ew-game-info p, .ew-game-info li { color: var(--c-text-soft); line-height: 1.75; margin-bottom: 10px; }

/* Category card */
.ew-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ew-cat-card {
  position: relative; display: block;
  aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--c-flame-100), var(--c-royal-100));
  border: 1px solid var(--c-line); transition: all var(--t);
  text-decoration: none; color: var(--c-text);
}
.ew-cat-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); color: var(--c-text); border-color: var(--c-flame-300); }
.ew-cat-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.5;
  transition: opacity var(--t), transform var(--t-slow);
}
.ew-cat-card:hover img { opacity: 0.7; transform: scale(1.05); }
.ew-cat-card-content {
  position: absolute; inset: 0; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--c-bg) 95%, transparent));
}
.ew-cat-card h3 { font-family: var(--f-display); font-size: 22px; font-weight: 600; margin: 0; color: var(--c-text); }
.ew-cat-card-count {
  font-size: 12.5px; font-weight: 700;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em;
}

/* Tables */
.ew-table { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--r); overflow: hidden; border: 1px solid var(--c-line); }
.ew-table thead { background: var(--c-flame-50); }
.ew-table th {
  text-align: left; font-family: var(--f-body);
  font-weight: 700; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--c-text); padding: 14px 16px;
}
.ew-table td { padding: 14px 16px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-text-soft); }
.ew-table tr:hover td { background: var(--c-flame-50); }

/* Footer */
.ew-foot { background: var(--c-surface); border-top: 1px solid var(--c-line); padding: 44px 0 24px; position: relative; }
.ew-foot::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--g-flame); opacity: 0.6; }
.ew-foot-inner {
  max-width: var(--w-wide); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 36px;
}
.ew-foot-brand img { height: 56px; width: auto; margin-bottom: 14px; object-fit: contain; }
.ew-foot-brand p { font-size: 13.5px; line-height: 1.7; color: var(--c-text-muted); max-width: 360px; margin-bottom: 18px; }
.ew-foot-sister {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--g-flame-soft);
  border: 1px solid var(--c-flame-100); border-radius: var(--r-pill);
  color: var(--c-text); font-weight: 600; font-size: 12.5px;
  transition: all var(--t);
}
.ew-foot-sister:hover { background: var(--c-flame-500); color: #fff; border-color: var(--c-flame-500); transform: translateY(-1px); }
.ew-foot-col h4 { font-family: var(--f-display); font-size: 18px; font-weight: 600; color: var(--c-text); margin-bottom: 14px; }
.ew-foot-col a { display: block; padding: 5px 0; font-size: 13.5px; color: var(--c-text-soft); }
.ew-foot-col a:hover { color: var(--c-flame-600); }
.ew-foot-bottom {
  max-width: var(--w-wide); margin: 0 auto;
  padding: 22px var(--pad) 0;
  border-top: 1px solid var(--c-line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-size: 12.5px; color: var(--c-text-muted);
}
.ew-foot-bottom-links a { color: var(--c-text-soft); }
.ew-foot-bottom-links a:hover { color: var(--c-flame-600); }
@media (max-width: 768px) { .ew-foot-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ew-foot-inner { grid-template-columns: 1fr; } .ew-foot-bottom { flex-direction: column; text-align: center; } }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.ew-card-game, .ew-mini, .ew-cat-card { animation: fadeUp 420ms ease both; }
[data-reveal] { opacity: 0; transform: translateY(14px); transition: all 540ms cubic-bezier(.4,0,.2,1); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ew-marquee-track, .ew-reel-track { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .ew-stagger > * { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ==========================================================================
 * EDITORIAL CLASSIC styles — masthead, drop caps, ornaments, formal layouts
 * ========================================================================== */

/* Masthead (replaces the centered "hero banner") */
.ew-masthead {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 7vw, 64px);
  max-width: 880px;
  margin: 0 auto;
}
.ew-masthead-flourish {
  font-family: var(--f-display);
  font-size: 22px;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.4em;
  margin-bottom: 18px;
  display: block;
}
.ew-masthead-title {
  font-family: var(--f-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--c-text);
}
.ew-masthead-title em {
  font-style: italic;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ew-masthead-sub {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--c-text-muted);
  margin: 0;
}
.ew-masthead-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 28px auto 32px;
  max-width: 480px;
}
.ew-masthead-rule::before,
.ew-masthead-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line-strong), var(--c-line-strong), transparent);
}
.ew-masthead-rule-symbol {
  font-family: var(--f-display);
  font-size: 18px;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  flex-shrink: 0;
}
.ew-masthead-lede {
  font-family: var(--f-display);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.55;
  color: var(--c-text-soft);
  max-width: 60ch;
  margin: 0 auto;
  font-weight: 500;
}
.ew-masthead-lede::first-letter {
  font-family: var(--f-display);
  font-size: 4.4em;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.08em -0.05em -0.02em;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ew-masthead-cta {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Editorial section heads with Roman-numeral folio */
.ew-folio {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-line-strong);
}
.ew-folio-num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  color: var(--c-flame-600);
  flex-shrink: 0;
  line-height: 1;
  min-width: 56px;
}
.ew-folio-title {
  flex: 1;
}
.ew-folio-title h2 {
  font-family: var(--f-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.ew-folio-title .head-sub {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 16px;
  color: var(--c-text-muted);
}
.ew-folio-more {
  font-family: var(--f-body);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-flame-700);
  border-bottom: 1px solid var(--c-flame-300);
  padding-bottom: 2px;
  transition: all var(--t);
  flex-shrink: 0;
  align-self: end;
}
.ew-folio-more:hover {
  color: var(--c-flame-800);
  border-color: var(--c-flame-700);
}
@media (max-width: 600px) {
  .ew-folio { flex-wrap: wrap; }
  .ew-folio-num { min-width: 0; }
  .ew-folio-more { width: 100%; margin-top: 4px; }
}

/* Centered ornamental rule between sections */
.ew-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  margin: 48px auto;
  max-width: 360px;
  color: var(--c-text-muted);
}
.ew-ornament::before, .ew-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-line-strong);
}
.ew-ornament-symbol {
  font-family: var(--f-display);
  font-size: 16px;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Catalogue list (categories as table-of-contents) */
.ew-catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--c-line);
}
.ew-catalogue-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--f-display);
  text-decoration: none;
  color: var(--c-text);
  transition: all var(--t);
  position: relative;
}
.ew-catalogue-item:hover {
  color: var(--c-flame-700);
  padding-left: 12px;
}
.ew-catalogue-item-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.ew-catalogue-item-leader {
  flex: 1;
  border-bottom: 1px dotted var(--c-line-strong);
  margin: 0 12px 4px;
  transform: translateY(-3px);
}
.ew-catalogue-item-count {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
}

/* Formal dashboard styles (replaces colorful one) */
.ew-ledger {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
}
.ew-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 24px;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
}
.ew-ledger-row:last-child { border-bottom: 0; }
.ew-ledger-label {
  font-family: var(--f-body);
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
}
.ew-ledger-value {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
}
.ew-ledger-value.is-mono {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
}
.ew-ledger-value.is-flame {
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Dashboard tab navigation (formal, restrained) */
.ew-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-line-strong);
  margin-bottom: 28px;
  overflow-x: auto;
}
.ew-tab {
  padding: 12px 22px;
  font-family: var(--f-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--t);
}
.ew-tab:hover { color: var(--c-text); }
.ew-tab.is-active {
  color: var(--c-flame-700);
  border-bottom-color: var(--c-flame-500);
}

/* Stat row (refined, ledger-style) */
.ew-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: var(--c-surface);
  overflow: hidden;
}
.ew-stat-cell {
  padding: 22px 24px;
  border-right: 1px solid var(--c-line);
}
.ew-stat-cell:last-child { border-right: 0; }
.ew-stat-cell-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.ew-stat-cell-value {
  font-family: var(--f-display);
  font-size: 32px; font-weight: 600;
  line-height: 1;
  color: var(--c-text);
}
.ew-stat-cell-value.is-flame {
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 600px) {
  .ew-stat-row { grid-template-columns: 1fr 1fr; }
  .ew-stat-cell { border-right: 0; border-bottom: 1px solid var(--c-line); }
  .ew-stat-cell:nth-child(odd) { border-right: 1px solid var(--c-line); }
}

/* Editorial blockquote — for taglines, pull quotes */
.ew-pullquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.45;
  color: var(--c-text);
  text-align: center;
  max-width: 60ch;
  margin: 48px auto;
  padding: 0 var(--pad);
  position: relative;
}
.ew-pullquote::before, .ew-pullquote::after {
  content: '"';
  font-family: var(--f-display);
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 1.6em;
  line-height: 0;
  vertical-align: -0.3em;
}
.ew-pullquote::before { margin-right: 0.1em; }
.ew-pullquote::after { margin-left: 0.1em; }

/* ==========================================================================
 * REFINEMENTS v3.1 — cleaner, more modern-classic
 * ========================================================================== */

/* Refined section header — replaces the busy Roman-numeral folio */
.ew-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 20px;
  position: relative;
}
.ew-section-title::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--c-line-strong) 0%,
    var(--c-line-strong) 30%,
    transparent 100%);
}
.ew-section-title .label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ew-section-title .num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-flame-600);
  letter-spacing: 0.06em;
}
.ew-section-title h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.012em;
  line-height: 1.1;
}
.ew-section-title .sub {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 16px;
  color: var(--c-text-muted);
  margin: 4px 0 0;
}
.ew-section-title .more {
  font-family: var(--f-body);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-flame-700);
  border-bottom: 1px solid var(--c-flame-300);
  padding-bottom: 3px;
  transition: all var(--t);
  flex-shrink: 0;
}
.ew-section-title .more:hover {
  color: var(--c-flame-800);
  border-color: var(--c-flame-700);
  letter-spacing: 0.18em;
}

/* Category chips — refined alternative to dotted-leader catalogue */
.ew-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ew-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--c-text);
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}
.ew-chip::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--g-flame);
  opacity: 0;
  transition: opacity var(--t);
}
.ew-chip:hover {
  background: var(--c-surface-2);
  border-color: var(--c-flame-300);
  color: var(--c-text);
  transform: translateX(4px);
  box-shadow: var(--sh-2);
}
.ew-chip:hover::before { opacity: 1; }
.ew-chip-name {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.ew-chip-count {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--c-flame-50);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-flame-100);
}

/* Stagger animation — slight, elegant, only on first appearance */
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ew-stagger > * {
  animation: staggerIn 600ms cubic-bezier(.2,.65,.3,1) both;
}
.ew-stagger > *:nth-child(1)  { animation-delay: 30ms;  }
.ew-stagger > *:nth-child(2)  { animation-delay: 80ms;  }
.ew-stagger > *:nth-child(3)  { animation-delay: 130ms; }
.ew-stagger > *:nth-child(4)  { animation-delay: 180ms; }
.ew-stagger > *:nth-child(5)  { animation-delay: 230ms; }
.ew-stagger > *:nth-child(6)  { animation-delay: 280ms; }
.ew-stagger > *:nth-child(7)  { animation-delay: 330ms; }
.ew-stagger > *:nth-child(8)  { animation-delay: 380ms; }
.ew-stagger > *:nth-child(n+9) { animation-delay: 430ms; }

/* Refined masthead — drop "Volume MMXXVI", cleaner spacing */
.ew-masthead {
  text-align: center;
  padding: clamp(48px, 8vw, 88px) 0 clamp(36px, 6vw, 56px);
  max-width: 880px;
  margin: 0 auto;
}
.ew-masthead .ew-eyebrow { margin-bottom: 22px; }
.ew-masthead h1.ew-masthead-title {
  font-size: clamp(44px, 7.5vw, 88px);
  font-weight: 600;
  line-height: 0.96;
  margin: 0 0 16px;
  letter-spacing: -0.022em;
}
.ew-masthead-sub {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--c-text-muted);
  margin: 0 0 28px;
  letter-spacing: 0.005em;
}
.ew-masthead-divider {
  width: 60px;
  height: 2px;
  background: var(--g-flame);
  border-radius: 2px;
  margin: 0 auto 28px;
  opacity: 0.7;
}
.ew-masthead-lede-wrap {
  max-width: 60ch;
  margin: 0 auto;
}
.ew-masthead-lede-wrap p {
  font-family: var(--f-display);
  font-size: clamp(17px, 1.85vw, 20px);
  line-height: 1.6;
  color: var(--c-text-soft);
  margin: 0;
  font-weight: 500;
}
.ew-masthead-lede-wrap p::first-letter {
  font-family: var(--f-display);
  font-size: 4em;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin: 0.06em 0.10em -0.05em -0.02em;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ew-masthead-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* Hero logo — refined subtle float, no rounded box */
.ew-hero-logo {
  width: clamp(96px, 12vw, 132px);
  height: auto;
  margin: 0 auto 24px;
  display: block;
  filter: drop-shadow(0 14px 36px rgba(232, 93, 47, 0.32))
          drop-shadow(0 4px 14px rgba(180, 20, 20, 0.2));
  animation: heroLogoFloat 7s ease-in-out infinite;
}

/* Subtle link-underline animation for CTAs */
.ew-link-underline {
  position: relative;
  font-weight: 600;
  color: var(--c-flame-700);
  padding-bottom: 2px;
  text-decoration: none;
}
.ew-link-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0; right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(.2,.65,.3,1);
}
.ew-link-underline:hover::after {
  transform: scaleX(0);
  transform-origin: right;
}
.ew-link-underline::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0; right: 0;
  height: 1px;
  background: var(--c-flame-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms cubic-bezier(.2,.65,.3,1) 60ms;
}
.ew-link-underline:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Refined card-game hover with staggered shadow */
.ew-card-game {
  transition: transform 280ms cubic-bezier(.2,.65,.3,1),
              box-shadow 280ms cubic-bezier(.2,.65,.3,1),
              border-color 200ms;
}
.ew-card-game:hover {
  transform: translateY(-5px);
}

/* ==========================================================================
 * v4.1 — TAPE REELS, IRREGULAR WALL, ICON-BUTTON SEARCH
 * ========================================================================== */

/* Tape reel — game cards scrolling automatically, like a film strip */
.ew-reel {
  position: relative;
  overflow: hidden;
  padding: 14px 0;
  /* fade edges so cards appear/disappear smoothly at the sides */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.ew-reel-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: reelScroll 75s linear infinite;
  will-change: transform;
}
.ew-reel.is-reverse .ew-reel-track { animation-direction: reverse; }
.ew-reel:hover .ew-reel-track { animation-play-state: paused; }

.ew-reel-card {
  flex-shrink: 0;
  width: 180px;
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-1);
  text-decoration: none;
  color: inherit;
  transition: transform 240ms cubic-bezier(.2,.65,.3,1),
              box-shadow 240ms cubic-bezier(.2,.65,.3,1),
              border-color 200ms;
  position: relative;
}
.ew-reel-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--sh-3);
  border-color: var(--c-flame-300);
  z-index: 2;
  color: inherit;
}
.ew-reel-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-surface-2);
}
.ew-reel-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.ew-reel-card:hover .ew-reel-thumb img { transform: scale(1.08); }
.ew-reel-name {
  padding: 9px 12px 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--c-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
@keyframes reelScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Irregular game wall — varied sizes, dense packing */
.ew-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 170px;
  grid-auto-flow: dense;
  gap: 10px;
}
.ew-wall-item {
  position: relative;
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-1);
  text-decoration: none;
  color: inherit;
  transition: transform 240ms cubic-bezier(.2,.65,.3,1),
              box-shadow 240ms cubic-bezier(.2,.65,.3,1),
              border-color 200ms;
}
.ew-wall-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: var(--c-flame-300);
  z-index: 3;
  color: inherit;
}
.ew-wall-item.is-2x { grid-column: span 2; grid-row: span 2; }
.ew-wall-item.is-2w { grid-column: span 2; }
.ew-wall-item.is-2h { grid-row: span 2; }
@media (max-width: 600px) {
  .ew-wall-item.is-2x, .ew-wall-item.is-2w, .ew-wall-item.is-2h {
    grid-column: auto; grid-row: auto;
  }
  .ew-wall-item.is-2x { grid-column: span 2; }
}

.ew-wall-item-thumb {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}
.ew-wall-item-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.ew-wall-item:hover .ew-wall-item-thumb img { transform: scale(1.06); }
.ew-wall-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 8, 20, 0.85));
  pointer-events: none;
}
.ew-wall-item-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ew-wall-item.is-2x .ew-wall-item-name { font-size: 17px; }
.ew-wall-item-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--g-flame);
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}

/* Mood pills — quick category filters at top of wall */
.ew-mood-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 var(--pad);
  margin-bottom: 32px;
}
.ew-mood-pill {
  font-family: var(--f-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
  color: var(--c-text-soft);
  text-decoration: none;
  transition: all var(--t);
  white-space: nowrap;
}
.ew-mood-pill:hover {
  background: var(--c-flame-50);
  border-color: var(--c-flame-300);
  color: var(--c-flame-700);
  transform: translateY(-1px);
}
.ew-mood-pill.is-active {
  background: var(--g-flame);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-1);
}

/* Compact hero — replaces the masthead, makes room for tape reels */
.ew-hero-compact {
  text-align: center;
  padding: clamp(36px, 5vw, 56px) 0 clamp(24px, 3vw, 36px);
  max-width: 720px;
  margin: 0 auto;
}
.ew-hero-compact h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 6.5vw, 72px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 18px 0 14px;
}
.ew-hero-compact h1 em {
  font-style: italic;
  background: var(--g-flame);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ew-hero-compact p {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--c-text-muted);
  margin: 0;
}

/* Replace heavyweight nav search input with a small icon button */
.ew-nav-search-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  color: var(--c-text-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
  text-decoration: none;
  margin-left: auto;
}
.ew-nav-search-icon:hover {
  border-color: var(--c-flame-500);
  color: var(--c-flame-600);
  transform: scale(1.05);
}
.ew-nav-search-icon svg { width: 18px; height: 18px; }

/* Theater mode for game player — focus on the game */
.ew-theater {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  transition: grid-template-columns var(--t-slow);
}
.ew-theater.is-focus { grid-template-columns: 1fr 0px; }
.ew-theater.is-focus .ew-theater-side { display: none; }
@media (max-width: 980px) {
  .ew-theater { grid-template-columns: 1fr; }
}
.ew-theater-stage {
  background: #050308;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-3);
  position: relative;
}
.ew-theater-frame {
  aspect-ratio: 16 / 10;
  background: #000;
}
.ew-theater-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ew-theater-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-line);
  flex-wrap: wrap;
}
.ew-theater-bar h1 {
  font-size: clamp(18px, 2vw, 24px);
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.ew-theater-side { display: flex; flex-direction: column; gap: 12px; }
.ew-theater-side h4 {
  font-family: var(--f-display);
  font-size: 16px;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}

/* ==========================================================================
 * v5.1 — EARNWAY LOADING OVERLAY (covers third-party splash on iframe load)
 * ========================================================================== */
.ew-theater-frame {
  position: relative;
}
.ew-game-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0E0814 0%, #1A1325 50%, #0E0814 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  z-index: 5;
  pointer-events: auto;
  transition: opacity 800ms ease;
  overflow: hidden;
}
/* Decorative glow behind logo */
.ew-game-overlay::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,93,47,0.35), transparent 65%);
  z-index: 0;
  animation: overlayGlow 4s ease-in-out infinite;
}
@keyframes overlayGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.15); }
}
.ew-game-overlay-logo {
  width: clamp(72px, 12vw, 110px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(232, 93, 47, 0.6));
  animation: overlayLogoBeat 2.4s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes overlayLogoBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.ew-game-overlay-text {
  font-family: var(--f-display);
  font-size: clamp(16px, 2vw, 22px);
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}
.ew-game-overlay-text .dots {
  display: inline-block;
  width: 28px;
  text-align: left;
}
.ew-game-overlay-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(232, 93, 47, 0.2);
  border-top-color: var(--c-flame-500);
  border-right-color: var(--c-flame-600);
  animation: overlaySpin 800ms linear infinite;
  position: relative;
  z-index: 1;
}
@keyframes overlaySpin { to { transform: rotate(360deg); } }
.ew-game-overlay.is-fading { opacity: 0; }
.ew-game-overlay.is-gone   { display: none; }

/* Click-to-start poster (alternative entry point) */
.ew-game-poster {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 400ms ease;
}
.ew-game-poster img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(2px) saturate(0.95);
  transition: transform 600ms ease, opacity var(--t);
}
.ew-game-poster:hover img { opacity: 0.7; transform: scale(1.04); }
.ew-game-poster::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(14, 8, 20, 0.9));
}
.ew-game-poster-play {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.ew-game-poster-button {
  width: clamp(80px, 12vw, 110px);
  height: clamp(80px, 12vw, 110px);
  border-radius: 50%;
  background: var(--g-flame);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  box-shadow: 0 10px 60px rgba(232, 93, 47, 0.6),
              0 0 0 0 rgba(232, 93, 47, 0.5);
  animation: posterPulse 1.8s ease-out infinite;
  transition: transform 240ms cubic-bezier(.2,.65,.3,1);
}
.ew-game-poster:hover .ew-game-poster-button {
  transform: scale(1.08);
}
@keyframes posterPulse {
  0% { box-shadow: 0 10px 60px rgba(232,93,47,0.6), 0 0 0 0 rgba(232,93,47,0.55); }
  70% { box-shadow: 0 10px 60px rgba(232,93,47,0.6), 0 0 0 24px rgba(232,93,47,0); }
  100% { box-shadow: 0 10px 60px rgba(232,93,47,0.6), 0 0 0 0 rgba(232,93,47,0); }
}
.ew-game-poster-label {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 26px);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  letter-spacing: 0.02em;
}
.ew-game-poster.is-launched { opacity: 0; pointer-events: none; }
