@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

/* ==========================================================================
   Pak Super Games — APK directory
   Design and layout replicated from the supplied reference pages.
   Tokens (background, header, accent, cards, section rules, type scale) were
   measured from the rendered reference rather than estimated.
   ========================================================================== */

:root {
    /* Core palette — measured from the svip slots reference */
    --bg:          #0C0E08;   /* page ground        rgb(12,14,8)   */
    --card:        #11130B;   /* card surface       rgb(17,19,11)  */
    --surface-2:   #1D2111;   /* nested surface     rgb(29,33,17)  */
    --panel:       #2F3519;   /* olive accent panel rgb(47,53,25)  */
    --header-bg:   #11130B;
    --accent:      #F59E0B;   /* amber              rgb(245,158,11)*/
    --accent-dark: #D98806;
    --accent-lite: #FFC107;
    --green:       #16A34A;   /* rgb(22,163,74)  */
    --green-dark:  #0E8A43;   /* rgb(14,138,67)  */
    --green-deep:  #024B22;   /* rgb(2,75,34)    */
    --on-accent:   #11130B;   /* text on amber/green fills */

    /* Text */
    --text:        #FFFBEA;   /* rgb(255,251,234) */
    --text-strong: #FFFBEA;
    --text-muted:  #C8BE92;   /* rgb(200,190,146) */
    --text-soft:   #C8BE92;

    /* Lines + surfaces */
    --line:        rgba(255, 255, 255, .10);
    --line-soft:   rgba(255, 255, 255, .07);
    --field:       #1D2111;
    --shadow:      0 2px 10px rgba(0, 0, 0, .55);

    /* Footer */
    --footer-bg:   #0A0C06;
    --gold:        #F59E0B;
    --gold-bright: #FFC107;

    /* Metrics */
    --container:   1420px;
    --sidebar:     300px;
    --gap:         20px;
    --radius:      20px;
    --header-h:    60px;

    --t: 200ms cubic-bezier(.4, 0, .2, 1);

    --z-nav: 30;
    --z-top: 50;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { font-weight: 700; color: var(--text-strong); line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 38px; color: var(--text); }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p  { margin: 0 0 1.1em; }

button { font: inherit; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 10px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--z-top);
    background: var(--accent);
    color: var(--on-accent);
    padding: 12px 18px;
}
.skip-link:focus { left: 0; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    background: var(--header-bg);
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }

.brand__logo {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-2);
}

.brand__name {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.15;
}
.brand__name span { color: var(--accent); }
.brand:hover .brand__name { color: var(--text); }

.nav { display: flex; align-items: center; }

.nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 15px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--t);
}
.nav__link { position: relative; }
.nav__link::after {
    content: '';
    position: absolute;
    left: 15px; right: 15px; bottom: 10px;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--t);
}
.nav__link:hover::after,
.nav__link.is-active::after { opacity: 1; }
.nav__link.is-active { color: var(--text); }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* --------------------------------------------------------------------------
   Search + social utility bar
   -------------------------------------------------------------------------- */
.utility-bar { background: var(--card); border-bottom: 1px solid var(--line); }

.utility-bar__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
}

.searchbox { position: relative; flex: 1; min-width: 0; }

.searchbox__input {
    width: 100%;
    height: 44px;
    background: var(--field);
    border: 0;
    border-radius: 50px;
    padding: 0 110px 0 20px;
    font-size: 16px;
    color: var(--text);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .125);
}
.searchbox__input::placeholder { color: var(--text-muted); }

.searchbox__submit {
    position: absolute;
    right: 0; top: 0;
    width: 70px; height: 44px;
    display: grid; place-items: center;
    background: var(--accent);
    border: 0;
    border-radius: 50px;
    color: var(--on-accent);
    cursor: pointer;
    transition: background-color var(--t);
}
.searchbox__submit:hover { background: var(--accent-dark); }

.socials { display: flex; align-items: center; gap: 8px; flex: none; }

