/*
Theme Name: Modder Modern
Theme URI: https://modder.me
Author: Modder
Description: App store layout: fixed category header with mega menu, featured rail on the home page, row-style app cards, two-column detail page, emerald green accent. Shares all ACF data, taxonomies, download page, ratings, favorites and light/dark mode with the Modder theme.
Version: 1.0.0
Text Domain: k
*/

/* ==========================================================
   1. Tokens & reset
   ========================================================== */
:root {
	--bg: #f5f5f4;
	--surface: #ffffff;
	--text: #111827;
	--text-2: #374151;
	--muted: #6b7280;
	--faint: #9ca3af;
	--line: #e7e5e4;
	--line-soft: #f1f0ee;
	--primary: #77be59;
	--primary-text: #4a8a32;
	--primary-600: #77be59;
	--primary-700: #5fa443;
	--primary-50: #f1f9ed;
	--primary-100: #dcf0d1;
	--accent: #764ba2;
	--gradient: linear-gradient(135deg, #0f172a 0%, #065f46 100%);
	--star: #f59e0b;
	--green: #16a34a;
	--red: #dc2626;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow-sm: none;
	--shadow: 0 1px 2px rgba(0, 0, 0, .06);
	--shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .15);
	--header-h: 64px;
	--header-bg: rgba(255, 255, 255, .9);
	--soft-green: #f0fdf4; --soft-green-line: #bbf7d0; --soft-green-text: #166534;
	--soft-amber: #fffbeb; --soft-amber-line: #fde68a; --soft-amber-text: #92400e;
	color-scheme: light;
}

