/* ==========================================================================
   Emely Games — design system & theme styles
   blogelemy.com
   --------------------------------------------------------------------------
   1. Fonts        2. Tokens       3. Base          4. Layout
   5. Header       6. Search       7. Chips/rail    8. Buttons
   9. Cards       10. Grids       11. Home         12. Categories
  13. Game page   14. Player      15. Content/FAQ  16. Footer
  17. Ads         18. Forms/misc  19. Motion       20. Responsive
   ========================================================================== */

/* 1. Fonts (self-hosted, SIL OFL — see /fonts) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); }

/* 2. Tokens — dark ("Midnight Arcade") is the default */
:root {
  color-scheme: dark;

  /* palette */
  --eg-coral: #FF4F7B;
  --eg-violet: #8B5CFF;
  --eg-orchid: #B04BFF;
  --eg-indigo: #5B6CFF;
  --eg-sky: #4FD8FF;
  --eg-volt: #D7FF3F;
  --eg-amber: #FFB547;
  --eg-mint: #3DFFC5;

  /* surfaces */
  --eg-bg: #0E0B1F;
  --eg-bg-2: #120E27;
  --eg-surface: #1A1533;
  --eg-surface-2: #231C44;
  --eg-surface-3: #2D2556;
  --eg-line: rgba(255, 255, 255, .08);
  --eg-line-2: rgba(255, 255, 255, .14);
  --eg-header: rgba(14, 11, 31, .84);

  /* text */
  --eg-text: #F4F1FF;
  --eg-text-2: #BDB6DA;
  --eg-text-3: #918AB3;

  /* semantic */
  --eg-accent: var(--eg-coral);
  --eg-accent-hover: #FF6B90;
  --eg-on-accent: #1B0712;
  --eg-focus: var(--eg-volt);
  --eg-brand-gradient: linear-gradient(135deg, #FF4F7B 0%, #B04BFF 55%, #5B6CFF 100%);
  --eg-scrim: linear-gradient(180deg, rgba(10, 7, 24, 0) 40%, rgba(10, 7, 24, .88) 100%);

  /* type */
  --eg-font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --eg-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --eg-fs-xs: .75rem;
  --eg-fs-sm: .875rem;
  --eg-fs-md: 1rem;
  --eg-fs-lg: 1.125rem;
  --eg-fs-xl: clamp(1.15rem, 1rem + .5vw, 1.4rem);
  --eg-fs-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --eg-fs-hero: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem);

  /* spacing (4px scale) */
  --eg-s1: 4px; --eg-s2: 8px; --eg-s3: 12px; --eg-s4: 16px; --eg-s5: 20px;
  --eg-s6: 24px; --eg-s8: 32px; --eg-s10: 40px; --eg-s12: 48px; --eg-s16: 64px;

  /* shape & depth */
  --eg-r-sm: 10px;
  --eg-r-md: 14px;
  --eg-r-lg: 20px;
  --eg-r-xl: 28px;
  --eg-r-pill: 999px;
  --eg-shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .18);
  --eg-shadow-2: 0 10px 30px -8px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --eg-glow: 0 12px 36px -10px rgba(255, 79, 123, .55);

  /* layout */
  --eg-max: 1680px;
  --eg-gutter: clamp(12px, 2.6vw, 32px);
  --eg-header-h: 64px;
  --eg-card-min: 158px;

  /* motion */
  --eg-ease: cubic-bezier(.2, .8, .2, 1);
  --eg-fast: 160ms;
  --eg-med: 260ms;
}

/* Light theme ("Daylight") */
:root[data-theme="light"] {
  color-scheme: light;
  --eg-bg: #F6F4FD;
  --eg-bg-2: #EFECFA;
  --eg-surface: #FFFFFF;
  --eg-surface-2: #F1EEFB;
  --eg-surface-3: #E6E1F7;
  --eg-line: rgba(23, 19, 46, .09);
  --eg-line-2: rgba(23, 19, 46, .16);
  --eg-header: rgba(255, 255, 255, .86);
  --eg-text: #17132E;
  --eg-text-2: #4A4468;
  --eg-text-3: #686283;
  --eg-accent: #D92A58;
  --eg-accent-hover: #C21F4C;
  --eg-on-accent: #FFFFFF;
  --eg-focus: #5B3BFF;
  --eg-shadow-1: 0 1px 2px rgba(23, 19, 46, .06), 0 4px 14px rgba(23, 19, 46, .07);
  --eg-shadow-2: 0 14px 34px -12px rgba(23, 19, 46, .28), 0 2px 6px rgba(23, 19, 46, .06);
  --eg-glow: 0 12px 30px -12px rgba(217, 42, 88, .5);
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--eg-header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--eg-bg);
  color: var(--eg-text);
  font-family: var(--eg-font-body);
  font-size: var(--eg-fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before { /* ambient brand glow behind the top of every page */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  background:
    radial-gradient(600px 320px at 85% -60px, rgba(176, 75, 255, .22), transparent 70%),
    radial-gradient(520px 280px at 8% 0, rgba(255, 79, 123, .14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="light"] body::before { opacity: .55; }
img, svg, iframe { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--eg-font-display); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--eg-focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--eg-accent); color: var(--eg-on-accent); }
.eg-ico { width: 1.25em; height: 1.25em; flex: none; }
.eg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eg-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--eg-r-sm); background: var(--eg-accent); color: var(--eg-on-accent); font-weight: 700; }
.eg-skip:focus { top: 10px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* 4. Layout */
.eg-wrap { position: relative; width: 100%; max-width: var(--eg-max); margin-inline: auto; padding-inline: var(--eg-gutter); }
.eg-main { position: relative; min-height: 60vh; padding-bottom: var(--eg-s16); }
.eg-section { margin-top: clamp(28px, 4vw, 48px); }
.eg-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--eg-s4); margin-bottom: var(--eg-s4); }
.eg-section__title { display: flex; align-items: center; gap: 10px; font-size: var(--eg-fs-xl); font-weight: 800; }
.eg-section__icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--eg-surface-2); color: var(--eg-accent); box-shadow: inset 0 0 0 1px var(--eg-line); }
.eg-section__icon .eg-ico { width: 19px; height: 19px; }
.eg-section__sub { color: var(--eg-text-3); font-size: var(--eg-fs-sm); margin-top: 2px; }
.eg-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--eg-fs-sm); color: var(--eg-text-2); padding: 8px 12px; border-radius: var(--eg-r-pill); transition: background var(--eg-fast), color var(--eg-fast); white-space: nowrap; }
.eg-link:hover { background: var(--eg-surface-2); color: var(--eg-text); }