.social {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: opacity var(--t);
}
.social:hover { opacity: .85; color: #fff; }
.social--facebook  { background: #1877F2; }
.social--x         { background: #1DA1F2; }
.social--instagram { background: var(--accent-alt); }
.social--youtube   { background: #D6180F; }
.social--pinterest { background: #C4181F; }
.social--telegram  { background: #0088CC; }

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    background: var(--header-bg) center/cover no-repeat;
    border-bottom: 3px solid var(--accent);
    padding: 58px 0 46px;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 14, 8, .78), rgba(12, 14, 8, .93));
}

.hero__inner { position: relative; z-index: 2; }

.hero__title {
    color: var(--text);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.hero__sub {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 760px;
    margin: 0 auto 26px;
}

.hero .searchbox { max-width: 600px; margin: 0 auto 22px; }
.hero .socials { justify-content: center; }

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    margin: 0 0 20px;
}

.title-section a { font-size: 13px; font-weight: 600; }

.section { padding: 26px 0; }

/* --------------------------------------------------------------------------
   App cards
   -------------------------------------------------------------------------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--gap);
}

.app-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-bottom: 2px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    text-align: center;
    color: var(--text);
    cursor: pointer;
    transition: transform var(--t), box-shadow var(--t);
}
.app-card:hover {
    color: var(--text);
    border-color: rgba(245, 158, 11, .45);
    border-bottom-color: var(--accent);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .65);
    transform: translateY(-3px);
}

.app-card__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--surface-2);
}

.app-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 6px;
    line-height: 1.35;
}
.app-card:hover .app-card__title { color: var(--accent); }

.app-card__meta { font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.app-card__meta span { display: block; }
.app-card__meta .is-bonus { color: var(--accent); font-weight: 600; }

/* Carousel (Top rated) */
.carousel { position: relative; }

.carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (5 * var(--gap))) / 6);
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 0 10px;
    scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }

.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-soft);
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 2;
    transition: color var(--t), border-color var(--t);
}
.carousel__btn:hover { color: var(--accent); border-color: var(--accent); }
.carousel__btn[disabled] { opacity: .35; cursor: not-allowed; }
.carousel__btn--prev { left: -6px; }
.carousel__btn--next { right: -6px; }

/* Horizontal card used by the Top rated carousel */
.rank-card {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-bottom: 2px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform var(--t), box-shadow var(--t);
}
.rank-card:hover {
    color: var(--text);
    border-color: rgba(245, 158, 11, .45);
    border-bottom-color: var(--accent);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .65);
    transform: translateY(-3px);
}

.rank-card__img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.rank-card__title { font-size: 14px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.rank-card:hover .rank-card__title { color: var(--accent); }
.rank-card__meta { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.rank-card__meta span { display: block; }
.rank-card__meta .is-bonus { color: var(--accent); font-weight: 600; }

/* Search empty state */
.no-results {
    display: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    text-align: center;
    color: var(--text-soft);
}
.no-results.is-shown { display: block; }

/* --------------------------------------------------------------------------
   Featured promo (black + gold)
   -------------------------------------------------------------------------- */
.promo { padding: 30px 0 40px; }

.promo__card {
    max-width: 530px;
    margin: 0 auto;
    background: var(--panel);
    border: 2px solid var(--accent);
    border-radius: 22px;
    box-shadow: 0 0 26px rgba(245, 158, 11, .32);
    padding: 30px 26px 34px;
    text-align: center;
}

.promo__art {
    width: 250px; height: 250px;
    margin: 0 auto 18px;
    border-radius: 16px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 22px rgba(245, 158, 11, .35);
    object-fit: cover;
    background: var(--surface-2);
}

.promo__title {
    color: var(--gold-bright);
    font-size: 27px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-shadow: 0 0 14px rgba(245, 158, 11, .5);
}

.promo__text { color: var(--text); margin-bottom: 22px; }

.promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 40px;
    border-radius: 50px;
    background: linear-gradient(180deg, var(--accent-lite), var(--accent));
    color: var(--on-accent);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    box-shadow: 0 0 22px rgba(245, 158, 11, .4);
    cursor: pointer;
    transition: filter var(--t);
}
.promo__btn:hover { filter: brightness(1.08); color: var(--on-accent); }

/* --------------------------------------------------------------------------
   Detail / page layout
   -------------------------------------------------------------------------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar);
    gap: var(--gap);
    align-items: start;
    padding: 20px 0 30px;
}

.box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 25px;
    margin-bottom: var(--gap);
}

.box:last-child { margin-bottom: 0; }

.box-title {
    position: relative;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: .4px;
    padding: 15px 25px;
    margin: -20px -25px 18px;
    border-bottom: 1px solid var(--line);
}

.box-title::after {
    content: '';
    position: absolute;
    left: 25px;
    bottom: -2px;
    width: 45px;
    height: 5px;
    background: var(--accent);
}

/* App header block */
.app-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; }

