
:root {
  color-scheme: light;
  --bg: #f4fbff;
  --bg-soft: #ffffff;
  --paper: #ffffff;
  --panel: rgba(255, 255, 255, .9);
  --panel-strong: #ffffff;
  --ink: #172033;
  --muted: #607087;
  --line: rgba(23, 32, 51, .16);
  --dash: rgba(77, 124, 255, .22);
  --accent: #4d7cff;
  --accent-2: #16c4a5;
  --accent-3: #ff6aa2;
  --shadow: 0 18px 42px rgba(22, 45, 78, .12);
  --radius: 18px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}
body.player-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(240px, 420px) minmax(380px, 1fr);
  gap: 18px;
  align-items: center;
}
.brand {
  min-width: max-content;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 1.18rem;
  font-weight: 950;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: url("../favicon.jpg?v=sep16miz1") center / cover no-repeat;
}
.brand-word span { color: var(--accent); }
.search {
  width: 100%;
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.search span {
  color: var(--accent-3);
  font-size: 1.35rem;
  font-weight: 950;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}
.search input::placeholder { color: var(--muted); }
.top-nav {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  font-weight: 900;
}
.top-nav a {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  opacity: .78;
}
.top-nav a:hover,
.top-nav a.active { opacity: 1; }
.top-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 25%, transparent);
}
.view { min-height: 70vh; }
.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding: 28px 0 24px;
}
.home-spotlight,
.content-area,
.sidebar,
.home-sidebar,
.detail-sidebar { min-width: 0; }
.home-rail,
.home-sidebar { display: grid; gap: 16px; align-content: start; }
.hero-slider {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 38%);
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 58px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .18;
  z-index: -2;
}
.hero-screen {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--paper) 96%, transparent), color-mix(in srgb, var(--paper) 78%, transparent));
}
.hero-slide-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.hero-visual {
  min-width: 0;
  display: grid;
  place-items: center;
}
.hero-art {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--paper) 75%, transparent);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .14);
}
.hero-tag,
.detail-category,
.topic-count {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent-2);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}
.hero-slide-content h1 {
  max-width: 100%;
  margin: 16px 0 12px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: .98;
  letter-spacing: 0;
}
.hero-slide-content p {
  max-width: 580px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.hero-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.button,
.play-link,
.rank-play,
.back-button,
.grid-tab {
  border: 0;
  border-radius: var(--radius);
  font-weight: 950;
}
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.button.primary,
.grid-tab.active,
.category-button.active,
.category-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.button.ghost,
.back-button,
.grid-tab,
.play-link,
.rank-play,
.tag {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--panel-strong);
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}
.dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.dot.active {
  width: 30px;
  border-color: transparent;
  background: var(--accent);
}

.home-panel,
.side-block,
.chart-card,
.topic-card,
.home-category-band,
.feature-tile,
.page-hero,
.game-card,
.detail,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.home-panel { padding: 22px; }
.home-panel-head,
.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.home-panel-head span,
.home-panel-head a,
.home-section-head span,
.see-all-link {
  font-weight: 950;
}
.home-panel-head a,
.home-section-head span,
.see-all-link { color: var(--accent); font-size: .84rem; }
.pick-card,
.compact-game-link,
.feature-tile,
.detail-related-card {
  min-width: 0;
  display: grid;
  align-items: center;
}
.pick-card { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; }
.pick-icon {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 18px;
  background: var(--panel-strong);
}
.pick-card strong,
.pick-card small,
.compact-game-link strong,
.compact-game-link small,
.feature-tile strong,
.feature-tile small,
.ranking-copy strong,
.ranking-copy small,
.detail-related-card strong,
.detail-related-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-card small,
.compact-game-link small,
.feature-tile small,
.ranking-copy small,
.detail-related-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
}
.pick-panel .button { width: 100%; margin-top: 16px; }
.compact-list { display: grid; gap: 10px; }
.compact-game-link {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
  min-height: 64px;
  padding: 8px;
  border: 1px dashed var(--dash);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--panel-strong) 62%, transparent);
}
.compact-game-icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 13px;
}
.compact-game-link b,
.rank-play {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: .72rem;
}