/* 5. Header */
.eg-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--eg-header);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--eg-line);
}
.eg-header__bar { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); height: var(--eg-header-h); }
.eg-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; border-radius: 12px; }
.eg-brand__mark { width: 38px; height: 38px; flex: none; transition: transform var(--eg-med) var(--eg-ease); }
.eg-brand:hover .eg-brand__mark { transform: rotate(-8deg) scale(1.05); }
.eg-brand__word { font-family: var(--eg-font-display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.eg-brand__word span { color: var(--eg-accent); font-weight: 600; margin-left: 3px; }
.eg-header__search { flex: 1 1 auto; max-width: 620px; margin-inline: auto; }
.eg-header__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.eg-iconbtn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  color: var(--eg-text-2);
  transition: background var(--eg-fast), color var(--eg-fast), transform var(--eg-fast);
}
.eg-iconbtn:hover { background: var(--eg-surface-2); color: var(--eg-text); }
.eg-iconbtn:active { transform: scale(.94); }
.eg-iconbtn .eg-ico { width: 22px; height: 22px; }
.eg-iconbtn--search { display: none; }
.eg-theme-toggle .eg-ico--sun { display: none; }
:root[data-theme="light"] .eg-theme-toggle .eg-ico--sun { display: block; }
:root[data-theme="light"] .eg-theme-toggle .eg-ico--moon { display: none; }

/* category navigation strip */
.eg-catnav { border-top: 1px solid var(--eg-line); }
.eg-catnav__track {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0;
  scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%);
  padding-inline: 4px;
}
.eg-catnav__track::-webkit-scrollbar { display: none; }

/* 6. Search */
.eg-search { position: relative; display: flex; align-items: center; width: 100%; }
.eg-search__icon { position: absolute; left: 16px; color: var(--eg-text-3); pointer-events: none; display: grid; }
.eg-search__input {
  width: 100%; height: 46px; padding: 0 48px 0 46px;
  border-radius: var(--eg-r-pill);
  border: 1px solid var(--eg-line-2);
  background: var(--eg-surface);
  color: var(--eg-text);
  font-size: var(--eg-fs-md); font-weight: 500;
  outline: none;
  transition: border-color var(--eg-fast), box-shadow var(--eg-fast), background var(--eg-fast);
  -webkit-appearance: none; appearance: none;
}
.eg-search__input::placeholder { color: var(--eg-text-3); }
.eg-search__input:focus { border-color: var(--eg-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--eg-accent) 22%, transparent); }
.eg-search__input::-webkit-search-cancel-button { display: none; }
.eg-search__clear { position: absolute; right: 6px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--eg-text-3); }
.eg-search__clear:hover { background: var(--eg-surface-2); color: var(--eg-text); }
.eg-search--hero .eg-search__input { height: 58px; font-size: var(--eg-fs-lg); padding-left: 54px; background: var(--eg-surface); box-shadow: var(--eg-shadow-2); }
.eg-search--hero .eg-search__icon { left: 20px; }
.eg-search--hero .eg-search__icon .eg-ico { width: 22px; height: 22px; }
.eg-search--hero .eg-search__clear { right: 10px; }

