/*
 * GameHiHe OS UI layer.
 * Loaded after the original compatibility stylesheet. It intentionally styles
 * frontend markup only; no wp-admin selectors are used.
 */
:root {
  --gh-bg: #0a0d19;
  --gh-text: #f5f7ff;
  --gh-text-2: rgba(241, 244, 255, .80);
  --gh-text-3: rgba(241, 244, 255, .60);
  --gh-surface: #12182a;
  --gh-surface-2: #192137;
  --gh-surface-3: #222c46;
  --gh-glass: rgba(255, 255, 255, .075);
  --gh-glass-hi: rgba(255, 255, 255, .14);
  --gh-stroke: rgba(255, 255, 255, .13);
  --gh-stroke-hi: rgba(255, 255, 255, .28);
  --gh-accent: #5b8dff;
  --gh-accent-2: #8a5cf6;
  --gh-danger: #ff6b81;
  --gh-success: #4ade80;
  --gh-blur: blur(26px) saturate(1.65);
  --gh-spring: cubic-bezier(.34, 1.4, .64, 1);
  --gh-sidebar: 236px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --gh-bg: #eef1fa;
  --gh-text: #1b2340;
  --gh-text-2: rgba(27, 35, 64, .78);
  --gh-text-3: rgba(27, 35, 64, .58);
  --gh-surface: #ffffff;
  --gh-surface-2: #f4f7fc;
  --gh-surface-3: #e9eef8;
  --gh-glass: rgba(255, 255, 255, .58);
  --gh-glass-hi: rgba(255, 255, 255, .88);
  --gh-stroke: rgba(22, 32, 72, .1);
  --gh-stroke-hi: rgba(22, 32, 72, .18);
  --gh-accent: #3d6ff2;
  --gh-accent-2: #7552dc;
  color-scheme: light;
}

html { scroll-behavior: smooth; }
body.gamehihe-os {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--gh-bg);
  color: var(--gh-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color .25s ease, background-color .25s ease;
}
body.gamehihe-os a { color: inherit; text-decoration: none; }
body.gamehihe-os button,
body.gamehihe-os input,
body.gamehihe-os textarea,
body.gamehihe-os select { font: inherit; }
body.gamehihe-os img { max-width: 100%; }
body.gamehihe-os ::selection { background: rgba(91, 141, 255, .35); }
body.gamehihe-os :focus-visible { outline: 2px solid var(--gh-accent); outline-offset: 3px; }

.gamehihe-wallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 12% 6%, rgba(104, 92, 255, .24), transparent 62%),
    radial-gradient(46% 38% at 88% 14%, rgba(45, 212, 191, .13), transparent 60%),
    radial-gradient(64% 52% at 50% 108%, rgba(59, 130, 246, .17), transparent 62%),
    radial-gradient(30% 26% at 74% 62%, rgba(217, 70, 239, .07), transparent 60%),
    var(--gh-bg);
}
.gamehihe-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 50% at 50% 30%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 50% at 50% 30%, #000 0%, transparent 100%);
}
html[data-theme="light"] .gamehihe-wallpaper {
  background:
    radial-gradient(58% 46% at 12% 6%, rgba(124, 110, 255, .2), transparent 62%),
    radial-gradient(46% 38% at 88% 14%, rgba(45, 212, 191, .16), transparent 60%),
    radial-gradient(64% 52% at 50% 108%, rgba(96, 165, 250, .22), transparent 62%),
    radial-gradient(30% 26% at 74% 62%, rgba(244, 114, 182, .1), transparent 60%),
    var(--gh-bg);
}
html[data-theme="light"] .gamehihe-wallpaper::after { background-image: radial-gradient(rgba(30, 42, 96, .07) 1px, transparent 1px); }

body.gamehihe-os .glass,
body.gamehihe-os .glass-soft {
  background: var(--gh-glass);
  border: 1px solid var(--gh-stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 10px 34px rgba(3, 6, 18, .28);
  -webkit-backdrop-filter: var(--gh-blur);
  backdrop-filter: var(--gh-blur);
}
html[data-theme="light"] body.gamehihe-os .glass,
html[data-theme="light"] body.gamehihe-os .glass-soft {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 10px 34px rgba(40, 54, 110, .14);
}

/* Brand and navigation */
.gamehihe-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -.03em; }
.gamehihe-brand img { display: block; object-fit: cover; }
.gamehihe-brand-logo--mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.gamehihe-brand-logo--wide {
  width: 204px;
  height: auto;
  aspect-ratio: 5 / 2;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}
html[data-theme="light"] .gamehihe-brand-logo { border-color: rgba(16, 31, 24, .18); }
.gamehihe-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 19px;
  background: linear-gradient(135deg, #5b7cfa, #8a5cf6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(91, 124, 250, .35);
}
.gamehihe-brand-word { font-size: 17px; }
.gamehihe-brand-word span { color: var(--gh-accent); }

.gamehihe-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  transition: background .25s ease, box-shadow .25s ease;
}
.gamehihe-topbar.is-scrolled {
  background: rgba(12, 16, 30, .62);
  border-bottom: 1px solid var(--gh-stroke);
  box-shadow: 0 10px 30px rgba(3, 6, 18, .3);
  -webkit-backdrop-filter: var(--gh-blur);
  backdrop-filter: var(--gh-blur);
}
html[data-theme="light"] .gamehihe-topbar.is-scrolled { background: rgba(243, 246, 253, .72); }
.gamehihe-top-actions { display: flex; align-items: center; gap: 9px; }
.gamehihe-icon-button,
.gamehihe-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--gh-text);
  background: transparent;
  cursor: pointer;
  transition: transform .18s var(--gh-spring), background .18s ease;
}
.gamehihe-icon-button:hover { background: var(--gh-glass-hi); }
.gamehihe-icon-button:active,
.gamehihe-avatar:active { transform: scale(.9); }
.gamehihe-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gamehihe-avatar {
  overflow: hidden;
  border-color: var(--gh-stroke-hi);
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.gamehihe-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.gamehihe-sidebar { display: none; }

body.gamehihe-os .wrap {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: calc(76px + env(safe-area-inset-top)) 16px 122px;
}

/* Game cards */
.gamehihe-game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 10px;
}
.gamehihe-game-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82px;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.gamehihe-game-row::-webkit-scrollbar { display: none; }
body.gamehihe-os a.cell.gh-game-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  /* Legacy .cell uses container-type:size. Size containment makes the new
     card's auto height collapse to zero, which caused cards/sections to
     overlap on Home and Search. The GameHiHe card is not a size container. */
  container-type: normal;
  contain: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--gh-text);
  scroll-snap-align: start;
  transition: transform .22s var(--gh-spring);
}
body.gamehihe-os a.cell.gh-game-card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: none; }
.gh-game-thumb {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--gh-stroke);
  border-radius: 22%;
  background: linear-gradient(135deg, #5b7cfa, #8a5cf6);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .25), 0 10px 24px rgba(3, 6, 18, .3);
  transition: transform .22s var(--gh-spring), box-shadow .22s ease, border-color .22s ease;
}
.gh-game-card:hover .gh-game-thumb { transform: scale(1.035); border-color: var(--gh-stroke-hi); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .25), 0 15px 34px rgba(3, 6, 18, .45); }
html[data-theme="light"] .gh-game-thumb { box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .38), 0 10px 22px rgba(40, 54, 110, .22); }
.gh-game-thumb > img,
.gh-game-thumb > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .2s ease, transform .28s ease;
}
.gh-game-thumb > .yiyi-card-preview { z-index: 2; opacity: 0; }
.gh-game-card.is-previewing .gh-game-thumb > .yiyi-card-preview { opacity: 1; }
.gh-game-thumb > .gh-card-preview-image { z-index: 2; opacity: 0; }
.gh-game-card:hover .gh-game-thumb > .gh-card-preview-image { opacity: 1; transform: scale(1.035); }
.gh-game-card:hover .gh-game-thumb > .yiyi-card-image { transform: scale(1.04); }
.gh-game-fallback { font-size: clamp(28px, 9vw, 48px); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); }
.gh-game-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 4;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  color: #fff;
  background: #ff315b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .04em;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .22);
}
.gh-game-badge--baru { background: #20b981; }
.gh-game-badge--top { background: #7552dc; }
.gh-game-play {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 16, 30, .76);
  font-size: 10px;
  opacity: 0;
  transform: translate(-50%, 6px);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity .18s ease, transform .22s var(--gh-spring);
}
.gh-game-card:hover .gh-game-play { opacity: 1; transform: translate(-50%, 0); }
.gh-game-copy { display: block; min-width: 0; padding: 8px 2px 0; text-align: center; }
.gh-game-copy strong,
.gh-game-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-game-copy strong { color: var(--gh-text); font-size: 11.5px; font-weight: 680; line-height: 1.35; }
.gh-game-copy small { margin-top: 2px; color: var(--gh-text-3); font-size: 9.5px; }
.gh-game-meta { display: none; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; color: var(--gh-text-3); font-size: 9px; }

/* Homepage */
.gamehihe-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
  border: 1px solid var(--gh-stroke);
  border-radius: 30px;
  background: linear-gradient(135deg, #5b7cfa, #8a5cf6);
  box-shadow: 0 24px 60px rgba(3, 6, 18, .5), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.gamehihe-hero-slides,
.gamehihe-hero-slide { position: absolute; inset: 0; }
.gamehihe-hero-slide {
  pointer-events: none;
  opacity: 0;
  background: var(--hero-gradient);
  transition: opacity .5s ease, transform .55s ease;
  transform: scale(1.02);
}
.gamehihe-hero-slide.is-active { pointer-events: auto; opacity: 1; transform: scale(1); }
.gamehihe-hero-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gamehihe-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 10, 20, .78), rgba(8, 10, 20, .08) 72%); }
.gamehihe-hero-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 16px;
  border-radius: 20px;
  color: #fff;
  background: rgba(17, 22, 42, .42);
}
.gamehihe-kicker { display: block; margin-bottom: 5px; color: var(--gh-accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gamehihe-hero-content h2 { margin: 0; color: #fff; font-size: clamp(22px, 6vw, 34px); letter-spacing: -.035em; }
.gamehihe-hero-content p { display: -webkit-box; max-width: 620px; margin: 6px 0 0; overflow: hidden; color: rgba(255, 255, 255, .82); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gamehihe-hero-meta { display: flex; gap: 12px; margin-top: 8px; color: rgba(255, 255, 255, .76); font-size: 11px; }
.gamehihe-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  color: #151a2c;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}
/* body.gamehihe-os a { color:inherit } is intentionally broad and has higher
   specificity than .gamehihe-primary-button. Force readable dark text on the
   white Hero CTA in both light and dark themes. */
body.gamehihe-os a.gamehihe-primary-button { color: #151a2c; }
.gamehihe-hero-dots { position: absolute; top: 13px; right: 13px; z-index: 5; display: flex; gap: 6px; padding: 7px 9px; border-radius: 999px; }
.gamehihe-hero-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .48); transition: width .3s var(--gh-spring), background .2s; }
.gamehihe-hero-dots button.is-active { width: 20px; background: #fff; }
.gamehihe-home-summary {
  display: flex;
  align-items: center;
  gap: 10px 20px;
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 18px;
  color: var(--gh-text-2);
  font-size: 11.5px;
}
.gamehihe-home-summary a { margin-left: auto; color: var(--gh-accent); font-weight: 750; }
.gamehihe-section { margin-top: 30px; }
.gamehihe-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 2px 14px; }
.gamehihe-section-head h2 { margin: 0; color: var(--gh-text); font-size: 19px; font-weight: 780; letter-spacing: -.025em; }
.gamehihe-section-head h2 span { margin-right: 6px; }
.gamehihe-section-head > a { flex: 0 0 auto; color: var(--gh-accent); font-size: 12px; font-weight: 700; }
.gamehihe-section-head > span { color: var(--gh-text-3); font-size: 12px; }
.gamehihe-widget-pair { display: grid; gap: 14px; margin-top: 26px; }
.gamehihe-widget { overflow: hidden; padding: 16px; border-radius: 24px; }
.gamehihe-widget > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.gamehihe-widget > header > div { display: flex; align-items: center; gap: 9px; }
.gamehihe-widget h2 { margin: 0; font-size: 15px; }
.gamehihe-widget header > a { color: var(--gh-accent); font-size: 11px; font-weight: 750; }
.gamehihe-widget-icon { font-size: 20px; }
.gamehihe-widget-list > a { display: grid; grid-template-columns: 20px 46px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 14px; transition: background .15s ease; }
.gamehihe-widget-list > a:hover { background: var(--gh-glass-hi); }
.gamehihe-widget-list > a > b { color: var(--gh-text-3); font-size: 12px; text-align: center; }
.gamehihe-widget-thumb { position: relative; width: 46px; height: 46px; overflow: hidden; border-radius: 13px; background: var(--gh-glass-hi); }
.gamehihe-widget-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamehihe-widget-list strong,
.gamehihe-widget-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamehihe-widget-list strong { font-size: 12px; }
.gamehihe-widget-list small { margin-top: 3px; color: var(--gh-text-3); font-size: 10px; }
.gamehihe-widget-list em { color: var(--gh-text-3); font-style: normal; }
.gamehihe-daily {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 12px;
  border-radius: 24px;
  transition: transform .2s var(--gh-spring), border-color .2s;
}
.gamehihe-daily:hover { transform: translateY(-3px); border-color: var(--gh-stroke-hi); }
.gamehihe-daily-thumb { position: relative; width: 72px; height: 72px; overflow: hidden; border-radius: 20px; }
.gamehihe-daily-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamehihe-daily span > small,
.gamehihe-daily span > strong,
.gamehihe-daily span > em { display: block; }
.gamehihe-daily span > small { color: var(--gh-accent); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.gamehihe-daily span > strong { margin-top: 4px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.gamehihe-daily span > em { display: none; margin-top: 4px; color: var(--gh-text-3); font-size: 11px; font-style: normal; }
.gamehihe-daily > b { padding: 8px 11px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--gh-accent), var(--gh-accent-2)); font-size: 10px; }
.gamehihe-folder-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; }
.gamehihe-folder { min-width: 0; text-align: center; transition: transform .2s var(--gh-spring); }
.gamehihe-folder:hover { transform: translateY(-4px); }
.gamehihe-folder-icon { display: grid; aspect-ratio: 1; place-items: center; border-radius: 26%; font-size: 30px; }
.gamehihe-folder strong,
.gamehihe-folder small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamehihe-folder strong { margin-top: 8px; font-size: 11px; }
.gamehihe-folder small { margin-top: 2px; color: var(--gh-text-3); font-size: 9px; }

/* Archive, taxonomy, search */
.gamehihe-page-head { display: grid; gap: 18px; margin: 6px 0 26px; }
.gamehihe-page-head h1,
.gamehihe-taxonomy-head h1 { margin: 0; color: var(--gh-text); font-size: clamp(28px, 6vw, 40px); letter-spacing: -.04em; }
.gamehihe-page-head p,
.gamehihe-taxonomy-head p { max-width: 720px; margin: 7px 0 0; color: var(--gh-text-2); font-size: 13px; line-height: 1.6; }
.gamehihe-page-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
}
.gamehihe-page-search svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--gh-text-3); stroke-width: 2; }
.gamehihe-page-search input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  color: var(--gh-text);
  background: transparent !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.gamehihe-page-search input:focus,
