/* O. Store в браузере (/store). Цвета — OColors приложения (как в web/app.css), шрифты — Onest и Unbounded сайта. */
@font-face { font-family: Unbounded; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --accent: #2563eb; --accent2: #7155f5; --logo: #2660e0;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
  --bg: #fff; --canvas: #f3f5fa; --surface: #fff; --alt: #f3f5fa; --hover: #f1f4f9; --line: #e7eaf2;
  --text: #0b1030; --text2: #5f6b85; --text3: #7a849c; --field: #fff; --dim: rgba(5, 8, 28, .42);
  --k-mini: #7155f5; --k-game: #e8501a; --k-android: #16904a; --k-windows: #2563eb; --k-web: #0c8f9c;
  --sh: 11, 16, 48; --sha: .1;
  --card-shadow: 0 10px 28px -6px rgba(var(--sh), var(--sha)), 0 1px 3px rgba(var(--sh), calc(var(--sha) * .5));
  --pop-shadow: 0 24px 60px -16px rgba(var(--sh), calc(var(--sha) * 3)), 0 1px 4px rgba(var(--sh), calc(var(--sha) * .7));
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #4f86ff; --accent2: #8e78ff; --logo: #4f86ff;
    --bg: #0b0e17; --canvas: #080a11; --surface: #11141f; --alt: #1a1e2c; --hover: #171b28; --line: #222738;
    --text: #f1f3f9; --text2: #9aa3ba; --text3: #7e879e; --field: #11141f; --dim: rgba(5, 8, 28, .62);
    --k-mini: #8e78ff; --k-game: #ff7a45; --k-android: #3cc77a; --k-windows: #4f86ff; --k-web: #2cc7d0;
    --sh: 0, 0, 0; --sha: .5; color-scheme: dark; }
}
:root[data-theme="dark"] { --accent: #4f86ff; --accent2: #8e78ff; --logo: #4f86ff;
  --bg: #0b0e17; --canvas: #080a11; --surface: #11141f; --alt: #1a1e2c; --hover: #171b28; --line: #222738;
  --text: #f1f3f9; --text2: #9aa3ba; --text3: #7e879e; --field: #11141f; --dim: rgba(5, 8, 28, .62);
  --k-mini: #8e78ff; --k-game: #ff7a45; --k-android: #3cc77a; --k-windows: #4f86ff; --k-web: #2cc7d0;
  --sh: 0, 0, 0; --sha: .5; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 16px/1.5 Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: #fff;
  font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
svg.i { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none;
  font: 600 17px/1 Unbounded, Onest, sans-serif; letter-spacing: -.02em; }
.mark { width: 28px; height: 28px; fill: var(--logo); flex: none; }
.bar-nav { margin-left: auto; display: flex; gap: 4px; }
.bar-nav a { padding: 8px 12px; border-radius: 10px; color: var(--text2); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.bar-nav a:hover { background: var(--alt); color: var(--text); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text2); font-size: 20px; flex: none; }
.icon-btn:hover { background: var(--alt); color: var(--text); }

/* Первый блок: заголовок, поиск, фильтр */
.hero { padding: 44px 0 6px; }
.hero h1 { font: 700 clamp(34px, 6vw, 56px)/1.05 Unbounded, Onest, sans-serif; letter-spacing: -.04em; width: fit-content;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 12px; max-width: 46ch; color: var(--text2); font-size: 17px; }
.tools { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; display: block; }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 18px; display: grid; pointer-events: none; }
.search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--field);
  color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--text3); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text2); font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip svg { font-size: 16px; color: var(--kc, currentColor); }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--text3) 60%, var(--line)); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip[aria-pressed="true"] svg { color: inherit; }
.hint { min-height: 22px; margin-top: 14px; color: var(--text2); font-size: 14.5px; }

/* Разделы и карточки */
.sec { margin-top: 26px; }
.sec h2 { display: flex; align-items: baseline; gap: 10px; font: 600 20px/1.2 Unbounded, Onest, sans-serif; letter-spacing: -.03em; }
.sec h2 small { font: 500 14px/1 Onest, sans-serif; color: var(--text3); letter-spacing: 0; }
.grid { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.card { position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 104px; padding: 16px; border-radius: 20px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.card:focus-visible { border-radius: 20px; }
.card:active { transform: scale(.985); }
.skel { border-color: transparent; background: linear-gradient(90deg, var(--alt) 25%, var(--surface) 50%, var(--alt) 75%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.ico { width: 58px; height: 58px; border-radius: 16px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--tile, var(--accent));
  color: #fff; font: 700 20px/1 Unbounded, Onest, sans-serif; letter-spacing: -.02em; }
.ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { min-width: 0; flex: 1; }
.card h3 { font-size: 16.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card p { margin-top: 3px; color: var(--text2); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kinds { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.kind { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); }
.kind svg { font-size: 13px; }
[data-k="mini"] { --kc: var(--k-mini); } [data-k="game"] { --kc: var(--k-game); } [data-k="android"] { --kc: var(--k-android); }
[data-k="windows"] { --kc: var(--k-windows); } [data-k="web"] { --kc: var(--k-web); }
.empty { margin: 40px auto; padding: 0 16px; max-width: 46ch; text-align: center; color: var(--text2); }
.empty button { margin-top: 14px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px 20px; border-radius: 14px;
  background: var(--alt); color: var(--text); font-weight: 600; font-size: 15.5px; text-decoration: none; text-align: center; transition: transform .2s var(--ease), background .15s; }
.btn svg { font-size: 19px; }
.btn:hover { background: color-mix(in srgb, var(--text) 9%, var(--alt)); }
.btn:active { transform: scale(.97); }
.btn.main { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.main:hover { filter: brightness(1.06); }

/* Карточка приложения */
dialog { width: min(560px, calc(100% - 24px)); max-height: min(86vh, 760px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 26px;
  background: var(--surface); color: var(--text); box-shadow: var(--pop-shadow); overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; animation: pop .32s var(--ease); }
dialog::backdrop { background: var(--dim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.d-scroll { overflow-y: auto; padding: 22px 22px 8px; overscroll-behavior: contain; }
.d-head { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.d-head .ico { width: 76px; height: 76px; border-radius: 21px; font-size: 26px; }
.d-head h2 { font: 600 22px/1.2 Unbounded, Onest, sans-serif; letter-spacing: -.03em; overflow-wrap: anywhere; }
.d-close { position: absolute; top: 14px; right: 14px; background: var(--alt); }
.d-text { margin-top: 18px; font-size: 15.5px; white-space: pre-line; overflow-wrap: anywhere; }
.d-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--alt); color: var(--text2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.d-files { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.d-files li { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.d-files b { font-weight: 600; color: var(--kc); display: inline-flex; align-items: center; gap: 6px; }
.d-files span { color: var(--text2); }
.d-acts { display: grid; gap: 8px; padding: 14px 22px 22px; }
.d-hint { padding: 0 22px 18px; margin-top: -8px; color: var(--text3); font-size: 13px; text-align: center; }

/* Подвал */
.foot { margin-top: auto; padding: 56px 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--text3); font-size: 14px; }
.foot a { color: var(--text2); text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .bar-nav a:last-child { display: none; }
  .hero { padding-top: 30px; }
  .lead { font-size: 16px; }
  .search { max-width: none; flex-basis: 100%; }
  .card { padding: 14px; border-radius: 18px; }
  dialog { border-radius: 22px; max-height: 90vh; }
  .d-scroll { padding: 18px 18px 6px; }
  .d-acts { padding: 12px 18px 18px; }
  .d-head .ico { width: 64px; height: 64px; border-radius: 18px; }
  .d-head h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
