:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #59595f;
  --blue: #005bb9;
  --line: rgb(29 29 31 / 8%);
  --shadow: 0 4px 22px rgb(30 30 40 / 4%), 0 1px 4px rgb(30 30 40 / 3%);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  scroll-padding-top: 88px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1440px, calc(100% - 80px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; top: 8px; left: 12px; padding: 8px 14px; background: white; }
.header { position: sticky; top: 0; z-index: 2; background: rgb(255 255 255 / 88%); backdrop-filter: blur(24px); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: white; font-size: 18px; font-weight: 700; }
.header nav, .filters { display: flex; align-items: center; padding: 4px; gap: 3px; background: #eaeaec; border-radius: 999px; }
.header nav a, .filters button { padding: 6px 15px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.header nav a:hover, .filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / 8%); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 20px; border-radius: 999px; background: var(--ink); color: white; font-weight: 650; font-size: 13px; white-space: nowrap; }
.pill:hover { background: #343437; }
main { flex: 1; padding-block: 32px 82px; }
.toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 38px; }
.count { color: var(--muted); font-size: 13px; font-weight: 600; }
.count::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #0071e3; vertical-align: 1px; }
.search { display: flex; align-items: center; justify-self: end; gap: 9px; width: min(100%, 288px); border-radius: 999px; background: #eaeaec; padding-inline: 13px; }
.search:focus-within { box-shadow: 0 0 0 2px var(--blue); background: white; }
.search input { min-width: 0; width: 100%; height: 38px; color: var(--ink); background: transparent; border: 0; outline: none; font-size: 14px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { margin-bottom: 24px; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; letter-spacing: -.035em; }
section + section { margin-top: 58px; }
.grid { display: grid; gap: 24px; }
.tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; position: relative; min-width: 0; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: var(--shadow); transition: box-shadow 180ms ease, transform 180ms ease; }
.card:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(20px, 2.5vw, 34px); }
.badge, .tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; line-height: 1.5; }
.badge { margin-bottom: 17px; color: #126335; background: #e7f8ed; font-weight: 650; }
.cemian .badge { color: #a71b49; background: #fff0f3; }
.gdw .badge { color: #8a4b05; background: #fcf3de; }
.card h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; letter-spacing: -.025em; }
.subtitle { margin-top: 5px; color: var(--muted); font-size: 14px; }
.tool .subtitle { color: var(--blue); font-weight: 600; }
.description { margin-top: 13px; color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 20px 24px; }
.tag { background: #efeff1; color: #45454d; }
.card-action { margin-top: auto; font-size: 14px; font-weight: 650; }
.card-action::after { position: absolute; inset: 0; content: ""; }
.tool .card-action:hover { color: var(--blue); }
.cover { position: relative; aspect-ratio: 16 / 9; background: #171922; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover .badge { position: absolute; right: 15px; top: 15px; margin: 0; background: rgb(12 36 34 / 88%); color: #a7f3cf; }
.message { padding-block: 44px; text-align: center; color: var(--muted); }
.message button { margin-top: 8px; border: 0; background: none; color: var(--blue); text-decoration: underline; }
footer { background: #eeeeef; border-top: 1px solid var(--line); }
.footer-inner { min-height: 88px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.footer-inner a:hover { color: var(--blue); text-decoration: underline; }
.back-top { margin-left: auto; }
@media (hover: hover) { .card:has(a:hover) { transform: translateY(-3px); box-shadow: 0 12px 30px rgb(30 30 40 / 9%); } }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 48px); }
  .grid { gap: 16px; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; min-height: 0; gap: 10px; padding-block: 10px; }
  .header nav { order: 1; width: 100%; justify-content: center; }
  :root { scroll-padding-top: 115px; }
  main { padding-block: 22px 48px; }
  .toolbar { grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; }
  .filters { justify-self: start; }
  .search { width: 100%; justify-self: stretch; }
  .tools, .games { grid-template-columns: 1fr; }
  section + section { margin-top: 38px; }
  .footer-inner { gap: 8px 16px; padding-block: 16px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:has(a:hover) { transform: none; } }
