/* PlayTab
   Mise en page : une étagère de jeux. Chaque licence est un "onglet" posé sur sa rangée de jaquettes,
   comme les onglets d'un navigateur. Direction artistique noir et vert : le vert est réservé à ce qui lance un jeu. */
:root {
  --bg: #090b0a;
  --bg-raise: #0f1311;
  --card: #141a17;
  --line: #222b26;
  --line-soft: #19201c;
  --fg: #ecf2ee;
  --muted: #98a39d;
  --dim: #69746e;
  --accent: #34e27f;
  --accent-hover: #6ff0a6;
  --accent-ink: #02150a;
  --accent-soft: rgba(52, 226, 127, .14);
  --danger: #ff8270;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--body);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .85em; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--bg-raise); color: var(--fg);
  border-radius: 8px; padding: 9px 14px; font-weight: 650; font-size: 14px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: #3d4a43; }
.btn-ghost { background: transparent; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: transparent; border-color: #5a2f2a; color: var(--danger); }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ------------------------------------------------------------------ barre du haut */
.topbar { border-bottom: 1px solid var(--line-soft); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 850; font-stretch: 125%; font-size: 20px; letter-spacing: -.01em; }
.logo-mark { width: 34px; height: 28px; flex: none; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav > a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 6px; }
.topnav > a:hover { color: var(--fg); }
.topnav .lang { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); margin-inline: 6px; }

/* ------------------------------------------------------------------ langues */
.langs { position: relative; margin-inline: 4px; }
.langs summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  font: 500 12px var(--mono); transition: color .15s, border-color .15s;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 15px; height: 15px; }
.langs summary:hover, .langs[open] summary { color: var(--fg); border-color: #3d4a43; }
.langs-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30;
  width: 236px; max-height: min(70vh, 520px); overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9);
}
.langs-list a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 7px; text-decoration: none; font-size: 14px; color: var(--fg); }
.langs-list a:hover { background: var(--bg-raise); }
.langs-list a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.langs-list .lc { font: 500 11px var(--mono); color: var(--dim); width: 20px; }
.langs-list a[aria-current] .lc { color: var(--accent); }

.lang-banner {
  position: fixed; z-index: 40; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 12px 12px 18px; background: var(--card); border: 1px solid var(--accent); border-radius: 12px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9);
}
.lang-banner p { margin: 0; flex: 1 1 200px; font-size: 14px; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 18% 30%, rgba(52, 226, 127, .10), transparent 70%); }
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(36px, 5vw, 64px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { display: grid; gap: 14px; }
.h1-a { font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: clamp(2.6rem, 7.2vw, 5.8rem); line-height: .92; letter-spacing: -.035em; }
.h1-b { font-weight: 500; font-stretch: 100%; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.25; letter-spacing: -.01em; color: var(--fg); max-width: 26ch; }
.lead { color: var(--muted); font-size: 17px; max-width: 54ch; margin: 22px 0 30px; }

.hero-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-shelf .shelf-item { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); }
.hero-shelf .shelf-item:nth-child(3n + 2) { transform: translateY(28px); }
.hero-shelf .shelf-item:nth-child(n + 4) { opacity: .55; }
.hero-shelf .cover { border-radius: 0; }