.home-category-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px 20px;
}
.home-category-band > div > span,
.page-hero p,
.detail-panel-head span {
  display: block;
  margin: 0 0 4px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.home-category-band h2,
.home-section-head h2,
.inline-title,
.side-block h2,
.chart-card h2,
.detail-panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.22;
  letter-spacing: 0;
}
.category-strip,
.featured-tags {
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}
.category-strip::-webkit-scrollbar,
.featured-tags::-webkit-scrollbar,
.top-nav::-webkit-scrollbar { display: none; }
.category-button {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 950;
}
.category-button span {
  min-width: 26px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}
.category-button.active span,
.category-button:hover span { color: #ffffff; }
.home-main-grid,
.main-layout,
.directory-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding-bottom: 54px;
}
.home-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.feature-tile {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  min-height: 104px;
  padding: 16px;
}
.feature-icon {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 16px;
}
.home-section-container { margin-bottom: 34px; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.game-card {
  min-width: 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}
.game-card-icon {
  width: 100%;
  height: 138px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  background: var(--panel-strong);
}
.game-card h3 {
  margin: 16px 0 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.rating { color: var(--accent-3); }
.game-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  min-height: 64px;
  margin: 12px 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.58;
}
.card-foot {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 900;
}
.play-link {
  min-width: 68px;
  min-height: 38px;
  display: grid;
  place-items: center;
}
.sidebar,
.detail-sidebar { display: grid; gap: 18px; }
.side-block,
.chart-card,
.topic-card,
.detail-panel { padding: 24px; }
.ranking-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}
.ranking-item a {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px 50px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px dashed var(--dash);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--panel-strong) 64%, transparent);
}
.ranking-rank {
  color: var(--accent);
  font-weight: 950;
  text-align: center;
}
.ranking-icon {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 14px;
}
.ranking-copy { min-width: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.tag {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 900;
}
.page-hero {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 28px;
  margin-bottom: 26px;
  padding: 36px;
}
.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0;
}
.page-hero span { max-width: 720px; color: var(--muted); line-height: 1.7; }
.category-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 38px;
}
.category-index-btn {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.category-index-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent);
  font-size: .82rem;
  font-weight: 950;
}
.pill-title {
  width: max-content;
  max-width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  margin: 0 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: .86rem;
  font-weight: 950;
}
.charts-grid,
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 58px;
}
.topic-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.topic-card h2 {
  margin: 16px 0 10px;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.topic-card p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}
.topic-previews {
  display: grid;
  gap: 10px;
  margin-top: auto;
}
.topic-preview-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}
.topic-preview-icon {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
}
.topic-preview-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}
.topic-preview-item b { color: var(--accent); font-size: .74rem; }
.featured-shell { padding-bottom: 58px; }
.featured-tags { margin-bottom: 20px; }
.grid-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; }
.grid-tab { min-height: 36px; padding: 0 14px; color: var(--muted); }
.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}
.detail-shell { padding: 24px 0 56px; }
.back-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 16px;
}
.detail-page { display: grid; gap: 24px; }
.detail { overflow: hidden; }
.detail-hero-card { position: relative; }
.detail-banner {
  min-height: 310px;
  position: relative;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: color-mix(in srgb, var(--accent) 8%, var(--paper));
}
.detail-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--panel-strong) 92%);
}
.detail-main {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(180px, auto);
  gap: 20px;
  align-items: center;
  padding: 0 28px 24px;
  margin-top: -64px;
}
.detail-icon {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.detail-title-copy { min-width: 0; }
.detail-main h1 {
  margin: 8px 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.08;
}
.detail-actions { justify-self: end; width: min(220px, 100%); }
.detail-actions .button { width: 100%; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 28px 28px;
}
.stat,
.detail-feature-grid div,
.detail-info-list div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}
.stat span,
.detail-feature-grid span,
.detail-info-list dt {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.stat strong,
.detail-feature-grid strong,
.detail-info-list dd {
  display: block;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 950;
}
.detail-content-stack { display: grid; gap: 20px; min-width: 0; }
.detail-panel p {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.75;
}
.detail-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.detail-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.65;
}
.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-related-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  min-height: 82px;
  padding: 12px;
  border: 1px dashed var(--dash);
  border-radius: calc(var(--radius) - 4px);
}
.detail-related-icon {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}
.detail-info-list { display: grid; gap: 10px; margin: 0; }
.hidden { display: none !important; }
.player {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}
.player-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 12, 22, .68);
}
.player-window {
  position: relative;
  width: min(1120px, 100%);
  height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
}
.player-bar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
}
.player-bar h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}
.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel);
  font-weight: 950;
}
iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}
.site-footer {
  margin-top: 36px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
}
.footer-row {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.footer-row > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 950;
}
.footer-row > span::before {
  content: "";
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: url("../favicon.jpg?v=sep16miz1") center / cover no-repeat;
}
.footer-row > span::after {
  content: "Fast HTML5 picks with on-demand game loading.";
  grid-column: 2;
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.footer-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-strong);
  font-weight: 900;
}
.footer-links a:hover {
  color: #ffffff;
  border-color: transparent;
  background: var(--accent);
}

