.content:has(.home) { background: var(--ca-bg); }
.home {
    max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px);
    color: var(--ca-text); font-family: var(--ca-font);
}
.home__heading, .home .live-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home__heading { margin-bottom: 16px; flex-wrap: wrap; }
.home__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(100vh - 114px);
    min-height: calc(100svh - 114px);
    border-block: 1px solid var(--ca-line-soft);
}
.home__intro-copy {
    align-self: center;
    padding: clamp(32px, 6vw, 82px) clamp(20px, 4vw, 60px) clamp(32px, 6vw, 82px) 0;
}
.home__intro h1 {
    margin: 0; max-width: 11ch;
    font-size: clamp(40px, 5.65vw, 82px);
    font-weight: 700; line-height: .99; letter-spacing: -.055em;
}
.home__intro h1 em {
    display: block; margin-top: .06em;
    font-family: Georgia, serif; font-weight: 400; color: var(--ca-text);
}
.home__intro p {
    max-width: 37ch; margin: clamp(20px, 3vw, 36px) 0 24px;
    font-size: clamp(16px, 1.4vw, 20px); line-height: 1.5; color: var(--ca-muted);
}
.home .home__intro-link, .home__intro-game span {
    display: inline-flex; align-items: center; gap: 22px;
    min-height: 46px; padding-inline: 20px; border-radius: var(--ca-radius);
    font-weight: 650; text-decoration: none;
}
.home .home__intro-link { background: var(--ca-text); color: var(--ca-bg); }
.home .home__intro-link:hover { background: var(--ca-accent-ink); color: var(--ca-on-accent, white); }
.home__slide { position: relative; min-height: 290px; overflow: hidden; isolation: isolate; }
.home__intro-game { position: absolute; inset: 0; display: block; overflow: hidden; }
.home-slide-next-enter-active, .home-slide-next-leave-active,
.home-slide-previous-enter-active, .home-slide-previous-leave-active {
    transition: transform 420ms cubic-bezier(.33, 0, .2, 1);
}
.home-slide-next-enter-from, .home-slide-previous-leave-to { transform: translateX(100%); }
.home-slide-previous-enter-from, .home-slide-next-leave-to { transform: translateX(-100%); }
@media (prefers-reduced-motion: reduce) {
    .home__slide .home__intro-game { transition: none; }
}
.home__slide-nav {
    position: absolute; z-index: 1; inset: 14px 14px auto auto; display: flex; align-items: center;
    background: var(--ca-surface); color: var(--ca-text); border-radius: var(--ca-radius);
}
.home__slide-nav button {
    width: 44px; height: 44px; border: 0; border-radius: inherit; background: transparent;
    color: inherit; font-size: 18px; cursor: pointer;
}
.home__slide-nav button:hover { background: var(--ca-surface-2); }
.home__slide-nav span { font-size: 13px; font-variant-numeric: tabular-nums; }
.home__intro-game img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home__intro-game span {
    position: absolute; bottom: 16px; left: 16px;
    background: var(--ca-surface); color: var(--ca-text); min-height: 40px; padding-inline: 14px;
}
.home__intro-game:hover span { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
    html:has(.home__intro) { scroll-behavior: smooth; }
}
.home #games { scroll-margin-top: 80px; }
.home h2#games { font-size: clamp(24px, 3vw, 34px); }
@media (max-width: 720px) {
    .home__intro { grid-template-columns: 1fr; grid-template-rows: auto minmax(150px, 1fr); }
    .home__intro-copy { padding: clamp(14px, 4vw, 28px) 0 24px; }
    .home__intro h1 { max-width: none; font-size: clamp(36px, 8.5vw, 56px); }
    .home__intro h1 em { display: inline; }
    .home__intro p { margin: 14px 0 18px; }
    .home__slide { min-height: 150px; }
    .home__intro-game img { object-position: 50% 54%; }
}
.home h2 { margin: 0; font-size: 18px; }
.home__heading a {
    display: inline-flex; align-items: center; min-height: 44px; color: var(--ca-accent);
}
.home__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.home > section + section { margin-top: 28px; }