.app-head__art {
    width: 150px; height: 150px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--surface-2);
}

.app-head__dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    padding: 8px 18px;
    background: var(--accent);
    border-radius: 20px;
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color var(--t);
}
.app-head__dl:hover { background: var(--accent-dark); color: var(--on-accent); }

.app-head__rating { text-align: center; margin-top: 12px; }

.rating-big { font-size: 26px; font-weight: 700; color: var(--text-strong); }
.rating-big small { font-size: 15px; color: var(--text-soft); font-weight: 400; }

.rating-note { font-size: 12px; color: var(--text-soft); }

.breadcrumb { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--accent); }

.app-head__title { font-size: 38px; font-weight: 700; color: var(--text); margin: 0 0 12px; line-height: 1.15; }
.app-head__title .ver { font-size: 20px; font-weight: 400; color: var(--text-muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 13px;
    background: var(--accent);
    border-radius: 20px;
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--t);
}
.tag:hover { background: var(--accent-dark); color: var(--on-accent); }

.app-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 20px;
    margin: 18px 0 4px;
}
.app-meta dt { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.app-meta dd { margin: 0; font-size: 14px; color: var(--text-soft); }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 15px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
    transition: border-color var(--t), color var(--t);
}
.share:hover { border-color: var(--accent); color: var(--accent); }

/* Article body */
.article h1 { font-size: 30px; }
.article h2 { font-size: 24px; font-weight: 700; color: var(--text-strong); margin: 1.5em 0 .5em; }
.article h3 { font-size: 18px; font-weight: 700; color: var(--text-strong); margin: 1.3em 0 .4em; }
.article p  { font-size: 14px; color: var(--text); }
.article ul { margin: 0 0 1.2em; padding-left: 20px; }
.article li { margin-bottom: .5em; }
.article li strong { color: var(--text-strong); }
.article > *:first-child { margin-top: 0; }

/* Download links block */
.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    background: var(--accent);
    border-radius: 30px;
    color: var(--on-accent);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--t);
}
.dl-btn:hover { background: var(--accent-dark); color: var(--on-accent); }

.install-note {
    margin-top: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 18px 20px;
    font-size: 14px;
}
.install-note h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.install-note ol { margin: 0; padding-left: 18px; }
.install-note li { margin-bottom: 5px; }

/* Related grid inside a box */
.box .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.mini-card { display: block; text-align: center; color: var(--text); cursor: pointer; }
.mini-card__img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 14px; margin-bottom: 10px; background: var(--surface-2); }
.mini-card__title { font-size: 14px; font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.mini-card:hover .mini-card__title { color: var(--accent); }
.mini-card__meta { font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.mini-card__meta span { display: block; }

/* --------------------------------------------------------------------------
   Sidebar widgets
   -------------------------------------------------------------------------- */
.sidebar { display: grid; gap: var(--gap); }

.widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

.widget__title {
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-strong);
    padding-bottom: 12px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--line);
}

.widget .searchbox__input { padding-right: 92px; font-size: 14px; }
.widget .searchbox__submit { width: 80px; font-size: 13px; font-weight: 700; }

.recent { display: grid; gap: 14px; }