.gamehihe-page-search input:focus-visible { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.gamehihe-page-search input::-webkit-search-decoration,
.gamehihe-page-search input::-webkit-search-cancel-button,
.gamehihe-page-search input::-webkit-search-results-button,
.gamehihe-page-search input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; display: none; }
.gamehihe-page-search:focus-within { border-color: color-mix(in srgb, var(--gh-accent) 72%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gh-accent) 20%, transparent); }
.gamehihe-page-search input::placeholder { color: var(--gh-text-3); }
.gamehihe-page-search .gamehihe-search-clear { display: inline-grid; }
.gamehihe-page-search .gamehihe-search-clear[hidden] { display: none !important; }
.gamehihe-library-folders { margin-bottom: 34px; }
.gamehihe-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gamehihe-library-card { display: grid; grid-template-columns: 60px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-width: 0; padding: 10px; border-radius: 20px; transition: transform .2s var(--gh-spring), border-color .2s; }
.gamehihe-library-card:hover { transform: translateY(-3px); border-color: var(--gh-stroke-hi); }
.gamehihe-library-art { display: grid; width: 60px; height: 60px; place-items: center; overflow: hidden; border-radius: 17px; background: linear-gradient(135deg, rgba(91, 141, 255, .28), rgba(138, 92, 246, .24)); background-position: center; background-size: cover; }
.gamehihe-library-card strong,
.gamehihe-library-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamehihe-library-card strong { font-size: 13px; }
.gamehihe-library-card small { margin-top: 4px; color: var(--gh-text-3); font-size: 10px; }
.gamehihe-library-card > b { color: var(--gh-text-3); }
.gamehihe-taxonomy-head { display: flex; align-items: center; gap: 18px; margin: 6px 0 20px; padding: 22px; border-radius: 26px; }
.gamehihe-taxonomy-icon { display: grid; width: 74px; height: 74px; flex: 0 0 74px; place-items: center; border-radius: 23px; background: linear-gradient(135deg, rgba(91, 141, 255, .3), rgba(138, 92, 246, .26)); }
body.gamehihe-os .pills { display: flex; gap: 8px; margin: 0 0 24px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
body.gamehihe-os .pills::-webkit-scrollbar { display: none; }
body.gamehihe-os .pill { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--gh-stroke); border-radius: 999px; color: var(--gh-text-2); background: var(--gh-glass); font-size: 11px; font-weight: 700; }
body.gamehihe-os .pill.active { color: #fff; border-color: rgba(91, 141, 255, .55); background: rgba(91, 141, 255, .32); }
.gamehihe-filter-chips { display: flex; gap: 8px; margin: 0 0 24px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.gamehihe-filter-chips::-webkit-scrollbar { display: none; }
.gamehihe-filter-chips a { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--gh-stroke); border-radius: 999px; color: var(--gh-text-2); background: var(--gh-glass); font-size: 11px; font-weight: 700; }
.gamehihe-filter-chips a.is-active { color: #fff; border-color: rgba(91, 141, 255, .55); background: rgba(91, 141, 255, .34); }
.gamehihe-pagination { margin-top: 28px; }
body.gamehihe-os .nav-links { display: flex; justify-content: center; gap: 6px; }
body.gamehihe-os .page-numbers { display: inline-grid; min-width: 36px; height: 36px; place-items: center; padding: 0 8px; border: 1px solid var(--gh-stroke); border-radius: 12px; color: var(--gh-text-2); background: var(--gh-glass); }
body.gamehihe-os .page-numbers.current { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--gh-accent), var(--gh-accent-2)); }