.eg-search-panel {
  position: fixed; z-index: 45;
  top: var(--eg-panel-top, var(--eg-header-h)); left: 0; right: 0;
  max-height: calc(100vh - var(--eg-panel-top, var(--eg-header-h)));
  max-height: calc(100dvh - var(--eg-panel-top, var(--eg-header-h)));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--eg-bg-2);
  border-bottom: 1px solid var(--eg-line);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  padding: var(--eg-s5) 0 var(--eg-s8);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--eg-med) var(--eg-ease), transform var(--eg-med) var(--eg-ease), visibility 0s linear var(--eg-med);
}
.eg-search-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.eg-search-panel__mobile { display: none; gap: 8px; align-items: center; margin-bottom: var(--eg-s4); }
.eg-search-panel__status { color: var(--eg-text-2); font-size: var(--eg-fs-sm); font-weight: 600; margin-bottom: var(--eg-s3); min-height: 1.4em; }
.eg-search-panel__empty { padding: var(--eg-s5); border-radius: var(--eg-r-lg); background: var(--eg-surface); border: 1px dashed var(--eg-line-2); margin-bottom: var(--eg-s5); }
.eg-search-panel__empty h3 { font-size: var(--eg-fs-lg); margin-bottom: 4px; }
.eg-search-panel__empty p { color: var(--eg-text-2); font-size: var(--eg-fs-sm); }
.eg-search-panel h3.eg-search-panel__label { font-size: var(--eg-fs-sm); text-transform: uppercase; letter-spacing: .08em; color: var(--eg-text-3); margin: var(--eg-s5) 0 var(--eg-s3); font-family: var(--eg-font-body); font-weight: 700; }
.eg-search-panel .eg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-search-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6, 4, 16, .55); opacity: 0; visibility: hidden; transition: opacity var(--eg-med), visibility 0s linear var(--eg-med); }
.eg-search-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
body.eg-no-scroll { overflow: hidden; }

/* 7. Chips */
.eg-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 38px; padding: 0 14px 0 10px;
  border-radius: var(--eg-r-pill);
  background: var(--eg-surface);
  box-shadow: inset 0 0 0 1px var(--eg-line);
  color: var(--eg-text-2);
  font-weight: 700; font-size: var(--eg-fs-sm); white-space: nowrap;
  transition: background var(--eg-fast), color var(--eg-fast), box-shadow var(--eg-fast), transform var(--eg-fast);
}
.eg-chip__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--eg-surface-2); color: var(--eg-accent); }
.eg-chip__icon .eg-ico { width: 16px; height: 16px; }
.eg-chip:hover { color: var(--eg-text); background: var(--eg-surface-2); box-shadow: inset 0 0 0 1px var(--eg-line-2); }
.eg-chip:active { transform: scale(.97); }
.eg-chip.is-active { background: var(--eg-accent); color: var(--eg-on-accent); box-shadow: none; }
.eg-chip.is-active .eg-chip__icon { background: rgba(0, 0, 0, .14); color: inherit; }
.eg-chip--home .eg-chip__icon { background: var(--eg-brand-gradient); color: #fff; }

/* 8. Buttons */
.eg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: var(--eg-r-pill);
  font-weight: 700; font-size: var(--eg-fs-md);
  transition: background var(--eg-fast), transform var(--eg-fast), box-shadow var(--eg-fast), color var(--eg-fast);
  white-space: nowrap;
}
.eg-btn:active { transform: scale(.97); }
.eg-btn--primary { background: var(--eg-accent); color: var(--eg-on-accent); box-shadow: var(--eg-glow); }
.eg-btn--primary:hover { background: var(--eg-accent-hover); }
.eg-btn--ghost { background: var(--eg-surface); color: var(--eg-text); box-shadow: inset 0 0 0 1px var(--eg-line-2); }
.eg-btn--ghost:hover { background: var(--eg-surface-2); }
.eg-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* 9. Cards */
.eg-card { position: relative; min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 150px; }
.eg-card__link {
  position: relative; display: block; height: 100%;
  border-radius: var(--eg-r-md);
  overflow: hidden;
  background: var(--eg-surface-2);
  box-shadow: var(--eg-shadow-1);
  transform: translateZ(0);
  transition: transform var(--eg-med) var(--eg-ease), box-shadow var(--eg-med) var(--eg-ease);
  isolation: isolate;
}
.eg-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, var(--eg-surface-2), var(--eg-surface-3)); }
.eg-card__media img { width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; transition: transform var(--eg-med) var(--eg-ease), filter var(--eg-med); }
.eg-card__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 26px 10px 9px;
  background: var(--eg-scrim);
  color: #fff;
  z-index: 1;
}
.eg-card__title { font-weight: 700; font-size: .84rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.eg-card__cat { font-size: var(--eg-fs-xs); color: rgba(255, 255, 255, .78); font-weight: 600; text-transform: capitalize; }
.eg-card__badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 3px 9px; border-radius: var(--eg-r-pill);
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--eg-volt); color: #16121F;
}
.eg-card__badge--featured { background: var(--eg-brand-gradient); color: #fff; }
.eg-card__badge--hot { background: var(--eg-amber); color: #1C1205; }
.eg-card__play { display: none; }
.eg-card__link::after { /* focus/hover ring */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--eg-accent);
  transition: box-shadow var(--eg-fast);
  z-index: 3; pointer-events: none;
}
@media (hover: hover) {
  .eg-card__link:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--eg-shadow-2); z-index: 4; }
  .eg-card__link:hover img { transform: scale(1.06); }
  .eg-card__link:hover::after { box-shadow: inset 0 0 0 3px var(--eg-accent); }
}
.eg-card__link:focus-visible { outline: none; }
.eg-card__link:focus-visible::after { box-shadow: inset 0 0 0 3px var(--eg-focus); }