.recent__item { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: center; cursor: pointer; }
.recent__img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.recent__name { font-size: 14px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.recent__item:hover .recent__name { color: var(--accent); }
.recent__meta { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.recent__meta span { display: block; }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px;
    min-height: 40px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}
.cat-list a:hover { color: var(--accent); }
.cat-list .count { color: var(--text-muted); font-size: 12px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--footer-bg);
    border-top: 3px solid var(--gold-bright);
    padding: 40px 0 30px;
    text-align: center;
}

.footer__title {
    color: var(--gold-bright);
    font-size: 27px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 12px rgba(245, 158, 11, .45);
}

.footer__text { color: var(--text); max-width: 700px; margin: 0 auto 22px; }

.footer__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 26px; }

.footer__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 22px;
    border: 1px solid var(--gold);
    border-radius: 30px;
    color: var(--gold);
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--t), color var(--t);
}
.footer__link:hover { background: var(--gold); color: var(--on-accent); }
.footer__link svg { flex: none; }

.footer__disclaimer { color: var(--text-muted); font-size: 13px; max-width: 1000px; margin: 0 auto 22px; }

.footer__rule { height: 1px; background: var(--line); max-width: 1240px; margin: 0 auto 20px; }

.footer__copy { color: var(--gold); font-size: 14px; }

.notice-bar { padding: 0 0 30px; }

.notice-bar__box {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 22px 26px;
}
.notice-bar__box p { color: var(--text); font-size: 14px; margin-bottom: 1em; }
.notice-bar__box p:last-child { margin-bottom: 0; }
.notice-bar__box strong { color: var(--gold); }

/* Scroll to top */
.to-top {
    position: fixed;
    right: 20px; bottom: 20px;
    z-index: var(--z-top);
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    transition: opacity var(--t), transform var(--t), visibility var(--t), background-color var(--t);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); }

/* Static page hero */
.page-hero {
    position: relative;
    background: var(--header-bg) center/cover no-repeat;
    border-bottom: 3px solid var(--accent);
    padding: 46px 0;
    text-align: center;
}
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 14, 8, .80), rgba(12, 14, 8, .94)); }
.page-hero__inner { position: relative; z-index: 2; }
.page-hero h1 { color: var(--text); font-size: clamp(24px, 3.4vw, 34px); margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .app-grid, .box .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .carousel__track { grid-auto-columns: calc((100% - (3 * var(--gap))) / 4); }
}

@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-grid, .box .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .carousel__track { grid-auto-columns: calc((100% - (2 * var(--gap))) / 3); }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }

    .nav {
        position: fixed;
        inset: calc(var(--header-h) + 3px) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--header-bg);
        border-bottom: 3px solid var(--accent);
        padding: 6px 10px 14px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
        transition: opacity var(--t), transform var(--t), visibility var(--t);
    }
    .nav.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav__link { padding: 12px 10px; font-size: 15px; border-bottom: 1px solid var(--line-soft); }

    .utility-bar__inner { flex-wrap: wrap; }
    .socials { width: 100%; justify-content: center; }

    .app-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .app-head__art { width: 150px; height: 150px; }
    .app-head__dl { max-width: 240px; }
    .app-head__title { font-size: 27px; }
    .tag-row, .share-row { justify-content: center; }
    .app-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
}

@media (max-width: 640px) {
    .app-grid, .box .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .carousel__track { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
    .sidebar { grid-template-columns: 1fr; }
    .box { padding: 16px; }
    .box-title { margin: -16px -16px 16px; padding: 14px 16px; }
    .box-title::after { left: 16px; }
    .carousel__btn--prev { left: -2px; }
    .carousel__btn--next { right: -2px; }
    h1, .app-head__title { font-size: 26px; }
    .promo__art { width: 190px; height: 190px; }
}

@media (max-width: 400px) {
    .container { padding-inline: 8px; }
    .app-card { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .carousel__track { scroll-behavior: auto; }
    .app-card:hover { transform: none; }
}

@media print {
    .site-header, .utility-bar, .site-footer, .to-top, .sidebar, .notice-bar { display: none !important; }
    body { background: #fff; }
    .box { box-shadow: none; border: 1px solid #ddd; }
}
