/* ===== Storefront theme (works with Bootstrap 5.3 data-bs-theme) ===== */
/* The colors below are only a fallback. The real values are printed into every page from
   Admin → Settings → Public Theme (ThemeService); the defaults are the Happy Kopi palette. */
:root, [data-bs-theme="light"] {
    --sf-bg: #ffffff;
    --sf-surface: #ffffff;
    --sf-surface-2: #e6f5ec;
    --sf-surface-3: #f3faf6;
    --sf-border: #cfe6d7;
    --sf-text: #14301f;
    --sf-muted: #4b6b58;
    --sf-accent: #a8e0bd;
    --sf-accent-contrast: #04130a;
    --sf-shadow: 0 10px 28px rgba(20, 48, 31, .14);
    --brand: #1b7f46;
    --brand-hover: #0f5a31;
    --brand-contrast: #ffffff;
    --brand-hover-contrast: #ffffff;
}
[data-bs-theme="dark"] {
    --sf-bg: #000000;
    --sf-surface: #0e1611;
    --sf-surface-2: #16231b;
    --sf-surface-3: #0e1611;
    --sf-border: #28402f;
    --sf-text: #eaf4ee;
    --sf-muted: #a3b8aa;
    --sf-accent: #a8e0bd;
    --sf-accent-contrast: #04130a;
    --sf-shadow: 0 12px 30px rgba(0, 0, 0, .5);
    --brand: #4ade80;
    --brand-hover: #86efac;
    --brand-contrast: #04130a;
    --brand-hover-contrast: #04130a;
    --bs-body-bg: var(--sf-bg);
    --bs-body-color: var(--sf-text);
    --bs-border-color: var(--sf-border);
    --bs-secondary-color: var(--sf-muted);
}

body.sf-body { background: var(--sf-bg); color: var(--sf-text); min-height: 100vh; display: flex; flex-direction: column; }
.sf-body a { color: inherit; }
.sf-body .text-muted, .sf-body .text-body-secondary { color: var(--sf-muted) !important; }
.sf-body .card { background: var(--sf-surface); border-color: var(--sf-border); color: var(--sf-text); }
.sf-body .bg-body { background: var(--sf-surface) !important; }
.sf-body .bg-body-tertiary { background: var(--sf-surface-2) !important; }
.sf-body .btn-primary { --bs-btn-color: var(--brand-contrast); --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-color: var(--brand-hover-contrast); --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover); --bs-btn-active-color: var(--brand-hover-contrast); --bs-btn-active-bg: var(--brand-hover); --bs-btn-active-border-color: var(--brand-hover); --bs-btn-disabled-color: var(--brand-contrast); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-focus-shadow-rgb: var(--brand-rgb, 27, 127, 70); }
.sf-body .btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-color: var(--brand-contrast); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-color: var(--brand-hover-contrast); --bs-btn-active-bg: var(--brand-hover); --bs-btn-active-border-color: var(--brand-hover); }
.sf-body .btn-outline-secondary { --bs-btn-color: var(--sf-muted); --bs-btn-border-color: var(--sf-border); --bs-btn-hover-color: var(--sf-text); --bs-btn-hover-bg: var(--sf-surface-2); --bs-btn-hover-border-color: var(--sf-accent); --bs-btn-active-color: var(--brand-contrast); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }
.sf-body .bg-primary { background-color: var(--brand) !important; color: var(--brand-contrast) !important; }
.sf-body .border-primary { border-color: var(--brand) !important; }
.sf-body .page-link { color: var(--brand); background-color: var(--sf-surface); border-color: var(--sf-border); }
.sf-body .page-link:hover { color: var(--brand-hover); background-color: var(--sf-surface-2); border-color: var(--sf-border); }
.sf-body .page-item.active .page-link { color: var(--brand-contrast); background-color: var(--brand); border-color: var(--brand); }
.sf-body .page-item.disabled .page-link { color: var(--sf-muted); background-color: var(--sf-surface); border-color: var(--sf-border); }
.sf-body .form-control:focus, .sf-body .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb, 27, 127, 70), .35); }
.sf-body .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.sf-body :focus-visible { outline-color: var(--brand); }
.sf-body .dropdown-menu { background-color: var(--sf-surface); border-color: var(--sf-border); color: var(--sf-text); }
.sf-body .dropdown-item { color: var(--sf-text); }
.sf-body .dropdown-item:hover, .sf-body .dropdown-item:focus { background-color: var(--sf-surface-2); color: var(--sf-text); }
.sf-body .dropdown-item.active, .sf-body .dropdown-item:active { background-color: var(--brand); color: var(--brand-contrast); }
.sf-body .table { --bs-table-bg: transparent; --bs-table-color: var(--sf-text); --bs-table-border-color: var(--sf-border); }
.sf-body .table > thead > tr > th { background-color: var(--sf-surface-3); color: var(--sf-muted); }
.sf-body .alert-success { --bs-alert-color: var(--sf-text); --bs-alert-bg: var(--bs-success-bg-subtle); --bs-alert-border-color: var(--bs-success-border-subtle); }
.sf-body .text-primary { color: var(--brand) !important; }
.sf-body .form-control, .sf-body .form-select { background-color: var(--sf-surface); border-color: var(--sf-border); color: var(--sf-text); }
.sf-body .form-control::placeholder { color: var(--sf-muted); }
.sf-body .breadcrumb-item.active, .sf-body .breadcrumb-item + .breadcrumb-item::before { color: var(--sf-muted); }

