:root {
    --ink: #18243c;
    --muted: #68748c;
    --line: #e7ebf2;
    --paper: #ffffff;
    --surface: #f5f7fb;
    --primary: #5b4df6;
    --primary-dark: #4336d8;
    --accent: #ff8b42;
    --shadow: 0 16px 40px rgba(31, 48, 88, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: Inter, Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand__logo { display: block; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; object-fit: contain; }
.brand__mark, .app-hero__icon, .app-card__icon { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), #8d61ff); border-radius: 16px; font-weight: 900; }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; }
.brand__text { line-height: 1.05; }
.brand__text small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; gap: 16px; color: var(--muted); font-size: 14px; font-weight: 700; }
.site-nav a:hover, .text-link:hover { color: var(--primary); }
.hero { padding: 54px 0 48px; background: radial-gradient(circle at 85% 20%, rgba(255,139,66,.18), transparent 30%), linear-gradient(135deg, #f0efff, #f7f9ff 62%, #fff); }
.hero__inner { max-width: 760px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(34px, 7vw, 58px); max-width: 720px; }
h2 { font-size: clamp(25px, 4vw, 34px); }
h3 { font-size: 19px; }
.hero p, .lede { max-width: 620px; color: var(--muted); font-size: 18px; }
.search-form { display: flex; max-width: 620px; margin-top: 28px; padding: 6px; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.search-form input { min-width: 0; flex: 1; padding: 12px 14px; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 18px; border: 0; border-radius: 12px; color: #fff; background: var(--primary); font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { color: #fff; background: var(--primary-dark); transform: translateY(-1px); }
.button--secondary { color: var(--ink); background: #eef0ff; }
.button--secondary:hover { color: var(--ink); background: #e1e4ff; }
.button--small { min-height: 36px; padding: 8px 12px; border-radius: 10px; font-size: 13px; white-space: nowrap; }
.page-wrap { padding: 42px 0 72px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 0; }
.text-link { color: var(--primary); font-weight: 800; }
.app-grid { display: grid; gap: 14px; }
.app-card { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 112px; padding: 18px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(31, 48, 88, .04); }
.app-card__icon { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 16px; font-size: 17px; }
.app-card__body { min-width: 0; flex: 1; }
.app-card h3 { margin-bottom: 4px; font-size: 18px; overflow-wrap: anywhere; }
.app-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.app-card__facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; color: var(--primary); font-size: 14px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.notice-card { margin-top: 28px; padding: 18px; background: #fff8ec; border: 1px solid #ffe0ae; border-radius: 16px; }
.notice-card p { margin: 4px 0 0; color: #7b6346; font-size: 14px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--primary); font-weight: 700; }
.app-hero { display: flex; align-items: center; gap: 22px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.app-hero__icon { width: 200px; height: 200px; flex: 0 0 200px; border-radius: 28px; font-size: 30px; }
.app-hero__copy { min-width: 0; }
.app-hero h1 { margin-bottom: 7px; font-size: clamp(30px, 6vw, 48px); }
.app-hero p { margin: 0; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.link-note { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }
.details-card { margin-top: 18px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.details-card h2 { margin-bottom: 16px; font-size: 24px; }
.details-grid { display: grid; gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.details-grid div { display: grid; grid-template-columns: 42% 58%; gap: 12px; padding: 11px 12px; background: #fbfcff; border-bottom: 1px solid var(--line); }
.details-grid div:last-child { border-bottom: 0; }
.details-grid dt { color: var(--muted); font-size: 13px; }
.details-grid dd { margin: 0; font-size: 13px; font-weight: 750; }
.copy-code { padding: 0; border: 0; color: var(--primary); background: none; font: inherit; font-weight: 800; cursor: pointer; }
.copy-code span { margin-left: 5px; color: var(--accent); font-size: 11px; }
.related-section { margin-top: 42px; }
.related-list { display: grid; gap: 12px; }
.screenshot-strip { display: flex; gap: 12px; margin-top: 24px; padding: 2px 2px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.screenshot-strip figure { flex: 0 0 250px; width: 250px; height: 360px; margin: 0; overflow: hidden; background: #e9edf5; border: 1px solid var(--line); border-radius: 14px; scroll-snap-align: start; }
.screenshot-strip img { display: block; width: 100%; height: 360px; object-fit: contain; background: #f4f6fb; }
.app-content { max-width: 760px; margin-top: 38px; }
.content-section { margin-top: 30px; }
.content-section:first-child { margin-top: 0; }
.content-section p { color: #4a5870; }
.content-section--compact { padding: 18px; background: #fff8ec; border: 1px solid #ffe0ae; border-radius: 18px; }
.tag-list, .warning-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 0; list-style: none; }
.tag-list li { padding: 7px 10px; color: var(--primary); background: #eef0ff; border-radius: 999px; font-size: 13px; font-weight: 800; }
.warning-list { display: grid; gap: 8px; margin-top: 0; }
.warning-list li { position: relative; padding-left: 18px; color: #70582e; font-size: 14px; }
.warning-list li::before { content: '•'; position: absolute; left: 2px; color: var(--accent); font-weight: 900; }
.faq-section details { padding: 15px 0; border-bottom: 1px solid var(--line); }
.faq-section summary { cursor: pointer; font-weight: 800; }
.faq-section p { margin: 10px 0 0; font-size: 14px; }
.prose { max-width: 760px; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.site-footer { padding: 28px 0; color: var(--muted); background: #111a2c; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 24px; }
.site-footer strong { color: #fff; }
.site-footer p { margin: 5px 0 0; font-size: 13px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.site-footer__links a { color: #d6dcf0; }

@media (min-width: 720px) {
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .related-list .app-card { align-items: flex-start; flex-direction: column; }
    .related-list .app-card__body { width: 100%; }
    .related-list .button { width: 100%; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 22px, 1120px); }
    .site-header__inner { min-height: 62px; flex-wrap: wrap; gap: 2px 12px; padding-top: 8px; }
    .brand { gap: 8px; }
    .brand__logo { width: 42px; height: 42px; flex-basis: 42px; border-radius: 11px; }
    .site-nav { width: 100%; order: 2; gap: 18px; overflow-x: auto; padding: 4px 0 8px; font-size: 12px; white-space: nowrap; scrollbar-width: none; }
    .site-nav::-webkit-scrollbar { display: none; }
    .brand__text small { display: none; }
    .hero { padding: 42px 0 34px; }
    .hero p { font-size: 16px; }
    body { font-size: 14px; }
    .eyebrow, .link-note, .app-updated { font-size: 14px; }
    .button--small, .app-card__type, .category-chip, .category-chip span { font-size: 14px; }
    .copy-code span, .screenshot-strip figcaption, .footer-age-note { font-size: 14px; }
    .search-form { margin-top: 22px; }
    .search-form .button { padding-inline: 14px; }
    .app-card { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 12px; min-height: 154px; padding: 16px; }
    .app-card__body { width: 100%; min-width: 0; }
    .app-card > .button { grid-column: 2; width: 100%; min-height: 44px; }
    .app-hero { flex-direction: column; align-items: center; padding: 20px 16px; gap: 16px; text-align: center; }
    .app-hero__icon { width: 200px; height: 200px; flex-basis: 200px; border-radius: 28px; font-size: 30px; }
    .app-hero__icon--image { padding: 4px; }
    .app-hero h1 { font-size: clamp(25px, 8vw, 32px); overflow-wrap: anywhere; }
    .hero-actions { display: grid; grid-template-columns: 1fr; }
    .hero-actions .button { width: 100%; min-height: 48px; padding-inline: 12px; font-size: 14px; }
    .app-page { padding-bottom: 92px; }
    .details-card { padding: 14px; border-radius: 16px; }
    .details-card h2 { font-size: 21px; }
    .details-grid div { grid-template-columns: 38% 62%; gap: 8px; padding: 10px; }
    .details-grid dd { overflow-wrap: anywhere; }
    .screenshot-strip, .screenshot-strip--2, .screenshot-strip--3 { display: flex; gap: 12px; }
    .screenshot-strip figure { flex-basis: min(78vw, 300px); width: min(78vw, 300px); height: 360px; }
    .screenshot-strip img { height: 360px; }
    .entry-content { margin-top: 28px; }
    .entry-content p, .entry-content li { font-size: 16px; line-height: 1.7; }
    .age-note { align-items: flex-start; flex-direction: column; gap: 2px; }
    .mobile-download-bar { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(31,48,88,.12); backdrop-filter: blur(12px); }
    .mobile-download-bar .button { width: 100%; min-height: 46px; padding: 10px 8px; font-size: 13px; }
    .mobile-download-bar .button:only-child { grid-column: 1 / -1; }
    .site-footer__inner { display: block; }
    .site-footer__links { margin-top: 16px; }
}

/* Logo images (auto-matched from the asset folder) */
.app-card__icon--image,
.app-hero__icon--image {
    padding: 0;
    background: #fff;
    border: 1px solid var(--line);
    object-fit: contain;
}
.app-hero__icon--image { padding: 8px; }
.app-card__type { color: var(--muted); background: #eef1f7; }
.app-card__type::before { content: ''; }

/* Category chips */
.category-section { margin-top: 38px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.category-chips--directory { margin: 22px 0 26px; }
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
}
.category-chip span { padding: 2px 7px; color: var(--muted); background: var(--surface); border-radius: 999px; font-size: 11px; }
.category-chip:hover { border-color: var(--primary); color: var(--primary); }

/* Search inside directory pages */
.search-form--inline { margin: 22px 0 0; box-shadow: none; }

/* App detail additions */
.app-hero--closed { border-color: #f0d9b5; }
.status-note {
    margin-top: 16px;
    padding: 14px 16px;
    color: #6f4d1f;
    background: #fff8ec;
    border: 1px solid #ffe0ae;
    border-radius: 16px;
    font-size: 14px;
}
.status-note strong { display: block; margin-bottom: 3px; color: #5c3d12; }
.screenshot-section { margin-top: 34px; }
.screenshot-strip--1, .screenshot-strip--2, .screenshot-strip--3 { grid-template-columns: none; }
.screenshot-strip figcaption { padding: 7px 10px; color: var(--muted); font-size: 11px; }

/* HTML body from the data table */
.entry-content { max-width: 760px; margin-top: 34px; }
.entry-content h2 { margin: 30px 0 10px; font-size: clamp(22px, 3.4vw, 28px); }
.entry-content h3 { margin: 22px 0 8px; font-size: 19px; }
.entry-content > h2:first-child { margin-top: 0; }
.entry-content p { color: #42506a; }
.entry-content ul, .entry-content ol { margin: 12px 0 18px; padding-left: 22px; color: #42506a; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.app-updated { max-width: 760px; margin: 34px 0 0; color: var(--muted); font-size: 12px; }
.age-note { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; padding: 10px 12px; color: #68552d; background: #fff8ec; border: 1px solid #ffe0ae; border-radius: 12px; font-size: 14px; }
.age-note strong { color: #9a5b00; white-space: nowrap; }
.mobile-download-bar { display: none; }
.footer-age-note { color: #f5d7a2 !important; }

/* Pagination */
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}
.pagination .current { color: #fff; background: var(--primary); border-color: var(--primary); }

/* Admin: app fields and asset preview */
.club-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.club-admin-field { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.club-admin-field span { color: #50575e; }
.club-admin-field input[type="text"], .club-admin-field input[type="number"], .club-admin-field textarea, .club-admin-field select { width: 100%; }
.club-admin-field--wide { grid-column: 1 / -1; }
.club-admin-field--check { align-content: start; }
.club-admin-assets { margin-top: 20px; padding-top: 14px; border-top: 1px solid #dcdcde; }
.club-admin-assets__row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.club-admin-assets figure { margin: 0; text-align: center; font-size: 11px; }
.club-admin-assets img { display: block; object-fit: cover; border: 1px solid #dcdcde; border-radius: 6px; background: #f6f7f7; }

@media (max-width: 560px) {
    .screenshot-strip--2, .screenshot-strip--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .club-admin-grid { grid-template-columns: 1fr; }
    .app-updated { font-size: 11px; }
}

