@font-face {
    font-family: "Barlow Condensed";
    src: url("fonts/barlow-condensed-700.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --paper: #16121e;
    --surface: #211a2b;
    --surface-raised: #2a2135;
    --ink: #fff4eb;
    --muted: #c4b6cb;
    --line: #403449;
    --highlight: #ff826e;
    --highlight-strong: #ff9e8d;
    --lavender: #e1b9ff;
    --shell: 1200px;
    --display: "Barlow Condensed", "Instrument Sans", sans-serif;
}

body { background: var(--paper); }
.shell { width: min(calc(100% - 64px), var(--shell)); }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline-color: var(--highlight-strong); }
.skip-link:focus { color: #211727; }
.topbar { --header-height: 66px; --toolbar-height: 0px; background: #1b1524; border-bottom: 1px solid var(--line); }
body.admin-bar .topbar { --toolbar-height: 32px; }
.topbar-inner { position: relative; min-height: var(--header-height); gap: clamp(20px, 4vw, 56px); }
.brand { gap: 8px; color: var(--ink); letter-spacing: -.055em; }
.brand > span > span { color: var(--highlight); }
.desktop-nav { align-items: center; gap: 4px; }
.desktop-nav a { min-height: 42px; padding-inline: 14px; border-radius: 8px; }
.desktop-nav a, .mobile-menu nav a { color: var(--muted); }
.desktop-nav a[aria-current]::after { content: none; }
.desktop-nav a:hover, .desktop-nav a[aria-current], .mobile-menu nav a:hover, .mobile-menu nav a[aria-current] {
    background: #322336;
    color: var(--highlight-strong);
}
.header-tools { position: static; gap: 6px; }
.header-tools :is(summary, .popover a) { -webkit-tap-highlight-color: #ff826e40; }
.header-tools summary { min-height: 44px; color: var(--ink); background: #281f33; border-color: #4a3a54; border-radius: 8px; }
.header-tools details[open] summary, .header-tools summary:hover { border-color: #6f5177; background: #352745; }
.header-tools .popover {
    z-index: 1;
    top: calc(100% + 6px);
    width: min(370px, 100%);
    max-height: calc(100vh - var(--header-height) - var(--toolbar-height) - 18px);
    max-height: calc(100dvh - var(--header-height) - var(--toolbar-height) - 18px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 10px;
    padding: 10px;
    background: #241c2f;
    border-color: #5d4569;
    border-radius: 12px;
    box-shadow: 0 15px 38px #090710a6;
}
.mobile-menu { display: block; }
.mobile-menu summary .menu-name { font-size: 14px; font-weight: 700; }
.mobile-menu .popover { width: min(320px, calc(100vw - 24px)); padding: 8px; }
.menu-heading {
    margin: 10px 10px 2px;
    color: #b7a4c2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
}
.menu-group + .menu-heading { margin-top: 14px; }
.menu-group a { padding-inline: 12px; }
.age-badge { color: #ffc2b4; min-height: 44px; min-width: 38px; text-decoration: none; }
.age-badge:hover { color: var(--highlight); }
.search-form { gap: 7px; }
.search-form input { min-height: 46px; padding-inline: 14px; color: var(--ink); color-scheme: dark; background: #1e1829; border: 1px solid #58465f; border-radius: 8px; }
.search-form input::placeholder { color: #d2c0d8; opacity: 1; }
.search-form .btn { color: #26151d; background: var(--highlight); font-weight: 700; }
.search-form .btn:hover { background: var(--highlight-strong); }

.home-main { padding-top: 24px; }
.hero {
    min-height: 366px;
    padding: clamp(24px, 3.35vw, 46px);
    border: 1px solid #503044;
    border-radius: 16px;
    background: #211225;
}
.hero-visual { position: absolute; z-index: -2; inset: 0 0 0 39%; }
.hero-visual .hero-art {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 75% 60%;
    opacity: 1;
    mask-image: none;
}
.hero::after { background: linear-gradient(90deg, #211225 0%, #211225 37%, #211225bd 51%, #21122525 69%, transparent 85%); }
.hero-copy { position: relative; width: min(100%, 580px); max-width: none; }
.hero h1 {
    max-width: 578px;
    color: var(--ink);
    font: 700 clamp(3.7rem, 5.55vw, 5.4rem)/.96 var(--display);
    letter-spacing: -.024em;
    margin-bottom: 14px;
    text-wrap: wrap;
}
.hero p { max-width: 420px; margin-bottom: 18px; color: #f2d9e9; font-size: 15px; line-height: 1.47; }
.hero-search { max-width: 410px; }
.hero-search .search-form input { background: #1a1322; }
.hero-actions { margin-top: 9px; gap: 6px 17px; }
.hero-btn, .hero-all {
    min-height: 40px; display: inline-flex; align-items: center; gap: 5px;
    padding: 0; border: 0; background: transparent; color: #f4dbe5; font-size: 14px;
    text-decoration: none;
}
.hero-btn { color: #ffb5a4; }
.hero-btn:hover, .hero-all:hover { background: transparent; color: #fff; text-decoration: underline; }
.hero-actions .symbol { width: 14px; height: 14px; }
.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 12px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 9px;
}
.home-shortcuts a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 0; min-height: 50px; padding: 6px;
    background: var(--surface); color: var(--ink);
    font-size: 14px; font-weight: 650; text-align: center; text-decoration: none;
}
.home-shortcuts .symbol { width: 17px; height: 17px; color: var(--highlight); }
.home-shortcuts a:hover { background: var(--surface-raised); }
.home-shortcuts a:focus-visible { outline-offset: -4px; }

.home-section, .catalogue-section { margin-top: 34px; }
.section-heading { margin-bottom: 12px; }
.section-heading h2, .archive-header h1 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -.012em;
}
.section-heading h2 { font-size: clamp(2rem, 3.7vw, 2.9rem); }
.section-heading .text-link, .text-link { color: #ffb3a4; }
.brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.brand-tile {
    display: flex;
    min-height: 79px;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(108deg, #2a2033, var(--surface) 68%);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.brand-tile:focus-within { border-color: #9e6787; }
.brand-tile-title { margin: 0; gap: 10px; min-width: 0; }
.brand-tile-title .profile-icon { width: 44px; height: 44px; }
.brand-tile-title .profile-icon, .recent-app .profile-icon {
    border: 1px solid #ffffff26;
    border-radius: 10px;
    box-shadow: 0 3px 9px #100b1854;
}
.brand-tile-title h3 { margin: 0 0 4px; line-height: 1.15; font-size: 1.02rem; }
.brand-tile-title h3 a { color: var(--ink); }
.brand-tile h3 a::after { border-radius: 12px; }
.brand-tile h3 a:focus-visible { outline: none; }
.brand-tile h3 a:focus-visible::after { outline: 3px solid var(--highlight-strong); outline-offset: 2px; }
.brand-tile p { color: var(--muted); font-size: .83rem; line-height: 1.35; }
.brand-tile .download-link { flex: none; margin: 0; }
.download-link {
    justify-content: center; min-height: 42px; gap: 5px; padding: 6px 9px; text-align: center;
    background: #382637; border-color: #654253; color: #ffd2c6; font-size: .75rem; font-weight: 700;
}
.download-link:hover { background: #613649; border-color: #a86575; color: #fff; }
.download-link .symbol { width: 14px; height: 14px; }
.profile-icon-initials {
    color: #ffddc6;
    background: linear-gradient(148deg, #70415b, #3b2748 60%, #2b1d3b);
    font-family: var(--display);
    font-size: calc(var(--profile-icon-size) * .42);
    letter-spacing: .035em;
    text-shadow: 0 2px 3px #1b0e22;
}
.recent-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.recent-app {
    display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 60px; padding: 8px 12px;
    color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere;
    background: linear-gradient(108deg, #342439, #231a2e 70%); border: 1px solid #543c56; border-radius: 10px;
}
.recent-app > .symbol { margin-inline-start: auto; color: var(--highlight-strong); width: 15px; }
.recent-app:is(:hover, :focus-visible, :active) { border-color: #a9667e; }
.directory-count { margin-inline-start: auto; color: #e2c9df; font-size: .8rem; font-variant-numeric: tabular-nums; }
.directory-content h2:target { color: #ffb3a4; }

@media (hover: hover) {
    .brand-tile:hover { border-color: #94627e; box-shadow: 0 5px 13px #0f0a15a8; }
}
@media (prefers-reduced-motion: no-preference) {
    .brand-tile, .recent-app { transition: border-color .18s ease, box-shadow .18s ease; }
    .brand-tile .download-link, .brand-tile .profile-icon, .recent-app .symbol { transition: transform .16s ease; }
    .brand-tile .download-link:active { transform: scale(.97); }
    .recent-app:is(:hover, :focus-visible) > .symbol { transform: translateX(2px); }
    @media (hover: hover) { .brand-tile:hover .profile-icon { transform: translateY(-2px); } }
}
.focus-card, .app-card, .page-result { background: var(--surface); border-color: var(--line); }
.guide-card h3 { color: var(--ink); }
.guide-card p { color: var(--muted); }
.guide-foot, .card-foot { border-color: var(--line); }
.focus-card h2 a:hover, .focus-card h3 a:hover, .lane-links a:hover { color: #ffb3a4; }
.supporting-lanes { margin-top: 24px; }
.lane {
    --lane-ink: #ffb09f; --lane-bg: #3e2634;
    padding: 17px;
    border-radius: 10px;
}
.lane-game-formats { --lane-ink: var(--lavender); --lane-bg: #35243f; }
.lane-lottery-results { --lane-ink: #ffc397; --lane-bg: #412c30; }
.lane-head h2 { font: 700 1.7rem/1.05 var(--display); }
.lane-links li + li { border-color: var(--line); }
.lane-links a { color: var(--muted); }
.help-card { color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: 9px; }
.help-card:hover { background: var(--surface-raised); border-color: #72576e; }
.help-card > .symbol, .home-method a { color: #ffb3a4; }
.help-icon { color: #ffc0af; background: #352438; }
.home-method { color: var(--muted); }
.site-footer { background: #1c1525; }
.footer-inner { align-items: flex-start; }
.footer-nav a { display: flex; align-items: center; min-height: 37px; }
.footer-nav a:hover, .crumbs a:hover { color: var(--highlight-strong); }
.crumbs { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }
.archive-header, .empty-state {
    color: var(--ink);
    background: radial-gradient(ellipse at 95% 0, #402337, transparent 68%), var(--surface);
    border-color: var(--line);
    border-radius: 11px;
}
.archive-header h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); margin-bottom: 9px; }
.archive-header .intro { color: var(--muted); }
.age-note, .archive-header .age-note { color: var(--muted); }
.age-note a:hover { color: var(--highlight-strong); }
.age-note span { color: #ffd1c5; background: #382635; border-color: #684554; }
.empty-state .btn { background: var(--highlight); color: #26151d; }
.directory-view .archive-header { padding: 22px 26px; }
.directory-view .archive-header .intro { margin-bottom: 13px; }
.directory-layout { display: grid; grid-template-columns: minmax(170px, 215px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.directory-layout .catalogue-links { position: sticky; top: 86px; flex-direction: column; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.directory-content { min-width: 0; }
.directory-content > .catalogue-section:first-child { margin-top: 0; }
.directory-content .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.genre-links a { min-height: 42px; border-color: #564256; border-radius: 7px; background: var(--surface-raised); color: #efdfeb; }
.genre-links a:hover, .genre-links a[aria-current] { color: #ffd2c6; border-color: #a66475; background: #482c3f; }
.genre-links .symbol { color: var(--highlight); }
.catalogue-section h2[id], #platform-downloads { scroll-margin-top: 8px; }

@media (max-width: 1060px) {
    .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .shell { width: calc(100% - 32px); }
    .topbar { --header-height: 60px; }
    .topbar-inner { gap: 10px; }
    .header-tools summary { padding: 7px 10px; }
    .directory-layout { display: block; margin-top: 13px; }
    .directory-layout .catalogue-links { position: static; flex-direction: row; display: flex; margin-bottom: 20px; }
    .hero { min-height: 280px; }
    .hero-search { display: none; }
    .hero h1 { max-width: 420px; font-size: clamp(3.15rem, 8vw, 4rem); }
    .hero-visual { left: 31%; }
}
@media (max-width: 782px) {
    body.admin-bar .topbar { --toolbar-height: 46px; }
}
@media (max-width: 620px) {
    .shell { width: calc(100% - 24px); }
    .topbar { --header-height: 56px; }
    .topbar .brand { font-size: 22px; }
    .topbar .brand img { width: 31px; height: 31px; }
    .header-tools { gap: 3px; }
    .header-tools summary { width: 44px; }
    .mobile-menu summary .menu-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .home-main { padding-block: 13px 40px; }
    .hero { display: block; min-height: 0; padding: 17px 16px 11px; border-radius: 12px; }
    .hero-visual {
        inset: 0 0 auto 26%;
        height: min(210px, 66vw);
        mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
    }
    .hero-visual .hero-art { object-position: 75% 30%; }
    .hero::after {
        background: linear-gradient(0deg, #211225 13%, #211225e0 32%, transparent 82%),
            linear-gradient(90deg, #211225 16%, #211225e8 29%, #2112257d 55%, #21122522 78%);
    }
    .hero h1 { max-width: min(235px, 100%); font-size: clamp(2.45rem, 10.5vw, 3.5rem); margin-bottom: 8px; }
    .hero p { max-width: min(247px, 96%); margin-bottom: 5px; color: #f0dbe7; font-size: .84rem; line-height: 1.45; }
    .hero-actions { margin-top: 4px; gap: 4px 13px; }
    .hero-btn, .hero-all { min-height: 44px; font-size: .8rem; }
    .home-shortcuts { margin-top: 8px; }
    .home-shortcuts a { min-height: 43px; gap: 5px; font-size: .75rem; white-space: nowrap; }
    .home-shortcuts .symbol { width: 13px; height: 13px; }
    .home-main .home-section, .catalogue-section { margin-top: 21px; }
    .home-main .section-heading .text-link { display: inline-flex; margin-left: auto; }
    .recent-apps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .section-heading { gap: 5px 9px; margin-bottom: 9px; }
    .section-heading h2 { font-size: 2rem; line-height: 1; }
    .supporting-lanes { margin-top: 19px; }
    .brand-grid, .directory-content .brand-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .brand-tile { min-height: 72px; padding: 9px 10px; gap: 7px; }
    .brand-tile-title { gap: 9px; }
    .brand-tile-title .profile-icon { width: 41px; height: 41px; }
    .brand-tile-title h3 { margin-bottom: 3px; }
    .brand-tile p { font-size: .8rem; }
    .brand-tile .download-link { min-height: 44px; max-width: 85px; }
    .directory-view .archive-header { padding: 16px; }
    .directory-view .archive-header h1 { font-size: 2.9rem; }
    .directory-view .archive-header .intro { font-size: .9rem; line-height: 1.4; }
    .directory-layout .catalogue-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 7px; }
    .directory-layout .catalogue-links a { min-height: 42px; justify-content: center; text-align: center; }
    .footer-nav { gap: 1px 15px; }
}
@media (max-width: 600px) {
    body.admin-bar .topbar { position: sticky; top: 0; }
}
@media (max-width: 360px) {
    .home-shortcuts .symbol { display: none; }
    .hero-actions .symbol, .brand-tile .download-link .symbol { display: none; }
    .section-heading h2 { font-size: 1.77rem; }
}