/* ------------------------------------------------------------------ jaquettes */
.cover {
  position: relative; display: block; width: 100%; max-width: 100%; aspect-ratio: 460 / 215;
  border-radius: 8px; overflow: hidden; background: hsl(var(--h, 220) 30% 18%);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.art {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 14px;
  background:
    repeating-linear-gradient(115deg, hsl(var(--h, 220) 55% 60% / .07) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, hsl(var(--h, 220) 52% 30%), hsl(calc(var(--h, 220) + 30) 45% 13%));
}
.art-fr { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: hsl(var(--h, 220) 60% 82% / .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-name { font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: .95; letter-spacing: -.03em; color: #fff; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ barre de recherche */
.toolbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(9, 11, 10, .9); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-block: 1px solid var(--line-soft); padding-block: 12px 0;
}
.toolbar-in { display: flex; align-items: center; gap: 16px; }
.search { position: relative; flex: 1; min-width: 0; max-width: 640px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input {
  width: 100%; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px;
  padding-block: 12px; padding-inline: 42px 44px; font-size: 16px; outline: none; transition: border-color .15s, background .15s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--accent); background: var(--card); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.search kbd { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font: 500 12px var(--mono); color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }
.count { margin: 0; margin-inline-start: auto; font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.chips {
  display: flex; gap: 6px; overflow-x: auto; padding-block: 12px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.chip span { font: 500 11px var(--mono); color: var(--dim); }
.chip:hover { color: var(--fg); border-color: #3d4a43; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] span { color: var(--accent); opacity: .7; }

/* ------------------------------------------------------------------ étagères (une par licence) */
.catalog { padding-block: 8px 24px; }
.shelf { margin-top: 44px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab {
  position: relative; margin-bottom: -1px;
  padding: 10px 20px 11px; background: var(--bg);
  border: 1px solid var(--line); border-bottom-color: var(--bg); border-radius: 10px 10px 0 0;
  font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -.015em; line-height: 1.2;
}
.tab::before { content: ""; position: absolute; inset-inline: 20px; top: -1px; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; }
.shelf-count { font: 500 12px var(--mono); color: var(--dim); padding-bottom: 10px; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 26px 18px; }

.card { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card-cover { position: relative; display: block; border-radius: 8px; transition: transform .2s ease; }
.card-cover::after { content: ""; position: absolute; inset: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); z-index: 2; pointer-events: none; transition: box-shadow .2s; }
.play-dot {
  position: absolute; z-index: 3; inset-inline-end: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .18s, transform .18s;
}
.play-dot::before { content: ""; position: absolute; left: 15px; top: 12px; border-left: 11px solid var(--accent-ink); border-block: 7px solid transparent; }
.card:hover .card-cover { transform: translateY(-3px); }
.card:hover .card-cover::after { box-shadow: inset 0 0 0 2px var(--accent); }
.card:hover .play-dot { opacity: 1; transform: none; }

.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title play" "meta play" "tag tag"; column-gap: 12px; row-gap: 3px; align-items: start; }
.card-title { grid-area: title; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.card-meta { grid-area: meta; margin: 0; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.card-meta .host { font-family: var(--mono); font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding-top: 1px; }
.card-play {
  grid-area: play; display: inline-flex; align-items: center; gap: 5px; align-self: center;
  color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; padding: 6px 2px;
}
.card-play svg { width: 11px; height: 11px; transition: transform .15s; }
.card-play:hover svg { transform: translate(2px, -2px); }
.tag { grid-area: tag; justify-self: start; margin-top: 6px; font: 500 11px var(--mono); letter-spacing: .02em; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.tag-warn { border-color: #4f4518; color: #e3cf74; }

.empty { padding: 64px 0; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 16px; }
.empty p { margin: 0; font-size: 18px; color: var(--fg); }

/* ------------------------------------------------------------------ avertissement + FAQ */
.notice {
  margin-top: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start;
  padding: 20px 22px; border: 1px dashed #2f3a34; border-radius: var(--r); color: var(--muted); font-size: 15px;
}
.notice::before { content: "!"; grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font: 700 14px var(--mono); }
.notice strong { color: var(--fg); }
.notice p { margin: 0; max-width: 80ch; }

.faq { margin-top: 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 64px; align-items: start; }
.faq h2 { font-family: var(--display); font-weight: 850; font-stretch: 118%; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.05; letter-spacing: -.03em; position: sticky; top: 170px; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 500 22px/1 var(--mono); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 0 22px; color: var(--muted); max-width: 65ch; }

/* ------------------------------------------------------------------ pied de page */
.footer { margin-top: 110px; border-top: 1px solid var(--line-soft); background: var(--bg-raise); padding-block: 48px 40px; font-size: 14px; color: var(--muted); }
.footer-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 32px 48px; }
.footer-brand p { margin: 14px 0 0; max-width: 44ch; }
.footer-brand .fine { font-size: 12px; color: var(--dim); }
.footer-links { columns: 2; column-gap: 32px; }
.footer-links a { display: block; break-inside: avoid; padding: 3px 0; text-decoration: none; }
.footer-links a:hover, .footer-meta a:hover { color: var(--fg); }
.footer-meta { display: grid; gap: 6px; align-content: start; }
.footer-meta a { text-decoration: none; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.footer-langs a { text-decoration: none; color: var(--dim); }
.footer-langs a:hover { color: var(--fg); }
.footer-langs a[aria-current] { color: var(--accent); }

/* ------------------------------------------------------------------ fiche jeu */
.game-page { padding-top: 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.game-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 28px; }
.game-art .cover { border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.game-art .art { padding: 22px 26px; }
.game-art .art-name { font-size: clamp(2rem, 5vw, 3.4rem); }
.game-main h1 { font-family: var(--display); font-weight: 900; font-stretch: 118%; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1; letter-spacing: -.035em; }
.play-big { margin-top: 28px; }
.play-big svg { width: 16px; height: 16px; }
.opens { margin: 12px 0 0; font-size: 13px; color: var(--dim); font-family: var(--mono); overflow-wrap: anywhere; }
.game-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px 64px; margin-top: 56px; align-items: start; }
.prose p { margin: 0 0 1em; max-width: 65ch; color: #d6d3cc; font-size: 17px; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: end; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.related { margin-top: 64px; }
.back { margin-top: 56px; }
.back a { color: var(--muted); text-decoration: none; font-weight: 600; }
.back a:hover { color: var(--fg); }
.notfound { padding-block: 96px; }
.notfound h1 { font-family: var(--display); font-weight: 900; font-stretch: 118%; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.035em; line-height: 1; }

/* ------------------------------------------------------------------ fenêtre "proposer un jeu" */
.modal { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--fg); }
.modal::backdrop { background: rgba(2, 4, 3, .78); backdrop-filter: blur(3px); }
.modal form { padding: 26px; }
.modal h2 { font-family: var(--display); font-weight: 850; font-stretch: 115%; font-size: 24px; letter-spacing: -.02em; }
.modal-lead { color: var(--muted); margin: 6px 0 18px; font-size: 15px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 650; color: #d6d3cc; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.form-status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; color: var(--accent); }

/* ------------------------------------------------------------------ admin */
.admin-tag { font: 500 12px var(--mono); color: var(--muted); padding-inline: 10px; }
.admin-main { padding-block: 32px 80px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 26px; }
.login { max-width: 420px; margin: 40px auto; }
.login h1 { font-family: var(--display); font-weight: 850; font-stretch: 115%; font-size: 26px; margin-bottom: 18px; }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-bar .chips { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; }
.admin-rows { display: grid; gap: 10px; margin-top: 8px; }
.admin-row { display: grid; grid-template-columns: 172px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raise); }
.admin-thumb { aspect-ratio: 460 / 215; border-radius: 6px; overflow: hidden; background: var(--card); display: grid; place-items: center; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-img { font: 500 11px var(--mono); color: var(--dim); text-align: center; padding: 6px; }
.admin-info { min-width: 0; }
.admin-info h2 { font-size: 17px; }
.admin-info .meta { margin: 2px 0 4px; font-size: 13px; color: var(--muted); }
.admin-info .link { display: block; color: var(--accent); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-info .notes { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.modal-wide { width: min(760px, calc(100% - 32px)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 16px; }
.form-grid .span2 { grid-column: span 2; }
.field.check { align-content: end; }
.field.check label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding-bottom: 10px; }
.field.check input { width: auto; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ responsive */
[dir="rtl"] .chips { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 40px), transparent); }
[dir="rtl"] .card-play svg { transform: scaleX(-1); }
[dir="rtl"] .card-play:hover svg { transform: scaleX(-1) translate(2px, -2px); }
[dir="rtl"] .h1-a, [dir="rtl"] .logo, [dir="rtl"] .tab { letter-spacing: 0; }

@media (max-width: 980px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-shelf { max-width: 640px; }
  .hero-shelf .shelf-item:nth-child(n + 4) { display: none; }
  .hero-shelf .shelf-item:nth-child(3n + 2) { transform: translateY(16px); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq h2 { position: static; }
  .footer-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: span 2; }
  .game-hero, .game-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 170px; }
  .topnav > a { display: none; }
  .langs-list { position: fixed; inset-inline: 16px; top: 64px; width: auto; }
  .topnav .btn { padding: 8px 11px; font-size: 13px; }
  .logo { font-size: 18px; }
  .hero { padding-top: 32px; }
  .lead { font-size: 16px; }
  .toolbar-in { gap: 10px; }
  .search kbd { display: none; }
  .count { font-size: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "meta" "tag" "play"; }
  .card-title { font-size: 14.5px; }
  .card-meta .host { display: none; }
  .card-play { justify-self: start; padding: 2px 0; font-size: 13px; }
  .play-dot { display: none; }
  .tab { padding: 8px 14px 9px; }
  .notice { grid-template-columns: minmax(0, 1fr); }
  .notice::before { grid-row: auto; }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
  .footer-links { columns: 1; }
  .admin-row { grid-template-columns: 96px minmax(0, 1fr); }
  .admin-actions { grid-column: span 2; justify-content: flex-start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span2 { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover .card-cover { transform: none; }
}