/* ----- Header ----- */
.sf-header { position: sticky; top: 0; z-index: 1030; background: var(--sf-surface); border-bottom: 1px solid var(--sf-border); }
.sf-header .sf-bar { height: 64px; display: flex; align-items: center; gap: 14px; }
.sf-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -.4px; }
.sf-brand img { height: 36px; width: auto; }
.sf-search { flex: 1; max-width: 520px; position: relative; }
.sf-search input { border-radius: 999px; padding-left: 2.6rem; height: 42px; }
.sf-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--sf-muted); }
.sf-nav a { padding: .4rem .8rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--sf-muted); }
.sf-nav a:hover { background: var(--sf-surface-2); color: var(--sf-text); }
.sf-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sf-surface-2); color: var(--sf-text); display: inline-flex; align-items: center; justify-content: center; }
.sf-icon-btn:hover { background: var(--brand); color: var(--brand-contrast); }

/* ----- Shell + sidebar ----- */
.sf-shell { display: flex; gap: 24px; align-items: flex-start; width: 100%; max-width: 1760px; margin: 0 auto; padding: 20px 16px 40px; flex: 1; }
.sf-sidebar { width: 220px; flex: 0 0 220px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.sf-side-title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-muted); font-weight: 700; margin: 4px 12px 8px; }
.sf-side-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--sf-text); }
.sf-side-link:hover { background: var(--sf-surface-2); }
.sf-side-link.active { background: var(--brand); color: var(--brand-contrast); }
.sf-side-link small { opacity: .65; font-weight: 500; }
.sf-main { flex: 1; min-width: 0; }
.sf-no-sidebar .sf-sidebar { display: none; }
@media (max-width: 991.98px) { .sf-sidebar { display: none; } .sf-shell { padding-top: 14px; } }

/* ----- Hero carousel ----- */
.sf-hero { border-radius: 22px; overflow: hidden; box-shadow: var(--sf-shadow); margin-bottom: 28px; }
.sf-slide { position: relative; min-height: 300px; display: flex; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 55%, #000), #000) center/cover no-repeat; color: #fff; }
.sf-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, .1) 100%); }
.sf-slide .sf-slide-body { position: relative; padding: 36px 48px; max-width: 640px; }
.sf-slide h2 { font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.1; }
.sf-slide p { opacity: .85; font-size: 1.05rem; }
@media (max-width: 575.98px) { .sf-slide { min-height: 240px; } .sf-slide .sf-slide-body { padding: 24px; } }

/* ----- Rows + tiles ----- */
.sf-row { margin-bottom: 30px; }
.sf-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sf-row-head h3 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.sf-row-head .sf-all { font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--brand); }
.sf-scroller { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 14px; scrollbar-width: thin; }
.sf-scroller .sf-tile { flex: 0 0 188px; scroll-snap-align: start; }
@media (max-width: 575.98px) { .sf-scroller .sf-tile { flex-basis: 150px; } }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }

.sf-tile { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--sf-surface-2); aspect-ratio: 1 / 1; text-decoration: none; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); transition: transform .18s ease, box-shadow .18s ease; }
.sf-tile:hover { transform: translateY(-4px) scale(1.03); box-shadow: var(--sf-shadow); color: #fff; z-index: 2; }
.sf-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.sf-tile:hover img { transform: scale(1.08); }
.sf-tile .sf-tile-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: var(--sf-muted); }
.sf-tile .sf-tile-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, 0)); font-weight: 700; font-size: .92rem; line-height: 1.2; opacity: 0; transform: translateY(8px); transition: all .18s ease; }
.sf-tile:hover .sf-tile-title, .sf-tile:focus-visible .sf-tile-title { opacity: 1; transform: none; }
@media (hover: none) { .sf-tile .sf-tile-title { opacity: 1; transform: none; } }
.sf-badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; background: var(--sf-accent); color: var(--sf-accent-contrast); }
.sf-badge.paid { background: var(--brand); color: var(--brand-contrast); }
.sf-badge.new { left: auto; right: 8px; background: var(--brand-hover); color: var(--brand-hover-contrast); }

.sf-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.sf-chip { white-space: nowrap; padding: 7px 16px; border-radius: 999px; background: var(--sf-surface); border: 1px solid var(--sf-border); text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--sf-text); }
.sf-chip:hover { border-color: var(--brand); }
.sf-chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

/* ----- Footer ----- */
.sf-footer { background: var(--sf-surface); border-top: 1px solid var(--sf-border); padding: 22px 0; margin-top: auto; color: var(--sf-muted); font-size: .88rem; }
.sf-footer a { text-decoration: none; color: var(--sf-muted); }
.sf-footer a:hover { color: var(--sf-text); }

/* ===== Game player page ===== */
.sf-play { max-width: 1400px; margin: 0 auto; }
.sf-stage-wrap { display: flex; flex-direction: column; align-items: center; }
.sf-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 18px 18px 0 0; overflow: hidden; box-shadow: var(--sf-shadow); }
.sf-stage.is-portrait { aspect-ratio: 9 / 16; }
.sf-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.sf-loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; background: #000 center/cover no-repeat; z-index: 3; transition: opacity .35s ease; text-align: center; padding: 20px; }
.sf-loader::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px); }
.sf-loader > * { position: relative; }
.sf-loader img.sf-loader-icon { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.sf-loader.is-hidden { opacity: 0; pointer-events: none; }
.sf-spinner { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--brand); border-radius: 50%; animation: sf-spin .8s linear infinite; }
@keyframes sf-spin { to { transform: rotate(360deg); } }

.sf-controlbar { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-top: 0; border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.sf-controlbar .sf-cb-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: 0 0 44px; background: var(--sf-surface-2); }
.sf-controlbar .sf-cb-title { font-weight: 800; line-height: 1.15; font-size: 1.05rem; }
.sf-controlbar .sf-cb-meta { font-size: .8rem; color: var(--sf-muted); }
.sf-chip-info { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--sf-surface-2); font-size: .8rem; font-weight: 700; }
.sf-cb-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sf-cb-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sf-surface-2); color: var(--sf-text); font-weight: 700; font-size: .88rem; }
.sf-cb-btn:hover { background: var(--brand); color: var(--brand-contrast); }
@media (max-width: 575.98px) { .sf-cb-btn span { display: none; } .sf-cb-btn { padding: 0 12px; } .sf-stage { border-radius: 12px 12px 0 0; } .sf-controlbar { border-radius: 0 0 12px 12px; } }

.sf-notice { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .92); color: #fff; font-size: .85rem; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.sf-notice button { background: transparent; border: 0; color: #fff; font-size: 1.1rem; line-height: 1; }

/* Fullscreen (native or pseudo for browsers that cannot fullscreen an element) */
.sf-stage:fullscreen, .sf-stage:-webkit-full-screen { width: 100% !important; height: 100% !important; border-radius: 0; aspect-ratio: auto; }
.sf-stage.is-pseudo-fs { position: fixed !important; inset: 0; width: 100% !important; height: 100% !important; z-index: 2000; border-radius: 0; aspect-ratio: auto; }
body.sf-pseudo-fs { overflow: hidden; }
.sf-fs-exit { display: none; position: absolute; top: 10px; right: 10px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; }
.sf-stage.is-pseudo-fs .sf-fs-exit { display: inline-flex; align-items: center; justify-content: center; }

