* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color: #23372c; background: #f6f4e9; font-family: "Segoe UI", system-ui, sans-serif;
  --ink: #23372c; --text: #3e5347; --accent: #245845; --paper: #f6f4e9;
  --edge: #dce2d4; --panel: #fffdf6; --round: 21px;
}
body { margin: 0; color: var(--ink); background: var(--paper); min-width: 0; }
body[data-layout="showcase"] {
  --ink: #173c39; --text: #42645e; --accent: #9d4328; --paper: #f8f1e6;
  --edge: #e5d8c6; --panel: #fffbf1;
}
button, input, summary { font: inherit; }
button, summary { color: inherit; cursor: pointer; touch-action: manipulation; }
button { background: var(--panel); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #477e65; outline-offset: 3px; }
.site-header {
  background: #19382e; color: #fff9ec; position: sticky; top: 0; z-index: 5;
  padding-top: env(safe-area-inset-top); box-shadow: 0 1px 0 #20392e22;
}
.head-inner {
  display: flex; min-height: 68px; align-items: center; justify-content: space-between;
  gap: 12px; max-width: 1500px; margin-inline: auto;
  padding: 8px max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left));
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 27px; font-weight: 780; letter-spacing: -.055em; white-space: nowrap; }
.brand-domain { color: #b5d5a3; }
.brand-symbol {
  display: flex; align-items: center; justify-content: center; gap: 4px; flex: none;
  width: 36px; height: 36px; border-radius: 11px; background: #dce8bd;
}
.brand-symbol i { width: 3px; height: 13px; border-radius: 100px; background: #255543; }
.brand-symbol i:nth-child(2) { height: 21px; }
.account {
  min-height: 44px; padding: 8px 16px; border: 1px solid #9db29a; border-radius: 12px;
  color: #fff9ec; background: #264b3d; font-weight: 680; white-space: nowrap;
}
.account:hover { background: #315c48; }
[data-layout="showcase"] .site-header { color: var(--ink); background: #fffcf4; }
[data-layout="showcase"] .brand-domain { color: #a2482d; }
[data-layout="showcase"] .brand-symbol { background: #f5d7a4; }
[data-layout="showcase"] .brand-symbol i { background: #934629; }
[data-layout="showcase"] .account { color: #154e44; background: #e6f2e9; border-color: #ccdfd2; }

.page {
  display: grid; grid-template-columns: minmax(218px, 250px) minmax(0,1fr);
  width: min(100%,1500px); margin-inline: auto; align-items: start;
}
.sidebar {
  position: sticky; top: 68px; min-height: calc(100dvh - 68px);
  padding: 27px 12px 18px 21px; border-right: 1px solid #dbe0d3;
}
.sidebar h2 { margin: 0 0 13px 7px; color: #405849; font-size: 15px; font-weight: 720; }
.sidebar nav, .picker nav { display: grid; gap: 6px; }
[data-category] {
  display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto; gap: 1px 9px;
  width: 100%; min-height: 52px; align-items: center; padding: 6px 7px;
  text-align: left; border: 1px solid transparent; border-radius: 11px;
  color: #263c30; background: transparent; font-weight: 675; font-size: 14px; line-height: 1.19;
}
[data-category] .catalog-icon {
  grid-row: 1 / span 2; display: block; width: 36px; aspect-ratio: 1; border-radius: 10px;
  background: url("/design/category-icons.png") var(--x) var(--y) / 400% 300%;
}
[data-category] .count { color: #576e60; font-size: 12px; font-weight: 500; }
[data-category]:hover { background: #edf1e5; }
[data-category][aria-pressed="true"] { background: #e0ecd6; border-color: #a4c0a1; }
main { min-width: 0; padding: 24px max(24px,env(safe-area-inset-right)) 36px max(24px,env(safe-area-inset-left)); }
[data-layout="showcase"] .page { display: block; width: min(100%,1330px); }
[data-layout="showcase"] .head-inner { max-width: 1330px; }
[data-layout="showcase"] .sidebar { display: none; }

.hero {
  position: relative; display: flex; align-items: center; isolation: isolate; overflow: hidden;
  min-height: clamp(260px,24vw,340px); border-radius: var(--round); border: 1px solid #c3d3b5;
  background: #e2ecd1; 
}
.hero-photo {
  position: absolute; inset: 0 0 0 41%; z-index: -2;
  background: url("/design/lake.webp") center 37% / cover no-repeat;
}
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#e2ecd1 0%,#e2ecd145 28%,transparent 54%); }
.hero-character {
  position: absolute; z-index: -1; width: clamp(235px,27.4vw,385px);
  bottom: -20%; right: 4%; pointer-events: none; filter: drop-shadow(0 7px 10px #3c412b30);
}
.hero-text { max-width: 66%; padding: 29px 0 30px clamp(23px,4vw,59px); }
.hero h1 {
  margin: 0; max-width: 600px; color: #193d31;
  font-size: clamp(34px,4.1vw,61px); line-height: 1.04; letter-spacing: -.046em; font-weight: 800;
  text-wrap: balance;
}
.weekly {
  margin: 14px 0 19px; color: #385646; font-size: clamp(14px,1.45vw,19px); font-weight: 640;
  line-height: 1.23;
}
.start, .all-free {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 15px;
  border: 1px solid transparent; border-radius: 11px; font-weight: 715; white-space: nowrap;
}
.start { background: var(--accent); color: #fffbea; }
.start span, .all-free span { font-size: 1.25em; line-height: 1; }
.start:hover { filter: brightness(1.09); }
[data-layout="showcase"] .hero { min-height: clamp(247px,23vw,315px); background: #f7e6c4; border-color: #e6d4b4; }
[data-layout="showcase"] .hero-photo { inset-inline-start: 40%; background-image: url("/design/lake.webp"); background-position: center 42%; }
[data-layout="showcase"] .hero-photo::after { background: linear-gradient(90deg,#f7e6c4 0%,#f7e6c445 30%,transparent 58%); }
[data-layout="showcase"] .hero-character { width: clamp(225px,22vw,345px); bottom: -12%; right: 8.5%; transform: rotate(-6deg); }
[data-layout="showcase"] .hero h1 { color: #24504a; }
[data-layout="showcase"] .weekly { color: #5d5844; }

.tools { display: flex; align-items: start; flex-wrap: wrap; gap: 8px; margin: 17px 0 18px; }
.search {
  display: flex; align-items: center; background: var(--panel); gap: 11px;
  width: min(100%,397px); min-height: 45px; padding: 0 13px;
  border: 1px solid var(--edge); border-radius: 12px; color: #425f50;
}
.search:focus-within { border-color: #78a18d; }
.search input { display: block; width: 100%; min-width: 0; padding: 7px 0; border: 0; color: var(--ink); background: none; outline: none; }
.magnifier { display: block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid; position: relative; flex-shrink: 0; }
.magnifier::after { content: ""; position: absolute; width: 6px; height: 2px; border-radius: 2px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); }
.picker { display: none; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); min-width: 0; }

.result { scroll-margin-top: 82px; }
.section-title { display: flex; gap: 8px; align-items: end; justify-content: space-between; margin: 0 0 12px; }
.section-title h2, .directory h2 { margin: 0; font-size: clamp(23px,3vw,39px); line-height: 1.11; letter-spacing: -.022em; }
.section-title p { margin: 5px 0 0; color: var(--text); font-size: clamp(13px,1.42vw,16px); line-height: 1.25; }
.all-free { background: var(--panel); border-color: var(--edge); color: #23574c; }
.all-free:hover { border-color: #7b9b88; }
#game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
[data-layout="showcase"] #game-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.game-card {
  display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 0; text-align: left;
  overflow: hidden; border: 1px solid var(--edge); border-radius: 14px;
  box-shadow: 0 4px 10px #3147350d;
}
.game-card:hover { border-color: #90ac91; box-shadow: 0 5px 14px #31473524; }
.cover {
  display: block; position: relative; width: 100%; aspect-ratio: 16 / 10;
  overflow: hidden; background: linear-gradient(140deg,#d7e7d0,#e9ede1);
}
.cover-1, .cover-3 { background: linear-gradient(140deg,#d8e9e4,#e8f1ed); }
.cover-2, .cover-4 { background: linear-gradient(140deg,#e3e2ed,#e9edee); }
.cover-5, .cover-6 { background: linear-gradient(140deg,#f4e7d3,#faf2e3); }
.cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.access {
  position: absolute; bottom: 6px; left: 6px; border-radius: 99px; padding: 3px 7px;
  font-size: clamp(11px,.95vw,13px); line-height: 1.18; font-weight: 730;
}
.free { background: #e1f6d7; color: #245543; border: 1px solid #bcd9b2; }
.member { background: #ffdf78; color: #5e4212; border: 1px solid #e8b84a; }
.game-name {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 5px;
  min-height: 53px; padding: 8px 11px; font-size: clamp(13px,1.55vw,21px); line-height: 1.19; font-weight: 730;
}
.game-name span { color: #547f68; font-size: 1.5em; font-weight: 550; }
.directory { display: none; margin-top: 27px; }
[data-layout="showcase"] .directory { display: block; }
.directory h2 { font-size: clamp(22px,2.4vw,34px); margin-bottom: 11px; }
.directory nav { display: grid; gap: 8px; grid-template-columns: repeat(7,minmax(0,1fr)); }
.directory [data-category] {
  background: #fffbf2; border-color: #e6dccd; min-height: 76px;
  padding: 7px; align-content: center;
}
.directory [data-category]:hover,
.directory [data-category][aria-pressed="true"] { border-color: #a2bdae; background: #e4eee1; }

@media (max-width: 1160px) {
  .directory nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 950px) {
  .page { grid-template-columns: minmax(203px,220px) minmax(0,1fr); }
  #game-grid, [data-layout="showcase"] #game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-text { max-width: 72%; }
}
@media (max-width: 720px) {
  .head-inner { min-height: 55px; padding: 5px max(11px,env(safe-area-inset-right)) 5px max(11px,env(safe-area-inset-left)); gap: 8px; }
  .brand { font-size: clamp(17px,5.4vw,25px); gap: 6px; }
  .brand-symbol { width: 30px; height: 30px; gap: 3px; border-radius: 9px; }
  .brand-symbol i { height: 10px; }
  .brand-symbol i:nth-child(2) { height: 17px; }
  .account { padding-inline: 8px; font-size: clamp(11px,3.2vw,14px); }
  .page, [data-layout="showcase"] .page { display: block; }
  .sidebar { display: none; }
  main { padding: 11px max(10px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
  .hero, [data-layout="showcase"] .hero { min-height: 208px; border-radius: 16px; }
  .hero-text { max-width: 70%; padding: 14px 0 15px 12px; }
  .hero h1 { font-size: clamp(24px,7.4vw,38px); line-height: 1.04; text-wrap: wrap; }
  .weekly { margin: 9px 0 12px; font-size: 13px; max-width: 175px; }
  .start, .all-free { gap: 6px; padding: 4px 8px; font-size: 13px; }
  .hero-photo, [data-layout="showcase"] .hero-photo { inset-inline-start: 35%; background-position: center center; }
  .hero-photo::after { background: linear-gradient(90deg,#e2ecd1 1%,#e2ecd1ab 28%,transparent 63%); }
  [data-layout="showcase"] .hero-photo::after { background: linear-gradient(90deg,#f7e6c4 1%,#f7e6c4ab 28%,transparent 65%); }
  .hero-character { width: min(44%,245px); right: -1%; bottom: 1%; }
  [data-layout="showcase"] .hero-character { width: min(43%,225px); right: -2%; bottom: 1%; }
  .tools { margin: 10px 0 14px; gap: 6px; }
  .search, .picker { width: 100%; }
  .search input { font-size: 16px; }
  .result { scroll-margin-top: 62px; }
  .section-title { margin-bottom: 9px; }
  #game-grid, [data-layout="showcase"] #game-grid { gap: 9px; }
  [data-layout="showcase"][data-selection="picks"] #game-grid {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 12px) / 2);
    overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x mandatory; padding-bottom: 4px;
  }
  [data-layout="showcase"][data-selection="picks"] .game-card { scroll-snap-align: start; }
  .cover { aspect-ratio: 4 / 3; }
  .game-name { min-height: 49px; padding: 6px 8px; }
  .directory { margin-top: 15px; }
  .directory h2 { margin-bottom: 8px; }
  .directory nav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .directory [data-category] { font-size: 13px; min-height: 58px; }
}
@media (max-width: 360px) {
  .hero, [data-layout="showcase"] .hero { min-height: 200px; }
  .hero h1 { font-size: 23px; }
  .weekly { max-width: 145px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
.cover::before {
  content: ""; position: absolute; inset: 0; opacity: .48;
  background: var(--cover-photo) center / cover no-repeat;
  filter: blur(14px); scale: 1.08;
}
.cover img { position: relative; }
@media (min-width: 1100px) {
  [data-layout="showcase"] .hero { min-height: 263px; }
  [data-layout="showcase"] .hero-text { padding-block: 19px; }
  [data-layout="showcase"] .hero h1 { max-width: 595px; font-size: clamp(41px,3.43vw,51px); }
  [data-layout="showcase"] .hero-character { width: clamp(225px,20.5vw,320px); }
  [data-layout="showcase"] .directory { margin-top: 21px; }
}

.games-group { display: contents; }
.game-card { background: var(--panel); }
.has-subscription .access.member { display: none; }
.catalog-documents, .catalog-contact {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px;
  font-size: 14px; color: var(--text);
}
.catalog-contact { margin-top: 12px; }
.catalog-documents a, .catalog-contact a { text-decoration: underline; text-underline-offset: .2em; }
#no-results { color: var(--text); }