/* large tiles */
.eg-card--lg, .eg-card--md, .eg-card--hero { content-visibility: visible; }
.eg-card--lg .eg-card__link, .eg-card--hero .eg-card__link { border-radius: var(--eg-r-lg); }
.eg-card--lg .eg-card__media, .eg-card--hero .eg-card__media { position: absolute; inset: 0; aspect-ratio: auto; }
.eg-card--lg .eg-card__meta, .eg-card--hero .eg-card__meta { padding: 60px 16px 16px; gap: 6px; }
.eg-card--lg .eg-card__title, .eg-card--hero .eg-card__title { font-family: var(--eg-font-display); font-size: clamp(1rem, .8rem + .8vw, 1.45rem); font-weight: 800; letter-spacing: -.01em; }
.eg-card--hero .eg-card__play, .eg-card--lg .eg-card__play {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 4px; padding: 7px 14px 7px 10px; border-radius: var(--eg-r-pill);
  background: #fff; color: #16121F; font-size: var(--eg-fs-sm); font-weight: 800;
  transition: background var(--eg-fast), color var(--eg-fast);
}
.eg-card--hero .eg-card__play svg, .eg-card--lg .eg-card__play svg { width: 16px; height: 16px; }
.eg-card--hero .eg-card__link:hover .eg-card__play, .eg-card--lg .eg-card__link:hover .eg-card__play { background: var(--eg-volt); }
.eg-card--hero .eg-card__badge, .eg-card--lg .eg-card__badge { top: 12px; left: 12px; }

/* rail cards */
.eg-card--rail { flex: 0 0 clamp(150px, 15vw, 210px); scroll-snap-align: start; content-visibility: visible; }

/* compact rows */
.eg-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.eg-rows > li { min-width: 0; }
.eg-row { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: var(--eg-r-md); transition: background var(--eg-fast); }
.eg-row:hover { background: var(--eg-surface-2); }
.eg-row img { width: 76px; height: 57px; object-fit: cover; border-radius: 10px; flex: none; background: var(--eg-surface-2); }
.eg-row__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.eg-row__title { font-weight: 700; font-size: var(--eg-fs-sm); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-row__cat { font-size: var(--eg-fs-xs); color: var(--eg-text-3); text-transform: capitalize; }

/* 10. Grids */
.eg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--eg-card-min), 1fr));
  gap: clamp(8px, 1vw, 14px);
  grid-auto-flow: dense;
}
.eg-grid > .eg-card--lg { grid-column: span 2; grid-row: span 2; }
.eg-grid > .eg-card--md { grid-column: span 2; grid-row: span 2; }
.eg-grid > .eg-ad { grid-column: span 2; grid-row: span 2; }

/* bento feed: every 2x2 tile keeps the 4:3 rhythm of the base cards */
.eg-feed { --eg-card-min: 150px; }

/* rails */
.eg-rail { position: relative; }
.eg-rail__track {
  display: flex; gap: clamp(8px, 1vw, 14px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 6px 2px 14px;
  scrollbar-width: none;
}
.eg-rail__track::-webkit-scrollbar { display: none; }
.eg-rail__btn {
  position: absolute; top: calc(50% - 30px); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--eg-surface-3); color: var(--eg-text);
  box-shadow: var(--eg-shadow-2), inset 0 0 0 1px var(--eg-line-2);
  transition: opacity var(--eg-fast), transform var(--eg-fast), background var(--eg-fast);
}
.eg-rail__btn:hover { background: var(--eg-accent); color: var(--eg-on-accent); }
.eg-rail__btn--prev { left: -12px; }
.eg-rail__btn--next { right: -12px; }
.eg-rail__btn[disabled] { opacity: 0; pointer-events: none; }

/* 11. Home */
.eg-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding-top: clamp(20px, 3vw, 36px);
}
.eg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: var(--eg-r-pill);
  background: var(--eg-surface); box-shadow: inset 0 0 0 1px var(--eg-line-2);
  font-size: var(--eg-fs-sm); font-weight: 700; color: var(--eg-text-2);
}
.eg-eyebrow__dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--eg-volt); color: #16121F; }
.eg-eyebrow__dot .eg-ico { width: 14px; height: 14px; }
.eg-hero__title { font-size: var(--eg-fs-hero); margin: 16px 0 12px; letter-spacing: -.035em; line-height: 1.02; }
.eg-hero__title em { font-style: normal; background: var(--eg-brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.eg-hero__lead { color: var(--eg-text-2); font-size: var(--eg-fs-lg); max-width: 36ch; margin-bottom: var(--eg-s6); }
.eg-hero__quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--eg-s4); }
.eg-hero__quick-label { font-size: var(--eg-fs-sm); color: var(--eg-text-3); font-weight: 600; align-self: center; margin-right: 2px; }
.eg-stats { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 36px); margin-top: var(--eg-s6); }
.eg-stat { display: flex; flex-direction: column; }
.eg-stat__num { font-family: var(--eg-font-display); font-weight: 800; font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); letter-spacing: -.02em; line-height: 1.1; }
.eg-stat__label { font-size: var(--eg-fs-sm); color: var(--eg-text-3); font-weight: 600; }