.sf-play-info { margin-top: 26px; }
.sf-card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: 18px; padding: 20px; }
.sf-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }
.sf-tag { display: inline-block; padding: 5px 12px; margin: 0 6px 6px 0; border-radius: 999px; background: var(--sf-surface-2); text-decoration: none; font-size: .82rem; font-weight: 600; }
.sf-tag:hover { background: var(--brand); color: var(--brand-contrast); }
.sf-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sf-shots img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; }

/* ----- Player: reactions, favorite, fullscreen pull-down controls ----- */
.sf-react-group { display: inline-flex; gap: 4px; }
.sf-react-group .sf-cb-btn { padding: 0 12px; }
.sf-react-group .sf-cb-btn span { display: inline !important; }
.sf-cb-btn.is-on { background: var(--brand); color: var(--brand-contrast); }
.sf-fs-menu { display: none; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 6; flex-direction: column; align-items: center; }
.sf-stage:fullscreen .sf-fs-menu, .sf-stage:-webkit-full-screen .sf-fs-menu, .sf-stage.is-pseudo-fs .sf-fs-menu { display: flex; }

/* Test ads (SDK_TEST_ADS, test-ad.js): a card over the game. The stage is short on phones, so the card scrolls. */
.sf-test-ad { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(0, 0, 0, .78); overflow-y: auto; }
.sf-test-ad-card { width: 100%; max-width: 380px; max-height: 100%; overflow-y: auto; padding: 16px 18px; border-radius: 16px; background: var(--sf-surface); color: var(--sf-text); border: 1px solid var(--sf-border); box-shadow: var(--sf-shadow); text-align: center; }
.sf-test-ad-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--sf-accent); color: var(--sf-accent-contrast); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.sf-test-ad-title { margin-top: 8px; font-weight: 800; font-size: 1.1rem; }
.sf-test-ad-text { margin: 6px 0; font-size: .85rem; color: var(--sf-muted); }
.sf-test-ad-meta { font-size: .78rem; color: var(--sf-muted); overflow-wrap: anywhere; }
.sf-test-ad-bar { height: 6px; margin: 10px 0 4px; border-radius: 999px; background: var(--sf-surface-2); overflow: hidden; }
.sf-test-ad-bar > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width 1s linear; }
.sf-test-ad-count { font-size: .8rem; font-weight: 700; }
.sf-test-ad-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.sf-test-ad-link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--sf-muted); font-size: .78rem; text-decoration: underline; }
@media (max-height: 260px), (max-width: 420px) {
    .sf-test-ad-card { padding: 10px 12px; }
    .sf-test-ad-text { display: none; }
    .sf-test-ad-title { margin-top: 4px; font-size: 1rem; }
    .sf-test-ad-actions .btn { padding: 4px 12px; font-size: .85rem; }
}
.sf-fs-tab { width: 56px; height: 20px; border: 0; border-radius: 0 0 14px 14px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .7rem; line-height: 1; opacity: .55; transition: opacity .2s; }
.sf-fs-menu:hover .sf-fs-tab, .sf-fs-menu.is-open .sf-fs-tab { opacity: 1; }
.sf-fs-bar { display: none; gap: 6px; padding: 8px; margin-top: 2px; border-radius: 16px; background: rgba(0, 0, 0, .9); backdrop-filter: blur(8px); }
.sf-fs-menu:hover .sf-fs-bar, .sf-fs-menu.is-open .sf-fs-bar { display: flex; }
.sf-fs-bar button { width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.1rem; }
.sf-fs-bar button:hover { background: var(--brand); }
.sf-stage.is-pseudo-fs .sf-fs-exit { display: none; } /* the pull-down menu has an exit button */