/* ---------------------------- живые матчи -------------------------------- */
.home .live-card {
    background: var(--ca-surface); border: 1px solid var(--ca-line-hairline);
    border-radius: 14px; box-shadow: var(--ca-raise); overflow: hidden;
}
.home .live-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--ca-line-hairline);
}
.home .live-head .lh-l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.home .live-head .lh-c { font-size: 12px; color: var(--ca-muted); font-variant-numeric: tabular-nums; }
.home .live-online {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px;
    border-bottom: 1px solid var(--ca-line-hairline);
}
.home .lo-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 160px;
    padding: 3px 10px 3px 4px; border: 1px solid var(--ca-line-hairline);
    border-radius: 999px; background: var(--ca-surface);
    font-size: 12px; font-weight: 600; color: var(--ca-muted);
    text-decoration: none; transition: .15s;
}
.home .lo-chip:hover { border-color: var(--ca-accent); color: var(--ca-accent); }
.home .lo-ava {
    width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fff;
}
.home .lo-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home .match { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--ca-line-hairline); font-size: 13px; }
.home .match:last-child { border-bottom: 0; }
.home .m-ava { display: flex; flex-shrink: 0; }
.home .m-ava span {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    font-size: 11px; font-weight: 700; color: #fff; border: 2px solid var(--ca-surface);
}
.home .m-ava span:nth-child(2) { margin-left: -9px; }
.home .m-body { flex: 1; min-width: 0; }
.home .m-body .m-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .m-body .m-s { color: var(--ca-faint); font-size: 11.5px; }
.home .m-move { font-size: 11.5px; color: var(--ca-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.home .gcard {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 10px 14px; padding: 16px;
    border: 0; border-radius: 12px; background: var(--ca-surface);
    box-shadow: var(--ca-raise); cursor: pointer; transition: .15s; text-decoration: none; color: inherit;
}
.home .gcard:hover { background: var(--ca-surface-2); }
.home .gcard .g-ic { align-self: start; font-size: 56px; line-height: 1; }
.home .gcard .g-ic svg { display: block; }
.home .gcard .g-txt { display: contents; }
.home .gcard .g-t { align-self: center; font-size: 16px; font-weight: 700; }
.home .gcard .g-d {
    grid-column: 1 / -1;
    font-size: 14px; line-height: 1.4; color: var(--ca-muted);
}

/* ===================== Пикер «Быстрая игра с другом» ===================== */
.qpf-overlay {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(20, 22, 27, 0.5);
    animation: qpf-fade .18s ease;
}
@keyframes qpf-fade { from { opacity: 0; } to { opacity: 1; } }

.qpf-modal {
    width: 420px; max-width: 100%;
    background: var(--ca-surface); color: var(--ca-text);
    border: 1px solid var(--ca-line-soft); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(20, 22, 27, 0.35);
    padding: 20px; font-family: var(--ca-font);
    animation: qpf-pop .2s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes qpf-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.qpf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qpf-head h3 { font-size: 18px; font-weight: 800; margin: 0; }
.qpf-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ca-faint); cursor: pointer; }
.qpf-x:hover { color: var(--ca-text); }
.qpf-hint { font-size: 13px; color: var(--ca-muted); margin: 6px 0 14px; line-height: 1.45; }
.qpf-error {
    font-size: 13px; color: var(--ca-bad); background: var(--ca-bad-soft);
    border: 1px solid var(--ca-line-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}

.qpf-search {
    width: 100%; height: 44px; padding: 0 14px; font-size: 15px;
    color: var(--ca-text); background: var(--ca-bg);
    border: 1px solid var(--ca-line-soft); border-radius: 10px; outline: none;
    font-family: var(--ca-font);
}
.qpf-search:focus { border-color: var(--ca-accent); box-shadow: 0 0 0 3px var(--ca-accent-soft); }

.qpf-results { margin-top: 8px; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.qpf-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px; text-align: left;
    background: var(--ca-bg); border: 1px solid transparent; border-radius: 9px;
    color: var(--ca-text); font-size: 14px; font-family: var(--ca-font); cursor: pointer; transition: .12s;
}
.qpf-item:hover:not(:disabled) { border-color: var(--ca-accent); background: var(--ca-accent-soft); }
.qpf-item:disabled { cursor: default; opacity: .6; }
.qpf-item.is-busy { opacity: 1; }
.qpf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ca-line); flex-shrink: 0; }
.qpf-dot.is-online { background: var(--ca-good); box-shadow: 0 0 0 2px var(--ca-good-soft); }
.qpf-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qpf-star { color: var(--ca-line); font-size: 13px; flex-shrink: 0; }
.qpf-go { font-size: 12.5px; font-weight: 700; color: var(--ca-accent); flex-shrink: 0; }
.qpf-empty { padding: 14px 12px; font-size: 13px; color: var(--ca-muted); line-height: 1.45; text-align: center; }

.qpf-open {
    width: 100%; height: 46px; margin-top: 14px;
    background: var(--ca-surface); color: var(--ca-text);
    border: 1px solid var(--ca-line-soft); border-radius: 10px;
    font-size: 14px; font-weight: 700; font-family: var(--ca-font); cursor: pointer;
    box-shadow: var(--ca-raise); transition: .12s;
}
.qpf-open:hover:not(:disabled) { border-color: var(--ca-accent); color: var(--ca-accent); }
.qpf-open:disabled { cursor: default; opacity: .6; }

.home a:focus-visible,
.home button:focus-visible {
    outline: 2px solid var(--ca-accent);
    outline-offset: 2px;
    border-radius: 8px;
}