.eg-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: clamp(8px, 1vw, 14px);
}
.eg-showcase > .eg-card--hero { grid-column: span 2; grid-row: span 2; }
.eg-showcase > .eg-card { content-visibility: visible; }

/* about + FAQ */
.eg-about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(16px, 2.4vw, 32px); }
.eg-panel { background: var(--eg-surface); border-radius: var(--eg-r-xl); padding: clamp(20px, 3vw, 36px); box-shadow: inset 0 0 0 1px var(--eg-line); }
.eg-panel__eyebrow { display: inline-block; font-size: var(--eg-fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--eg-accent); margin-bottom: var(--eg-s3); }

/* 12. Category tiles & category page */
.eg-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: clamp(8px, 1vw, 14px); }
.eg-cat {
  --c1: var(--eg-coral); --c2: #7A1E3A;
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 86px; padding: 14px 16px; overflow: hidden;
  border-radius: var(--eg-r-lg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c1) 30%, var(--eg-surface)) 0%, var(--eg-surface) 70%);
  box-shadow: inset 0 0 0 1px var(--eg-line);
  transition: transform var(--eg-med) var(--eg-ease), box-shadow var(--eg-med);
  isolation: isolate;
}
.eg-cat--violet { --c1: var(--eg-violet); }
.eg-cat--sky { --c1: var(--eg-sky); }
.eg-cat--volt { --c1: var(--eg-volt); }
.eg-cat--amber { --c1: var(--eg-amber); }
.eg-cat--mint { --c1: var(--eg-mint); }
.eg-cat__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--c1); color: #16121F; flex: none; box-shadow: 0 8px 20px -8px var(--c1); }
.eg-cat__icon .eg-ico { width: 24px; height: 24px; }
.eg-cat__text { display: flex; flex-direction: column; min-width: 0; z-index: 1; }
.eg-cat__name { font-family: var(--eg-font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.eg-cat__count { font-size: var(--eg-fs-xs); color: var(--eg-text-2); font-weight: 600; }
.eg-cat__cover {
  position: absolute; right: -22px; bottom: -18px; z-index: -1;
  width: 104px; height: 78px; object-fit: cover; border-radius: 12px;
  transform: rotate(-9deg); opacity: .5;
  transition: transform var(--eg-med) var(--eg-ease), opacity var(--eg-med);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
@media (hover: hover) {
  .eg-cat:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--c1), var(--eg-shadow-2); }
  .eg-cat:hover .eg-cat__cover { transform: rotate(-4deg) scale(1.08); opacity: .8; }
}

.eg-pagehead {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(16px, 2.4vw, 28px);
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--eg-r-xl);
  background: linear-gradient(120deg, color-mix(in srgb, var(--eg-orchid) 28%, var(--eg-surface)), var(--eg-surface) 65%);
  box-shadow: inset 0 0 0 1px var(--eg-line);
}
.eg-pagehead__icon { display: grid; place-items: center; width: clamp(56px, 6vw, 76px); height: clamp(56px, 6vw, 76px); border-radius: 22px; background: var(--eg-brand-gradient); color: #fff; flex: none; box-shadow: var(--eg-glow); }
.eg-pagehead__icon .eg-ico { width: 55%; height: 55%; }
.eg-pagehead h1 { font-size: var(--eg-fs-2xl); }
.eg-pagehead p { color: var(--eg-text-2); margin-top: 6px; max-width: 70ch; }
.eg-pagehead__count { display: inline-flex; margin-top: 10px; padding: 4px 12px; border-radius: var(--eg-r-pill); background: var(--eg-volt); color: #16121F; font-weight: 800; font-size: var(--eg-fs-sm); }

.eg-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--eg-s8); }
.eg-pagination a, .eg-pagination span {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px;
  border-radius: 13px; background: var(--eg-surface); box-shadow: inset 0 0 0 1px var(--eg-line);
  font-weight: 700; font-size: var(--eg-fs-sm);
}
.eg-pagination a:hover { background: var(--eg-surface-2); }
.eg-pagination .is-current { background: var(--eg-accent); color: var(--eg-on-accent); box-shadow: none; }
.eg-pagination .is-gap { background: none; box-shadow: none; color: var(--eg-text-3); }