@media (max-width: 1120px) {
  .header-row {
    grid-template-columns: auto minmax(220px, 1fr);
    row-gap: 12px;
  }
  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .charts-grid,
  .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .home-dashboard,
  .home-main-grid,
  .main-layout,
  .directory-layout,
  .detail-layout { grid-template-columns: 1fr; }
  .home-rail,
  .home-sidebar,
  .detail-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-slide {
    grid-template-columns: 1fr;
    place-items: center;
  }
  .hero-visual { display: none; }
  .hero-slide-content {
    width: min(620px, 100%);
    align-items: center;
    text-align: center;
  }
  .hero-actions { justify-content: center; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { top: 0; }
  .header-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
  }
  .brand { grid-column: 1 / -1; width: max-content; max-width: 100%; font-size: 1.06rem; }
  .search { grid-column: 1 / -1; height: 46px; }
  .top-nav {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
    padding-bottom: 4px;
  }
  .top-nav a { min-height: 42px; padding: 0 16px; }
  .home-dashboard { padding-top: 20px; }
  .hero-slider { min-height: 500px; }
  .hero-slide {
    min-height: 500px;
    padding: 26px 18px 70px;
  }
  .hero-slide-content h1 { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.04; }
  .hero-slide-content p {
    -webkit-line-clamp: 5;
    font-size: .96rem;
    line-height: 1.54;
  }
  .hero-actions .button {
    flex: 1 1 136px;
    min-width: min(148px, 100%);
  }
  .home-category-band,
  .home-feature-strip,
  .home-rail,
  .home-sidebar,
  .category-index-grid,
  .charts-grid,
  .topics-grid,
  .detail-sidebar,
  .detail-feature-grid,
  .detail-related-grid,
  .footer-row { grid-template-columns: 1fr; }
  .home-category-band { align-items: start; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-card { min-height: 286px; padding: 12px; }
  .game-card-icon { height: 112px; }
  .game-card p { -webkit-line-clamp: 2; min-height: 44px; }
  .card-foot { grid-template-columns: 1fr; }
  .page-hero { min-height: 160px; padding: 26px 20px; }
  .ranking-item a { grid-template-columns: 28px 46px minmax(0, 1fr) 48px; }
  .detail-main {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 0 16px 20px;
  }
  .detail-icon { width: 82px; height: 82px; }
  .detail-actions { grid-column: 1 / -1; justify-self: stretch; width: 100%; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 16px; }
  .detail-panel { padding: 20px; }
  .footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }
  .footer-links a { min-width: 0; padding: 0 8px; font-size: .84rem; }
}

@media (max-width: 430px) {
  .game-grid { grid-template-columns: 1fr; }
  .hero-slider,
  .hero-slide { min-height: 530px; }
  .hero-actions .button { flex-basis: 100%; }
}


