/* Game Night by Our Valenversary: matches the ourvalenversary.com palette */
:root {
  --pink: #f46b93; --pink-hot: #ee4c7c; --pink-deep: #d93468;
  --berry: #9c0f47; --berry-dark: #5e0a2c; --wine: #420d20;
  --ink: #2a1118; --muted: #4d2730;
  --blush: #fbe6ec; --blush-soft: #fdf3f5; --blush-line: #efb6c6; --blush-text: #f6d2dc;
  --grad: linear-gradient(135deg, #f46b93 0%, #ee4c7c 48%, #d93468 100%);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--berry); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; margin-top: 1.25rem; }
.accent { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; }
.wrap { width: min(1040px, 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; }

/* top bar + hero */
.gn-hero { background: var(--grad); color: #fff; padding-bottom: clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.gn-hero::after { content: 'Game Night'; position: absolute; right: -2vw; bottom: -.2em; font-weight: 700; font-size: clamp(80px, 16vw, 220px); letter-spacing: -0.04em; color: rgba(255,255,255,.12); white-space: nowrap; pointer-events: none; line-height: 1; }
.gn-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 18px; padding-top: max(18px, env(safe-area-inset-top)); }
.gn-logo { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; color: #fff; text-decoration: none; line-height: 1; }
.gn-logo em { font-style: italic; }
.gn-top nav { display: flex; gap: 18px; align-items: center; font-size: .9rem; font-weight: 500; flex-wrap: wrap; }
.gn-top nav a { color: #fff; text-decoration: none; }
.gn-top nav a:hover { text-decoration: underline; }
.gn-top nav .pill { background: #fff; color: var(--berry); border-radius: 999px; padding: .5rem 1.1rem; font-weight: 600; }
.gn-top nav .pill:hover { background: var(--blush); text-decoration: none; }
.gn-hero-inner { position: relative; z-index: 1; padding-top: clamp(16px, 4vw, 48px); display: grid; gap: 14px; justify-items: start; }
.gn-hero-inner > * { max-width: 760px; }
.gn-hero h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); line-height: .95; letter-spacing: -0.035em; }
.gn-hero .lede { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 620px; }
.gn-hero .tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 0; }
.gn-hero .gn-actions { margin-top: 6px; }
.gn-crumbs { font-size: .85rem; }
.gn-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.gn-crumbs li + li::before { content: '/'; margin-right: 4px; opacity: .7; }
.gn-crumbs a { color: #fff; }
.gn-crumbs [aria-current] { opacity: .9; }
.gn-hero-game { padding-bottom: clamp(64px, 8vw, 88px); }
.gn-hero-game h1 { font-size: clamp(2.1rem, 6vw, 4rem); }
.gn-hero-game .lede { font-size: clamp(1rem, 1.6vw, 1.15rem); }

/* buttons */
.gn-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 .95rem var(--sans); padding: .8rem 1.4rem; border-radius: 999px; border: 0; background: var(--pink-deep); color: #fff; cursor: pointer; text-decoration: none; min-height: 44px; transition: background .2s; }
.gn-btn:hover { background: var(--berry); }
.gn-btn.ghost { background: #fff; color: var(--berry); box-shadow: inset 0 0 0 1.5px var(--blush-line); }
.gn-btn.ghost:hover { background: var(--blush-soft); }
.gn-btn.white { background: #fff; color: var(--berry); }
.gn-btn.white:hover { background: var(--blush); }
.gn-btn.small { padding: .45rem 1rem; min-height: 36px; font-size: .85rem; width: 100%; margin-top: 6px; }
.gn-btn:disabled { opacity: .45; cursor: not-allowed; }
.gn-link { background: none; border: 0; padding: 4px; font: 500 .9rem var(--sans); color: var(--berry); text-decoration: underline; cursor: pointer; }
.gn-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.gn-help { background: rgba(255,255,255,.18); border-radius: 14px; padding: 12px 16px; margin: 4px 0 0; max-width: 620px; }

/* content */
main { padding-block: 28px 8px; }
.gn-card { background: #fff; border: 1px solid var(--blush); border-radius: var(--r); padding: clamp(16px, 3vw, 28px); margin: 0 0 20px; box-shadow: 0 10px 30px rgba(94, 10, 44, .05); }
.gn-play { margin-top: -56px; position: relative; z-index: 2; }
.gn-round { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 16px; }
.gn-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.gn-player { background: var(--blush-soft); border: 1.5px solid transparent; border-radius: 18px; padding: 14px; }
.gn-player.is-leading { border-color: var(--pink-hot); }
.gn-score { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--pink-deep); font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.gn-phase { display: block; color: var(--muted); font-size: .8rem; }
label { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin: 8px 0 0; }
input, select { width: 100%; min-width: 0; font: 400 1rem var(--sans); color: var(--ink); padding: .7rem .85rem; border: 1px solid var(--blush-line); border-radius: 12px; background: #fff; margin-top: 4px; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--pink-hot); outline-offset: 0; border-color: transparent; }
input:disabled, select:disabled { background: var(--blush-soft); color: var(--muted); }
.gn-name { font-weight: 600; border-color: transparent; background: transparent; padding-inline: 4px; margin: 0; }
.gn-name:hover { border-color: var(--blush-line); background: #fff; }
.gn-error { color: #b3261e; min-height: 1.2em; margin: 12px 0 0; font-weight: 500; }
.gn-error:empty { margin: 0; min-height: 0; }
.gn-hint, .gn-muted, .gn-saved { display: block; color: var(--muted); font-size: .85rem; margin: 12px 0 0; }
.gn-notice { background: var(--blush); color: var(--berry); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin: 14px 0 0; }
.gn-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; margin-top: 8px; }
.gn-scroll { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
td, th { padding: 9px 10px; border-bottom: 1px solid var(--blush); text-align: center; white-space: nowrap; }
td:first-child, th:first-child { text-align: left; }
thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }
tr.gn-total th { color: var(--pink-deep); font-size: 1.1rem; border-bottom: 0; }
tr.gn-sub td { color: var(--muted); font-style: italic; }
tr.is-editing td { background: var(--blush-soft); }
.gn-archive { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.gn-archive li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; background: var(--blush-soft); padding: 10px 14px; border-radius: 12px; font-size: .9rem; }

/* game directory */
.gn-section { margin: 0 0 36px; }
.gn-section > h2 { margin: 0 0 14px; font-size: clamp(1.4rem, 3vw, 2rem); }
.gn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gn-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; background: var(--blush-soft); color: var(--ink); text-decoration: none; border: 1.5px solid transparent; transition: transform .2s, border-color .2s, box-shadow .2s; }
.gn-tile:hover { transform: translateY(-3px); border-color: var(--pink-hot); box-shadow: 0 14px 30px rgba(94, 10, 44, .1); }
.gn-tile b { font-size: 1.15rem; }
.gn-tile small { color: var(--muted); }
.gn-tile.feature { background: var(--wine); color: #fff; }
.gn-tile.feature small { color: var(--blush-text); }
.gn-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gn-features div { background: var(--blush-soft); border-radius: 18px; padding: 18px; }
.gn-features b { display: block; color: var(--berry); font-size: 1.05rem; margin-bottom: 4px; }
.gn-features p { margin: 0; color: var(--muted); font-size: .95rem; }
.gn-about ul { padding-left: 1.2rem; margin: 10px 0 0; }
.gn-about li { margin: 6px 0; }
.gn-about p { color: var(--muted); }
.gn-app-slot { min-height: 420px; }
.gn-app-slot:has(.gn-round) { min-height: 0; }
.gn-columns { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.gn-about h3 { font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.25; margin-top: 1.1rem; }
.gn-about h3 + p { margin: .35rem 0 0; }
.gn-steps { padding-left: 1.3rem; margin: 10px 0 0; }
.gn-steps li { margin: 8px 0; }
.gn-print-cta { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--blush-soft); }
.gn-print-cta > div { flex: 1 1 420px; }
.gn-print-cta p { margin-bottom: 0; }
.gn-related { margin: 8px 0 24px; }
.gn-related > h2 { margin-bottom: 14px; }
.gn-tile-icon { --ib: #fff; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--pink-deep); margin-bottom: 6px; }
.gn-tile.feature .gn-tile-icon { --ib: transparent; background: rgba(255,255,255,.14); color: #fff; }
.gn-invite { background: var(--wine); color: #fff; border-color: var(--wine); }
.gn-invite h2 { color: #fff; }
.gn-invite p { color: var(--blush-text); }
.gn-invite .gn-btn { background: #fff; color: var(--berry); }
.gn-invite .gn-btn:hover { background: var(--blush); }
.gn-invite .gn-btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.gn-help-dark { background: rgba(255,255,255,.12); color: #fff; }
.gn-disclaimer { color: var(--muted); font-size: .82rem; margin: 0 0 8px; }
.gn-sheet-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.gn-sheet-list li { margin: 0 !important; }
.gn-sheet-list a { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--blush-soft); border-radius: 12px; padding: .6rem .9rem; text-decoration: none; font-weight: 500; min-height: 44px; }
.gn-sheet-list a:hover { background: var(--blush); }
.gn-sheet-list small { font-size: .7rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.gn-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gn-more a { background: var(--blush-soft); border-radius: 999px; padding: .4rem .9rem; text-decoration: none; font-size: .9rem; font-weight: 500; }
.gn-more a:hover { background: var(--blush); }

/* footer */
.gn-footer { background: var(--berry-dark); color: #fff; padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 24px; }
.gn-footer .wrap { display: grid; gap: 14px; }
.gn-footer .brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.gn-footer .brand em { color: var(--pink); }
.gn-footer p { margin: 0; color: var(--blush-text); font-size: .9rem; }
.gn-footer a { color: #fff; }
.gn-footer nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: .9rem; }

@media (max-width: 560px) {
  .gn-players { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gn-player { padding: 10px; }
  .gn-score { font-size: 2rem; }
  .gn-top nav .hide-sm { display: none; }
}

/* ==========================================================================
   Installed app shell. html.gn-app is set before first paint when Game Night
   runs as an installed app (display-mode: standalone or iOS navigator.standalone).
   The dashboard (/games/app/) always uses the shell.
   ========================================================================== */
.gn-appbar { display: none; }
html.gn-app .gn-appbar, .gn-dash .gn-appbar { display: block; }
html.gn-app .gn-hero, html.gn-app .gn-footer, html.gn-app .gn-web,
html.gn-app [data-install], html.gn-app #install-help, html.gn-app #install { display: none !important; }
html.gn-app, .gn-dash { background: var(--blush-soft); }
html.gn-app body { background: var(--blush-soft); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.gn-lock, html.gn-lock body { overflow: hidden; }
/* keep focused / scrolled-to content clear of the sticky app bar */
html.gn-app { scroll-padding-top: calc(68px + env(safe-area-inset-top)); }
html:has(body.gn-dash) { scroll-padding-top: calc(136px + env(safe-area-inset-top)); }
.ui { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* app bar */
.gn-appbar { position: sticky; top: 0; z-index: 20; color: #fff;
  background: linear-gradient(180deg, var(--pink-hot) 0%, var(--pink-deep) 100%);
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  box-shadow: 0 1px 0 rgba(94, 10, 44, .12), 0 8px 24px -12px rgba(94, 10, 44, .45); }
.gn-appbar-game { display: none; }
html.gn-app .gn-appbar-game { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: calc(56px + env(safe-area-inset-top)); }
.gn-appbar-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px 0 4px; margin-left: -4px; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem; }
.gn-appbar-back:active { background: rgba(255,255,255,.18); }
.gn-appbar-title { margin: 0; font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; text-align: center; }
.gn-icon-btn { justify-self: end; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; padding: 0; }
.gn-icon-btn:active { background: rgba(255,255,255,.18); }
.gn-icon-btn:focus-visible, .gn-appbar-back:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
[data-fav][aria-pressed="true"] .ui { fill: currentColor; }
.gn-appbar [data-fav][aria-pressed="true"] { color: #fff3b8; }

/* game pages inside the app */
html.gn-app body:not(.gn-dash) main { padding: 12px 0 calc(28px + env(safe-area-inset-bottom)); }
html.gn-app body:not(.gn-dash) .wrap { width: min(1040px, 100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
html.gn-app .gn-play { margin-top: 0; }
html.gn-app .gn-card { border-radius: 20px; padding: 16px; margin-bottom: 12px; border-color: #f7d9e2; box-shadow: 0 6px 18px rgba(94, 10, 44, .05); }
html.gn-app .gn-about h2 { font-size: 1.2rem; }

/* ---------- dashboard ---------- */
.gn-dash { min-height: 100vh; min-height: 100dvh; overflow-anchor: none; }
html:has(body.gn-dash) { overflow-anchor: none; }
.gn-appbar-dash { padding-bottom: 12px; }
.gn-appbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding-top: 4px; }
.gn-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.gn-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
.gn-brand > span { display: grid; line-height: 1.05; }
.gn-brand b { font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; }
.gn-brand .accent { font-size: .95rem; color: #ffe3ec; }
.gn-search { position: relative; margin: 6px 0 0; }
.gn-search .ui { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--berry); opacity: .7; pointer-events: none; }
.gn-search input { margin: 0; min-height: 46px; padding-left: 42px; border: 0; border-radius: 14px; background: #fff; font-size: 1rem; box-shadow: inset 0 0 0 1px rgba(156, 15, 71, .08); -webkit-appearance: none; appearance: none; }
.gn-search input::placeholder { color: #a7798a; }
.gn-search input:focus { outline: 2px solid #fff; outline-offset: 2px; }

.gn-dash-main { overflow-x: clip; padding: 14px max(12px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); max-width: 760px; margin: 0 auto; }
.gn-dsec { margin: 0 0 18px; }
.gn-dsec[hidden], .gn-dsec.is-off { display: none; }
.gn-dhead { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.gn-dhead h2, .gn-sheet h2 { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--berry); }
.gn-count { font-size: .8rem; color: var(--muted); }

/* icons: blush tile with category-tinted glyph */
.gi { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gi .bg { fill: var(--ib, #fff); }
.gi .dot, .gi .fill { fill: currentColor; stroke: none; }
.gi .fill { stroke: currentColor; stroke-width: 1; }
.gn-dicon { --ib: #fff; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: var(--c, var(--pink-deep)); background: var(--cbg, var(--blush)); }
.gn-dicon.sm { width: 34px; height: 34px; border-radius: 10px; }
.gn-dicon.sm .gi { width: 22px; height: 22px; }
.c-card { --c: #d93468; --cbg: #fde4ec; }
.c-dice { --c: #9c0f47; --cbg: #f9dde8; }
.c-tile { --c: #6e1236; --cbg: #f6e0e7; }
.c-any { --c: var(--wine); --cbg: var(--blush); }
.gn-dtile.is-wide .gn-dicon, #favs .c-any .gn-dicon { --c: #fff; --cbg: rgba(255,255,255,.14); --ib: transparent; }

/* resume */
.gn-resume { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px; border-radius: 20px; text-decoration: none; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #7a1440 0%, var(--wine) 62%); box-shadow: 0 14px 30px -14px rgba(66, 13, 32, .7); position: relative; overflow: hidden; }
.gn-resume::after { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(244,107,147,.45), transparent 70%); pointer-events: none; }
.gn-resume .gn-dicon { width: 56px; height: 56px; border-radius: 16px; --c: var(--wine); --cbg: #fff; --ib: #fde4ec; }
.gn-resume .gn-dicon .gi { width: 34px; height: 34px; }
.gn-resume-text { display: grid; min-width: 0; flex: 1; }
.gn-resume-text small { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); }
.gn-resume-text b { font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.15; }
.gn-resume-text span { font-size: .86rem; color: var(--blush-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn-resume-go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pink-hot); flex: none; position: relative; z-index: 1; }
.gn-resume:active { transform: scale(.985); }
.gn-also-label { margin: 12px 2px 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.gn-also { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 16px; border: 1px solid #f7d9e2; overflow: hidden; }
.gn-also li + li { border-top: 1px solid var(--blush); }
.gn-also a { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 10px; min-height: 52px; text-decoration: none; color: var(--ink); }
.gn-also a > span:not(.gn-dicon) { display: grid; flex: 1; line-height: 1.2; }
.gn-also small { color: var(--muted); font-size: .8rem; }
.gn-also .ui { color: var(--blush-line); width: 20px; height: 20px; }
.gn-also a:active { background: var(--blush-soft); }

/* recently played: horizontal rail */
.gn-recent { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gn-recent::-webkit-scrollbar { display: none; }
.gn-recent li { flex: none; scroll-snap-align: start; }
.gn-recent a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 7px; border-radius: 999px; background: #fff; border: 1px solid #f7d9e2; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.gn-recent .gn-dicon.sm { border-radius: 50%; }
.gn-recent a:active { background: var(--blush); }

/* category chips */
.gn-chips { display: flex; gap: 6px; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.gn-chips button { flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--blush-line); background: #fff; color: var(--berry); font: 600 .88rem var(--sans); cursor: pointer; }
.gn-chips button[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: #fff; }
.is-searching .gn-chips { display: none; }

/* two-column game grid */
.gn-dgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 620px) { .gn-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gn-dtile { position: relative; }
.gn-dash:not(.gn-ready) .gn-dtile { animation: gn-rise .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms); }
.gn-dtile[hidden] { display: none; }
.gn-dtile > a { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 100px; padding: 11px 12px; border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; border: 1px solid #f7d9e2; box-shadow: 0 4px 14px rgba(94, 10, 44, .04); transition: transform .15s, box-shadow .15s; }
.gn-dtile > a:active { transform: scale(.97); box-shadow: none; }
.gn-dtile > a:focus-visible { outline: 2px solid var(--pink-hot); outline-offset: 2px; }
.gn-dtext { display: grid; gap: 1px; min-width: 0; }
.gn-dtext b { font-size: 1rem; line-height: 1.2; letter-spacing: -.01em; padding-right: 4px; }
.gn-dtext small { font-size: .78rem; color: var(--muted); }
.gn-star { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: #e7b3c3; cursor: pointer; border-radius: 50%; padding: 0; }
.gn-star .ui { width: 21px; height: 21px; transition: transform .2s; }
.gn-star[aria-pressed="true"] { color: var(--pink-hot); }
.gn-star[aria-pressed="true"] .ui { animation: gn-pop .32s ease-out; }
.gn-star:focus-visible { outline: 2px solid var(--pink-hot); }
.gn-dtile.is-wide { grid-column: 1 / -1; }
.gn-dtile.is-wide > a { flex-direction: row; align-items: center; min-height: 76px; background: var(--wine); color: #fff; border-color: transparent; }
.gn-dtile.is-wide .gn-dtext small { color: var(--blush-text); }
.gn-dtile.is-wide .gn-star { top: 50%; transform: translateY(-50%); right: 8px; color: rgba(255,255,255,.45); }
.gn-dtile.is-wide .gn-star[aria-pressed="true"] { color: var(--pink); }
#favs .gn-dtile.c-any > a { background: var(--wine); color: #fff; }

.gn-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 28px 16px; background: #fff; border-radius: 20px; border: 1px dashed var(--blush-line); color: var(--berry); }
.gn-empty .gi { width: 44px; height: 44px; --ib: var(--blush); }
.gn-empty p { margin: 0; color: var(--muted); max-width: 300px; }
.gn-empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.gn-empty[hidden] { display: none; }
.gn-dfoot { text-align: center; font-size: .78rem; color: var(--muted); margin: 18px 0 0; letter-spacing: .02em; }

/* settings bottom sheet */
.gn-sheet { position: fixed; inset: 0; z-index: 50; }
.gn-sheet[hidden] { display: none; }
.gn-sheet-scrim { position: absolute; inset: 0; background: rgba(42, 17, 24, .45); opacity: 0; transition: opacity .25s; }
.gn-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; background: var(--blush-soft); border-radius: 24px 24px 0 0;
  padding: 6px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); max-width: 640px; margin: 0 auto; outline: none; }
.gn-sheet.is-open .gn-sheet-scrim { opacity: 1; }
.gn-sheet.is-open .gn-sheet-panel { transform: none; }
.gn-sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--blush-line); margin: 4px auto 6px; }
.gn-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.gn-sheet-head h2 { font-size: 1.3rem; letter-spacing: -.02em; text-transform: none; color: var(--ink); }
.gn-link-btn { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--pink-deep); font: 600 1rem var(--sans); cursor: pointer; }
.gn-group-label { margin: 14px 6px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--berry); }
.gn-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #f7d9e2; }
.gn-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; }
.gn-list li + li { border-top: 1px solid var(--blush); }
.gn-list li:has(> a, > button) { padding: 0; }
.gn-list a, .gn-list button { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 52px; padding: 6px 16px; border: 0; background: none; text-align: left; font: 500 1rem var(--sans); color: var(--berry); text-decoration: none; cursor: pointer; }
.gn-list a small { font-size: .78rem; color: var(--muted); }
.gn-list a:active, .gn-list button:active { background: var(--blush-soft); }
.gn-val { color: var(--muted); font-size: .9rem; text-align: right; }
.gn-about-app { margin: 14px 6px 0; font-size: .85rem; color: var(--muted); }

@keyframes gn-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gn-pop { 50% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) {
  .gn-dtile, .gn-star .ui { animation: none !important; }
  .gn-sheet-panel, .gn-sheet-scrim, .gn-dtile > a { transition: none; }
}
@media print { .gn-appbar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .gn-tile, .gn-btn { transition: none; } .gn-tile:hover { transform: none; } }
@media print {
  .gn-hero { background: none; color: var(--ink); padding: 0; }
  .gn-hero::after, .gn-top nav, .gn-actions, .gn-footer, .gn-about, .gn-hint, form label, .gn-btn, .gn-link, #notice, .gn-saved, .gn-setup { display: none !important; }
  .gn-play { margin-top: 0; }
  .gn-card { box-shadow: none; border: 0; padding: 0; }
  .gn-logo { color: var(--ink); }
}
