:root {
  --bg: #f6f8fb;
  --bg-soft: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --surface-hover: #f2f6f9;
  --line: #dce4eb;
  --line-strong: #c8d3dd;
  --text: #18202b;
  --muted: #718091;
  --muted-strong: #4d5b6b;
  --brand: #1dfb04;
  --brand-hover: #15e400;
  --brand-ink: #0c1a0a;
  --accent: #4f7cff;
  --accent-soft: #eaf0ff;
  --warm: #ffb84d;
  --danger: #d94d56;
  --radius: 22px;
  --shadow-sm: 0 8px 24px rgba(28, 44, 62, .08);
  --shadow: 0 20px 55px rgba(28, 44, 62, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(29,251,4,.08), transparent 25rem),
    radial-gradient(circle at 96% 12%, rgba(79,124,255,.08), transparent 26rem),
    linear-gradient(180deg, #fbfcfe 0, var(--bg) 30rem, #f5f8fb 100%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.layer-open { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(79,124,255,.42);
  outline-offset: 2px;
}

.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; width: 280px; height: 280px; border-radius: 48%; filter: blur(1px); opacity: .65; }
.ambient i:nth-child(1) { left: -180px; top: 18%; background: rgba(29,251,4,.035); transform: rotate(25deg); }
.ambient i:nth-child(2) { right: -190px; top: 40%; width: 340px; height: 340px; background: rgba(79,124,255,.035); transform: rotate(11deg); }
.ambient i:nth-child(3) { left: 44%; bottom: -250px; width: 390px; height: 390px; background: rgba(255,184,77,.04); transform: rotate(38deg); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  width: min(1440px, 100%); min-height: 66px; margin: 0 auto;
  padding: 10px clamp(14px,2.4vw,28px);
  display: grid; grid-template-columns: auto minmax(280px,560px) auto; align-items: center; gap: clamp(18px,3vw,42px);
  border-bottom: 1px solid rgba(198,210,221,.75);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; font-weight: 900; letter-spacing: -.035em; text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 5px 15px rgba(17,34,20,.15); }