/* ----- Player control bar: stays on one tidy row, drops button labels when narrow ----- */
.min-w-0 { min-width: 0; }
.sf-controlbar { container: cb / inline-size; flex-wrap: nowrap; }
.sf-cb-main { flex: 1 1 140px; }
.sf-cb-actions { margin-left: auto; flex-wrap: nowrap; flex: 0 0 auto; }
@container cb (max-width: 960px) {
    .sf-cb-btn span { display: none !important; }
    .sf-cb-btn { padding: 0 13px; }
    .sf-react-group .sf-cb-btn span { display: inline !important; }
}
@container cb (max-width: 560px) {
    .sf-controlbar { flex-wrap: wrap; }
    .sf-cb-actions { width: 100%; justify-content: space-between; }
}

/* ----- Stage backdrop -----
   Landscape: invisible wrapper. Portrait: a full-width dark band with the game centred in it and the
   control bar underneath, exactly like landscape, so the empty sides look intentional. */
.sf-stage-backdrop { width: 100%; display: flex; justify-content: center; }
.sf-stage-wrap.is-portrait .sf-stage-backdrop {
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--brand) 22%, #000) 0%, #000 70%);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    box-shadow: var(--sf-shadow);
}
.sf-stage-wrap.is-portrait .sf-stage { border-radius: 0; box-shadow: 0 0 60px rgba(0, 0, 0, .65); }

/* Correct size even before the script runs (the script then fine-tunes it). */
.sf-stage.is-portrait { aspect-ratio: 9 / 16; width: min(100%, calc((100vh - 190px) * 9 / 16)); }
.sf-stage:not(.is-portrait) { width: min(100%, calc((100vh - 190px) * 16 / 9)); }
@media (max-width: 575.98px) {
    .sf-stage.is-portrait { width: 100%; }
    .sf-stage-wrap.is-portrait .sf-stage-backdrop { border-radius: 12px 12px 0 0; }
}

/* Category icons (library class, text/emoji or sanitized inline SVG) */
.sf-cat-icon-wrap { display: inline-flex; width: 1.1em; justify-content: center; vertical-align: -0.125em; }
.sf-cat-icon-wrap svg { width: 1.1em; height: 1.1em; }

/* Catalogue filter bar */
.sf-toolbar { display: flex; align-items: center; gap: 10px; }
.sf-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--sf-surface); border: 1px solid var(--sf-border); }
.sf-seg a { padding: 5px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--sf-muted); }
.sf-seg a:hover { color: var(--sf-text); }
.sf-seg a.active { background: var(--brand); color: var(--brand-contrast); }
.sf-sort { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--sf-surface); border: 1px solid var(--sf-border); color: var(--sf-text); font-weight: 600; font-size: .85rem; }
.sf-sort:hover { border-color: var(--brand); }
.sf-tagbar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.sf-tagchip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 11px; border-radius: 6px; background: var(--sf-surface-2); color: var(--sf-text); text-decoration: none; font-size: .8rem; font-weight: 600; }
.sf-tagchip small { opacity: .6; font-weight: 500; }
.sf-tagchip:hover { background: var(--brand); color: var(--brand-contrast); }
.sf-tagchip.active { background: var(--brand); color: var(--brand-contrast); }

/* Public publisher page */
.sf-publisher-head { display: flex; align-items: center; gap: 14px; }
.sf-publisher-avatar { flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--brand); color: var(--brand-contrast); font-size: 1.4rem; font-weight: 800; }

/* Content pages (About, Terms, Privacy ...) */
.sf-page { max-width: 820px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: 16px; padding: 28px 32px; }
.sf-page-body { line-height: 1.7; overflow-wrap: anywhere; }
.sf-page-body h2 { font-size: 1.35rem; font-weight: 700; margin: 1.6em 0 .5em; }
.sf-page-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.4em 0 .4em; }
.sf-page-body h4 { font-size: 1rem; font-weight: 700; margin: 1.2em 0 .3em; }
.sf-page-body blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--brand); color: var(--sf-muted); }
.sf-page-body table { width: 100%; margin: 1em 0; border-collapse: collapse; display: block; overflow-x: auto; }
.sf-page-body th, .sf-page-body td { border: 1px solid var(--sf-border); padding: 8px 12px; }
.sf-page-body th { background: var(--sf-surface-2); }
.sf-page-body pre { background: var(--sf-surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
.sf-page-body a { color: var(--brand); }
@media (max-width: 575.98px) { .sf-page { padding: 20px 16px; } }