/* breadcrumb */
.eg-crumbs { margin: var(--eg-s4) 0 var(--eg-s3); }
.eg-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; font-size: var(--eg-fs-sm); color: var(--eg-text-3); }
.eg-crumbs li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.eg-crumbs li + li::before { content: "/"; opacity: .5; margin-right: 2px; }
.eg-crumbs a { color: var(--eg-text-2); font-weight: 600; padding: 4px 2px; }
.eg-crumbs a:hover { color: var(--eg-accent); }
.eg-crumbs [aria-current] { color: var(--eg-text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* 13. Game page */
.eg-game { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(16px, 2vw, 28px); align-items: start; }
.eg-game__main { min-width: 0; }
.eg-game__aside { display: flex; flex-direction: column; gap: var(--eg-s5); position: sticky; top: calc(var(--eg-header-h) + 16px); }
.eg-card-box { background: var(--eg-surface); border-radius: var(--eg-r-lg); padding: var(--eg-s5); box-shadow: inset 0 0 0 1px var(--eg-line); }
.eg-card-box__title { font-size: var(--eg-fs-lg); margin-bottom: var(--eg-s3); display: flex; align-items: center; gap: 8px; }
.eg-card-box__title .eg-ico { color: var(--eg-accent); }

.eg-info { margin-top: var(--eg-s5); display: grid; gap: var(--eg-s4); }
.eg-info__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-tag { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--eg-r-pill); background: var(--eg-surface-2); color: var(--eg-text-2); font-size: var(--eg-fs-sm); font-weight: 700; text-transform: capitalize; }
a.eg-tag:hover { color: var(--eg-text); box-shadow: inset 0 0 0 1px var(--eg-accent); }
.eg-tag .eg-ico { width: 16px; height: 16px; color: var(--eg-accent); }

/* 14. Player */
.eg-stage {
  position: relative;
  border-radius: var(--eg-r-xl);
  padding: 3px;
  background: var(--eg-brand-gradient);
  box-shadow: 0 30px 80px -30px rgba(176, 75, 255, .55);
}
.eg-stage__inner { border-radius: calc(var(--eg-r-xl) - 3px); overflow: hidden; background: #07050F; display: flex; flex-direction: column; }
.eg-player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--eg-header-h) - 150px); max-height: calc(100svh - var(--eg-header-h) - 150px); min-height: 300px; background: #07050F; }
.eg-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.eg-player__loader {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; text-align: center;
  color: #fff; pointer-events: none;
  background: #0B0818;
  transition: opacity 400ms var(--eg-ease), visibility 0s linear 400ms;
}
.eg-player__loader-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(26px) saturate(1.3); opacity: .45; transform: scale(1.1); }
.eg-player__loader-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; }
.eg-player__loader-thumb { width: 120px; height: 90px; border-radius: 16px; object-fit: cover; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .7); }
.eg-player__loader-text { font-weight: 700; font-size: var(--eg-fs-md); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.eg-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--eg-volt); animation: eg-spin .8s linear infinite; }
.eg-player.is-loaded .eg-player__loader { opacity: 0; visibility: hidden; }