.desktop-search {
  height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 14px; background: #f7f9fb; color: var(--muted);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.desktop-search:focus-within { border-color: #94a8bb; background: #fff; box-shadow: 0 0 0 4px rgba(79,124,255,.08); }
.desktop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .93rem; }
.desktop-search input::placeholder { color: #8d99a7; }
.desktop-search kbd { padding: 1px 6px 2px; border: 1px solid var(--line); border-bottom-color: var(--line-strong); border-radius: 7px; background: #fff; color: #8b97a5; font-size: .72rem; font-family: inherit; }
.header-actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-button {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px;
  background: #fff; color: var(--muted-strong); cursor: pointer; box-shadow: 0 3px 12px rgba(35,50,66,.045);
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text); }
.icon-button:active { transform: scale(.96); }
.sound-button .sound-off { display: none; }
.sound-button[aria-pressed="true"] .sound-on { display: none; }
.sound-button[aria-pressed="true"] .sound-off { display: block; }

.site-main { width: min(1380px, calc(100% - 28px)); margin: 0 auto; padding: 14px 0 72px; }
.game-toolbar {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 12px; padding: 0 2px;
}
.game-heading { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.game-heading h1 { margin: 0; font-size: 1.28rem; line-height: 1; letter-spacing: -.04em; }
.game-heading p { margin: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.game-heading strong { color: var(--muted-strong); }
.toolbar-actions { display: flex; gap: 8px; }
.tool-chip {
  min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted-strong);
  cursor: pointer; font-size: .8rem; font-weight: 760; box-shadow: 0 3px 12px rgba(35,50,66,.035);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.tool-chip:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.tool-chip:active { transform: scale(.98); }
.tool-chip .icon { width: 17px; height: 17px; }
.tool-chip[aria-pressed="true"] { border-color: rgba(29,170,10,.28); background: rgba(29,251,4,.09); color: #14730c; }
.tool-chip.surprise .icon { color: #19b208; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(126px,1fr)); gap: 17px 14px; }
.game-card { position: relative; min-width: 0; border-radius: 19px; transition: transform .17s ease; }
.game-card[hidden] { display: none; }
.game-card:hover { transform: translateY(-3px); }
.game-launch { display: block; min-width: 0; color: var(--text); text-decoration: none; }
.game-art {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(202,213,223,.9); border-radius: 19px;
  background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.game-art img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform .22s ease, filter .22s ease; }
.game-launch:hover .game-art { border-color: #b6c4cf; box-shadow: 0 14px 34px rgba(35,50,66,.14); }
.game-launch:hover .game-art img { transform: scale(1.035); filter: saturate(1.04); }
.game-title {
  display: -webkit-box; min-height: 2.34em; margin: 8px 3px 0; overflow: hidden; color: #2b3643;
  font-size: .8rem; font-weight: 740; line-height: 1.17; letter-spacing: -.012em; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-menu {
  position: absolute; top: 7px; right: 7px; width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.82); border-radius: 11px; background: rgba(255,255,255,.88); color: #33404d;
  opacity: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(25,35,48,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity .15s ease, background .15s ease;
}
.card-menu .icon { width: 18px; height: 18px; stroke-width: 2.3; }
.game-card:hover .card-menu, .card-menu:focus-visible { opacity: 1; }
.card-menu:hover { background: #fff; }
.favorite-dot {
  position: absolute; left: 8px; bottom: 8px; width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(255,255,255,.92); color: #16a208; box-shadow: 0 4px 12px rgba(30,45,35,.16);
  opacity: 0; transform: translateY(3px) scale(.92); transition: opacity .16s ease, transform .16s ease;
}
.favorite-dot .icon { width: 14px; height: 14px; fill: currentColor; stroke-width: 1.4; }
.game-card.is-favorite .favorite-dot { opacity: 1; transform: none; }
.game-card.random-pick .game-art { box-shadow: 0 0 0 3px rgba(29,251,4,.48), 0 14px 34px rgba(29,180,10,.17); transform: scale(1.025); }

.landing-section {
  margin: 64px 0 14px; padding: clamp(24px,4vw,42px); display: grid; grid-template-columns: minmax(0,1.05fr) minmax(360px,.95fr); gap: clamp(26px,5vw,70px); align-items: center;
  border: 1px solid #dfe7ee; border-radius: 30px;
  background: linear-gradient(135deg,#fff 0%,#f7fbf7 48%,#f3f7ff 100%); box-shadow: 0 18px 50px rgba(40,58,75,.07);
}
.landing-copy h2 { max-width: 680px; margin: 0; font-size: clamp(2rem,4.7vw,4.2rem); line-height: .97; letter-spacing: -.06em; }
.landing-copy > p:not(.eyebrow) { max-width: 640px; margin: 15px 0 0; color: var(--muted-strong); font-size: 1rem; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.landing-points { display: grid; gap: 10px; }
.landing-points article { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid rgba(207,219,229,.9); border-radius: 18px; background: rgba(255,255,255,.8); }
.point-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #eff7ef; color: #138507; font-size: 1.35rem; font-weight: 900; }
.landing-points article:nth-child(2) .point-icon { background: #edf2ff; color: #4169df; }
.landing-points article:nth-child(3) .point-icon { background: #fff4e4; color: #bd750d; }
.landing-points strong { display: block; font-size: .92rem; }
.landing-points small { display: block; margin-top: 2px; color: var(--muted); font-size: .77rem; line-height: 1.35; }

.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 32px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-size: 1.1rem; }
.empty-state span { max-width: 340px; }
.empty-state .button { margin-top: 8px; }
.button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--text); text-decoration: none; cursor: pointer; font-weight: 770;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.button:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.button:active { transform: scale(.985); }
.button.primary { border-color: transparent; background: var(--brand); color: var(--brand-ink); }
.button.primary:hover { background: var(--brand-hover); }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.eyebrow, .sheet-kicker { margin: 0 0 7px; color: #138b08; font-size: .69rem; font-weight: 880; letter-spacing: .16em; }
.content-head, .text-page, .game-detail, .not-found { padding: clamp(28px,5vw,58px) 0 20px; }
.content-head h1, .text-page h1, .game-detail h1, .not-found h1 { margin: .08em 0; font-size: clamp(2.3rem,6vw,5rem); line-height: .98; letter-spacing: -.06em; }
.content-head > p:last-child { max-width: 700px; color: var(--muted); font-size: 1.05rem; }
.catalog-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.catalog-card { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.catalog-card img { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; }
.catalog-card h2 { margin: 0; font-size: 1.08rem; }
.catalog-card p { margin: 6px 0; color: var(--muted); font-size: .88rem; }
.back-link { display: inline-flex; margin-bottom: 24px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.game-detail-main { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.game-detail-icon { border-radius: 34px; object-fit: cover; box-shadow: var(--shadow); }
.author { color: var(--muted); }
.author a { color: var(--text); }
.detail-panel, .detail-meta, .prose { margin-top: 26px; padding: clamp(18px,4vw,30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-panel h2 { margin-top: 0; }
.detail-panel p, .prose p { color: var(--muted-strong); }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; }
.detail-meta div { display: flex; flex-direction: column; gap: 3px; }
.detail-meta span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.wallets { display: grid; gap: 10px; }
.wallets p { display: flex; flex-direction: column; gap: 4px; }
.wallets span { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap: anywhere; }
.not-found { max-width: 620px; margin: 0 auto; text-align: center; }

.site-footer { width: min(1380px,calc(100% - 28px)); margin: 0 auto; padding: 30px 0 48px; display: grid; gap: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer nav, .social-links { display: flex; gap: 11px 18px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; font-size: .82rem; }

.mobile-dock, .sheet-layer { display: none; }
.context-menu, .rating-dialog {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px;
  background: rgba(39,50,61,.27); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.context-card, .rating-card { position: relative; width: min(520px,100%); max-height: min(760px,90dvh); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: 0 32px 90px rgba(28,44,62,.22); }
.context-close, .layer-close { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fb; color: var(--muted-strong); cursor: pointer; }
.context-close { position: absolute; right: 15px; top: 15px; }
.context-close:hover, .layer-close:hover { background: #eef3f6; color: var(--text); }
.context-game-head { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 14px; padding-right: 50px; }
.context-game-head img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow-sm); }
.context-title { font-size: 1.35rem; font-weight: 860; letter-spacing: -.025em; }
.context-description { max-height: 150px; margin: 18px 0 0; overflow: auto; color: var(--muted); font-size: .9rem; }
.context-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 20px; }
.context-actions button { min-height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 16px; background: #f9fbfc; color: var(--muted-strong); cursor: pointer; }
.context-actions button:hover { background: #f1f5f8; color: var(--text); }
.context-actions button .icon { width: 21px; height: 21px; }
.context-actions button span { font-size: .72rem; font-weight: 730; }
.context-actions button.is-active { color: #14730c; border-color: rgba(29,180,10,.24); background: rgba(29,251,4,.08); }
.context-bottom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-top: 20px; }
.context-handle { display: none; }
.rating-card h2 { margin: 0; font-size: 1.4rem; }
.rating-game-title { margin: 6px 0 0; color: var(--muted); }
.stars { display: flex; justify-content: center; gap: 6px; margin: 24px 0 12px; }
.stars button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; color: #c4ccd5; cursor: pointer; transition: color .14s ease, transform .14s ease; }
.stars button .icon { width: 34px; height: 34px; fill: currentColor; stroke-width: 1.3; }
.stars button.active, .stars button:hover { color: #f5b63b; transform: translateY(-1px); }
.rating-summary { margin: 0; color: var(--muted); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 180; max-width: min(90vw,420px); padding: 10px 14px; border: 1px solid #cfd8e0; border-radius: 13px; background: #fff; color: var(--text); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%,18px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.landing-section, .site-footer { content-visibility: auto; contain-intrinsic-size: 1px 560px; }

@media (min-width: 1500px) {
  .site-header, .site-main, .site-footer { width: min(1480px,calc(100% - 44px)); }
  .game-grid { grid-template-columns: repeat(auto-fill,minmax(136px,1fr)); gap: 18px 16px; }
}
@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 14px; }
  .desktop-search { max-width: 360px; justify-self: stretch; }
  .catalog-list { grid-template-columns: 1fr; }
  .landing-section { grid-template-columns: 1fr; }
}

/* restart.im v10 — Y8-inspired mobile-first catalogue.
   Desktop rules above remain unchanged. Phones/tablets get a separate, dense touch composition. */
.mobile-only { display: none; }

@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  :root { --radius: 20px; }
  html { background: #f7fbfa; }
  body {
    background: #f7fbfa;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
  }
  .ambient { display: none; }
  .mobile-only { display: grid; }

  /* Full-width app bar, intentionally closer to Y8 than a floating desktop capsule. */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 70;
    width: 100%;
    min-height: calc(72px + env(safe-area-inset-top));
    margin: 0;
    padding: max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));
    grid-template-columns: minmax(0,1fr) auto;
    gap: 6px;
    border: 0;
    border-bottom: 1px solid #dfe8e4;
    border-radius: 0;
    background: rgba(255,255,255,.985);
    box-shadow: 0 3px 14px rgba(31,55,47,.065);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
  }
  .brand {
    min-width: 0;
    gap: 9px;
    font-size: 1.06rem;
    letter-spacing: -.035em;
  }
  .brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    box-shadow: 0 4px 13px rgba(16,50,23,.14);
  }
  .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desktop-search, .desktop-only, .desktop-sound { display: none !important; }
  .header-actions { gap: 3px; }
  .icon-button {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: #f3f7f5;
    color: #20302a;
    box-shadow: none;
    touch-action: manipulation;
  }
  .icon-button .icon { width: 24px; height: 24px; stroke-width: 2; }
  .mobile-header-action[aria-pressed="true"] {
    color: #127a0b;
    background: #e9f7e9;
  }
  .icon-button:active { transform: scale(.94); background: #eaf1ed; }

  /* Games dominate the viewport: no desktop toolbar, no central container. */
  .site-main {
    width: 100%;
    margin: 0;
    padding: 8px max(8px,env(safe-area-inset-right)) 30px max(8px,env(safe-area-inset-left));
  }
  body[data-page="home"] .game-toolbar { display: none; }
  .game-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
    align-items: start;
  }
  .game-card {
    min-width: 0;
    border-radius: 20px;
    transform: none !important;
    touch-action: manipulation;
  }
  .game-launch {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
  }
  .game-launch::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(180deg,transparent 0%,rgba(5,12,16,.035) 20%,rgba(5,12,16,.74) 100%);
  }
  .game-art {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #e8efeb;
    box-shadow: 0 5px 16px rgba(25,49,40,.12);
  }
  .game-art img { display:block; width:100%; height:100%; object-fit:cover; transform:none; filter:none; }
  .game-launch:hover .game-art,
  .game-launch:active .game-art { border:0; box-shadow:0 5px 16px rgba(25,49,40,.12); }
  .game-launch:hover .game-art img { transform:none; filter:none; }
  .game-launch:active .game-art { transform: scale(.975); }
  .game-title {
    position: absolute;
    z-index: 2;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: -webkit-box;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: clamp(.82rem,2.2vw,.98rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -.02em;
    text-align: left;
    text-shadow: 0 1px 5px rgba(0,0,0,.58);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .card-menu {
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 13px;
    opacity: 1;
    background: rgba(255,255,255,.93);
    color: #26352f;
    box-shadow: 0 4px 12px rgba(16,31,25,.14);
  }
  .card-menu .icon { width: 20px; height: 20px; }
  .favorite-dot {
    left: 6px;
    top: 6px;
    bottom: auto;
    width: 34px;
    height: 34px;
    z-index: 3;
    background: rgba(255,255,255,.94);
  }
  .favorite-dot .icon { width: 17px; height: 17px; }
  .game-card.random-pick .game-art {
    transform: none;
    box-shadow: 0 0 0 3px rgba(29,251,4,.60),0 7px 18px rgba(29,170,10,.16);
  }

  /* Secondary landing stays below all games and never consumes the opening viewport. */
  .landing-section {
    margin: 28px 0 8px;
    padding: 19px 16px;
    grid-template-columns: 1fr;
    gap: 18px;
    border-radius: 24px;
    background: linear-gradient(145deg,#fff 0%,#f1fbf2 57%,#f4f8ff 100%);
    box-shadow: none;
  }
  .landing-copy h2 { font-size: 2.05rem; line-height: .98; }
  .landing-copy > p:not(.eyebrow) { margin-top: 11px; font-size: 1rem; line-height: 1.5; }
  .landing-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:17px; }
  .landing-actions .button { min-height: 52px; padding: 10px 12px; font-size: .9rem; }
  .landing-points { gap:8px; }
  .landing-points article { grid-template-columns:50px 1fr; gap:12px; padding:12px; border-radius:17px; }
  .point-icon { width:50px; height:50px; border-radius:15px; }
  .landing-points strong { font-size:.96rem; }
  .landing-points small { margin-top:3px; font-size:.82rem; line-height:1.4; }
  .site-footer { width:100%; padding:22px 8px calc(24px + env(safe-area-inset-bottom)); font-size:.88rem; }

  /* Search and More are true mobile sheets: readable, nearly full width, 85dvh maximum. */
  .sheet-layer {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(20,32,27,.36);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .sheet-card {
    width: calc(100% - 20px);
    max-width: 680px;
    max-height: 85vh;
    max-height: 85dvh;
    margin: 0 10px max(10px,env(safe-area-inset-bottom));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 9px 18px 20px;
    border: 1px solid #d2ddd8;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(18,37,29,.26);
    animation: v10-sheet-in .18s ease-out;
  }
  @keyframes v10-sheet-in { from { transform:translateY(28px); opacity:.72; } to { transform:none; opacity:1; } }
  .sheet-handle { width:46px; height:5px; margin:2px auto 16px; border-radius:999px; background:#c8d4cf; }
  .sheet-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
  .sheet-head h2 { margin:0; font-size:1.7rem; line-height:1.06; letter-spacing:-.04em; }
  .sheet-kicker { margin-bottom:6px; font-size:.76rem; }
  .layer-close, .context-close { width:48px; height:48px; border-radius:15px; }
  .mobile-search-field {
    height:58px;
    display:flex;
    align-items:center;
    gap:11px;
    margin-top:18px;
    padding:0 15px;
    border:1px solid #ccd9d3;
    border-radius:18px;
    background:#f3f7f5;
    color:#6c7c75;
  }
  .mobile-search-field input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font-size:1.08rem; }
  .search-meta { margin:12px 2px 10px; font-size:.9rem; }
  .mobile-search-results { display:grid; gap:5px; }
  .mobile-search-result { min-height:76px; grid-template-columns:62px 1fr auto; gap:12px; padding:7px; border-radius:17px; }
  .mobile-search-result img { width:62px; height:62px; border-radius:16px; }
  .mobile-search-result strong { font-size:1rem; line-height:1.2; }
  .mobile-search-result span:last-child { color:#157d0e; font-size:.9rem; font-weight:800; }
  .compact-sheet { padding-bottom:18px; }
  .sheet-action-list { gap:5px; margin-top:14px; }
  .sheet-action-list > button, .sheet-action-list > a {
    min-height:78px;
    grid-template-columns:52px 1fr 22px;
    gap:13px;
    padding:10px;
    border-radius:18px;
  }
  .sheet-action-icon { width:52px; height:52px; border-radius:16px; }
  .sheet-action-list strong { font-size:1rem; }
  .sheet-action-list small { margin-top:3px; font-size:.84rem; line-height:1.34; }

  /* Desktop right-click stays intact; mobile gets a large action sheet with the same actions. */
  .context-menu, .rating-dialog {
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding:0;
    background:rgba(20,32,27,.38);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
  }
  .context-card, .rating-card {
    width: calc(100% - 20px);
    max-width: 680px;
    max-height:85vh;
    max-height:85dvh;
    margin:0 10px max(10px,env(safe-area-inset-bottom));
    overflow:auto;
    overscroll-behavior:contain;
    padding:9px 18px 20px;
    border:1px solid #d2ddd8;
    border-radius:28px;
    background:#fff;
    box-shadow:0 24px 70px rgba(18,37,29,.26);
    animation:v10-sheet-in .18s ease-out;
  }
  .context-handle { display:block; width:46px; height:5px; margin:2px auto 16px; border-radius:999px; background:#c8d4cf; }
  .context-close { top:17px; right:17px; }
  .context-game-head { grid-template-columns:88px 1fr; gap:15px; padding:2px 58px 0 0; }
  .context-game-head img { width:88px; height:88px; border-radius:21px; }
  .context-title { font-size:1.5rem; line-height:1.08; }
  .context-description { max-height:150px; margin-top:16px; font-size:1rem; line-height:1.5; }
  .context-actions { grid-template-columns:repeat(2,1fr); gap:9px; margin-top:17px; }
  .context-actions button { min-height:78px; border-radius:18px; }
  .context-actions button .icon { width:26px; height:26px; }
  .context-actions button span { font-size:.93rem; }
  .context-bottom { grid-template-columns:1.15fr 1fr; gap:9px; margin-top:15px; }
  .context-bottom .button { min-height:54px; font-size:.96rem; }
  .rating-card h2 { font-size:1.7rem; }
  .rating-game-title { font-size:1rem; }
  .stars { gap:4px; margin:24px 0 14px; }
  .stars button { width:56px; height:56px; }
  .stars button .icon { width:40px; height:40px; }
  .rating-summary { font-size:.96rem; }
  .toast { bottom:max(16px,env(safe-area-inset-bottom)); padding:13px 16px; font-size:.96rem; }

  /* Content/detail pages use mobile typography instead of inherited desktop geometry. */
  .content-head, .text-page, .game-detail, .not-found { padding:24px 6px 18px; }
  .content-head h1, .text-page h1, .game-detail h1, .not-found h1 { font-size:clamp(2.1rem,8vw,3.4rem); }
  .catalog-list { gap:9px; }
  .catalog-card { grid-template-columns:92px 1fr; gap:13px; padding:12px; border-radius:19px; box-shadow:none; }
  .catalog-card img { width:92px; height:92px; border-radius:18px; }
  .catalog-card p { font-size:.92rem; line-height:1.45; }
  .game-detail-main { grid-template-columns:108px 1fr; gap:15px; }
  .game-detail-icon { width:108px; height:108px; border-radius:23px; }
  .detail-panel, .detail-meta, .prose { margin-top:15px; padding:16px; border-radius:20px; box-shadow:none; }
}

/* Portrait devices always stay on the 3-column phone composition, including wide-DPR phones. */
@media (max-width: 1100px) and (orientation: portrait), (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .game-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
}

/* Landscape keeps touch UI but uses the extra width efficiently. */
@media (max-width: 1100px) and (orientation: landscape), (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .site-header { min-height:64px; padding-top:max(6px,env(safe-area-inset-top)); padding-bottom:6px; }
  .brand-logo { width:46px; height:46px; }
  .icon-button { width:46px; height:46px; border-radius:14px; }
  .game-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
  .sheet-card, .context-card, .rating-card { max-height:88vh; max-height:88dvh; }
}

/* Very small phones preserve 52px controls by dropping brand text, never by shrinking targets. */
@media (max-width: 430px) {
  .brand span { display:none; }
  .site-main { padding-left:max(6px,env(safe-area-inset-left)); padding-right:max(6px,env(safe-area-inset-right)); }
  .game-grid { gap:6px; }
  .game-title { left:7px; right:7px; bottom:7px; font-size:clamp(.75rem,3.45vw,.88rem); }
  .card-menu { width:38px; height:38px; }
  .landing-actions { grid-template-columns:1fr; }
}

@media (hover:none) { .game-card:hover { transform:none; } }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; animation-iteration-count:1!important; }
}

/* v10 MOBILE-FIRST PRODUCTION: Y8-inspired full-width header, 3-column portrait grid, 52px controls, 85dvh sheets */