.gamehihe-seo { margin-top: 34px; padding: 22px; border-radius: 24px; }
.gamehihe-seo h2 { margin: 0 0 12px; color: var(--gh-text); font-size: 17px; }
.gamehihe-seo h3 { margin: 18px 0 7px; color: var(--gh-text); font-size: 14px; }
.gamehihe-seo p,
.gamehihe-seo li { color: var(--gh-text-2); font-size: 13px; line-height: 1.72; }
.gamehihe-seo a { color: var(--gh-accent); }
.gamehihe-seo-body:not(.is-expanded) { max-height: 145px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.gamehihe-expand-button { display: block; margin: 10px auto 0; padding: 8px 13px; border: 0; border-radius: 999px; color: var(--gh-accent); background: rgba(91, 141, 255, .12); cursor: pointer; font-size: 11px; font-weight: 750; }
.gamehihe-faq { margin-top: 30px; }
.gamehihe-faq h2 { margin-bottom: 14px; font-size: 18px; }
.gamehihe-faq details { margin-bottom: 10px; padding: 14px 16px; border-radius: 18px; }
.gamehihe-faq summary { cursor: pointer; color: var(--gh-text); font-size: 13px; font-weight: 700; }
.gamehihe-faq p { margin: 10px 0 0; color: var(--gh-text-2); font-size: 12px; line-height: 1.65; }

/* Existing recent/recommendation components stay wired to the original REST logic. */
body.gamehihe-os .gamejoy-personal-section { margin-top: 26px; }
body.gamehihe-os .gamejoy-continue-heading,
body.gamehihe-os .gamejoy-recommend-heading { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; color: var(--gh-text); font-size: 17px; font-weight: 780; }
body.gamehihe-os .gamejoy-continue-heading svg,
body.gamehihe-os .gamejoy-recommend-heading svg { width: 15px; height: 15px; margin-left: auto; fill: none; stroke: var(--gh-accent); stroke-width: 2; }
body.gamehihe-os .gamejoy-continue-track,
body.gamehihe-os .gamejoy-recommend-track { gap: 12px; }
body.gamehihe-os .gamejoy-personal-empty,
body.gamehihe-os .yiyi-empty-state { padding: 34px 18px; border: 1px dashed var(--gh-stroke-hi); border-radius: 22px; color: var(--gh-text-2); text-align: center; }
body.gamehihe-os .yiyi-empty-state > span { display: block; margin-bottom: 10px; font-size: 38px; }
body.gamehihe-os .yiyi-empty-state p { margin: 7px 0; color: var(--gh-text-3); }

/* Game detail: keep every player data attribute and state from the old theme. */
body.gamehihe-os .gamehihe-player-layout { gap: 12px; }
body.gamehihe-os [data-yiyi-player-wrap] { overflow: hidden; border: 1px solid var(--gh-stroke); border-radius: 28px; background: var(--gh-glass); box-shadow: 0 24px 60px rgba(3, 6, 18, .38); }
body.gamehihe-os .stage { overflow: hidden; border-radius: 0; }
body.gamehihe-os .stage-overlay { background: linear-gradient(to top, rgba(7, 10, 20, .72), rgba(7, 10, 20, .12)); }
body.gamehihe-os .stage-overlay h1 { color: #fff; letter-spacing: -.035em; }
body.gamehihe-os .btn-grad,
body.gamehihe-os .yiyi-mobile-play-cta { border: 0; color: #fff; background: linear-gradient(135deg, var(--gh-accent), var(--gh-accent-2)); box-shadow: 0 10px 24px rgba(91, 124, 250, .3); }
body.gamehihe-os .stage-bar,
body.gamehihe-os .yiyi-player-topbar { color: var(--gh-text); background: var(--gh-glass); border-color: var(--gh-stroke); }
body.gamehihe-os .act,
body.gamehihe-os .yiyi-topbar-action,
body.gamehihe-os .gact { color: var(--gh-text-2); border-color: var(--gh-stroke); background: var(--gh-glass); }
body.gamehihe-os .act:hover,
body.gamehihe-os .yiyi-topbar-action:hover { color: var(--gh-text); background: var(--gh-glass-hi); }
body.gamehihe-os .rating-strip,
body.gamehihe-os .info-card,
body.gamehihe-os .gsection { border: 1px solid var(--gh-stroke); border-radius: 22px; color: var(--gh-text); background: var(--gh-glass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
body.gamehihe-os .rating-strip { margin-top: 14px; }
body.gamehihe-os .info-card p,
body.gamehihe-os .info-card li,
body.gamehihe-os .meta-dl dt { color: var(--gh-text-2); }
body.gamehihe-os .side-rail { gap: 12px; }
body.gamehihe-os .side-rail .gh-game-copy { display: none; }
body.gamehihe-os .side-rail .gh-game-thumb { border-radius: 21px; }

/* Account, profile, leaderboard, static pages retain server logic/forms. */
body.gamehihe-os .yiyi-account-layout { gap: 18px; }
body.gamehihe-os .yiyi-account-nav,
body.gamehihe-os .yiyi-account-main,
body.gamehihe-os .leaderboard-shell,
body.gamehihe-os .article-shell,
body.gamehihe-os .page-shell { border: 1px solid var(--gh-stroke); border-radius: 26px; color: var(--gh-text); background: var(--gh-glass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 14px 40px rgba(3, 6, 18, .24); }
body.gamehihe-os .yiyi-account-nav > a { color: var(--gh-text-2); }
body.gamehihe-os .yiyi-account-nav > a:hover,
body.gamehihe-os .yiyi-account-nav > a.active { color: #fff; background: rgba(91, 141, 255, .32); }
body.gamehihe-os .yiyi-account-main h1 { color: var(--gh-text); }
body.gamehihe-os .yiyi-form input:not([type="checkbox"]),
body.gamehihe-os .yiyi-form textarea,
body.gamehihe-os .yiyi-form select { color: var(--gh-text); border-color: var(--gh-stroke); background: rgba(255, 255, 255, .06); }
html[data-theme="light"] body.gamehihe-os .yiyi-form input:not([type="checkbox"]),
html[data-theme="light"] body.gamehihe-os .yiyi-form textarea,
html[data-theme="light"] body.gamehihe-os .yiyi-form select { background: rgba(22, 32, 72, .05); }
body.gamehihe-os .yiyi-stat-grid > div,
body.gamehihe-os .yiyi-stat-grid > a,
body.gamehihe-os .yiyi-wallet-card,
body.gamehihe-os .yiyi-security-pill,
body.gamehihe-os .yiyi-reward-box { border-color: var(--gh-stroke); border-radius: 20px; background: var(--gh-glass); }
body.gamehihe-os .yiyi-history-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }

/* Keep the existing search/AJAX/profile overlays, visually align them. */
body.gamehihe-os .m-search,
body.gamehihe-os .yiyi-guest-profile-overlay,
body.gamehihe-os .yiyi-my-games-modal { background: rgba(5, 8, 18, .58); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
body.gamehihe-os .m-search-in,
body.gamehihe-os .yiyi-guest-profile-modal,
body.gamehihe-os .yiyi-my-games-dialog { border: 1px solid var(--gh-stroke); border-radius: 28px; color: var(--gh-text); background: rgba(22, 27, 49, .9); }
html[data-theme="light"] body.gamehihe-os .m-search-in,
html[data-theme="light"] body.gamehihe-os .yiyi-guest-profile-modal,
html[data-theme="light"] body.gamehihe-os .yiyi-my-games-dialog { background: rgba(252, 253, 255, .92); }

/* Footer and mobile dock */
body.gamehihe-os .gamehihe-footer { margin-top: 0; padding: 10px 16px calc(104px + env(safe-area-inset-bottom)); border: 0; }
.gamehihe-footer-inner { max-width: 1480px; margin: 0 auto; padding: 25px 22px 15px; border-radius: 28px; }
.gamehihe-footer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 18px; }
.gamehihe-footer-brand { grid-column: 1 / -1; }
.gamehihe-footer-brand p { max-width: 330px; margin: 10px 0 0; color: var(--gh-text-3); font-size: 12px; line-height: 1.6; }
.gamehihe-footer-column h2 { margin: 0 0 9px; color: var(--gh-text-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gamehihe-footer-column a { display: block; padding: 4px 0; color: var(--gh-text-2); font-size: 12px; }
.gamehihe-footer-column a:hover { color: var(--gh-text); }
.gamehihe-footer-column ul { margin: 0; padding: 0; list-style: none; }
.gamehihe-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--gh-stroke); color: var(--gh-text-3); font-size: 11px; }

/* Footer social network pills */
.gamehihe-footer-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}
.gamehihe-social {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 7px 16px rgba(15, 23, 42, .12);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.gamehihe-social:hover {
  color: #fff !important;
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .18);
}
.gamehihe-social[aria-disabled="true"] { cursor: default; pointer-events: none; }
.gamehihe-social[aria-disabled="true"]:hover { transform: none; }
.gamehihe-social-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  font-size: 15px;
  font-weight: 900;
}
.gamehihe-social-icon svg { width: 17px; height: 17px; display: block; }
.gamehihe-social.facebook { background: #1877f2; }
.gamehihe-social.tiktok { background: #050505; }
.gamehihe-social.youtube { background: #ff0000; }
.gamehihe-social.zalo { background: #0068ff; }
.gamehihe-social.telegram { background: #229ed9; }
.gamehihe-social.instagram { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 55%, #fcb045 100%); }
@media (max-width: 560px) {
  .gamehihe-footer-socials { gap: 7px; }
  .gamehihe-social { min-height: 36px; padding: 8px 12px; font-size: 12px; }
}
.gamehihe-dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 3px;
  width: min(90%, 372px);
  padding: 7px;
  border: 1px solid var(--gh-stroke-hi);
  border-radius: 24px;
  background: rgba(20, 24, 44, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 20px 50px rgba(3, 6, 18, .46);
  -webkit-backdrop-filter: var(--gh-blur);
  backdrop-filter: var(--gh-blur);
  transform: translateX(-50%);
}
html[data-theme="light"] .gamehihe-dock { background: rgba(255, 255, 255, .72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 20px 50px rgba(40, 54, 110, .24); }
.gamehihe-dock a { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: center; gap: 3px; padding: 7px 3px; border-radius: 16px; color: var(--gh-text-3); font-size: 8.5px; font-weight: 700; }
.gamehihe-dock a.is-active { color: var(--gh-text); background: var(--gh-glass-hi); }
.gamehihe-dock svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
body.gamehihe-os .yiyi-mobile-bottom { display: none; }
body.gamehihe-os .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }


/* Shared clear button for sidebar and Search results form. */
.gamehihe-search-clear {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--gh-text-2);
  background: transparent;
  font: 700 20px/1 system-ui, sans-serif;
  cursor: pointer;
}
.gamehihe-search-clear[hidden] { display: none !important; }
.gamehihe-search-clear:hover,
.gamehihe-search-clear:focus-visible { color: var(--gh-text); background: rgba(255,255,255,.08); outline: 0; }
html[data-theme="light"] .gamehihe-search-clear:hover,
html[data-theme="light"] .gamehihe-search-clear:focus-visible { background: rgba(22,32,72,.08); }

@media (min-width: 560px) {
  .gamehihe-game-grid,
  .gamehihe-folder-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px 14px; }
  .gamehihe-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gamehihe-hero { aspect-ratio: 16 / 7.4; }
  .gamehihe-hero-content { right: auto; width: min(62%, 600px); padding: 19px; }
  .gamehihe-daily span > em { display: block; }
}

@media (min-width: 768px) {
  body.gamehihe-os .wrap { padding-right: 32px; padding-left: 32px; }
  .gamehihe-game-grid,
  .gamehihe-folder-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 23px 16px; }
  .gamehihe-game-row { grid-auto-columns: 96px; }
  .gh-game-copy strong { font-size: 12.5px; }
  .gh-game-copy small { font-size: 10px; }
  .gh-game-meta { display: flex; }
  .gamehihe-widget-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamehihe-widget-pair.is-single { grid-template-columns: minmax(0, 1fr); }
  .gamehihe-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .gamehihe-page-head { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: end; }
  .gamehihe-footer-columns { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; }
  .gamehihe-footer-brand { grid-column: auto; }
  body.gamehihe-os .yiyi-history-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .gamehihe-topbar,
  .gamehihe-dock { display: none; }
  .gamehihe-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    display: flex;
    width: var(--gh-sidebar);
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    padding: 20px 12px 16px;
    border-right: 1px solid var(--gh-stroke);
    background: rgba(15, 19, 36, .64);
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
    scrollbar-width: thin;
    -webkit-backdrop-filter: var(--gh-blur);
    backdrop-filter: var(--gh-blur);
  }
  html[data-theme="light"] .gamehihe-sidebar { background: rgba(255, 255, 255, .58); scrollbar-color: rgba(22, 32, 72, .2) transparent; }
  .gamehihe-sidebar-brand { justify-content: center; padding: 2px 8px 16px; }
  .gamehihe-sidebar-brand .gamehihe-brand-logo--wide { width: 194px; }
  .gamehihe-sidebar-search { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 3px 11px; padding: 8px 10px; border: 1px solid var(--gh-stroke); border-radius: 11px; background: rgba(255, 255, 255, .08); }
  html[data-theme="light"] .gamehihe-sidebar-search { background: rgba(22, 32, 72, .055); }
  .gamehihe-sidebar-search > svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--gh-text-3); stroke-width: 2.2; stroke-linecap: round; }
  .gamehihe-sidebar-search > input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--gh-text); background: transparent; font-size: 13px; padding: 0; box-shadow: none; }
  .gamehihe-sidebar-search > input:focus, .gamehihe-sidebar-search > input:focus-visible { outline: 0 !important; box-shadow: none !important; }
  .gamehihe-sidebar-search > input::-webkit-search-decoration, .gamehihe-sidebar-search > input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
  .gamehihe-sidebar-search:focus-within { border-color: color-mix(in srgb, var(--gh-accent) 72%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gh-accent) 20%, transparent); }
  .gamehihe-sidebar-search > input::placeholder { color: var(--gh-text-3); }
  .gamehihe-sidebar-search .search-panel { top: calc(100% + 8px); right: -4px; left: -4px; width: auto; max-height: min(64vh, 560px); overflow-y: auto; border: 1px solid var(--gh-stroke); border-radius: 16px; color: var(--gh-text); background: rgba(19, 24, 45, .96); box-shadow: 0 20px 50px rgba(3, 6, 18, .5); }
  html[data-theme="light"] .gamehihe-sidebar-search .search-panel { background: rgba(252, 253, 255, .97); }
  .gamehihe-sidebar-nav,
  .gamehihe-sidebar-categories { display: grid; gap: 2px; }
  .gamehihe-sidebar-label { padding: 14px 10px 6px; color: var(--gh-text-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .gamehihe-sidebar-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 11px; color: var(--gh-text-2); background: transparent; font-size: 13px; font-weight: 620; text-align: left; cursor: pointer; transition: color .15s, background .15s; }
  .gamehihe-sidebar-item:hover { color: var(--gh-text); background: rgba(255, 255, 255, .07); }
  html[data-theme="light"] .gamehihe-sidebar-item:hover { background: rgba(22, 32, 72, .06); }
  .gamehihe-sidebar-item.is-active { color: #fff; background: rgba(91, 141, 255, .32); }
  html[data-theme="light"] .gamehihe-sidebar-item.is-active { color: #2a55c8; background: rgba(61, 111, 242, .15); }
  .gamehihe-sidebar-item svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .gamehihe-category-icon { display: grid; width: 18px; flex: 0 0 18px; place-items: center; }
  .gamehihe-category-icon img { width: 18px; height: 18px; object-fit: contain; }
  .gamehihe-sidebar-footer { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gh-stroke); }
  body.gamehihe-os .wrap {
    width: calc(100% - var(--gh-sidebar));
    max-width: none;
    margin: 0 0 0 var(--gh-sidebar);
    padding: 36px max(42px, calc((100vw - var(--gh-sidebar) - 1400px) / 2)) 80px;
  }
  .gamehihe-hero { aspect-ratio: 21 / 7.2; border-radius: 36px; }
  .gamehihe-section-head h2 { font-size: 22px; }
  .gamehihe-game-grid,
  .gamehihe-folder-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 25px 18px; }
  .gh-game-copy { text-align: left; }
  .gh-game-meta { justify-content: flex-start; }
  .gamehihe-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.gamehihe-os .gamehihe-footer { margin-left: var(--gh-sidebar); padding: 10px max(42px, calc((100vw - var(--gh-sidebar) - 1400px) / 2)) 44px; }
  body.gamehihe-os .toast { bottom: 30px; }
  body.admin-bar .gamehihe-sidebar { top: 32px; }
}

@media (min-width: 1280px) {
  body.gamehihe-os .gamehihe-player-layout { grid-template-columns: 88px minmax(0, 1fr) 88px; }
  .gamehihe-widget { padding: 18px; }
}

@media (min-width: 1360px) {
  .gamehihe-game-grid,
  .gamehihe-folder-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .gamehihe-library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 1920px) {
  .gamehihe-game-grid,
  .gamehihe-folder-grid { gap: 28px 20px; }
  .gh-game-copy strong { font-size: 13px; }
}

@media (max-width: 1023px) {
  body.admin-bar .gamehihe-topbar { top: 32px; }
  body.gamehihe-os .side-rail { display: none; }
  body.gamehihe-os .play-layout { display: block; }
  body.gamehihe-os .yiyi-account-layout { grid-template-columns: 1fr; }
  body.gamehihe-os .yiyi-account-nav { position: static; display: flex; overflow-x: auto; border-radius: 20px; }
  body.gamehihe-os .yiyi-account-nav > a { flex: 0 0 auto; }
}

@media (max-width: 782px) {
  body.admin-bar .gamehihe-topbar { top: 46px; }
}

@media (max-width: 767px) {
  body.gamehihe-os .yiyi-form-grid { grid-template-columns: 1fr; }
  body.gamehihe-os .yiyi-span-2 { grid-column: auto; }
  body.gamehihe-os .yiyi-stat-grid,
  body.gamehihe-os .yiyi-wallet-grid,
  body.gamehihe-os .yiyi-security-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.gamehihe-os .yiyi-security-grid,
  body.gamehihe-os .yiyi-reward-cols { grid-template-columns: 1fr; }
  body.gamehihe-os [data-yiyi-player-wrap] { border-radius: 22px; }
  body.gamehihe-os .gamehihe-game-detail { padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 420px) {
  .gamehihe-home-summary { align-items: flex-start; flex-direction: column; }
  .gamehihe-home-summary a { margin-left: 0; }
  .gamehihe-daily { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; }
  .gamehihe-daily-thumb { width: 60px; height: 60px; border-radius: 17px; }
  .gamehihe-taxonomy-head { align-items: flex-start; padding: 17px; }
  .gamehihe-taxonomy-icon { width: 58px; height: 58px; flex-basis: 58px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; animation-duration: .001s; transition-duration: .001s; }
}


/* =========================================================
   GameHiHe 2.3.5 — centered desktop AJAX search
   ========================================================= */
@media (min-width: 1024px) {
  body.gamehihe-os.gamehihe-search-overlay-open { overflow: hidden; }
  body.gamehihe-os .gamehihe-sidebar-search .search-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(820px, calc(100vw - 64px)) !important;
    max-width: 820px !important;
    max-height: min(72vh, 680px) !important;
    margin: 0 !important;
    padding: 22px !important;
    overflow-y: auto;
    border-radius: 24px !important;
    z-index: 10050 !important;
    transform: translate(-50%, -50%);
    box-shadow:
      0 0 0 100vmax rgba(3, 6, 18, .58),
      0 34px 90px rgba(3, 6, 18, .55) !important;
    animation: gamehiheSearchCenter .18s ease-out !important;
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-sidebar-search .search-panel {
    background: rgba(252, 253, 255, .98) !important;
    box-shadow:
      0 0 0 100vmax rgba(32, 43, 75, .28),
      0 34px 90px rgba(32, 43, 75, .24) !important;
  }
  body.gamehihe-os .gamehihe-sidebar-search .search-panel .sr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.gamehihe-os .gamehihe-sidebar-search .search-panel .sr-item {
    min-height: 66px;
    padding: 10px 12px;
    border-radius: 16px;
  }
  body.gamehihe-os .gamehihe-sidebar-search .search-panel .sr-art {
    width: 48px;
    height: 48px;
  }
}
@keyframes gamehiheSearchCenter {
  from { opacity: 0; transform: translate(-50%, calc(-50% - 12px)) scale(.985); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Game cards keep image hover/preview only; no text/button overlay. */
body.gamehihe-os .gh-game-card .gh-game-play,
body.gamehihe-os .gh-game-card:hover .gh-game-play {
  display: none !important;
  opacity: 0 !important;
}

/* =========================================================
   GameHiHe 2.4.0 — visual layout refresh for home/library/detail
   ========================================================= */
html[data-theme="light"] body.gamehihe-os {
  --gh-page-bg: linear-gradient(135deg, #f4f6fd 0%, #edf1fb 50%, #f3f6fe 100%);
}
html[data-theme="light"] body.gamehihe-os { background: #edf1f9; }
html[data-theme="light"] body.gamehihe-os .glass,
html[data-theme="light"] body.gamehihe-os .glass-soft {
  background: rgba(255,255,255,.62);
  border-color: rgba(37, 55, 106, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 18px 40px rgba(100, 118, 164, .14);
}

/* Home */
.gamehihe-home > .screen-reader-text + .gamehihe-hero,
.gamehihe-home .gamehihe-hero {
  margin-bottom: 28px;
  border: 1px solid rgba(28, 55, 92, .08);
  border-radius: 36px;
  background: linear-gradient(135deg, #68cf26 0%, #39b95f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 18px 48px rgba(55, 89, 143, .16);
}
.gamehihe-hero-slide > img {
  width: 29%;
  height: auto;
  max-height: 72%;
  top: 9%;
  right: 5%;
  left: auto;
  bottom: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(27, 76, 34, .22));
}
.gamehihe-hero-shade {
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(13,66,20,.22) 62%, rgba(11,63,22,.42) 100%);
}
.gamehihe-hero .gamehihe-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #f5fff1;
  background: rgba(255,255,255,.28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gamehihe-hero-content {
  inset: auto 20px 20px 20px;
  width: auto;
  min-height: 132px;
  padding: 24px 24px 20px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 103, 13, .85), rgba(8, 112, 53, .88));
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 18px 40px rgba(12, 44, 22, .22);
}
.gamehihe-hero-content h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.04; }
.gamehihe-hero-content p { font-size: 14px; max-width: 70%; -webkit-line-clamp: 2; }
.gamehihe-hero-meta { gap: 18px; margin-top: 12px; font-size: 14px; color: rgba(255,255,255,.88); }
.gamehihe-primary-button {
  position: absolute;
  right: 24px;
  bottom: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  padding: 16px 28px;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(180deg, #71a2ff 0%, #4d79ef 100%);
  box-shadow: 0 14px 28px rgba(71, 106, 255, .34);
  font-weight: 800;
}
.gamehihe-hero-dots {
  top: 18px;
  right: 18px;
  padding: 8px 12px;
  background: rgba(255,255,255,.18);
}
.gamehihe-home-summary {
  margin-bottom: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.52);
}
.gamehihe-section { margin-top: 34px; }
.gamehihe-section-head { margin-bottom: 18px; }
.gamehihe-section-head h2 { font-size: clamp(28px, 2.4vw, 44px); letter-spacing: -.035em; }
.gamehihe-section-head a { color: #4671ee; font-size: 16px; font-weight: 800; }
.gamehihe-widget,
.gamehihe-daily,
.gamehihe-seo,
.gamehihe-home-summary {
  border-radius: 30px;
}
.gamehihe-widget { padding: 26px 28px; }
.gamehihe-widget h2 { font-size: 20px; }
.gamehihe-widget-list > a { grid-template-columns: 28px 64px minmax(0, 1fr) 72px; padding: 12px 8px; }
.gamehihe-widget-thumb { width: 64px; height: 64px; border-radius: 20px; }
.gamehihe-widget-list strong { font-size: 16px; }
.gamehihe-widget-list small { font-size: 14px; }
.gamehihe-widget-list em { justify-self: end; color: #49cc78; font-size: 15px; font-weight: 800; }
.gamehihe-daily {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px;
}
.gamehihe-daily-thumb { width: 92px; height: 92px; border-radius: 28px; }
.gamehihe-daily span > small { font-size: 13px; }
.gamehihe-daily span > strong { font-size: 20px; }
.gamehihe-daily span > em { display: block; font-size: 15px; }
.gamehihe-daily > b { padding: 14px 26px; font-size: 15px; }
.gamehihe-folder-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 22px;
}
.gamehihe-folder {
  padding: 14px;
  border-radius: 26px;
  background: rgba(255,255,255,.44);
  border: 1px solid rgba(37,55,106,.08);
}
.gamehihe-folder-icon {
  border-radius: 28px;
  background: rgba(255,255,255,.74);
}
.gamehihe-folder strong { margin-top: 12px; font-size: 17px; }
.gamehihe-folder small { font-size: 13px; }
.gamehihe-seo { padding: 24px 24px 18px; }
.gamehihe-seo h2 { font-size: 22px; }
.gamehihe-seo .gamehihe-expand-button { min-width: 152px; }

/* Library */
.gamehihe-page-head--library { margin: 12px 0 28px; }
.gamehihe-page-head--library h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.gamehihe-page-head--library p {
  margin: 8px 0 0;
  color: var(--gh-text-3);
  font-size: 22px;
}
.gamehihe-page-search {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 0 24px;
  border-radius: 999px;
}
.gamehihe-page-search svg { width: 26px; height: 26px; flex: 0 0 auto; fill: none; stroke: var(--gh-text-3); stroke-width: 2; }
.gamehihe-page-search input {
  width: 100%;
  border: 0;
  outline: 0;
  box-shadow: none;
  color: var(--gh-text);
  background: transparent;
  font-size: 18px;
}
.gamehihe-page-search input::placeholder { color: var(--gh-text-3); }
.gamehihe-library-grid--folders {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.gamehihe-library-card--folder {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 254px;
  padding: 18px 18px 16px;
  border-radius: 32px;
}
.gamehihe-library-folder-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
}
.gamehihe-library-folder-label strong { font-size: 18px; line-height: 1.2; }
.gamehihe-library-folder-emoji,
.gamehihe-library-folder-label img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.gamehihe-library-card--folder > small {
  color: var(--gh-text-3);
  font-size: 13px;
  font-weight: 600;
}
.gamehihe-term-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(68px, 1fr);
  gap: 12px;
  flex: 1;
}
.gamehihe-term-mosaic__cell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #6b8ff6, #7e58df);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(65, 84, 142, .12);
}
.gamehihe-term-mosaic__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gamehihe-term-mosaic__cell--placeholder {
  background: rgba(232, 237, 251, .72);
  border: 1px solid rgba(37,55,106,.08);
}
.gamehihe-term-mosaic__fallback,
.gamehihe-term-mosaic__fallback img { width: 26px; height: 26px; }
.gamehihe-section--library-all { margin-top: 36px; }
.gamehihe-pagination { margin-top: 28px; }

/* Detail */
.gamehihe-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.gamehihe-detail-back {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
}
.gamehihe-detail-head h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.gamehihe-detail-head p { margin: 6px 0 0; color: var(--gh-text-3); font-size: 16px; }
body.gamehihe-os .gamehihe-player-layout { gap: 22px; align-items: start; }
body.gamehihe-os .side-rail { display: grid; gap: 18px; }
body.gamehihe-os .side-rail .gh-game-thumb { border-radius: 28px; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 14px 26px rgba(40,54,110,.16); }
body.gamehihe-os [data-yiyi-player-wrap] {
  border-radius: 34px;
  background: rgba(255,255,255,.48);
  border-color: rgba(37,55,106,.08);
  box-shadow: 0 18px 44px rgba(81, 95, 144, .14);
}
body.gamehihe-os .stage { min-height: min(58vw, 690px); }
body.gamehihe-os .yiyi-player-topbar { padding: 16px 20px; }
body.gamehihe-os .stage .cover .glow {
  border-radius: 40px;
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 16px 36px rgba(19, 31, 62, .24);
}
body.gamehihe-os .stage .cover .cta {
  padding: 18px 34px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
}
body.gamehihe-os .rating-strip,
body.gamehihe-os .info-card,
body.gamehihe-os .sec { background: rgba(255,255,255,.44); border: 1px solid rgba(37,55,106,.08); border-radius: 24px; }
body.gamehihe-os .rating-strip { padding: 16px 18px; }
.gamehihe-detail-bottom-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(90px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 18px 2px 6px;
  scrollbar-width: none;
}
.gamehihe-detail-bottom-rail::-webkit-scrollbar { display: none; }
.gamehihe-detail-bottom-rail .gh-game-card--compact .gh-game-thumb,
.gamehihe-detail-bottom-rail .gh-game-card .gh-game-thumb { border-radius: 24px; }
.gamehihe-detail-bottom-rail .gh-game-copy { display: none; }
body.gamehihe-os .info-grid.yiyi-detail-top-grid { margin-top: 18px; }

@media (max-width: 1279px) {
  .gamehihe-hero-content p { max-width: 62%; }
  .gamehihe-library-grid--folders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .gamehihe-page-head--library p { font-size: 16px; }
  .gamehihe-page-head--library h1 { font-size: 42px; }
  .gamehihe-page-search { min-height: 64px; padding: 0 18px; }
  .gamehihe-page-search input { font-size: 16px; }
  .gamehihe-library-grid--folders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamehihe-hero-slide > img { width: 36%; right: 6%; top: 12%; }
  .gamehihe-hero-content { inset: auto 14px 14px 14px; padding: 18px; }
  .gamehihe-hero-content p { max-width: 100%; }
  .gamehihe-primary-button { position: static; margin-top: 16px; }
  .gamehihe-widget-list > a { grid-template-columns: 28px 56px minmax(0, 1fr) 24px; }
}

@media (max-width: 767px) {
  .gamehihe-library-grid--folders { grid-template-columns: 1fr; }
  .gamehihe-library-card--folder { min-height: 220px; }
  .gamehihe-section-head h2 { font-size: 24px; }
  .gamehihe-page-head--library h1 { font-size: 34px; }
  .gamehihe-home .gamehihe-hero { border-radius: 28px; }
  .gamehihe-hero-slide > img { width: 42%; max-height: 44%; top: 10%; }
  .gamehihe-hero-content h2 { font-size: 24px; }
  .gamehihe-widget, .gamehihe-daily, .gamehihe-seo { border-radius: 22px; }
  .gamehihe-daily { grid-template-columns: 72px minmax(0, 1fr); }
  .gamehihe-daily > b { grid-column: 1 / -1; justify-self: start; }
  .gamehihe-detail-head h1 { font-size: 28px; }
  body.gamehihe-os .stage { min-height: 420px; }
}

/* =========================================================
   GameHiHe 2.4.1 — demo-reference visual parity
   Home + Library + Game detail only. Data/business logic unchanged.
   ========================================================= */

/* Shared page scale from the supplied desktop reference. */
@media (min-width: 1024px) {
  body.gamehihe-os .wrap {
    padding-top: 34px;
    padding-bottom: 76px;
  }
}

/* ---------- Home ---------- */
.gamehihe-home .gamehihe-home-summary,
.gamehihe-home > .gamejoy-continue-section {
  display: none;
}
.gamehihe-home .gamehihe-hero {
  height: clamp(430px, 34vw, 535px);
  aspect-ratio: auto;
  margin: 0 0 38px;
  border-radius: 38px;
  background: linear-gradient(135deg, #6ed525 0%, #48c934 48%, #29ad5c 100%);
}
.gamehihe-home .gamehihe-hero-slide {
  background: linear-gradient(135deg, #73d927 0%, #49c934 50%, #2cab5a 100%) !important;
}
.gamehihe-home .gamehihe-hero-slide > img {
  inset: 8% 4% auto auto;
  width: min(34%, 460px);
  height: 58%;
  max-height: none;
  object-fit: contain;
  border-radius: 34px;
  filter: drop-shadow(0 22px 32px rgba(20, 72, 31, .18));
}
.gamehihe-home .gamehihe-hero-shade {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(15,90,27,.03) 48%, rgba(4,71,28,.26) 100%),
    radial-gradient(50% 90% at 100% 30%, rgba(255,255,255,.12), transparent 72%);
}
.gamehihe-hero-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  color: #fff;
  background: rgba(224,255,197,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.gamehihe-home .gamehihe-hero-content {
  inset: auto 20px 20px 20px;
  width: auto;
  min-height: 134px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title cta"
    "desc cta"
    "meta cta";
  align-content: center;
  align-items: center;
  column-gap: 34px;
  padding: 22px 24px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, rgba(8,102,18,.90), rgba(4,87,42,.91));
  border-color: rgba(255,255,255,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 36px rgba(5,61,24,.16);
}
.gamehihe-home .gamehihe-hero-content h2 {
  grid-area: title;
  margin: 0;
  font-size: clamp(28px, 2.5vw, 42px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.gamehihe-home .gamehihe-hero-content p {
  grid-area: desc;
  max-width: 820px;
  margin: 5px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}
.gamehihe-home .gamehihe-hero-meta {
  grid-area: meta;
  margin-top: 8px;
  color: rgba(255,255,255,.88);
  font-size: 13px;
}
.gamehihe-home .gamehihe-primary-button {
  grid-area: cta;
  position: static;
  min-width: 140px;
  margin: 0;
  padding: 16px 28px;
  color: #fff !important;
  background: linear-gradient(180deg, #6e9fff 0%, #4a76ee 100%);
  box-shadow: 0 12px 26px rgba(55,95,235,.34);
}
.gamehihe-home .gamehihe-hero-dots {
  top: 22px;
  right: 22px;
  padding: 8px 12px;
  background: rgba(255,255,255,.24);
}

.gamehihe-home .gamehihe-section {
  margin-top: 38px;
}
.gamehihe-home .gamehihe-section-head {
  margin: 0 4px 18px;
}
.gamehihe-home .gamehihe-section-head h2 {
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 820;
}
.gamehihe-home .gamehihe-section-head > a {
  color: var(--gh-accent);
  font-size: 15px;
  font-weight: 800;
}
.gamehihe-home .gamehihe-game-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 20px 18px;
}
.gamehihe-home .gh-game-thumb {
  border-radius: 28%;
}
.gamehihe-home .gh-game-copy {
  padding-top: 10px;
  text-align: center;
}
.gamehihe-home .gh-game-copy strong {
  font-size: 13px;
}
.gamehihe-home .gh-game-copy small {
  margin-top: 4px;
  font-size: 11px;
}
.gamehihe-home .gh-game-badge {
  top: -8px;
  right: -6px;
  left: auto;
  padding: 5px 9px;
  border-color: rgba(255,255,255,.92);
  font-size: 9px;
}

/* Two dashboard panels, matching the reference's trending/friends row. */
.gamehihe-home .gamehihe-widget-pair {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 38px;
}
.gamehihe-home .gamehihe-widget {
  min-height: 330px;
  padding: 24px 26px;
  border-radius: 32px;
}
.gamehihe-home .gamehihe-widget > header {
  margin-bottom: 16px;
}
.gamehihe-home .gamehihe-widget h2 {
  font-size: 20px;
}
.gamehihe-home .gamehihe-widget header > a {
  color: var(--gh-text-3);
  font-size: 13px;
}
.gamehihe-home .gamehihe-widget-list > a {
  grid-template-columns: 28px 66px minmax(0, 1fr) 70px;
  gap: 14px;
  min-height: 78px;
  padding: 8px 4px;
}
.gamehihe-home .gamehihe-widget-list > a > b {
  font-size: 17px;
  font-weight: 500;
}
.gamehihe-home .gamehihe-widget-thumb {
  width: 66px;
  height: 66px;
  border-radius: 20px;
}
.gamehihe-home .gamehihe-widget-list strong {
  font-size: 15px;
}
.gamehihe-home .gamehihe-widget-list small {
  font-size: 12px;
}
.gamehihe-home .gamehihe-widget-list em {
  justify-self: end;
  color: #43ca78;
  font-size: 13px;
  font-weight: 850;
}
.gamehihe-friend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.gamehihe-friend-grid .gh-game-card {
  min-width: 0;
}
.gamehihe-friend-grid .gh-game-thumb {
  border-radius: 28%;
}
.gamehihe-friend-grid .gh-game-copy {
  padding-top: 10px;
  text-align: center;
}
.gamehihe-friend-grid .gh-game-copy strong {
  font-size: 12px;
}
.gamehihe-friend-grid .gh-game-copy small,
.gamehihe-friend-grid .gh-game-meta,
.gamehihe-friend-grid .gh-game-badge {
  display: none;
}

/* Daily challenge is one self-contained glass card. */
.gamehihe-daily-card {
  margin-top: 42px;
  padding: 18px 20px 16px;
  border-radius: 30px;
}
.gamehihe-daily-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 12px;
}
.gamehihe-daily-card__head h2 {
  margin: 0;
  font-size: 20px;
}
.gamehihe-daily-card__head h2 span {
  margin-right: 8px;
}
.gamehihe-daily-card__head small {
  color: var(--gh-text-3);
  font-size: 12px;
}
.gamehihe-daily-card .gamehihe-daily {
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.gamehihe-daily-card .gamehihe-daily:hover {
  transform: none;
}
.gamehihe-daily-card .gamehihe-daily-thumb {
  width: 94px;
  height: 94px;
  border-radius: 26px;
}
.gamehihe-daily-copy strong,
.gamehihe-daily-copy em,
.gamehihe-daily-copy small {
  display: block;
}
.gamehihe-daily-copy strong {
  font-size: 18px;
}
.gamehihe-daily-copy em {
  margin-top: 5px;
  color: var(--gh-text-2);
  font-size: 13px;
  font-style: normal;
}
.gamehihe-daily-copy small {
  margin-top: 8px;
  color: #f4a20a;
  font-size: 11px;
  font-weight: 800;
}
.gamehihe-daily-card .gamehihe-daily > b {
  padding: 13px 24px;
  color: var(--gh-text);
  background: var(--gh-glass-hi);
  border: 1px solid var(--gh-stroke);
  font-size: 13px;
}

/* Category preview boxes on Home. */
.gamehihe-category-preview-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 22px;
}
.gamehihe-category-preview {
  display: block;
  min-width: 0;
  text-align: center;
}
.gamehihe-term-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--gh-stroke);
  border-radius: 30px;
  background: var(--gh-glass);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 14px 30px rgba(67,83,133,.12);
  backdrop-filter: var(--gh-blur);
}
.gamehihe-term-visual-cell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(135deg, #6c8cf7, #7857dc);
}
.gamehihe-term-visual-cell > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gamehihe-term-visual-fallback,
.gamehihe-term-visual-fallback img {
  width: 48%;
  height: 48%;
  object-fit: contain;
}
.gamehihe-term-icon-grid__cell {
  aspect-ratio: 1;
  border-radius: 28%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.gamehihe-category-preview > strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
  overflow: hidden;
  color: var(--gh-text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gamehihe-category-preview__emoji,
.gamehihe-category-preview__emoji img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.gamehihe-home .gamehihe-seo {
  margin-top: 42px;
  padding: 28px 30px 22px;
  border-radius: 30px;
}
.gamehihe-home .gamehihe-seo h2 {
  font-size: 19px;
}
.gamehihe-home .gamehihe-seo-body {
  color: var(--gh-text-2);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Library ---------- */
.gamehihe-library-page--folders .gamehihe-page-head--library {
  display: block;
  margin: 10px 0 30px;
}
.gamehihe-library-page--folders .gamehihe-page-head--library h1 {
  font-size: clamp(32px, 3vw, 48px);
}
.gamehihe-library-page--folders .gamehihe-page-head--library p {
  margin-top: 8px;
  font-size: 15px;
}
.gamehihe-library-page--folders .gamehihe-page-search {
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  padding: 0 22px;
  border-radius: 999px;
}
.gamehihe-library-page--folders .gamehihe-page-search input {
  font-size: 15px;
}
.gamehihe-library-page--folders .gamehihe-library-folders > .gamehihe-section-head {
  display: none;
}
.gamehihe-library-page--folders .gamehihe-library-grid--folders {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 20px;
}
.gamehihe-library-card--folder {
  min-height: 292px;
  gap: 14px;
  padding: 18px;
  border-radius: 32px;
}
.gamehihe-library-folder-label {
  gap: 8px;
}
.gamehihe-library-folder-label strong {
  font-size: 15px;
}
.gamehihe-library-card--folder > small {
  display: none;
}
.gamehihe-term-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.gamehihe-term-mosaic__cell {
  min-height: 0;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(65,84,142,.12);
}
.gamehihe-term-mosaic__cell--mini {
  padding: 10px;
  background: rgba(235,239,249,.72) !important;
  border: 1px solid var(--gh-stroke);
  box-shadow: none;
}
html:not([data-theme="light"]) .gamehihe-term-mosaic__cell--mini {
  background: rgba(255,255,255,.08) !important;
}
.gamehihe-term-mosaic__mini-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gamehihe-term-mosaic__mini-cell {
  border-radius: 28%;
}
.gamehihe-section--library-all {
  margin-top: 42px;
}

/* ---------- Game detail ---------- */
.gamehihe-game-detail .gamehihe-detail-head {
  gap: 14px;
  margin: 0 0 20px;
}
.gamehihe-game-detail .gamehihe-detail-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 21px;
}
.gamehihe-game-detail .gamehihe-detail-head h1 {
  font-size: clamp(24px, 2.2vw, 34px);
}
.gamehihe-game-detail .gamehihe-detail-head p {
  display: none;
}
body.gamehihe-os .gamehihe-player-layout {
  gap: 20px;
  align-items: start;
}
body.gamehihe-os .gamehihe-player-layout > main {
  min-width: 0;
}
body.gamehihe-os .side-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 18px 14px;
}
body.gamehihe-os .side-rail .gh-game-copy,
body.gamehihe-os .side-rail .gh-game-badge {
  display: none;
}
body.gamehihe-os .side-rail .gh-game-thumb {
  border-radius: 24px;
}
body.gamehihe-os [data-yiyi-player-wrap] {
  overflow: hidden;
  border: 0;
  border-radius: 34px;
  background: transparent;
  box-shadow: none;
}
body.gamehihe-os .stage {
  width: 100%;
  height: auto;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--gh-stroke);
  border-radius: 34px;
  box-shadow: 0 18px 38px rgba(67,83,133,.14);
}
body.gamehihe-os .stage-bar {
  margin-top: 14px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}
body.gamehihe-os .stage-actions {
  gap: 12px;
}
body.gamehihe-os .stage-actions .act,
body.gamehihe-os .stage-actions .yiyi-icon-action {
  min-height: 46px;
  padding: 0 18px !important;
  border: 1px solid var(--gh-stroke);
  border-radius: 999px !important;
  background: var(--gh-glass);
  color: var(--gh-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.gamehihe-detail-bottom-rail {
  grid-auto-columns: 102px;
  gap: 14px;
  margin-top: 10px;
  padding: 12px 2px 8px;
}
.gamehihe-detail-bottom-rail .gh-game-thumb {
  border-radius: 24px;
}
.gamehihe-detail-bottom-rail .gh-game-copy {
  display: none;
}
body.gamehihe-os .gamehihe-game-detail .rating-strip {
  margin-top: 20px;
  border-radius: 18px;
  background: var(--gh-glass);
}

@media (min-width: 1280px) {
  body.gamehihe-os .gamehihe-player-layout {
    grid-template-columns: 190px minmax(0, 1fr) 190px;
  }
}

@media (min-width: 1500px) {
  .gamehihe-home .gamehihe-game-grid {
    }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1279px) {
  .gamehihe-home .gamehihe-game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gamehihe-category-preview-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .gamehihe-home .gamehihe-hero { height: 430px; }
  .gamehihe-home .gamehihe-hero-slide > img { width: 42%; height: 46%; }
  .gamehihe-home .gamehihe-hero-content {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "desc" "meta" "cta";
    row-gap: 4px;
  }
  .gamehihe-home .gamehihe-primary-button { justify-self: start; margin-top: 10px; }
  .gamehihe-home .gamehihe-game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .gamehihe-home .gamehihe-widget-pair { grid-template-columns: 1fr; }
  .gamehihe-category-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .gamehihe-home .gamehihe-hero { height: 390px; border-radius: 28px; }
  .gamehihe-hero-badge { top: 14px; left: 14px; min-height: 31px; padding: 0 12px; font-size: 10px; }
  .gamehihe-home .gamehihe-hero-slide > img { top: 10%; right: 4%; width: 48%; height: 42%; }
  .gamehihe-home .gamehihe-hero-content { inset: auto 12px 12px; padding: 16px; border-radius: 22px; }
  .gamehihe-home .gamehihe-hero-content h2 { font-size: 24px; }
  .gamehihe-home .gamehihe-hero-content p { font-size: 12px; }
  .gamehihe-home .gamehihe-game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .gamehihe-friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamehihe-daily-card .gamehihe-daily { grid-template-columns: 72px minmax(0, 1fr); }
  .gamehihe-daily-card .gamehihe-daily-thumb { width: 72px; height: 72px; }
  .gamehihe-daily-card .gamehihe-daily > b { grid-column: 1 / -1; justify-self: start; }
  .gamehihe-category-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .gamehihe-library-card--folder { min-height: 230px; padding: 14px; border-radius: 24px; }
}

@media (max-width: 480px) {
  .gamehihe-home .gamehihe-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders { grid-template-columns: 1fr; }
}

/* Detail action row: keep the existing controls/handlers, present the same three pills as the reference. */
body.gamehihe-os .gamehihe-game-detail .stage-bar > .glogo,
body.gamehihe-os .gamehihe-game-detail .stage-actions .yiyi-vote-action {
  display: none !important;
}
body.gamehihe-os .gamehihe-game-detail .stage-actions {
  margin-left: 0 !important;
}
body.gamehihe-os .gamehihe-game-detail .stage-actions .yiyi-icon-action {
  width: auto;
  min-width: 0;
  gap: 7px;
}
body.gamehihe-os .gamehihe-game-detail .stage-actions .yiyi-icon-action span {
  display: inline !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}


/* =========================================================
   GameHiHe 2.4.2 — related-player rails + compact navigation
   ========================================================= */
@media (min-width: 1024px) {
  .gamehihe-sidebar { gap: 2px; }
  .gamehihe-sidebar-nav,
  .gamehihe-sidebar-categories { gap: 1px; }
}
@media (min-width: 1280px) {
  body.gamehihe-os .gamehihe-player-layout {
    grid-template-columns: 176px minmax(0, 1fr) 176px;
    gap: 18px;
  }
  body.gamehihe-os .side-rail { gap: 14px 12px; }
}
@media (max-width: 1023px) {
  .gamehihe-dock { width: min(88%, 372px); padding: 6px; }
  .gamehihe-dock a { padding: 6px 3px; }
}

/* =========================================================
   GameHiHe 2.4.3 — stable previews + phone/tablet polish
   ========================================================= */

/* A preview is never visible before it can actually play. The thumbnail stays
   on top of the gradient while MP4 data is still loading, avoiding blue flashes. */
body.gamehihe-os .yiyi-card-preview {
  visibility: hidden;
  opacity: 0 !important;
  background: transparent !important;
  object-fit: cover;
}
body.gamehihe-os .cell.is-previewing .yiyi-card-preview.is-preview-ready,
body.gamehihe-os .yiyi-slide-card.is-previewing .yiyi-card-preview.is-preview-ready,
body.gamehihe-os .gh-game-card.is-previewing .yiyi-card-preview.is-preview-ready {
  visibility: visible;
  opacity: 1 !important;
}
body.gamehihe-os .cell:not(.is-previewing) .yiyi-card-image,
body.gamehihe-os .gh-game-card:not(.is-previewing) .yiyi-card-image,
body.gamehihe-os .yiyi-slide-card:not(.is-previewing) .yiyi-card-image {
  opacity: 1 !important;
}

/* Keep folder/category cards compact and balanced instead of letting one sparse
   category stretch into an oversized mobile card. */
@media (max-width: 767px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body.gamehihe-os .wrap {
    width: 100%;
    max-width: 100%;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  /* iPhone Safari zooms focused form controls below 16px. */
  body.gamehihe-os input[type="search"],
  body.gamehihe-os .m-search input,
  body.gamehihe-os #yiyiMobileSearchInput,
  body.gamehihe-os .gamehihe-page-search input {
    font-size: 16px !important;
    line-height: 1.25;
  }
  body.gamehihe-os .m-search {
    padding: calc(70px + env(safe-area-inset-top)) 12px 20px;
  }
  body.gamehihe-os .m-search-in {
    width: min(100%, 620px);
    max-height: calc(100dvh - 94px - env(safe-area-inset-top));
    overflow: auto;
    border-radius: 20px;
  }

  /* Home category folders: two clean columns on phones. */
  .gamehihe-category-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 12px !important;
  }
  .gamehihe-category-preview { min-width: 0; }
  .gamehihe-term-icon-grid {
    gap: 6px;
    padding: 10px;
    border-radius: 22px;
  }
  .gamehihe-term-icon-grid__cell { border-radius: 24%; }
  .gamehihe-category-preview > strong {
    gap: 5px;
    margin-top: 8px;
    font-size: 12px;
  }

  /* Library app folders stay dense on mobile instead of becoming one very tall
     card. Two columns fit common 360–430px phones comfortably. */
  .gamehihe-library-page--folders .gamehihe-library-grid--folders {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .gamehihe-library-card--folder {
    min-height: 0 !important;
    gap: 9px !important;
    padding: 11px !important;
    border-radius: 22px !important;
  }
  .gamehihe-library-folder-label {
    min-width: 0;
    justify-content: center;
    gap: 6px !important;
  }
  .gamehihe-library-folder-label strong {
    overflow: hidden;
    font-size: 13px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gamehihe-library-folder-emoji,
  .gamehihe-library-folder-label img { width: 17px; height: 17px; }
  .gamehihe-term-mosaic {
    aspect-ratio: 1;
    gap: 7px !important;
  }
  .gamehihe-term-mosaic__cell { border-radius: 18px !important; }
  .gamehihe-term-mosaic__cell--mini { padding: 6px !important; }
  .gamehihe-term-mosaic__mini-grid { gap: 4px !important; }
  .gamehihe-term-mosaic__mini-cell { border-radius: 24% !important; }

  /* Two usable game cards per row are more stable than 3 tiny cards on phones. */
  .gamehihe-home .gamehihe-game-grid,
  .gamehihe-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }

  .gamehihe-section { margin-top: 30px; }
  .gamehihe-section-head {
    gap: 10px;
    align-items: center;
  }
  .gamehihe-section-head h2 { min-width: 0; font-size: 21px !important; }
  .gamehihe-section-head > a { flex: 0 0 auto; font-size: 11px; }

  /* Home hero stays inside the viewport and does not force horizontal overflow. */
  .gamehihe-home .gamehihe-hero {
    height: min(390px, 108vw) !important;
    min-height: 330px;
    margin-bottom: 28px;
  }
  .gamehihe-home .gamehihe-hero-content {
    right: 10px !important;
    bottom: 10px !important;
    left: 10px !important;
    width: auto !important;
  }
  .gamehihe-home .gamehihe-hero-content h2 { font-size: clamp(22px, 7vw, 28px) !important; }
  .gamehihe-home .gamehihe-hero-content p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  /* Game detail: on phones the player is the main column; related games move to
     the existing horizontal rail below it. */
  body.gamehihe-os .gamehihe-player-layout {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.gamehihe-os .gamehihe-player-layout > .side-rail { display: none !important; }
  body.gamehihe-os .gamehihe-game-detail { padding-right: 0 !important; padding-left: 0 !important; }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head {
    margin-bottom: 14px;
    gap: 10px;
  }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-back {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head h1 {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(21px, 6.2vw, 28px) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.gamehihe-os [data-yiyi-player-wrap] { border-radius: 20px !important; }
  body.gamehihe-os .stage {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9;
    border-radius: 20px !important;
  }
  body.gamehihe-os .stage-actions {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start !important;
    scrollbar-width: none;
  }
  body.gamehihe-os .stage-actions::-webkit-scrollbar { display: none; }
  body.gamehihe-os .gamehihe-game-detail .stage-actions .yiyi-icon-action {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 13px !important;
  }
  body.gamehihe-os .gamehihe-game-detail .stage-actions .yiyi-icon-action span { font-size: 12px; }
  .gamehihe-detail-bottom-rail {
    grid-auto-columns: 84px !important;
    gap: 10px !important;
    margin-top: 8px;
    padding-top: 10px;
  }
  .gamehihe-detail-bottom-rail .gh-game-thumb { border-radius: 19px !important; }

}

@media (max-width: 374px) {
  body.gamehihe-os .wrap {
    padding-right: max(9px, env(safe-area-inset-right));
    padding-left: max(9px, env(safe-area-inset-left));
  }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders,
  .gamehihe-category-preview-grid { gap: 9px !important; }
  .gamehihe-library-card--folder { padding: 9px !important; }
  .gamehihe-term-icon-grid { padding: 8px; gap: 5px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet layouts: keep cards roomy without inheriting desktop density. */
  body.gamehihe-os .wrap {
    padding-right: 24px;
    padding-left: 24px;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }
  .gamehihe-library-page--folders .gamehihe-library-grid--folders {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .gamehihe-category-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  body.gamehihe-os .gamehihe-player-layout {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.gamehihe-os .gamehihe-player-layout > .side-rail { display: none !important; }
  body.gamehihe-os .stage { min-height: 0 !important; aspect-ratio: 16 / 9; }
}

@media (max-width: 767px) and (hover: none) and (pointer: coarse) {
  /* Do not leave a desktop-like blue focus rectangle after tapping cards. */
  .gamehihe-category-preview:focus-visible,
  .gamehihe-library-card--folder:focus-visible,
  .gh-game-card:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}

/* Sparse category folders show real games only and expand those tiles cleanly. */
.gamehihe-term-icon-grid--count-1 { grid-template-columns: 1fr; }
.gamehihe-term-icon-grid--count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gamehihe-term-icon-grid--count-3,
.gamehihe-term-icon-grid--count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gamehihe-term-icon-grid--count-1 .gamehihe-term-icon-grid__cell { border-radius: 22%; }

.gamehihe-term-mosaic--count-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.gamehihe-term-mosaic--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
}
.gamehihe-term-mosaic--count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.gamehihe-term-mosaic--count-3 > .gamehihe-term-mosaic__cell:first-child { grid-row: 1 / 3; }
.gamehihe-term-mosaic__mini-grid--count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gamehihe-term-mosaic__mini-grid--count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
.gamehihe-term-mosaic__mini-grid--count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.gamehihe-term-mosaic__mini-grid--count-3 > :first-child { grid-row: 1 / 3; }

@media (max-width: 767px) {
  .gamehihe-term-icon-grid--count-1,
  .gamehihe-term-icon-grid--count-2,
  .gamehihe-term-icon-grid--count-3,
  .gamehihe-term-icon-grid--count-4 {
    aspect-ratio: 1;
  }
}

/* If a pointer arrives before preview media is ready, keep a neutral placeholder
   behind the real thumbnail instead of exposing the old blue/purple gradient. */
body.gamehihe-os .cell.is-preview-loading,
body.gamehihe-os .gh-game-card.is-preview-loading .gh-game-thumb,
body.gamehihe-os .yiyi-slide-card.is-preview-loading .yiyi-slide-thumb {
  background: #171b2d !important;
}
html[data-theme="light"] body.gamehihe-os .cell.is-preview-loading,
html[data-theme="light"] body.gamehihe-os .gh-game-card.is-preview-loading .gh-game-thumb,
html[data-theme="light"] body.gamehihe-os .yiyi-slide-card.is-preview-loading .yiyi-slide-thumb {
  background: #edf1f8 !important;
}

/* =========================================================
   GameHiHe 2.4.4 — one true full-viewport AJAX search on desktop
   ========================================================= */
@media (min-width: 1024px) {
  body.gamehihe-os.gamehihe-search-overlay-open {
    overflow: hidden !important;
  }

  body.gamehihe-os .gamehihe-global-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    width: 100vw;
    height: 100dvh;
    padding: clamp(28px, 5vh, 64px) clamp(28px, 5vw, 80px);
    place-items: center;
    background: rgba(3, 6, 18, .72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    isolation: isolate;
  }
  body.gamehihe-os .gamehihe-global-search-overlay.open {
    display: grid;
    animation: gamehiheSearchBackdropIn .16s ease-out both;
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-global-search-overlay {
    background: rgba(28, 37, 67, .38);
  }

  body.gamehihe-os .gamehihe-global-search-shell {
    width: min(980px, calc(100vw - 80px));
    max-height: min(82dvh, 760px);
    overflow: hidden;
    border: 1px solid var(--gh-stroke);
    border-radius: 28px;
    color: var(--gh-text);
    background: rgba(15, 20, 38, .985);
    box-shadow: 0 36px 110px rgba(0, 0, 0, .52);
    transform-origin: center;
    animation: gamehiheSearchShellIn .18s ease-out both;
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-global-search-shell {
    background: rgba(252, 253, 255, .99);
    box-shadow: 0 36px 110px rgba(35, 48, 85, .28);
  }

  body.gamehihe-os .gamehihe-global-search-head {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px 12px 24px;
    border-bottom: 1px solid var(--gh-stroke);
  }
  body.gamehihe-os .gamehihe-global-search-head strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.015em;
  }
  body.gamehihe-os .gamehihe-global-search-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid var(--gh-stroke);
    border-radius: 50%;
    color: var(--gh-text-2);
    background: var(--gh-surface-2);
    font: 500 25px/1 system-ui, sans-serif;
    cursor: pointer;
  }
  body.gamehihe-os .gamehihe-global-search-close:hover,
  body.gamehihe-os .gamehihe-global-search-close:focus-visible {
    color: var(--gh-text);
    border-color: color-mix(in srgb, var(--gh-accent) 55%, var(--gh-stroke));
    outline: 0;
  }

  body.gamehihe-os .gamehihe-global-search-slot {
    max-height: calc(min(82dvh, 760px) - 65px);
    overflow: auto;
    overscroll-behavior: contain;
  }

  /* The panel is re-parented from the sidebar to <body> by yiyi.js.  Reset all
     old absolute/fixed rules so no sidebar/transform can constrain it. */
  body.gamehihe-os .gamehihe-global-search-slot > #yiyiSearchPanel.search-panel,
  body.gamehihe-os .gamehihe-global-search-slot > .search-panel {
    position: static !important;
    inset: auto !important;
    display: none;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 22px 24px 26px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    animation: none !important;
  }
  body.gamehihe-os .gamehihe-global-search-slot > #yiyiSearchPanel.search-panel.open,
  body.gamehihe-os .gamehihe-global-search-slot > .search-panel.open {
    display: block;
  }
  body.gamehihe-os .gamehihe-global-search-slot .sr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.gamehihe-os .gamehihe-global-search-slot .sr-item {
    min-height: 72px;
    padding: 11px 13px;
    border-radius: 17px;
  }
  body.gamehihe-os .gamehihe-global-search-slot .sr-art {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  @keyframes gamehiheSearchBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes gamehiheSearchShellIn {
    from { opacity: 0; transform: translateY(-10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (min-width: 1024px) {
  body.gamehihe-os .gamehihe-global-search-head {
    padding: 12px 14px 12px 18px;
  }
  body.gamehihe-os .gamehihe-global-search-box {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--gh-stroke);
    border-radius: 15px;
    background: rgba(255,255,255,.055);
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-global-search-box {
    background: rgba(22,32,72,.045);
  }
  body.gamehihe-os .gamehihe-global-search-box:focus-within {
    border-color: color-mix(in srgb, var(--gh-accent) 72%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gh-accent) 17%, transparent);
  }
  body.gamehihe-os .gamehihe-global-search-box > svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: var(--gh-text-3);
    stroke-width: 2;
    stroke-linecap: round;
  }
  body.gamehihe-os #gamehiheGlobalSearchInput {
    width: 100%;
    min-width: 0;
    border: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
    color: var(--gh-text);
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px;
    font-weight: 650;
  }
  body.gamehihe-os #gamehiheGlobalSearchInput::-webkit-search-decoration,
  body.gamehihe-os #gamehiheGlobalSearchInput::-webkit-search-cancel-button,
  body.gamehihe-os #gamehiheGlobalSearchInput::-webkit-search-results-button,
  body.gamehihe-os #gamehiheGlobalSearchInput::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }
  body.gamehihe-os .gamehihe-global-search-clear {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--gh-text-2);
    background: transparent;
    font: 500 21px/1 system-ui, sans-serif;
    cursor: pointer;
  }
  body.gamehihe-os .gamehihe-global-search-clear[hidden] { display: none !important; }
  body.gamehihe-os .gamehihe-global-search-clear:hover { background: rgba(255,255,255,.08); }
  html[data-theme="light"] body.gamehihe-os .gamehihe-global-search-clear:hover { background: rgba(22,32,72,.08); }
  body.gamehihe-os .gamehihe-global-search-close {
    background: rgba(255,255,255,.055);
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-global-search-close {
    background: rgba(22,32,72,.05);
  }
}

/* =========================================================
   GameHiHe 2.4.5 — curated Home slider, manual challenge,
   cleaner Library categories and SVG-only interface glyphs.
   ========================================================= */
.gamehihe-ui-icon,
.gamehihe-section-icon,
.gamehihe-library-folder-icon,
.gamehihe-category-preview__icon,
.gh-game-fallback-svg,
.gamehihe-term-fallback-svg,
.gamehihe-daily-placeholder,
.gamehihe-empty-icon svg,
.sr-art--svg svg,
.sr-item .go svg,
.gamehihe-global-search-close svg,
.gamehihe-global-search-clear svg {
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.gamehihe-section-head h2,
.gamehihe-daily-card__head h2,
.gamehihe-hero-badge,
.gamehihe-hero-meta span,
.gamehihe-primary-button,
.gamehihe-home-summary > span,
.gamehihe-home-summary > a,
.gamehihe-daily-copy small,
.gamehihe-daily-card .gamehihe-daily > b,
.gamehihe-section-head > a,
.gamehihe-widget > header > div,
.gamehihe-widget > header > a {
  display: flex;
  align-items: center;
}
.gamehihe-section-head h2,
.gamehihe-daily-card__head h2 { gap: 9px; }
.gamehihe-section-head > a,
.gamehihe-widget > header > a,
.gamehihe-home-summary > a { gap: 5px; }
.gamehihe-hero-badge,
.gamehihe-hero-meta span,
.gamehihe-primary-button,
.gamehihe-home-summary > span,
.gamehihe-daily-copy small,
.gamehihe-daily-card .gamehihe-daily > b { gap: 7px; }
.gamehihe-section-head h2 > span,
.gamehihe-daily-card__head h2 > span { margin: 0 !important; }
.gamehihe-link-icon { width: 15px; height: 15px; }

/* Red replaces the old green Home hero treatment. */
.gamehihe-home .gamehihe-hero {
  background: linear-gradient(135deg, #ff5a49 0%, #ed3347 48%, #bd1835 100%) !important;
  box-shadow: 0 28px 68px rgba(116, 14, 36, .28), inset 0 1px 0 rgba(255,255,255,.26);
}
.gamehihe-home .gamehihe-hero-slide {
  background: linear-gradient(135deg, #ff604f 0%, #ed3448 50%, #b91534 100%) !important;
}
.gamehihe-home .gamehihe-hero-slide > img {
  filter: drop-shadow(0 22px 34px rgba(96, 8, 26, .25));
}
.gamehihe-home .gamehihe-hero-shade {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(122,8,30,.04) 46%, rgba(88,5,28,.28) 100%),
    radial-gradient(50% 90% at 100% 30%, rgba(255,255,255,.15), transparent 72%) !important;
}
.gamehihe-home .gamehihe-hero-content {
  background: linear-gradient(135deg, rgba(154,18,40,.91), rgba(104,8,34,.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 38px rgba(92, 8, 30, .2) !important;
}
.gamehihe-hero-badge {
  background: rgba(255, 235, 235, .2) !important;
}
.gamehihe-home .gamehihe-primary-button {
  color: #9f1730 !important;
  background: #fff !important;
  box-shadow: 0 12px 26px rgba(83, 7, 26, .28) !important;
}
.gamehihe-home .gamehihe-primary-button:hover { transform: translateY(-2px); }

/* Lists/cards intentionally expose only image + game name + category. */
body.gamehihe-os .gh-game-meta,
body.gamehihe-os .gh-game-badge,
body.gamehihe-os .gh-game-play { display: none !important; }
.gamehihe-home .gamehihe-widget-list > a {
  grid-template-columns: 66px minmax(0, 1fr) !important;
}
.gamehihe-home .gamehihe-widget-list > a > b,
.gamehihe-home .gamehihe-widget-list > a > em { display: none !important; }
.gamehihe-friend-grid .gh-game-copy small { display: block !important; }

/* Manual Daily Challenge block. */
.gamehihe-daily-card .gamehihe-daily-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ef3349, #b71538);
}
.gamehihe-daily-card .gamehihe-daily-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gamehihe-daily-card .gamehihe-daily-placeholder { width: 38px; height: 38px; }
.gamehihe-daily-copy small svg { color: #f4a20a; }
.gamehihe-daily-card .gamehihe-daily > b { justify-content: center; }

/* Library categories: compact app-folder cards rather than tall stretched posters. */
.gamehihe-library-page--folders .gamehihe-library-grid--folders {
  gap: 18px !important;
}
body.gamehihe-os .gamehihe-library-card--folder {
  min-height: 0 !important;
  height: 226px;
  padding: 15px !important;
  gap: 11px !important;
  border-radius: 26px !important;
}
.gamehihe-library-folder-label {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px !important;
}
.gamehihe-library-folder-label strong {
  overflow: hidden;
  font-size: 14px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gamehihe-library-folder-icon { color: var(--gh-accent); }
body.gamehihe-os .gamehihe-term-mosaic {
  width: 100%;
  height: 160px;
  flex: 0 0 auto;
  gap: 9px !important;
}
body.gamehihe-os .gamehihe-term-mosaic__cell {
  border-radius: 19px !important;
}
body.gamehihe-os .gamehihe-term-mosaic--count-1 {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
}
body.gamehihe-os .gamehihe-term-mosaic--count-1 > .gamehihe-term-mosaic__cell {
  width: 132px;
  height: 132px;
}
body.gamehihe-os .gamehihe-term-mosaic--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
}
body.gamehihe-os .gamehihe-term-mosaic--count-2 > .gamehihe-term-mosaic__cell { aspect-ratio: 1; }
body.gamehihe-os .gamehihe-term-mosaic--count-3 {
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
body.gamehihe-os .gamehihe-term-mosaic--count-3 > .gamehihe-term-mosaic__cell:first-child { grid-row: 1 / 3; }
.gamehihe-term-visual-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255,255,255,.9);
}
.gamehihe-term-fallback-svg { width: 34%; height: 34%; }

/* Search SVG controls and result rows use the same icon language. */
body.gamehihe-os .gamehihe-global-search-close svg,
body.gamehihe-os .gamehihe-global-search-clear svg { width: 18px; height: 18px; }
body.gamehihe-os .gamehihe-global-search-close { font-size: 0 !important; }
body.gamehihe-os .sr-art--svg { display: grid; place-items: center; color: var(--gh-text-2); }
body.gamehihe-os .sr-art--svg svg { width: 25px; height: 25px; }
body.gamehihe-os .sr-item .go { display: grid; place-items: center; }
body.gamehihe-os .sr-item .go svg { width: 17px; height: 17px; }

/* Give the content more of the desktop viewport instead of capping it visually
   around 1400px. Sidebar size/logic is unchanged. */
@media (min-width: 1024px) {
  body.gamehihe-os .wrap {
    padding-right: clamp(24px, 1.7vw, 34px) !important;
    padding-left: clamp(24px, 1.7vw, 34px) !important;
  }
  body.gamehihe-os .gamehihe-footer {
    padding-right: clamp(24px, 1.7vw, 34px) !important;
    padding-left: clamp(24px, 1.7vw, 34px) !important;
  }
}

@media (max-width: 1279px) {
  body.gamehihe-os .gamehihe-library-card--folder { height: 214px; }
  body.gamehihe-os .gamehihe-term-mosaic { height: 148px; }
  body.gamehihe-os .gamehihe-term-mosaic--count-1 > .gamehihe-term-mosaic__cell { width: 120px; height: 120px; }
}

@media (max-width: 767px) {
  body.gamehihe-os .gamehihe-library-card--folder {
    height: 176px;
    padding: 11px !important;
    border-radius: 21px !important;
  }
  body.gamehihe-os .gamehihe-term-mosaic { height: 116px; gap: 6px !important; }
  body.gamehihe-os .gamehihe-term-mosaic--count-1 > .gamehihe-term-mosaic__cell { width: 98px; height: 98px; }
  body.gamehihe-os .gamehihe-term-mosaic__cell { border-radius: 15px !important; }
  .gamehihe-library-folder-label strong { font-size: 12px !important; }
  .gamehihe-library-folder-icon { width: 15px; height: 15px; }
}

@media (max-width: 374px) {
  body.gamehihe-os .gamehihe-library-card--folder { height: 162px; }
  body.gamehihe-os .gamehihe-term-mosaic { height: 104px; }
  body.gamehihe-os .gamehihe-term-mosaic--count-1 > .gamehihe-term-mosaic__cell { width: 88px; height: 88px; }
}

/* Home category folders keep the same outer size even when a category only has
   one or two games, so sparse categories do not look smaller than full ones. */
.gamehihe-category-preview .gamehihe-term-icon-grid {
  width: 100%;
  aspect-ratio: 1;
  align-content: center;
  justify-content: center;
}
.gamehihe-category-preview .gamehihe-term-icon-grid--count-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
}
.gamehihe-category-preview .gamehihe-term-icon-grid--count-1 .gamehihe-term-icon-grid__cell {
  width: 68%;
  height: 68%;
}
.gamehihe-category-preview .gamehihe-term-icon-grid--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
  align-items: center;
}
.gamehihe-category-preview .gamehihe-term-icon-grid--count-3,
.gamehihe-category-preview .gamehihe-term-icon-grid--count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.gamehihe-category-preview__icon { color: var(--gh-accent); }
.gamehihe-search-clear svg,
.m-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gamehihe-icon-link { display: inline-flex; align-items: center; gap: 6px; }
.stage-overlay .play-big,
.stage-overlay .yiyi-preview-big { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }


/* =========================================================
   GameHiHe 2.4.6 — mobile search containment + related games
   ========================================================= */
/* The desktop overlay is created in the DOM for breakpoint handoff, but it must
   never participate in mobile layout. Previously it had no base display rule,
   so on phones it became a normal block and pushed the page hundreds of px. */
body.gamehihe-os .gamehihe-global-search-overlay {
  display: none;
}

.gamehihe-mobile-related {
  display: none;
}
.gamehihe-mobile-related__head {
  display: none;
}

@media (max-width: 1023px) {
  body.gamehihe-os .gamehihe-global-search-overlay,
  body.gamehihe-os .gamehihe-global-search-overlay.open {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
  body.gamehihe-os.gamehihe-search-overlay-open {
    overflow: auto !important;
  }
}

@media (max-width: 767px) {
  /* Related games are intentionally visible on the phone detail page rather
     than being hidden with the desktop side rails. */
  .gamehihe-mobile-related {
    display: block;
    width: 100%;
    margin: 18px 0 8px;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .gamehihe-mobile-related__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
  }
  .gamehihe-mobile-related__head h2 {
    margin: 0;
    min-width: 0;
    font-size: 18px;
    line-height: 1.15;
    color: var(--gh-text);
  }
  .gamehihe-mobile-related__head a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    color: var(--gh-accent);
    font-size: 12px;
    font-weight: 750;
  }
  .gamehihe-mobile-related .gamehihe-detail-bottom-rail {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(92px, 28vw) !important;
    gap: 11px !important;
    width: calc(100% + max(12px, env(safe-area-inset-right)) + max(12px, env(safe-area-inset-left)));
    margin: 0 calc(-1 * max(12px, env(safe-area-inset-right))) 0 calc(-1 * max(12px, env(safe-area-inset-left))) !important;
    padding: 0 max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)) !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .gamehihe-mobile-related .gamehihe-detail-bottom-rail::-webkit-scrollbar { display: none; }
  .gamehihe-mobile-related .gh-game-card {
    min-width: 0;
    scroll-snap-align: start;
  }
  .gamehihe-mobile-related .gh-game-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px !important;
  }
  .gamehihe-mobile-related .gh-game-copy {
    display: block !important;
    margin-top: 7px;
  }
  .gamehihe-mobile-related .gh-game-copy h3,
  .gamehihe-mobile-related .gh-game-copy strong {
    display: block;
    overflow: hidden;
    margin: 0;
    color: var(--gh-text);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gamehihe-mobile-related .gh-game-copy small,
  .gamehihe-mobile-related .gh-game-copy .gh-game-meta,
  .gamehihe-mobile-related .gh-game-badge { display: none !important; }

  /* Keep the inline player usable even if native fullscreen/orientation is
     denied by the browser. Once JS marks the stage as playing the iframe fills
     the visible stage immediately. */
  body.yiyi-page-game .stage.is-playing .yiyi-stage-frame {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body.yiyi-page-game .stage.is-playing {
    background: #050814 !important;
  }
}

@media (max-width: 374px) {
  .gamehihe-mobile-related .gamehihe-detail-bottom-rail {
    grid-auto-columns: minmax(88px, 30vw) !important;
  }
}


/* =========================================================
   GameHiHe 2.4.7 — paginated game lists + AJAX search pages
   ========================================================= */
body.gamehihe-os .gamehihe-pagination,
body.gamehihe-os .yiyi-pagination {
  width: 100%;
  margin: 30px 0 8px;
  justify-content: center;
}
body.gamehihe-os .gamehihe-pagination ul.page-numbers,
body.gamehihe-os .gamehihe-pagination .nav-links,
body.gamehihe-os .yiyi-pagination ul.page-numbers,
body.gamehihe-os .yiyi-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.gamehihe-os .gamehihe-pagination a.page-numbers,
body.gamehihe-os .gamehihe-pagination span.page-numbers,
body.gamehihe-os .gamehihe-pagination li > a,
body.gamehihe-os .gamehihe-pagination li > span {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  place-items: center;
  border: 1px solid var(--gh-stroke);
  border-radius: 13px;
  color: var(--gh-text-2);
  background: var(--gh-surface-2);
  font-weight: 800;
  text-decoration: none;
}
body.gamehihe-os .gamehihe-pagination .current {
  color: #fff !important;
  border-color: transparent !important;
  background: var(--gh-accent) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--gh-accent) 24%, transparent);
}
body.gamehihe-os .gamehihe-pagination a.page-numbers:hover,
body.gamehihe-os .gamehihe-pagination li > a:hover {
  color: var(--gh-text);
  border-color: color-mix(in srgb, var(--gh-accent) 50%, var(--gh-stroke));
}

body.gamehihe-os .sr-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--gh-stroke);
}
body.gamehihe-os .sr-page {
  display: grid;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--gh-stroke);
  border-radius: 12px;
  color: var(--gh-text-2);
  background: var(--gh-surface-2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
body.gamehihe-os .sr-page:hover,
body.gamehihe-os .sr-page:focus-visible {
  color: var(--gh-text);
  border-color: color-mix(in srgb, var(--gh-accent) 55%, var(--gh-stroke));
  outline: 0;
}
body.gamehihe-os .sr-page.is-current {
  color: #fff;
  border-color: transparent;
  background: var(--gh-accent);
}
body.gamehihe-os .sr-page-gap {
  min-width: 20px;
  color: var(--gh-text-3);
  text-align: center;
}

@media (max-width: 767px) {
  body.gamehihe-os .gamehihe-pagination,
  body.gamehihe-os .yiyi-pagination { margin-top: 22px; }
  body.gamehihe-os .gamehihe-pagination a.page-numbers,
  body.gamehihe-os .gamehihe-pagination span.page-numbers,
  body.gamehihe-os .gamehihe-pagination li > a,
  body.gamehihe-os .gamehihe-pagination li > span,
  body.gamehihe-os .sr-page {
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border-radius: 11px;
    font-size: 14px;
  }
  body.gamehihe-os .sr-pagination { gap: 6px; margin-top: 16px; padding-top: 14px; }
}


/* =========================================================
   GameHiHe 2.4.8 — player-only layout + readable detail content
   ========================================================= */

/* Stronger semantic surfaces/text keep labels readable in both themes even
   when legacy YIYI rules are loaded before this compatibility layer. */
body.gamehihe-os .gamehihe-game-detail,
body.gamehihe-os .gamehihe-taxonomy-page,
body.gamehihe-os .gamehihe-library-page,
body.gamehihe-os .gamehihe-search-page {
  color: var(--gh-text);
}
body.gamehihe-os .gamehihe-game-detail h1,
body.gamehihe-os .gamehihe-game-detail h2,
body.gamehihe-os .gamehihe-game-detail h3,
body.gamehihe-os .gamehihe-game-detail h4,
body.gamehihe-os .gamehihe-game-detail strong,
body.gamehihe-os .gamehihe-taxonomy-page h1,
body.gamehihe-os .gamehihe-taxonomy-page h2,
body.gamehihe-os .gamehihe-taxonomy-page strong {
  color: var(--gh-text);
}
body.gamehihe-os .gamehihe-game-detail p,
body.gamehihe-os .gamehihe-game-detail li,
body.gamehihe-os .gamehihe-game-detail dd,
body.gamehihe-os .gamehihe-game-detail small,
body.gamehihe-os .gamehihe-game-detail .rating-strip,
body.gamehihe-os .gamehihe-game-detail .yiyi-control-value,
body.gamehihe-os .gamehihe-taxonomy-page p {
  color: var(--gh-text-2);
}
body.gamehihe-os .gamehihe-game-detail .meta-dl dt {
  color: var(--gh-text-3);
}
body.gamehihe-os .gamehihe-game-detail a:not(.btn):not(.gamehihe-detail-back):not(.gh-game-card) {
  color: var(--gh-text);
}
body.gamehihe-os .gamehihe-game-detail .gamehihe-icon-link,
body.gamehihe-os .gamehihe-game-detail .more,
body.gamehihe-os .gamehihe-game-detail .gamehihe-mobile-related__head a {
  color: var(--gh-accent);
}
body.gamehihe-os .gamehihe-filter-chips a {
  color: var(--gh-text-2);
  background: var(--gh-surface-2);
}
body.gamehihe-os .gamehihe-filter-chips a.is-active {
  color: #fff;
  background: var(--gh-accent);
  border-color: transparent;
}
html[data-theme="light"] body.gamehihe-os .gamehihe-filter-chips a.is-active {
  color: #fff;
}

/* Detail page uses more breathing room than list pages. */
@media (min-width: 1024px) {
  body.gamehihe-os .wrap.gamehihe-game-detail {
    padding-right: clamp(30px, 2.2vw, 52px) !important;
    padding-left: clamp(30px, 2.2vw, 52px) !important;
    padding-top: 30px !important;
  }
  body.gamehihe-os .gamehihe-player-layout {
    padding: 16px;
    border: 1px solid var(--gh-stroke);
    border-radius: 34px;
    background: color-mix(in srgb, var(--gh-surface) 58%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  html[data-theme="light"] body.gamehihe-os .gamehihe-player-layout {
    background: rgba(255,255,255,.46);
  }
}
body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head {
  margin-bottom: 22px;
}
body.gamehihe-os .gamehihe-player-column {
  min-width: 0;
  width: 100%;
}
body.gamehihe-os .gamehihe-player-layout {
  width: 100%;
  margin: 0 auto;
}
body.gamehihe-os .gamehihe-player-layout [data-yiyi-player-wrap] {
  width: 100%;
}

/* Only the player + surrounding game rails live inside play-layout now.
   Everything below it is full-width and no longer squeezed by the rails. */
body.gamehihe-os .gamehihe-detail-content {
  width: 100%;
  margin-top: 28px;
  padding: clamp(18px, 2vw, 30px);
  border: 1px solid var(--gh-stroke);
  border-radius: 30px;
  color: var(--gh-text);
  background: color-mix(in srgb, var(--gh-surface) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 18px 44px rgba(3,6,18,.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-theme="light"] body.gamehihe-os .gamehihe-detail-content {
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 16px 38px rgba(53,69,120,.10);
}
body.gamehihe-os .gamehihe-detail-content > .rating-strip {
  margin-top: 0 !important;
  color: var(--gh-text-2);
  background: var(--gh-surface-2);
}
body.gamehihe-os .gamehihe-detail-content .info-card {
  color: var(--gh-text);
  background: var(--gh-surface-2);
  border-color: var(--gh-stroke);
}
html[data-theme="light"] body.gamehihe-os .gamehihe-detail-content .info-card,
html[data-theme="light"] body.gamehihe-os .gamehihe-detail-content > .rating-strip {
  background: rgba(247,249,253,.96);
}
body.gamehihe-os .gamehihe-detail-content .sec {
  margin-top: 28px;
  color: var(--gh-text);
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Related games live directly below the player and above the stage action buttons.
   The strip has no card/background container; when play starts the side rails
   disappear while this row remains available below the expanded player. */
.gamehihe-related-below {
  display: block;
  width: 100%;
  margin: 14px 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.gamehihe-related-below__grid {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 0 2px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.gamehihe-related-below__grid .gh-game-card {
  flex: 0 0 clamp(82px, 7.4vw, 108px);
  min-width: 0;
  scroll-snap-align: start;
}
.gamehihe-related-below__grid .gh-game-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px !important;
}
.gamehihe-related-below__grid .gh-game-copy {
  display: block !important;
  margin-top: 6px;
}
.gamehihe-related-below__grid .gh-game-copy strong,
.gamehihe-related-below__grid .gh-game-copy h3 {
  overflow: hidden;
  color: var(--gh-text);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gamehihe-related-below__grid .gh-game-copy small,
.gamehihe-related-below__grid .gh-game-meta,
.gamehihe-related-below__grid .gh-game-badge {
  display: none !important;
}

@media (min-width: 1024px) {
  body.gamehihe-os .gamehihe-game-detail.is-game-playing .gamehihe-player-layout,
  body.gamehihe-os .gamehihe-player-layout.is-playing-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: none;
  }
  body.gamehihe-os .gamehihe-game-detail.is-game-playing .gamehihe-player-layout > .side-rail,
  body.gamehihe-os .gamehihe-player-layout.is-playing-layout > .side-rail {
    display: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail.is-game-playing .stage {
    min-height: 0 !important;
    aspect-ratio: 16 / 9;
  }
  body.gamehihe-os .gamehihe-game-detail.is-game-playing [data-yiyi-player-wrap] {
    width: 100%;
  }
}

/* Mobile/tablet use their own dedicated related carousel. */
@media (max-width: 1023px) {
  .gamehihe-related-below { display: none !important; }
  body.gamehihe-os .gamehihe-detail-content {
    margin-top: 18px;
    padding: 14px;
    border-radius: 22px;
  }
}

/* Explicit light/dark detail contrast. This wins over older legacy --text /
   --muted declarations that could make labels disappear on glass backgrounds. */
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail {
  color: #17213b;
}
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail h1,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail h2,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail h3,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail strong {
  color: #17213b;
}
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail p,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail li,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail dd,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail small,
html[data-theme="light"] body.gamehihe-os .gamehihe-game-detail .rating-strip {
  color: #56637a;
}
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail {
  color: #f5f7ff;
}
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail p,
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail li,
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail dd,
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail small,
html:not([data-theme="light"]) body.gamehihe-os .gamehihe-game-detail .rating-strip {
  color: rgba(241,244,255,.80);
}


/* =========================================================
   GameHiHe 2.4.10 — transparent actions + inline related strip
   ========================================================= */
body.gamehihe-os .gamehihe-game-detail .stage-bar,
body.gamehihe-os .stage-bar {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}


/* GameHiHe 2.4.11 — thumbnails are media only: no decorative box/shadow. */
body.gamehihe-os .gh-game-thumb,
html[data-theme="light"] body.gamehihe-os .gh-game-thumb,
body.gamehihe-os .side-rail .gh-game-thumb,
body.gamehihe-os .gamehihe-detail-bottom-rail .gh-game-thumb,
body.gamehihe-os .gamehihe-related-below__grid .gh-game-thumb,
body.gamehihe-os .gamehihe-mobile-related .gh-game-thumb {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.gamehihe-os .gh-game-card:hover .gh-game-thumb,
body.gamehihe-os .gh-game-card.is-preview-loading .gh-game-thumb,
html[data-theme="light"] body.gamehihe-os .gh-game-card.is-preview-loading .gh-game-thumb {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* =========================================================
   GameHiHe 2.4.12 — taxonomy header contrast fix
   ========================================================= */
body.gamehihe-os .gamehihe-taxonomy-head {
  color: var(--gh-text);
}
body.gamehihe-os .gamehihe-taxonomy-head .gamehihe-kicker {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0 0 7px;
  padding: 5px 9px;
  border: 1px solid rgba(91, 141, 255, .22);
  border-radius: 999px;
  color: var(--gh-accent) !important;
  background: rgba(91, 141, 255, .10) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor;
}
body.gamehihe-os .gamehihe-taxonomy-head h1 {
  color: var(--gh-text) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor;
}
body.gamehihe-os .gamehihe-taxonomy-head p {
  color: var(--gh-text-2) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor;
}
html[data-theme="light"] body.gamehihe-os .gamehihe-taxonomy-head .gamehihe-kicker {
  color: #285bd8 !important;
  background: #eaf0ff !important;
  border-color: rgba(40, 91, 216, .18);
}


/* =========================================================
   GameHiHe 2.4.15 — consistent player corners
   The player wrapper is structural only. The actual stage owns the radius,
   so related games/actions below can no longer make individual corners look
   clipped or square.
   ========================================================= */
body.gamehihe-os .gamehihe-game-detail [data-yiyi-player-wrap] {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.gamehihe-os .gamehihe-game-detail .stage {
  overflow: hidden !important;
  border-radius: 28px !important;
  isolation: isolate;
}
body.gamehihe-os .gamehihe-game-detail .stage > .yiyi-stage-frame,
body.gamehihe-os .gamehihe-game-detail .stage > .yiyi-mobile-detail-preview,
body.gamehihe-os .gamehihe-game-detail .stage > .stage-overlay,
body.gamehihe-os .gamehihe-game-detail .stage > .yiyi-stage-cover,
body.gamehihe-os .gamehihe-game-detail .stage::after {
  border-radius: inherit !important;
}
body.gamehihe-os .gamehihe-game-detail .stage > .yiyi-stage-frame,
body.gamehihe-os .gamehihe-game-detail .stage > .yiyi-mobile-detail-preview {
  overflow: hidden;
}

@media (max-width: 1023px) {
  body.gamehihe-os .gamehihe-game-detail .stage {
    border-radius: 24px !important;
  }
}
@media (max-width: 480px) {
  body.gamehihe-os .gamehihe-game-detail .stage {
    border-radius: 20px !important;
  }
}

/* Immersive/fullscreen player must touch every screen edge. */
body.yiyi-page-game [data-yiyi-player-wrap].is-mobile-expanded .stage,
body.yiyi-page-game [data-yiyi-player-wrap].is-desktop-fullscreen .stage,
body.yiyi-page-game [data-yiyi-player-wrap]:fullscreen .stage,
body.yiyi-page-game [data-yiyi-player-wrap]:-webkit-full-screen .stage {
  border-radius: 0 !important;
}

/* =========================================================
   GameHiHe 2.4.16 — polished mobile game detail card
   Keep player/session logic intact; only refine the compact phone layout.
   ========================================================= */
@media (max-width: 680px) {
  body.gamehihe-os .wrap.gamehihe-game-detail {
    width: 100% !important;
    max-width: none !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
  }

  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head {
    align-items: center;
    gap: 12px;
    margin: 8px 0 14px;
    padding: 0 2px;
  }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-back {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: var(--gh-glass-hi);
    border: 1px solid var(--gh-stroke);
    box-shadow: none;
  }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head h1 {
    font-size: clamp(22px, 6.3vw, 27px) !important;
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -.035em;
  }
  body.gamehihe-os .gamehihe-game-detail .gamehihe-detail-head p { display: none; }

  body.gamehihe-os .gamehihe-game-detail [data-yiyi-player-wrap] {
    width: 100%;
    background: transparent !important;
  }
  body.gamehihe-os .gamehihe-game-detail .stage {
    width: 100%;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border: 1px solid var(--gh-stroke) !important;
    border-radius: 24px !important;
    box-shadow: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail .stage::after {
    background: linear-gradient(180deg, rgba(7,10,20,.02) 48%, rgba(7,10,20,.22) 100%) !important;
  }

  /* Play area: visually separated from metadata without reintroducing a panel. */
  body.gamehihe-os .gamehihe-game-detail .stage-bar {
    display: flex !important;
    min-height: 0 !important;
    padding: 12px 0 2px !important;
    margin: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }
  body.gamehihe-os .gamehihe-game-detail .stage-bar > .glogo,
  body.gamehihe-os .gamehihe-game-detail .stage-bar h2,
  body.gamehihe-os .gamehihe-game-detail .stage-bar .cat-link,
  body.gamehihe-os .gamehihe-game-detail .stage-bar .stage-actions,
  body.gamehihe-os .gamehihe-game-detail .stage-bar .yiyi-live-session {
    display: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-play-cta {
    width: min(100% - 48px, 270px) !important;
    min-height: 52px !important;
    margin: 0 auto !important;
    padding: 0 22px !important;
    gap: 9px;
    border-radius: 18px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    letter-spacing: -.01em;
    background: linear-gradient(135deg, #4777f3 0%, #7852ea 100%) !important;
    box-shadow: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-play-cta svg {
    width: 17px;
    height: 17px;
  }

  /* Quick facts: compact light/dark cards, never the old black slab. */
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-facts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    padding: 12px 0 0 !important;
    background: transparent !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact {
    min-width: 0;
    min-height: 64px !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    padding: 10px 11px !important;
    border: 1px solid var(--gh-stroke) !important;
    border-radius: 18px !important;
    color: var(--gh-text) !important;
    background: var(--gh-surface) !important;
    box-shadow: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    color: var(--gh-accent) !important;
    background: color-mix(in srgb, var(--gh-accent) 10%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--gh-accent) 18%, transparent) !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact small {
    color: var(--gh-text-3) !important;
    font-size: 9px !important;
    font-weight: 850 !important;
    letter-spacing: .075em !important;
    line-height: 1.1;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact strong {
    margin-top: 4px !important;
    color: var(--gh-text) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    line-height: 1.05;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact-arrow {
    width: 17px !important;
    height: 17px !important;
    color: var(--gh-text-3) !important;
  }

  /* Action row: same surface as facts, shorter and calmer. */
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px !important;
    padding: 10px 0 4px !important;
    background: transparent !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-actions button {
    height: 48px !important;
    min-width: 0;
    padding: 0 8px !important;
    border: 1px solid var(--gh-stroke) !important;
    border-radius: 16px !important;
    color: var(--gh-text-2) !important;
    background: var(--gh-surface) !important;
    box-shadow: none !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-actions button svg {
    width: 20px !important;
    height: 20px !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-actions button.active {
    color: #f04467 !important;
    border-color: rgba(240,68,103,.30) !important;
    background: rgba(240,68,103,.08) !important;
  }

  body.gamehihe-os .gamehihe-mobile-related {
    margin-top: 20px !important;
    padding-top: 0 !important;
  }
}

@media (max-width: 390px) {
  body.gamehihe-os .wrap.gamehihe-game-detail {
    padding-right: max(10px, env(safe-area-inset-right)) !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
  }
  body.gamehihe-os .gamehihe-game-detail .stage { border-radius: 20px !important; }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-play-cta {
    width: min(100% - 34px, 250px) !important;
    min-height: 50px !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 7px !important;
    padding: 9px !important;
  }
  body.gamehihe-os .gamehihe-game-detail .yiyi-mobile-game-fact-icon {
    width: 34px !important;
    height: 34px !important;
  }
}


/* =========================================================
   GameHiHe 2.4.17 — fullscreen focus + richer detail discovery
   ========================================================= */
/* Fullscreen/immersive mode is player-only. Related rails and the normal
   detail page stay out of view while the viewport is dedicated to the game. */
html.yiyi-desktop-player-open body.yiyi-page-game .gamehihe-related-below,
body.yiyi-desktop-player-open.yiyi-page-game .gamehihe-related-below,
html.yiyi-desktop-player-open body.yiyi-page-game .gamehihe-mobile-related,
body.yiyi-desktop-player-open.yiyi-page-game .gamehihe-mobile-related,
html.yiyi-desktop-player-open body.yiyi-page-game .gamehihe-detail-content,
body.yiyi-desktop-player-open.yiyi-page-game .gamehihe-detail-content,
html.yiyi-mobile-player-open body.yiyi-page-game .gamehihe-related-below,
body.yiyi-mobile-player-open.yiyi-page-game .gamehihe-related-below,
html.yiyi-mobile-player-open body.yiyi-page-game .gamehihe-mobile-related,
body.yiyi-mobile-player-open.yiyi-page-game .gamehihe-mobile-related,
html.yiyi-mobile-player-open body.yiyi-page-game .gamehihe-detail-content,
body.yiyi-mobile-player-open.yiyi-page-game .gamehihe-detail-content {
  display: none !important;
}

.gamehihe-detail-recommendation {
  margin-top: 34px;
}
.gamehihe-detail-recommendation__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.gamehihe-detail-recommendation__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  color: var(--gh-text);
  font-size: clamp(21px, 1.6vw, 28px);
  line-height: 1.15;
  font-weight: 850;
}
.gamehihe-detail-recommendation__head h2 svg {
  flex: 0 0 auto;
  color: var(--gh-accent);
}
.gamehihe-detail-recommendation__head > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: var(--gh-accent);
  font-size: 13px;
  font-weight: 800;
}
.gamehihe-detail-recommendation .gamehihe-game-grid.detail-recommend {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 18px 16px;
}
.gamehihe-detail-recommendation .gh-game-thumb {
  aspect-ratio: 1;
  border-radius: 26% !important;
}
.gamehihe-detail-recommendation .gh-game-copy {
  padding-top: 8px;
  text-align: center;
}
.gamehihe-detail-recommendation .gh-game-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gh-text);
  font-size: 12px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.gamehihe-detail-recommendation .gh-game-copy small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--gh-text-3);
  font-size: 10.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .gamehihe-detail-recommendation .gamehihe-game-grid.detail-recommend {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .gamehihe-detail-recommendation .gamehihe-game-grid.detail-recommend {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 12px;
  }
}
@media (max-width: 680px) {
  .gamehihe-detail-recommendation {
    margin-top: 26px;
  }
  .gamehihe-detail-recommendation__head {
    gap: 10px;
    margin-bottom: 13px;
  }
  .gamehihe-detail-recommendation__head h2 {
    font-size: 19px;
  }
  .gamehihe-detail-recommendation__head > a {
    font-size: 11px;
  }
  .gamehihe-detail-recommendation .gamehihe-game-grid.detail-recommend {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }
  .gamehihe-detail-recommendation .gh-game-copy strong {
    font-size: 12px;
  }
}