/* ===== Dark theme ===== */
:root[data-theme="dark"] {
	--bg: #0b0c0d; --surface: #141516; --text: #f3f4f6; --text-2: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
	--line: #26282b; --line-soft: #1d1f22;
	--primary: #77be59; --primary-700: #8fd470; --primary-text: #9bd67f; --primary-50: rgba(119, 190, 89, .16); --primary-100: rgba(119, 190, 89, .28);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 4px 12px -2px rgba(0, 0, 0, .5); --shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .6);
	--header-bg: rgba(20, 21, 22, .9);
	--soft-green: rgba(34, 197, 94, .12); --soft-green-line: rgba(34, 197, 94, .3); --soft-green-text: #86efac;
	--soft-amber: rgba(245, 158, 11, .12); --soft-amber-line: rgba(245, 158, 11, .3); --soft-amber-text: #fcd34d;
	color-scheme: dark;
}
:root[data-theme="dark"] .section-more, :root[data-theme="dark"] .breadcrumb-item a, :root[data-theme="dark"] .app-hero__dev,
:root[data-theme="dark"] .info-row a, :root[data-theme="dark"] .entry-content a, :root[data-theme="dark"] .app-card__mod,
:root[data-theme="dark"] .rank-item__mod { color: #9bd67f; }
:root[data-theme="dark"] .chip.is-active, :root[data-theme="dark"] .chip.active { color: #fff; }
:root[data-theme="dark"] .rank-no { color: rgba(119, 190, 89, .22); }
:root[data-theme="dark"] .pill-age { background: #374151; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .footer-brand img[src$=".svg"] { filter: invert(1) hue-rotate(180deg) brightness(1.15) saturate(1.1); }
:root[data-theme="dark"] .dl-row__icon, :root[data-theme="dark"] .dl-row__badge, :root[data-theme="dark"] .dl-file__icon { filter: brightness(.95) saturate(1.1); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 16px; }
.wrap--md { max-width: 56rem; }
.wrap--sm { max-width: 46rem; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

main { display: block; padding: 24px 0 48px; }
.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ==========================================================
   2. Header
   ========================================================== */
.site-header {
	position: sticky; top: 0; z-index: 999;
	background: var(--header-bg);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
	width: 36px; height: 36px; border-radius: 12px; background: var(--gradient);
	display: flex; align-items: center; justify-content: center;
	color: #fff; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.02em; display: none; }
.brand img { height: 36px; width: auto; }
@media (min-width: 640px) { .brand-name { display: block; } }

.icon-btn {
	width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent;
	display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
	transition: background .15s;
}
@media (hover: hover) { .icon-btn:hover { background: var(--line-soft); } }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.header-search { flex: 1; max-width: 42rem; position: relative; }
.header-search form { position: relative; margin: 0; }
.header-search .fa-magnifying-glass {
	position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 14px; pointer-events: none;
}
.header-search input[type=text], .header-search input[type=search] {
	width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 0;
	background: var(--line-soft); font-size: 14px; color: var(--text); outline: none; transition: box-shadow .15s, background .15s;
}
.header-search input:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.search-results {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 1000;
}
.search-results:empty { display: none; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; }
.search-item:hover { background: var(--primary-50); }
.search-item img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.search-item strong { color: var(--primary-text); font-weight: 600; }
.search-item--empty { color: var(--muted); justify-content: center; }
.search-spinner { position: absolute; right: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: none; }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.header-search + .header-actions { margin-left: 0; }

/* Drawer navigation */
.site-nav {
	position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); z-index: 1001;
	padding: 16px 20px 32px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease;
	box-shadow: var(--shadow-lg);
}
body.open-site-nav .site-nav { transform: none; }
.site-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 1000; }
.site-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.site-nav ul { list-style: none; }
.site-nav .menu > li > a { display: block; padding: 12px 12px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.site-nav .menu > li > a:hover, .site-nav .menu > li.current-menu-item > a { background: var(--primary-50); color: var(--primary-text); }
.site-nav .sub-menu { display: none; padding-left: 14px; }
.site-nav li.active > .sub-menu { display: block; }
.site-nav .sub-menu a { display: block; padding: 8px 12px; color: var(--muted); font-size: 14px; }

/* Detail header */
.detail-header .site-header__inner { height: 56px; gap: 12px; }
.detail-header__title { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }

/* ==========================================================
   3. Chips, hero, section heads
   ========================================================== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 8px; }
.chip {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s;
}
.chip i { font-size: 12px; }
.chip:hover { background: var(--bg); }
.chip.is-active, .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow); }
.chip--sm { padding: 6px 14px; font-size: 13px; }

.hero {
	position: relative; overflow: hidden; border-radius: 24px; background: var(--gradient); color: #fff;
	padding: 24px; box-shadow: var(--shadow-lg); margin-bottom: 32px;
}
@media (min-width: 640px) { .hero { padding: 32px; } }
.hero__body { position: relative; z-index: 1; max-width: 32rem; }
.hero__eyebrow { color: #c8ecb6; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.hero__title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
@media (min-width: 640px) { .hero__title { font-size: 30px; } }
.hero__desc { color: #dcf0d1; font-size: 14px; margin-bottom: 16px; }
.hero__btn {
	display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #4a8a32;
	padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: background .15s;
}
.hero__btn:hover { background: #f1f9ed; }
.hero__ghost { position: absolute; right: 0; bottom: 0; opacity: .2; font-size: 120px; line-height: 1; padding: 0 16px 8px 0; }
.hero__icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 104px; height: 104px; border-radius: 24px; border: 3px solid rgba(255,255,255,.5); box-shadow: var(--shadow-lg); display: none; object-fit: cover; }
@media (min-width: 640px) { .hero__icon { display: block; } }

.section { margin-bottom: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 600; color: var(--text); }
.section-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-text); font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.section-more i { font-size: 11px; }
.section-more:hover { background: var(--primary-50); }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
@media (min-width: 640px) { .page-title { font-size: 28px; } }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.result-count { color: var(--muted); font-size: 14px; }

/* ==========================================================
   4. App cards
   ========================================================== */
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .app-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.app-card {
	display: block; background: var(--surface); border-radius: var(--radius); padding: 12px; border: 1px solid var(--line-soft);
	box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; min-width: 0;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .15); }
.app-card__icon { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--line-soft); }
.app-card__icon .app-icon { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.app-card__icon img.app-icon { display: block; }
.app-icon--letter { display: flex !important; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 28px; width: 100%; height: 100%; }
.app-card__title { font-size: 14px; font-weight: 600; line-height: 1.25; margin-bottom: 4px; }
.app-card__cat { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.app-card__mod { font-size: 12px; color: var(--primary-text); margin-bottom: 6px; }
.app-card__meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.app-card__meta .fa-star { color: var(--star); }
.app-card__meta b { color: var(--text); font-weight: 500; }
.app-card__meta .dot { color: var(--faint); }
.badge-ver { background: var(--line-soft); padding: 0 6px; border-radius: 6px; font-size: 11px; color: var(--text-2); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stars { color: var(--star); letter-spacing: 1px; }
.stars i { font-size: 12px; }

/* Horizontal scroller */
.h-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { flex-shrink: 0; scroll-snap-align: start; }

/* Featured wide card */
.feature-card { display: block; width: 270px; background: var(--surface); border-radius: 20px; overflow: hidden; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card__cover { height: 120px; background: var(--gradient); position: relative; overflow: hidden; }
.feature-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-card__body { padding: 0 14px 14px; position: relative; }
.feature-card__icon { width: 56px; height: 56px; border-radius: 14px; border: 3px solid var(--surface); margin-top: -28px; box-shadow: var(--shadow); object-fit: cover; background: var(--surface); display: block; }
.feature-card__icon.app-icon--letter { font-size: 22px; }
.feature-card__score { position: absolute; right: 14px; top: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; background: var(--line-soft); padding: 2px 8px; border-radius: 999px; }
.feature-card__score i { color: var(--star); }
.feature-card__title { margin-top: 10px; font-size: 15px; font-weight: 600; }
.feature-card__cat { font-size: 12px; color: var(--muted); }

/* Ranked list */
.rank-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .rank-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rank-list { grid-template-columns: repeat(3, 1fr); } }
.rank-item { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.rank-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.rank-item__img { position: relative; width: 88px; flex-shrink: 0; background: var(--line-soft); }
.rank-item__img img, .rank-item__img .app-icon--letter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rank-item__body { min-width: 0; flex: 1; padding: 12px 16px 12px 14px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.rank-item__title { font-size: 14px; font-weight: 600; }
.rank-item__mod { font-size: 12px; color: var(--primary-text); min-height: 18px; }
.rank-item__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rank-item__meta .fa-star { color: var(--star); }
.rank-no { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 52px; font-weight: 800; font-style: italic; line-height: 1; color: var(--primary-100); z-index: 0; user-select: none; }

/* Must-have banner */
.must-banner { border-radius: 24px; background: var(--gradient); padding: 24px; margin-bottom: 32px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
@media (min-width: 1024px) { .must-banner { grid-template-columns: 220px 1fr; align-items: center; } }
.must-banner__title { color: #fff; font-size: 24px; font-weight: 700; }
.must-banner .app-card { width: 160px; }

/* Tips */
.tip-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tip-grid { grid-template-columns: repeat(3, 1fr); } }
.tip-card { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--gradient) center / cover; box-shadow: var(--shadow); transition: transform .2s; }
.tip-card:hover { transform: translateY(-4px); }
.tip-card__shade { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 10px; padding: 14px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0)); color: #fff; }
.tip-card__shade img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid #fff; flex-shrink: 0; }
.tip-card__title { font-size: 15px; font-weight: 600; color: #fff; }
.tip-card__meta { font-size: 12px; color: rgba(255,255,255,.8); }
.tip-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.tip-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.tip-row h3 { font-size: 14px; font-weight: 600; }

/* ==========================================================
   5. Archive pieces: sort tabs, breadcrumb, pagination
   ========================================================== */
.sort-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; padding-right: 6px; color: var(--faint); }
.breadcrumb-item a { color: var(--primary-text); }
.breadcrumb-item.active { color: var(--text-2); }
.nav-pagination { display: flex; justify-content: center; margin: 32px 0 8px; }
.pagination { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-link { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); box-shadow: var(--shadow-sm); }
.page-link:hover { background: var(--bg); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link svg { width: 12px; height: 12px; fill: currentColor; }
.empty-state { text-align: center; padding: 64px 16px; color: var(--muted); }
.empty-state i { font-size: 40px; opacity: .5; margin-bottom: 12px; }
.empty-state p { font-size: 16px; font-weight: 500; margin: 0 0 4px; }

/* ==========================================================
   6. Buttons & alerts
   ========================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-sm);
	padding: 12px 24px; font-weight: 600; font-size: 15px; color: #fff; background: var(--primary); box-shadow: var(--shadow); transition: background .15s, transform .1s;
}
.btn:hover { background: var(--primary-700); }
.btn--telegram, .btn--youtube, .btn--green { color: #fff; }
.btn:active { transform: scale(.98); }
.btn--green { background: var(--green); }
.btn--block { width: 100%; }
.btn--light { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn--light:hover { background: var(--bg); }
.btn--telegram { background: #229ed9; }
.btn--youtube { background: #ff2c2d; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-warning { background: var(--soft-amber); color: var(--soft-amber-text); border: 1px solid var(--soft-amber-line); }
.alert-success { background: var(--soft-green); color: var(--soft-green-text); border: 1px solid var(--soft-green-line); }
.alert-danger { background: rgba(239,68,68,.12); color: #991b1b; border: 1px solid #fecaca; }
.ad-slot { margin-bottom: 16px; text-align: center; overflow: hidden; }

/* ==========================================================
   7. Single app page
   ========================================================== */
.app-hero { display: flex; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .app-hero { gap: 20px; } }
.app-hero__icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow-lg); flex-shrink: 0; object-fit: cover; background: var(--line-soft); }
@media (min-width: 640px) { .app-hero__icon { width: 112px; height: 112px; } }
.app-hero__icon.app-icon--letter { font-size: 40px; }
.app-hero__info { flex: 1; min-width: 0; }
.app-hero__title { font-size: 20px; font-weight: 700; line-height: 1.25; }
@media (min-width: 640px) { .app-hero__title { font-size: 24px; } }
.app-hero__dev { color: var(--primary-text); font-weight: 500; font-size: 14px; margin-top: 2px; }
.app-hero__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.app-hero__rate { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; font-size: 14px; }
.app-hero__rate b { font-weight: 600; }
.app-hero__rate .sep { color: #d1d5db; }
.app-hero__rate .stars i { font-size: 14px; }

.cta { margin-bottom: 8px; }
.cta .btn { width: 100%; padding: 14px 32px; }
@media (min-width: 640px) { .cta .btn { width: auto; min-width: 220px; } }
.cta-note { font-size: 12px; color: var(--faint); margin: 0 0 24px; }

.block { margin-bottom: 32px; }
.block-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4px 8px; margin: 0 -4px; }
.shots a { flex-shrink: 0; scroll-snap-align: start; display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: var(--line-soft); }
.shots img { height: 280px; width: auto; display: block; }
@media (min-width: 640px) { .shots img { height: 340px; } }

.info-table { background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line-soft); font-size: 14px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.info-row + .info-row { border-top: 1px solid var(--line-soft); }
.info-row > span:first-child { color: var(--muted); flex-shrink: 0; }
.info-row > span:last-child, .info-row > a { font-weight: 500; text-align: right; max-width: 62%; word-break: break-word; }
.info-row a { color: var(--primary-text); }
.info-row s { color: var(--red); margin-right: 6px; }
.pill-age { background: #111827; color: #fff; border-radius: 6px; padding: 0 6px; font-size: 12px; }

.note-box { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius-sm); padding: 14px 16px 2px; font-size: 14px; margin-bottom: 24px; }

.dl-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.dl-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dl-row__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.dl-row__body { flex: 1; min-width: 0; }
.dl-row__title { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row__meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dl-row__note { color: var(--red); }
.dl-row__badge { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; flex-shrink: 0; }
.dl-row__arrow { color: var(--faint); flex-shrink: 0; }

.whatsnew { background: var(--soft-green); border: 1px solid var(--soft-green-line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; }

.rating-panel { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; flex-wrap: wrap; }
.rating-panel__score { text-align: center; min-width: 96px; }
.rating-panel__num { font-size: 40px; font-weight: 700; line-height: 1; }
.rating-panel__count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rating-panel__rate { flex: 1; min-width: 180px; }
.rating-panel__rate p { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.rating { display: inline-block; }

.entry-content { font-size: 15px; color: var(--text-2); line-height: 1.7; overflow-wrap: anywhere; }
.entry-content h2 { font-size: 20px; margin: 1.4em 0 .6em; color: var(--text); }
.entry-content h3 { font-size: 17px; margin: 1.2em 0 .5em; color: var(--text); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.entry-content a { color: var(--primary-text); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }

.more-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.more-row .app-card { width: 128px; flex-shrink: 0; padding: 10px; }

/* Comments */
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment img { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; }
.comment__bubble { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; flex: 1; min-width: 0; }
.comment__author { font-weight: 600; font-size: 14px; }
.comment__text { font-size: 14px; word-break: break-word; margin: 2px 0 4px; }
.comment__foot { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.comment__foot a { color: var(--primary-text); }
.comment-replies { padding-left: 48px; }
.form-control { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-comment h2 { font-size: 16px; margin-bottom: 12px; }

/* ==========================================================
   8. Download page
   ========================================================== */
.dl-hero { text-align: center; margin-bottom: 20px; }
.dl-hero img, .dl-hero .app-icon--letter { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow-lg); margin: 0 auto 12px; display: flex; }
.dl-hero h2 { font-size: 20px; }
.dl-hero p { color: var(--muted); font-size: 13px; }
.dl-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.dl-file { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dl-file__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-file p { margin: 0; font-size: 14px; font-weight: 500; word-break: break-all; }
.dl-file small { font-size: 12px; color: var(--muted); }
.fi-dl-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: var(--radius-sm); padding: 14px; background: var(--primary); color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 14px; box-shadow: var(--shadow); }
.fi-dl-btn:hover { background: var(--primary-700); }
#progress-btn { background: #9bd67f; cursor: default; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-row .btn { padding: 10px 12px; font-size: 14px; }
.note-red { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 20px; }
.note-red > i { color: var(--red); margin-top: 3px; }
.accordion .toggler { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 500; font-size: 14px; background: var(--surface); }
.accordion .toggler::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; color: var(--muted); transition: transform .2s; }
.accordion .toggler:not(.collapsed)::after { transform: rotate(180deg); }
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; background: var(--surface); }
.accordion-body { padding: 4px 16px 14px; font-size: 14px; color: var(--text-2); }
.collapse:not(.show) { display: none; }

/* ==========================================================
   9. Footer
   ========================================================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 2fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 30px; width: auto; }
.footer-intro { font-size: 14px; color: var(--muted); }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: var(--line-soft); display: flex; align-items: center; justify-content: center; }
.socials a:hover { background: var(--primary-50); }
.socials svg { width: 18px; height: 18px; fill: var(--text-2); }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.footer-cols h3 { font-size: 14px; margin-bottom: 12px; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 8px; }
.footer-cols a { font-size: 14px; color: var(--muted); }
.footer-cols a:hover { color: var(--primary-text); }
.copyright { text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); margin-top: 28px; padding-top: 18px; }

/* 404 */
.notfound { text-align: center; padding: 32px 0; }
.notfound h1 { font-size: 28px; margin-bottom: 12px; }
.notfound img { margin: 24px auto 0; display: block; }
.notfound p { color: var(--muted); }
.notfound a { color: var(--primary-text); }

/* Aside categories (sidebar) */
.aside-box { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.aside-box h4 { font-size: 15px; margin-bottom: 12px; }
.aside-cats { display: flex; flex-wrap: wrap; gap: 8px; }

/* Toast */
.toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: #111827; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
	box-shadow: var(--shadow-lg); z-index: 3000; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ==========================================================
   Favorites + theme toggle
   ========================================================== */
.app-card { position: relative; }
.app-card__link { display: block; }
.fav-btn, .icon-btn.js-fav { position: relative; }
.fav-btn {
	position: absolute; top: 18px; right: 18px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, .92); color: #6b7280; display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow); transition: transform .15s, color .15s; font-size: 14px;
}
:root[data-theme="dark"] .fav-btn { background: rgba(20, 21, 22, .9); color: #d1d5db; }
.fav-btn:hover { transform: scale(1.12); }
.js-fav.is-fav { color: #ef4444 !important; }
.js-fav.is-fav i { font-weight: 900; }
.fav-btn.is-fav { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.js-fav-open .fav-count {
	position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.js-fav-open { position: relative; }
.js-theme i { font-size: 16px; }

.fav-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--surface); z-index: 2001;
	transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.fav-panel.is-open { transform: none; }
.fav-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .5); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .25s; }
.fav-overlay.is-open { opacity: 1; pointer-events: auto; }
.fav-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.fav-panel__list { flex: 1; overflow-y: auto; padding: 12px; }
.fav-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); }
.fav-item:hover { background: var(--primary-50); }
.fav-item img, .fav-item .fav-item__ph { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--gradient); }
.fav-item__body { flex: 1; min-width: 0; }
.fav-item__title { font-size: 14px; font-weight: 600; }
.fav-item__meta { font-size: 12px; color: var(--muted); }
.fav-item__rm { border: 0; background: transparent; color: var(--faint); width: 32px; height: 32px; border-radius: 50%; }
.fav-item__rm:hover { color: #ef4444; background: var(--line-soft); }
.fav-empty { text-align: center; color: var(--muted); padding: 48px 16px; font-size: 14px; }
.fav-empty i { font-size: 36px; opacity: .5; display: block; margin-bottom: 10px; }


/* Hero slider */
.hero-slider { position: relative; margin-bottom: 32px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 12px; border-radius: 24px; }
.hero-track .hero-slide { flex: 0 0 100%; scroll-snap-align: start; margin-bottom: 0; min-height: 200px; display: flex; align-items: center; }
.hero-track .hero__icon { right: 28px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.hero-dot { pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .2s, background .2s; }
.hero-dot.is-active { width: 22px; background: #fff; }


/* Mobile search: icon opens a full-width search bar over the header */
.search-open, .search-close { display: none; }
.header-search { display: flex; align-items: center; }
@media (max-width: 639px) {
	.site-header__inner { gap: 8px; }
	.brand img { height: 28px; }
	.search-open { display: inline-flex; }
	.header-actions { margin-left: auto; }
	.header-search {
		display: none; position: absolute; left: 0; right: 0; top: 0; height: var(--header-h); max-width: none;
		background: var(--surface); padding: 0 12px; z-index: 5; gap: 4px;
	}
	.site-header.is-search-open .header-search { display: flex; }
	.search-close { display: inline-flex; }
	.search-results { left: 12px; right: 12px; }
	.header-search input[type=text] { font-size: 16px; }
}


/* Hero slider v2 */
.hero-track { gap: 0; }
.hero-track .hero-slide { padding: 28px 28px 52px; min-height: 260px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
@media (min-width: 640px) { .hero-track .hero-slide { padding: 40px 48px 56px; min-height: 300px; } }
.hero-slide__bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(60px) saturate(1.6); opacity: .35; }
.hero-slide__orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.hero-slide__orb--1 { width: 320px; height: 320px; right: -80px; top: -120px; }
.hero-slide__orb--2 { width: 180px; height: 180px; right: 160px; bottom: -90px; background: rgba(255, 255, 255, .08); }
.hero-track .hero__body { max-width: 36rem; flex: 1; min-width: 0; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .18); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.hero__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hero__icon-sm { width: 56px; height: 56px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .6); box-shadow: var(--shadow-lg); flex-shrink: 0; object-fit: cover; }
@media (min-width: 640px) { .hero__icon-sm { display: none; } }
.hero__head .hero__title { margin: 0; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hero__chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; max-width: 100%; }
.hero__chip--mod { background: rgba(255, 255, 255, .92); color: #4a8a32; border-color: transparent; font-weight: 600; }
.hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.hero__fav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .18); color: #fff; display: inline-flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero__fav.is-fav { background: #fff; color: #ef4444 !important; }
.hero__showcase { display: none; position: relative; flex-shrink: 0; margin-right: 24px; }
@media (min-width: 640px) { .hero__showcase { display: block; } }
.hero__showcase::before { content: ""; position: absolute; inset: -22px; border-radius: 44px; background: rgba(255, 255, 255, .15); transform: rotate(-8deg); }
.hero__showcase::after { content: ""; position: absolute; inset: -44px; border-radius: 60px; border: 1px dashed rgba(255, 255, 255, .3); transform: rotate(6deg); }
.hero-track .hero__icon { position: relative; display: block; right: auto; top: auto; transform: rotate(4deg); width: 140px; height: 140px; border-radius: 32px; z-index: 1; }
.hero-dots { justify-content: flex-start; left: 28px; bottom: 20px; }
@media (min-width: 640px) { .hero-dots { left: 48px; bottom: 24px; } }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .22); color: #fff; display: none; align-items: center; justify-content: center; z-index: 3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero-arrow--prev { left: 12px; } .hero-arrow--next { right: 12px; }
@media (min-width: 900px) { .hero-arrow { display: inline-flex; } .hero-arrow:hover { background: rgba(255, 255, 255, .4); } }


/* ==========================================================================
   FLOW LAYOUT — sidebar shell, bento home, row cards, two-column detail
   ========================================================================== */
body { font-size: 15px; }
.shell { display: block; }
.main-col { min-width: 0; }
.wrap { max-width: 78rem; }
.wrap--flow { max-width: 78rem; }
main { padding-top: 20px; }

/* (sidebar replaced by top navigation, see "Header" below) */

/* ----- Section heads / chips ----- */
.section-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.section-head { margin-bottom: 14px; }
.section-more { background: var(--line-soft); padding: 5px 12px; font-size: 13px; }
.chip { border-radius: 10px; }
@media (min-width: 1024px) { .chips--home { display: none; } }
.page-title { font-size: 26px; letter-spacing: -.03em; }

/* ----- Bento hero ----- */
.bento { display: grid; gap: 14px; margin-bottom: 36px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .bento { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; min-height: 340px; } .bento__tile--lg { grid-row: span 2; } }
.bento__tile { position: relative; display: block; min-height: 170px; border-radius: 20px; overflow: hidden; background: var(--tile, #0f172a); color: #fff; isolation: isolate; border: 1px solid var(--line); transition: transform .2s; }
.bento__tile:hover { transform: translateY(-3px); }
.bento__tile--lg { min-height: 300px; }
.bento__bg { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(34px) saturate(1.5) brightness(.8); z-index: -2; }
.bento__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .05) 70%); z-index: -1; }
.bento__tag { position: absolute; left: 16px; top: 16px; background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.bento__content { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 14px; align-items: flex-end; }
.bento__icon { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; object-fit: cover; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.bento__icon.app-icon--letter { font-size: 22px; }
.bento__tile--lg .bento__icon { width: 92px; height: 92px; border-radius: 22px; }
.bento__tile--lg .bento__icon.app-icon--letter { font-size: 34px; }
.bento__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bento__title { font-size: 16px; font-weight: 700; line-height: 1.2; }
.bento__tile--lg .bento__title { font-size: 26px; letter-spacing: -.02em; }
.bento__desc { font-size: 13px; color: rgba(255, 255, 255, .8); max-width: 34rem; }
.bento__meta { font-size: 12px; color: rgba(255, 255, 255, .85); }
.bento__meta i { color: #fde047; }

/* ----- Row cards ----- */
.app-grid { grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-card { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 10px; border-radius: 16px; border: 1px solid var(--line); box-shadow: none; background: var(--surface); }
.app-card:hover { transform: none; border-color: var(--primary); box-shadow: none; }
.app-card__link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.app-card__icon { width: 64px; height: 64px; flex-shrink: 0; margin: 0; border-radius: 16px; aspect-ratio: auto; }
.app-card__info { min-width: 0; flex: 1; }
.app-card__title { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.app-card__cat { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.app-card__meta { gap: 6px; }
.badge-mod { background: var(--primary-50); color: var(--primary-text); border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 600; max-width: 130px; }
:root[data-theme="dark"] .badge-mod { color: #9bd67f; }
.app-card .fav-btn { position: static; flex-shrink: 0; background: var(--line-soft); box-shadow: none; width: 36px; height: 36px; }
.more-row .app-card, .must-banner .app-card { flex: 0 0 300px; width: 300px; }
.more-row { gap: 10px; }

/* ----- Poster tiles ----- */
.feature-card { width: 190px; border-radius: 18px; box-shadow: none; border: 1px solid var(--line); background: var(--surface); }
.feature-card:hover { transform: translateY(-3px); box-shadow: none; border-color: var(--primary); }
.feature-card__cover { position: relative; height: 150px; background: var(--tile, #0f172a); display: flex; align-items: center; justify-content: center; isolation: isolate; }
.feature-card__blur { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(28px) saturate(1.4) brightness(.85); z-index: -1; }
.feature-card__cover .feature-card__icon { position: static; margin: 0; width: 84px; height: 84px; border-radius: 22px; border: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.feature-card__score { top: 10px; right: 10px; background: rgba(0, 0, 0, .45); color: #fff; }
.feature-card__body { padding: 12px 14px 14px; }
.feature-card__title { margin-top: 0; }

/* ----- Rank list ----- */
.rank-list { grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (min-width: 900px) { .rank-list { grid-template-columns: repeat(2, 1fr); } .rank-list .rank-item:nth-child(odd) { border-right: 1px solid var(--line); } }
.rank-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 12px 14px; align-items: center; gap: 14px; flex-direction: row-reverse; justify-content: flex-end; }
.rank-item:hover { transform: none; box-shadow: none; background: var(--line-soft); }
.rank-item__img { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; position: relative; }
.rank-item__body { padding: 0; flex: 1; }
.rank-no { position: static; transform: none; font-size: 22px; font-style: normal; font-weight: 800; width: 28px; text-align: center; color: var(--faint); }
.rank-list .rank-item:nth-child(-n+3) .rank-no { color: var(--primary-text); }

/* ----- Must have banner ----- */
.must-banner { border-radius: 20px; box-shadow: none; }
.must-banner .app-card { background: rgba(255, 255, 255, .96); }
:root[data-theme="dark"] .must-banner .app-card { background: var(--surface); }

/* ----- Tips ----- */
.tip-card { border-radius: 18px; box-shadow: none; border: 1px solid var(--line); }

/* ----- Detail: two columns ----- */
.detail-grid { display: block; }
@media (min-width: 1000px) {
	.detail-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; align-items: start; }
	.detail-side { position: sticky; top: 76px; }
}
.detail-side .app-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
.detail-side .app-hero__icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: none; border: 1px solid var(--line); }
.detail-side .app-hero__title { font-size: 20px; }
.detail-side .cta { display: flex; gap: 8px; }
.detail-side .cta .btn:first-child { flex: 1; min-width: 0; }
.detail-side .cta-note { margin-bottom: 16px; }
.detail-main { min-width: 0; }
.detail-main .block:first-child { margin-top: 0; }
.btn { border-radius: 12px; box-shadow: none; }
.info-table, .card, .rating-panel, .dl-row, .dl-card { box-shadow: none; border-color: var(--line); }
.shots a { border-radius: 14px; box-shadow: none; border: 1px solid var(--line); }
.block-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.note-box { border-radius: 12px; }

/* ----- Footer inside main column ----- */
.site-footer { margin-top: 12px; }
.footer-grid { grid-template-columns: 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr 1.6fr; } }


/* ==========================================================================
   Header (top navigation + mega menu)
   ========================================================================== */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); box-shadow: none; }
.topbar__inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand-mark { border-radius: 11px; background: #111; box-shadow: none; }
:root[data-theme="dark"] .brand-mark { background: var(--primary); color: #10260a; }
.brand img { max-width: 170px; }
.main-nav { display: none; align-items: center; gap: 2px; margin-left: 6px; }
.nav-item { position: static; }
.main-nav > .nav-item > a.nav-top, .extra-menu a {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
	font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: background .15s, color .15s;
}
.nav-top i:first-child { color: var(--primary); font-size: 14px; }
.nav-caret { font-size: 9px !important; color: var(--faint) !important; transition: transform .2s; }
.nav-item:hover .nav-top, .nav-item:focus-within .nav-top, .nav-top.is-active, .extra-menu a:hover { background: var(--primary-50); color: var(--primary-text); }
.nav-item:hover .nav-caret { transform: rotate(180deg); }
.extra-menu { display: flex; list-style: none; gap: 2px; margin: 0; padding: 0; }
.header-bar-wrap { position: relative; }
/* mega panel spans the container under the header */
.mega {
	display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
	background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px;
	box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .25); padding: 20px 24px 24px; max-height: 70vh; overflow-y: auto;
}
.nav-item:hover .mega, .nav-item:focus-within .mega { display: block; }
.mega__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.mega__head a { font-weight: 700; font-size: 15px; color: var(--primary-text); display: inline-flex; gap: 8px; align-items: center; }
.mega__head span { font-size: 12px; color: var(--muted); }
.mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.mega__link { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mega__link:hover { background: var(--primary-50); color: var(--primary-text); }
.mega__link.is-active { background: var(--primary-50); color: var(--primary-text); font-weight: 700; }
.mega__link.depth-1 { padding-left: 26px; font-size: 13px; color: var(--muted); }
.topbar .header-search { margin-left: auto; width: 250px; max-width: none; flex: 0 0 auto; transition: width .2s; }
.topbar .header-search:focus-within { width: 340px; }
.topbar .header-search input[type=text] { border-radius: 999px; background: var(--line-soft); border: 1px solid transparent; }
.topbar .header-search input:focus { box-shadow: none; border-color: var(--primary); background: var(--surface); }
.topbar .header-actions { margin-left: 0; }
.topbar__theme { display: inline-flex; }
@media (min-width: 1024px) { .main-nav { display: flex; } .site-nav-toggler { display: none; } .topbar .search-open { display: none; } }
@media (min-width: 640px) and (max-width: 1023px) { .topbar .header-search { width: 220px; } .topbar .search-open { display: none; } }
@media (max-width: 639px) {
	.topbar__inner { gap: 8px; position: relative; height: 60px; }
	.topbar .header-search { display: none; position: absolute; left: 0; right: 0; top: 0; height: 60px; width: auto; padding: 0 12px; background: var(--surface); z-index: 5; }
	.topbar .header-search:focus-within { width: auto; }
	.topbar .header-actions { margin-left: auto; }
	.topbar.is-search-open .header-search { display: flex; }
	.topbar .search-close { display: inline-flex; }
}

/* Drawer (mobile): every category */
.side { position: fixed; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); background: var(--surface); z-index: 1001; display: flex; flex-direction: column; padding: 16px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; }
body.open-site-nav .side { transform: none; box-shadow: var(--shadow-lg); }
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 14px; }
.side__nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.side__label { margin: 20px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.side__link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; border: 0; background: transparent; width: 100%; text-align: left; color: var(--text); font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.side__link > i:first-child { width: 18px; text-align: center; color: var(--primary); }
.side__link.is-active { background: var(--primary-50); color: var(--primary-text); }
.side__link .fav-count { position: static; margin-left: auto; background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; line-height: 18px; min-width: 18px; text-align: center; }
.side__group summary::-webkit-details-marker { display: none; }
.side__caret { margin-left: auto; font-size: 10px; color: var(--faint); transition: transform .2s; }
.side__group[open] .side__caret { transform: rotate(180deg); }
.side__sub { display: flex; flex-direction: column; margin: 0 0 6px 30px; border-left: 1px solid var(--line); }
.side__sub a { padding: 8px 14px; font-size: 14px; color: var(--muted); border-radius: 0 10px 10px 0; }
.side__sub a.is-active { color: var(--primary-text); font-weight: 700; }
.side__menu { list-style: none; }
.side__menu a { display: block; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
.side__foot { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .side, .site-overlay { display: none !important; } }

.topbar > .wrap { position: relative; }
.rank-item { flex-direction: row; justify-content: flex-start; }
.rank-item__body { display: flex; flex-direction: column; gap: 1px; }
.rank-item__mod { display: block; min-height: 0; }
.rank-item__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rank-item__meta .fa-star { color: var(--star); }
.main-col { display: block; }


/* ==========================================================================
   Fixes: bento cover image, detail CTA buttons, header nav
   ========================================================================== */

/* Featured today: real feature image on the first tile */
.bento__cover { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; z-index: -2; transition: transform .6s ease; }
.bento__tile--cover:hover .bento__cover { transform: scale(1.04); }
.bento__tile--cover .bento__shade { background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 42%, rgba(0, 0, 0, 0) 75%); }
.bento__tile--cover .bento__content { align-items: center; }
.bento__tile--cover .bento__icon { border: 2px solid rgba(255, 255, 255, .85); }
.bento__tile--lg.bento__tile--cover { min-height: 320px; }
@media (min-width: 768px) { .bento__tile--lg.bento__tile--cover { min-height: 0; } }

/* Detail CTA: download button grows, favorite button stays a fixed square */
.cta { display: flex; gap: 10px; align-items: stretch; }
.cta .btn { width: auto; }
.cta > .btn:first-child { flex: 1 1 auto; min-width: 0; padding: 14px 20px; white-space: nowrap; }
.cta > .btn:first-child span { overflow: hidden; text-overflow: ellipsis; }
.cta > .btn:first-child i { flex-shrink: 0; }
.cta > .btn.js-fav { flex: 0 0 52px; width: 52px; min-width: 52px; padding: 0; }
.cta > .btn.js-fav i { font-size: 18px; }
@media (min-width: 640px) { .cta .btn { min-width: 0; } .cta > .btn:first-child { flex: 0 1 auto; min-width: 220px; } }
.detail-side .cta > .btn:first-child { flex: 1 1 auto; min-width: 0; }
.cta .btn.js-fav.is-fav { color: #ef4444; border-color: #fecaca; background: var(--surface); }


/* ==========================================================================
   Buttons: white label on green
   ========================================================================== */
.btn, .fi-dl-btn, .btn-get, .chip.is-active, .chip.active { color: #fff; }
.btn, .fi-dl-btn { text-shadow: 0 1px 1px rgba(0, 0, 0, .14); }
.btn--light { color: var(--text-2); text-shadow: none; }
.btn:hover, .fi-dl-btn:hover { background: #5fa443; }
:root[data-theme="dark"] .btn:hover, :root[data-theme="dark"] .fi-dl-btn:hover { background: #68ad4b; }
:root[data-theme="dark"] .btn--light:hover { background: var(--line-soft); }
#progress-btn { color: #fff; }

/* "Get" pill (app store style) */
.btn-get {
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 64px; padding: 8px 20px;
	border-radius: 999px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.2;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .14); transition: background .15s, transform .1s;
}
a:hover > .btn-get, .btn-get:hover { background: #5fa443; }
:root[data-theme="dark"] a:hover > .btn-get { background: #68ad4b; }
a:active > .btn-get { transform: scale(.96); }

/* ==========================================================================
   Home v2 — app store layout
   ========================================================================== */
.chips--home { display: flex; }
.chips--home .chip { border-radius: 999px; padding: 9px 18px; font-weight: 600; }

/* Horizontal rails with arrows */
.rail { position: relative; min-width: 0; }
.rail-btn {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, transform .15s;
}
.rail-btn[hidden] { display: none !important; }
.rail-btn--prev { left: -14px; } .rail-btn--next { right: -14px; }
@media (hover: hover) and (min-width: 900px) {
	.rail-btn { display: inline-flex; }
	.rail:hover .rail-btn { opacity: 1; }
	.rail-btn:hover { transform: translateY(-50%) scale(1.06); }
}

/* Today / featured rail */
.today { margin: 0 0 40px; }
.today__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 6px; }
.today-card {
	position: relative; display: block; flex: 0 0 88%; scroll-snap-align: start; aspect-ratio: 16 / 11; border-radius: 26px; overflow: hidden;
	background: var(--tile, #0f172a); color: #fff; isolation: isolate; border: 1px solid var(--line);
}
@media (min-width: 768px) { .today-card { flex-basis: min(640px, 62%); aspect-ratio: 16 / 9; } }
.today-card__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.today-card:hover .today-card__img { transform: scale(1.04); }
.today-card__bg { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(34px) saturate(1.5) brightness(.8); z-index: -2; }
.today-card__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0) 55%), linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0) 32%); }
.today-card__tag { position: absolute; left: 22px; top: 20px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .95); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.today-card__panel {
	position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px;
	border-radius: 20px; background: rgba(22, 24, 26, .5); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
	border: 1px solid rgba(255, 255, 255, .12);
}
.today-card__icon, .today-card__icon.app-icon--letter { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; object-fit: cover; font-size: 22px; }
.today-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.today-card__title { font-size: 16px; font-weight: 700; color: #fff; }
.today-card__sub { font-size: 13px; color: rgba(255, 255, 255, .82); }
.today-card__sub i { color: #fde047; font-size: 11px; }

/* Promo cards (editors choice / popular rails) */
.promo-card { display: block; flex: 0 0 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: border-color .2s, transform .2s; }
.promo-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.promo-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--tile, #0f172a); display: flex; align-items: center; justify-content: center; isolation: isolate; overflow: hidden; }
.promo-card__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: -1; }
.promo-card__blur { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(28px) saturate(1.4) brightness(.85); z-index: -1; }
.promo-card__icon-big, .promo-card__icon-big.app-icon--letter { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); font-size: 30px; }
.promo-card__score { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; }
.promo-card__score i { color: #fde047; }
.promo-card__body { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.promo-card__icon, .promo-card__icon.app-icon--letter { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; object-fit: cover; font-size: 18px; }
.promo-card__text { min-width: 0; flex: 1; }
.promo-card__title { font-size: 15px; font-weight: 600; }
.promo-card__sub { font-size: 12px; color: var(--primary-text); font-weight: 500; margin-top: 1px; }

/* App row card (People also view, grids, banners) */
.app-card { gap: 6px; padding: 12px; }
.app-card__icon { width: 68px; height: 68px; border-radius: 17px; }
.app-card__info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.app-card__title { font-size: 15px; line-height: 1.3; margin: 0; word-break: break-word; }
.app-card .badge-mod { display: block; max-width: 100%; }
.app-card__meta { margin-top: 1px; font-size: 12.5px; }
.app-card__meta .dot { color: var(--faint); }
.app-card .fav-btn { width: 34px; height: 34px; }
.more-row .app-card, .must-banner .app-card { flex: 0 0 320px; width: 320px; }

/* Ranked rows */
.rank-item__img { width: 60px; height: 60px; }
.rank-item__meta .dot { color: var(--faint); }
.rank-item .btn-get { margin-left: auto; padding: 7px 18px; }
.rank-item__body { padding-right: 4px; }
@media (max-width: 420px) { .rank-item .btn-get { padding: 7px 14px; min-width: 0; } }

/* Section heads */
.section-head { margin-bottom: 16px; }
.section-title { font-size: 21px; }
.section-more { background: transparent; color: var(--primary-text); font-weight: 600; padding: 4px 8px; }
.section { margin-bottom: 40px; }


/* App hero: icon on the left, title + info on the right (full width above the columns) */
.app-hero { flex-direction: row; align-items: center; gap: 16px; margin-bottom: 24px; }
.app-hero__icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: none; border: 1px solid var(--line); }
.app-hero__title { font-size: 20px; }
@media (min-width: 640px) {
	.app-hero { gap: 24px; margin-bottom: 28px; }
	.app-hero__icon { width: 128px; height: 128px; border-radius: 30px; }
	.app-hero__title { font-size: 26px; letter-spacing: -.02em; }
	.app-hero__meta { font-size: 14px; margin-top: 6px; }
}


/* Featured today: 1 card on mobile (full width), 2 on tablet, 3 on desktop */
.today-card { flex: 0 0 100%; aspect-ratio: 16 / 11; }
@media (min-width: 640px) { .today-card { flex-basis: calc((100% - 16px) / 2); aspect-ratio: 16 / 11; } }
@media (min-width: 1024px) { .today-card { flex-basis: calc((100% - 32px) / 3); aspect-ratio: 4 / 3; } }
.today-card__tag { left: 18px; top: 16px; }
.today-card__title { font-size: 15px; }


/* Drawer: Legal & help links */
.side__menu--legal a { padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--muted); }
.side__menu--legal a:hover { background: var(--primary-50); color: var(--primary-text); }


/* Share button (next to the favorite button) */
.cta > .btn.js-share { flex: 0 0 52px; width: 52px; min-width: 52px; padding: 0; }
.cta > .btn.js-share i { font-size: 17px; }


/* Version text in card meta: never wraps, truncates when too long */
.app-card__meta > *, .rank-item__meta > * { flex-shrink: 0; }
.app-card__ver, .rank-item__ver { flex-shrink: 1 !important; min-width: 0; }