:root {
  color-scheme: light;
  --bg: #126b72;
  --bg-soft: #fffaf5;
  --paper: #fffdfb;
  --panel: rgba(255, 252, 248, .94);
  --panel-strong: #fff8f1;
  --ink: #3f2940;
  --muted: #765f70;
  --line: rgba(139, 69, 105, .24);
  --dash: rgba(232, 93, 139, .34);
  --accent: #e85d8b;
  --accent-2: #7a5de3;
  --accent-3: #f2ad4d;
  --shadow: 0 20px 48px rgba(143, 69, 105, .16);
  --radius: 22px;
}
body {
  background:
    radial-gradient(ellipse at 5% 0%, rgba(232, 93, 139, .24), transparent 32%),
    radial-gradient(ellipse at 96% 12%, rgba(122, 93, 227, .2), transparent 31%),
    radial-gradient(ellipse at 52% 100%, rgba(242, 173, 77, .18), transparent 38%),
    linear-gradient(135deg, #fffaf7 0%, #fff1ed 48%, #f4efff 100%);
  background-attachment: fixed;
}
.site-header {
  border-bottom: 4px solid var(--accent);
  background: rgba(255, 252, 248, .9);
}
.brand {
  border: 2px solid rgba(122, 93, 227, .28);
  border-left: 7px solid var(--accent-2);
  border-radius: 18px 26px 26px 18px;
  background: linear-gradient(135deg, #fffdfb, #fff0ea);
  box-shadow: 0 12px 28px rgba(143, 69, 105, .14);
}
.brand-word span { color: var(--accent); }
.search {
  border: 2px solid rgba(232, 93, 139, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
}
.top-nav {
  padding: 7px;
  border: 2px solid rgba(122, 93, 227, .2);
  border-radius: 999px;
  background: rgba(255, 248, 244, .8);
}
.top-nav a { border-radius: 999px; }
.home-dashboard {
  grid-template-columns: minmax(0, 1fr) 315px;
  align-items: stretch;
}
.hero-slider {
  border: 2px solid rgba(232, 93, 139, .26);
  border-radius: 30px;
  background: linear-gradient(135deg, #fffdfb 0%, #fff1e9 52%, #f2efff 100%);
  box-shadow: 0 22px 50px rgba(143, 69, 105, .18);
}
.hero-slide {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 36%);
}
.hero-screen {
  background:
    linear-gradient(100deg, rgba(255, 253, 251, .97), rgba(255, 239, 231, .86) 54%, rgba(242, 238, 255, .75));
}
.hero-art {
  border-radius: 28px;
  border: 8px solid rgba(255, 255, 255, .9);
  box-shadow: 16px 16px 0 rgba(122, 93, 227, .18), -12px -12px 0 rgba(232, 93, 139, .16);
}
.hero-tag,
.detail-category,
.topic-count {
  color: #fffafc;
  background: var(--accent-2);
}
.hero-slide-content h1 {
  color: var(--ink);
  text-transform: none;
}
.button.primary,
.grid-tab.active,
.category-button.active,
.category-button:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.button.ghost {
  border-radius: 999px;
}
.home-rail {
  grid-template-columns: 1fr;
}
.home-panel,
.game-card,
.side-block,
.chart-card,
.topic-card,
.detail-panel,
.page-hero,
.home-category-band,
.feature-tile {
  border-width: 1px;
  border-color: rgba(232, 93, 139, .22);
  background: linear-gradient(180deg, rgba(255, 253, 250, .96), rgba(255, 245, 238, .94));
  box-shadow: 0 18px 42px rgba(143, 69, 105, .14);
}
.home-category-band {
  border-top: 5px solid var(--accent-3);
}
.game-card {
  border-radius: 22px;
}
.game-card-icon {
  border-radius: 18px;
}
.play-link,
.rank-play {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.page-hero {
  border-left: 8px solid var(--accent-2);
}
@media (max-width: 700px) {
  .top-nav { border-radius: 18px; }
  .home-dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .hero-slide { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-slide-content {
    width: min(620px, 100%);
    align-items: center;
    text-align: center;
  }
  .hero-actions { justify-content: center; }
}

@media (min-width: 1121px) {
  .header-row { grid-template-columns: auto minmax(240px, 420px) minmax(280px, 1fr); }
}
@media (min-width: 701px) and (max-width: 1120px) {
  .header-row { grid-template-columns: auto minmax(220px, 1fr); }
}
@media (max-width: 700px) {
  .header-row { grid-template-columns: 1fr; }
  .brand { grid-column: 1; grid-row: 1; }
  .search { grid-row: 2; }
  .top-nav { grid-row: 3; }
}

/* MizGame visual system: clear lagoon, rounded aqua cards, breezy discovery layout. */
:root {
  color-scheme: light;
  --bg: #e8fbf6;
  --bg-soft: #f5fff9;
  --paper: #fffef7;
  --panel: rgba(255, 254, 247, .96);
  --panel-strong: #ffffff;
  --ink: #15383e;
  --muted: #557174;
  --line: rgba(18, 107, 114, .22);
  --dash: rgba(21, 169, 155, .36);
  --accent: #15a99b;
  --accent-2: #2f7cff;
  --accent-3: #ffd166;
  --shadow: 0 20px 44px rgba(23, 103, 111, .15);
  --radius: 30px;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(21,169,155,.22), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(47,124,255,.16), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255,209,102,.22), transparent 34%),
    linear-gradient(135deg, #e6fbf5 0%, #f9fff7 50%, #e8f4ff 100%);
  background-attachment: fixed;
}
.site-header {
  background: rgba(250, 255, 250, .9);
  border-bottom: 5px solid var(--accent);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(23,103,111,.12);
}
.header-row {
  min-height: 88px;
  grid-template-columns: auto minmax(250px, 450px) minmax(300px, 1fr);
}
.brand {
  border: 2px solid rgba(21,169,155,.36);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #ddfbf2);
  color: #15383e;
  box-shadow: 0 12px 28px rgba(21,169,155,.18);
}
.brand-word span { color: var(--accent-2); }
.search {
  border: 2px solid rgba(21,169,155,.28);
  border-radius: 999px;
  background: #ffffff;
}
.search span { color: var(--accent); }
.search input { color: #15383e; }
.search input::placeholder { color: #5a777a; }
.site-header .top-nav {
  width: max-content;
  max-width: 100%;
  justify-self: end;
  padding: 6px;
  border: 1px solid rgba(21,169,155,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
}
.top-nav a {
  border: 0;
  border-radius: 999px;
  color: #31595e;
  opacity: 1;
  background: transparent;
}
.top-nav a:hover,
.top-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #15a99b, #2f7cff);
}

.home-dashboard {
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 28px;
}
.hero-slider {
  min-height: 472px;
  border: 1px solid rgba(21,169,155,.3);
  border-radius: 42px;
  background: linear-gradient(135deg, #fffef7 0%, #ddfbf2 56%, #e7f1ff 100%);
  box-shadow: var(--shadow);
}
.hero-bg { opacity: .1; mix-blend-mode: multiply; }
.hero-screen {
  background: linear-gradient(105deg, rgba(255,254,247,.98), rgba(224,250,242,.84) 58%, rgba(230,242,255,.75));
}
.hero-slide {
  grid-template-columns: minmax(0, 1fr) minmax(245px, 35%);
}
.hero-slide-content h1 {
  color: #15383e;
  letter-spacing: -.035em;
  text-shadow: 0 2px 0 rgba(255,255,255,.76);
}
.hero-slide-content p { color: #557174; }
.hero-tag,
.detail-category,
.topic-count {
  color: #ffffff;
  background: linear-gradient(135deg, #15a99b, #2f7cff);
}
.hero-art {
  border: 8px solid rgba(255,255,255,.88);
  border-radius: 36px;
  background: #eefdf8;
  box-shadow: 0 20px 42px rgba(21,169,155,.18), 12px 12px 0 rgba(255,209,102,.26);
}
.button.primary,
.grid-tab.active,
.category-button.active,
.category-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #15a99b, #2f7cff);
}
.button.ghost,
.back-button,
.grid-tab,
.play-link,
.rank-play,
.tag {
  color: #15383e;
  border-color: rgba(21,169,155,.28);
  background: #fffef7;
}

.home-panel,
.game-card,
.side-block,
.chart-card,
.topic-card,
.detail-panel,
.page-hero,
.home-category-band,
.feature-tile {
  border: 1px solid rgba(21,169,155,.22);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,254,247,.98), rgba(234,252,246,.92));
  box-shadow: var(--shadow);
}
.home-panel-head span,
.home-panel h2,
.home-panel h3,
.home-panel p,
.home-panel strong,
.home-section-head h2,
.game-card h3,
.game-card p,
.game-card .meta,
.game-card .card-foot,
.feature-tile strong,
.detail-panel h2,
.detail-panel p,
.page-hero h1,
.page-hero span,
.stat strong,
.detail-feature-grid strong,
.detail-info-list dd {
  color: #15383e !important;
}
.pick-card small,
.compact-game-link small,
.feature-tile small,
.ranking-copy small,
.detail-related-card small,
.game-card small,
.detail-panel .muted,
.detail-steps,
.stat span,
.detail-feature-grid span,
.detail-info-list dt,
.footer-row,
.footer-row > span::after {
  color: #5d787a !important;
}
.home-panel-head a,
.home-section-head span,
.see-all-link,
.compact-game-link b,
.rank-play,
.category-button span,
.home-category-band > div > span {
  color: #126b72 !important;
}
.home-category-band {
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  border-left: 8px solid #ffd166;
  background: linear-gradient(115deg, #126b72, #15a99b);
}
.home-category-band h2,
.home-category-band > div > span {
  color: #fffef7 !important;
}
.home-category-band .category-button {
  color: #fffef7;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
}
.home-category-band .category-button span { color: #ffd166 !important; }
.home-category-band .category-button:hover,
.home-category-band .category-button.active {
  color: #15383e;
  border-color: transparent;
  background: #ffd166;
}
.home-category-band .category-button:hover span,
.home-category-band .category-button.active span { color: #15383e !important; }
.game-card {
  border-radius: 28px 12px 28px 12px;
}
.game-card-icon {
  border: 1px solid rgba(21,169,155,.26);
  border-radius: 22px 10px 22px 10px;
}
.play-link,
.rank-play {
  color: #ffffff !important;
  border-color: transparent;
  background: linear-gradient(135deg, #15a99b, #2f7cff);
}
.page-hero {
  border-left: 8px solid #2f7cff;
  background: linear-gradient(115deg, #fffef7, #ddfbf2);
}
.footer-row {
  border-color: rgba(21,169,155,.22);
  background: rgba(255,254,247,.9);
}

.hero-slide,
.hero-slide-content,
.hero-slide-content h1,
.hero-slide-content p,
.hero-visual,
.hero-art {
  min-width: 0;
  max-width: 100%;
}
.hero-slide-content h1 {
  width: 100%;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: normal;
}
.hero-slider { container-type: inline-size; }
@container (max-width: 780px) {
  .hero-slide {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 30px 24px 72px;
  }
  .hero-visual { display: none; }
  .hero-slide-content {
    width: min(560px, 100%);
    align-items: center;
    text-align: center;
  }
  .hero-slide-content h1 {
    font-size: clamp(2.1rem, 9cqw, 3.2rem);
    line-height: 1.05;
  }
  .hero-actions { justify-content: center; }
}
@media (max-width: 1120px) {
  .header-row { grid-template-columns: auto minmax(220px, 1fr); }
  .site-header .top-nav { justify-self: start; }
}
@media (max-width: 700px) {
  .header-row { grid-template-columns: 1fr; }
  .brand { grid-column: 1; grid-row: 1; }
  .search { grid-column: 1; grid-row: 2; }
  .site-header .top-nav {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    justify-self: stretch;
    overflow-x: auto;
  }
  .home-dashboard,
  .home-main-grid,
  .home-rail,
  .home-sidebar,
  .home-category-band { grid-template-columns: 1fr; }
}