.eg-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; background: var(--eg-surface); }
.eg-toolbar__game { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.eg-toolbar__thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; }
.eg-toolbar__text { min-width: 0; }
.eg-toolbar__title { font-size: clamp(1.05rem, .9rem + .5vw, 1.35rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eg-toolbar__cat { font-size: var(--eg-fs-sm); color: var(--eg-text-3); font-weight: 600; text-transform: capitalize; }
.eg-toolbar__cat:hover { color: var(--eg-accent); }
.eg-toolbar__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.eg-action {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; min-width: 44px; padding: 0 12px; justify-content: center;
  border-radius: 13px; color: var(--eg-text-2); font-weight: 700; font-size: var(--eg-fs-sm);
  transition: background var(--eg-fast), color var(--eg-fast), transform var(--eg-fast);
}
.eg-action .eg-ico { width: 20px; height: 20px; }
.eg-action:hover { background: var(--eg-surface-2); color: var(--eg-text); }
.eg-action:active { transform: scale(.94); }
.eg-action.active#Like { color: var(--eg-volt); background: color-mix(in srgb, var(--eg-volt) 14%, transparent); }
:root[data-theme="light"] .eg-action.active#Like { color: #3D6B00; background: #EEFFC2; }
.eg-action.active#Dislike { color: var(--eg-coral); background: color-mix(in srgb, var(--eg-coral) 14%, transparent); }
.eg-action--full { background: var(--eg-accent); color: var(--eg-on-accent); padding: 0 16px; }
.eg-action--full:hover { background: var(--eg-accent-hover); color: var(--eg-on-accent); }
.eg-action--full .eg-ico--shrink { display: none; }
.eg-sep { width: 1px; height: 26px; background: var(--eg-line-2); margin: 0 4px; }

/* fullscreen states (native and CSS fallback for iOS) */
.eg-stage:fullscreen, .eg-stage:-webkit-full-screen { padding: 0; border-radius: 0; background: #000; width: 100%; height: 100%; }
.eg-stage.is-full .eg-stage__inner { height: 100%; border-radius: 0; }
.eg-stage.is-full .eg-player { flex: 1 1 auto; aspect-ratio: auto; max-height: none; height: auto; min-height: 0; }
.eg-stage.is-full .eg-action--full .eg-ico--expand { display: none; }
.eg-stage.is-full .eg-action--full .eg-ico--shrink { display: block; }
.eg-stage.is-pseudo-full { position: fixed; inset: 0; z-index: 1000; padding: 0; border-radius: 0; background: #000; height: 100vh; height: 100dvh; }
body.eg-pseudo-full { overflow: hidden; }

/* report dialog (keeps original .report-popup / .thank-you-popup hooks) */
.report-popup {
  position: fixed; z-index: 80; left: 50%; top: 50%;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -46%) scale(.98);
  background: var(--eg-surface); color: var(--eg-text);
  border-radius: var(--eg-r-xl); padding: var(--eg-s6);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px var(--eg-line-2);
  opacity: 0; visibility: hidden;
  transition: opacity var(--eg-med) var(--eg-ease), transform var(--eg-med) var(--eg-ease), visibility 0s linear var(--eg-med);
}
.report-popup.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
.report-popup__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: var(--eg-s4); }
.report-popup__kicker { font-size: var(--eg-fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--eg-text-3); }
.report-popup__title { font-size: var(--eg-fs-xl); margin-top: 2px; }
.report-popup textarea {
  width: 100%; min-height: 130px; resize: vertical;
  padding: 14px; border-radius: var(--eg-r-md);
  background: var(--eg-bg-2); border: 1px solid var(--eg-line-2); color: var(--eg-text);
  font-size: var(--eg-fs-md); outline: none;
}
.report-popup textarea:focus { border-color: var(--eg-accent); }
.report-popup__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--eg-s4); }
.eg-dialog-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(6, 4, 16, .6); opacity: 0; visibility: hidden; transition: opacity var(--eg-med), visibility 0s linear var(--eg-med); }
.eg-dialog-backdrop.active { opacity: 1; visibility: visible; transition-delay: 0s; }
.thank-you-popup {
  position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: var(--eg-r-pill);
  background: var(--eg-volt); color: #16121F; font-weight: 800;
  box-shadow: var(--eg-shadow-2);
  opacity: 0; visibility: hidden; transition: all var(--eg-med) var(--eg-ease);
}
.thank-you-popup.active { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* 15. Rich content (admin HTML: about text, pages, descriptions) */
.eg-prose { color: var(--eg-text-2); font-size: var(--eg-fs-md); line-height: 1.7; overflow-wrap: anywhere; }
.eg-prose > * + * { margin-top: .9em; }
.eg-prose h1, .eg-prose h2, .eg-prose h3, .eg-prose h4 { color: var(--eg-text); margin-top: 1.4em; }
.eg-prose h1 { font-size: var(--eg-fs-2xl); }
.eg-prose h2 { font-size: var(--eg-fs-xl); }
.eg-prose h3 { font-size: var(--eg-fs-lg); }
.eg-prose > :first-child { margin-top: 0; }
.eg-prose a { color: var(--eg-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.eg-prose ul, .eg-prose ol { padding-left: 1.3em; }
.eg-prose li + li { margin-top: .35em; }
.eg-prose img { border-radius: var(--eg-r-md); }
.eg-prose strong { color: var(--eg-text); }

.eg-faq { display: grid; gap: 8px; }
.eg-faq details { border-radius: var(--eg-r-md); background: var(--eg-surface-2); box-shadow: inset 0 0 0 1px var(--eg-line); }
.eg-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; }
.eg-faq summary::-webkit-details-marker { display: none; }
.eg-faq summary::after { content: "+"; font-family: var(--eg-font-display); font-size: 1.4rem; line-height: 1; color: var(--eg-accent); transition: transform var(--eg-fast); }
.eg-faq details[open] summary::after { transform: rotate(45deg); }
.eg-faq details p { padding: 0 16px 16px; color: var(--eg-text-2); font-size: var(--eg-fs-sm); }

/* 16. Footer */
.eg-footer { position: relative; z-index: 1; margin-top: var(--eg-s12); background: var(--eg-bg-2); border-top: 1px solid var(--eg-line); padding: clamp(32px, 5vw, 56px) 0 28px; }
.eg-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.eg-footer__tagline { color: var(--eg-text-2); margin-top: 12px; max-width: 34ch; }
.eg-footer h2 { font-family: var(--eg-font-body); font-size: var(--eg-fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--eg-text-3); margin-bottom: 12px; }
.eg-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.eg-footer ul a { display: inline-block; padding: 5px 0; color: var(--eg-text-2); font-weight: 600; font-size: var(--eg-fs-sm); text-transform: capitalize; }
.eg-footer ul a:hover { color: var(--eg-accent); }
.eg-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(28px, 4vw, 44px); padding-top: 20px; border-top: 1px solid var(--eg-line); color: var(--eg-text-3); font-size: var(--eg-fs-sm); }
.eg-footer__bottom a:hover { color: var(--eg-text); }

/* 17. Ads — reserved space to limit layout shift; never styled like a game card */
.eg-ad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-inline: auto; width: 100%; }
.eg-ad__label { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--eg-text-3); }
.eg-ad__slot { width: 100%; display: flex; justify-content: center; align-items: center; border-radius: var(--eg-r-md); overflow: hidden; background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--eg-text) 3%, transparent) 10px 20px); }
.eg-ad__slot > * { max-width: 100%; }
.eg-ad--leaderboard { max-width: 728px; }
.eg-ad--leaderboard .eg-ad__slot { min-height: 90px; }
.eg-ad--box { max-width: 336px; }
.eg-ad--box .eg-ad__slot { min-height: 250px; }
.eg-grid > .eg-ad { max-width: none; justify-content: center; padding: 10px; border-radius: var(--eg-r-lg); background: var(--eg-surface); box-shadow: inset 0 0 0 1px var(--eg-line); }
.eg-grid > .eg-ad .eg-ad__slot { min-height: 0; flex: 1; background: none; }

/* 18. Forms / misc pages */
.eg-auth { display: grid; place-items: center; min-height: 64vh; padding: var(--eg-s8) 0; }
.eg-auth__card { width: min(420px, 100%); background: var(--eg-surface); border-radius: var(--eg-r-xl); padding: clamp(24px, 4vw, 36px); box-shadow: var(--eg-shadow-2), inset 0 0 0 1px var(--eg-line); }
.eg-auth__mark { width: 52px; height: 52px; margin-bottom: 16px; }
.eg-auth__card h1 { font-size: var(--eg-fs-2xl); margin-bottom: 6px; }
.eg-auth__card > p { color: var(--eg-text-2); margin-bottom: var(--eg-s6); }
.eg-field { display: grid; gap: 6px; margin-bottom: var(--eg-s4); }
.eg-field label { font-weight: 700; font-size: var(--eg-fs-sm); }
.eg-input { width: 100%; height: 50px; padding: 0 16px; border-radius: var(--eg-r-md); border: 1px solid var(--eg-line-2); background: var(--eg-bg-2); color: var(--eg-text); outline: none; transition: border-color var(--eg-fast), box-shadow var(--eg-fast); }
.eg-input:focus { border-color: var(--eg-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--eg-accent) 20%, transparent); }
.eg-btn--block { width: 100%; }

.eg-404 { text-align: center; padding: clamp(40px, 8vw, 90px) 0 var(--eg-s8); }
.eg-404__code { font-family: var(--eg-font-display); font-weight: 800; font-size: clamp(5rem, 3rem + 10vw, 10rem); line-height: .9; letter-spacing: -.06em; background: var(--eg-brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eg-404 h1 { font-size: var(--eg-fs-2xl); margin: 12px 0 8px; }
.eg-404 p { color: var(--eg-text-2); margin-bottom: var(--eg-s6); }
.eg-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.eg-page { max-width: 860px; margin: var(--eg-s4) auto 0; }
.eg-page h1 { font-size: var(--eg-fs-2xl); margin-bottom: var(--eg-s5); }

/* toast lib (login) — align with brand */
.toastify { font-family: var(--eg-font-body) !important; font-weight: 700; border-radius: var(--eg-r-md) !important; }

/* 19. Motion */
@keyframes eg-spin { to { transform: rotate(360deg); } }
@keyframes eg-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eg-hero > *, .eg-pagehead { animation: eg-rise 500ms var(--eg-ease) both; }
.eg-hero > :nth-child(2) { animation-delay: 90ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .eg-spinner { animation: eg-spin 1.6s linear infinite !important; }
}

/* 20. Responsive */
@media (min-width: 1800px) {
  :root { --eg-card-min: 172px; }
}
@media (max-width: 1279px) {
  .eg-game { grid-template-columns: minmax(0, 1fr); }
  .eg-game__aside { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .eg-game__aside .eg-ad--box { order: 2; }
}
@media (max-width: 1023px) {
  .eg-hero { grid-template-columns: minmax(0, 1fr); }
  .eg-hero__lead { max-width: 60ch; }
  .eg-about { grid-template-columns: minmax(0, 1fr); }
  .eg-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eg-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .eg-header__search { display: none; }
  .eg-iconbtn--search { display: inline-grid; }
  .eg-search-panel__mobile { display: flex; }
  .eg-game__aside { grid-template-columns: minmax(0, 1fr); }
  .eg-player { aspect-ratio: auto; height: min(68vh, 560px); height: min(68svh, 560px); min-height: 260px; max-height: none; }
  .eg-toolbar { flex-wrap: wrap; }
  .eg-toolbar__actions { width: 100%; justify-content: space-between; }
  .eg-toolbar__actions .eg-sep { display: none; }
}
@media (max-width: 640px) {
  :root { --eg-header-h: 58px; --eg-card-min: 104px; }
  .eg-brand__mark { width: 34px; height: 34px; }
  .eg-brand__word { font-size: 1.18rem; }
  .eg-showcase { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-inline: calc(var(--eg-gutter) * -1); padding: 4px var(--eg-gutter) 10px; scrollbar-width: none; }
  .eg-showcase::-webkit-scrollbar { display: none; }
  .eg-showcase > .eg-card { flex: 0 0 44%; scroll-snap-align: start; }
  .eg-showcase > .eg-card--hero { flex-basis: 78%; aspect-ratio: 4 / 3; }
  .eg-grid > .eg-card--lg, .eg-grid > .eg-card--md { grid-column: span 2; grid-row: span 2; }
  .eg-card__title { font-size: .76rem; }
  .eg-card__meta { padding: 20px 7px 6px; }
  .eg-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eg-cat { min-height: 72px; padding: 12px; gap: 10px; }
  .eg-cat__icon { width: 38px; height: 38px; border-radius: 12px; }
  .eg-cat__name { font-size: .95rem; }
  .eg-rail__btn { display: none; }
  .eg-card--rail { flex-basis: 40%; }
  .eg-section__head { margin-bottom: var(--eg-s3); }
  .eg-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .eg-toolbar__thumb { width: 40px; height: 40px; }
  .eg-action { padding: 0 10px; }
  .eg-action__label { display: none; }
  .eg-stats, .eg-hero__quick { display: none; }
  .eg-hero__title { margin: 12px 0 8px; }
  .eg-hero__lead { font-size: var(--eg-fs-md); margin-bottom: var(--eg-s4); }
  .eg-grid > .eg-ad { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 340px) {
  .eg-brand__word span { display: none; }
}
