/* =========================================================
   BaltyGram styles. Every colour comes from a theme variable.
   15 base themes live at the top: change a theme by changing data-theme on <html>.
   ========================================================= */
:root, [data-theme='mint'] {
  --bg: #ffffff; --surface: #fafafa; --card: #ffffff; --text: #171717; --muted: #737373; --light-muted: #a3a3a3; --border: #e5e5e5;
  --accent: #34d399; --accent-dark: #059669; --accent-soft: rgba(52, 211, 153, .12); --accent-ink: #052e22;
  --btn-bg: #171717; --btn-text: #ffffff; --header-bg: rgba(255, 255, 255, .94);
  --warn-bg: #fef3c7; --warn-text: #92400e; --bad-bg: #fee2e2; --bad-text: #b91c1c; --notice-bg: #fffbeb; --notice-border: #fde68a;
  --shadow: rgba(0, 0, 0, .12); --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 120px; color-scheme: light;
}
[data-theme='blue'] { --bg: #ffffff; --surface: #f5f9ff; --card: #ffffff; --text: #0f172a; --muted: #64748b; --light-muted: #94a3b8; --border: #dbe5f3; --accent: #3b82f6; --accent-dark: #1d4ed8; --accent-soft: rgba(59, 130, 246, .12); --accent-ink: #ffffff; --btn-bg: #0f172a; --header-bg: rgba(255, 255, 255, .94); }
[data-theme='solar'] { --bg: #fdf6e3; --surface: #f6efd9; --card: #fffaf0; --text: #586e75; --muted: #7b8f94; --light-muted: #93a1a1; --border: #e6dfc8; --accent: #2aa198; --accent-dark: #1f7f78; --accent-soft: rgba(42, 161, 152, .14); --accent-ink: #ffffff; --btn-bg: #073642; --btn-text: #fdf6e3; --header-bg: rgba(253, 246, 227, .94); }
[data-theme='sunset'] { --bg: #fff7ed; --surface: #fff1e0; --card: #fffdf9; --text: #431407; --muted: #9a5b3a; --light-muted: #c08a6a; --border: #fed7aa; --accent: #f97316; --accent-dark: #c2410c; --accent-soft: rgba(249, 115, 22, .13); --accent-ink: #ffffff; --btn-bg: #431407; --btn-text: #fff7ed; --header-bg: rgba(255, 247, 237, .94); }
[data-theme='rose'] { --bg: #fff1f2; --surface: #ffe4e6; --card: #fffafb; --text: #4c0519; --muted: #9f4a5e; --light-muted: #c98a98; --border: #fecdd3; --accent: #f43f5e; --accent-dark: #be123c; --accent-soft: rgba(244, 63, 94, .12); --accent-ink: #ffffff; --btn-bg: #4c0519; --btn-text: #fff1f2; --header-bg: rgba(255, 241, 242, .94); }

/* dark themes share these */
[data-theme='midnight'], [data-theme='darkblue'], [data-theme='hacker'], [data-theme='dracula'], [data-theme='nord'],
[data-theme='solar-dark'], [data-theme='monokai'], [data-theme='github'], [data-theme='forest'], [data-theme='contrast'] {
  --warn-bg: #3a2a05; --warn-text: #fcd34d; --bad-bg: #3b0f17; --bad-text: #fca5a5; --notice-bg: #2a2105; --notice-border: #5c4a10;
  --shadow: rgba(0, 0, 0, .55); --btn-bg: var(--text); --btn-text: var(--bg); color-scheme: dark;
}
[data-theme='midnight'] { --bg: #0b0f14; --surface: #0f151c; --card: #121821; --text: #e6edf3; --muted: #8b98a5; --light-muted: #5f6c78; --border: #1f2a36; --accent: #34d399; --accent-dark: #34d399; --accent-soft: rgba(52, 211, 153, .14); --accent-ink: #052e22; --header-bg: rgba(11, 15, 20, .92); }
[data-theme='darkblue'] { --bg: #0a1226; --surface: #0e1a33; --card: #111f3d; --text: #e8eefc; --muted: #93a4c7; --light-muted: #6b7ea6; --border: #1d2d52; --accent: #60a5fa; --accent-dark: #93c5fd; --accent-soft: rgba(96, 165, 250, .15); --accent-ink: #04122e; --header-bg: rgba(10, 18, 38, .92); }
[data-theme='hacker'] { --bg: #020402; --surface: #04100a; --card: #050c06; --text: #33ff66; --muted: #1fa84a; --light-muted: #17783a; --border: #0f3d1c; --accent: #33ff66; --accent-dark: #33ff66; --accent-soft: rgba(51, 255, 102, .12); --accent-ink: #001a08; --header-bg: rgba(2, 4, 2, .94); --font: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
[data-theme='dracula'] { --bg: #282a36; --surface: #2f3242; --card: #343746; --text: #f8f8f2; --muted: #b4b8d0; --light-muted: #8087a8; --border: #44475a; --accent: #bd93f9; --accent-dark: #d6b8ff; --accent-soft: rgba(189, 147, 249, .16); --accent-ink: #1d1033; --header-bg: rgba(40, 42, 54, .93); }
[data-theme='nord'] { --bg: #2e3440; --surface: #343b49; --card: #3b4252; --text: #eceff4; --muted: #b8c0cf; --light-muted: #8892a6; --border: #4c566a; --accent: #88c0d0; --accent-dark: #8fbcbb; --accent-soft: rgba(136, 192, 208, .16); --accent-ink: #0f2a33; --header-bg: rgba(46, 52, 64, .93); }
[data-theme='solar-dark'] { --bg: #002b36; --surface: #04333f; --card: #073642; --text: #93a1a1; --muted: #839496; --light-muted: #657b83; --border: #0d4755; --accent: #2aa198; --accent-dark: #3fd0c5; --accent-soft: rgba(42, 161, 152, .18); --accent-ink: #00212a; --header-bg: rgba(0, 43, 54, .93); }
[data-theme='monokai'] { --bg: #272822; --surface: #2d2e27; --card: #34352d; --text: #f8f8f2; --muted: #b6b7a8; --light-muted: #8a8b7a; --border: #49483e; --accent: #a6e22e; --accent-dark: #a6e22e; --accent-soft: rgba(166, 226, 46, .15); --accent-ink: #1c2600; --header-bg: rgba(39, 40, 34, .93); }
[data-theme='github'] { --bg: #0d1117; --surface: #11161d; --card: #161b22; --text: #c9d1d9; --muted: #8b949e; --light-muted: #6e7681; --border: #30363d; --accent: #58a6ff; --accent-dark: #79b8ff; --accent-soft: rgba(88, 166, 255, .15); --accent-ink: #04162e; --header-bg: rgba(13, 17, 23, .93); }
[data-theme='forest'] { --bg: #0b1a12; --surface: #0f2218; --card: #12261b; --text: #dcf5e5; --muted: #8fb8a0; --light-muted: #5f8a73; --border: #1f3d2c; --accent: #4ade80; --accent-dark: #6ee7a0; --accent-soft: rgba(74, 222, 128, .15); --accent-ink: #052e16; --header-bg: rgba(11, 26, 18, .93); }
[data-theme='contrast'] { --bg: #000000; --surface: #0a0a0a; --card: #000000; --text: #ffffff; --muted: #e5e5e5; --light-muted: #bdbdbd; --border: #ffffff; --accent: #ffd60a; --accent-dark: #ffd60a; --accent-soft: rgba(255, 214, 10, .18); --accent-ink: #000000; --header-bg: rgba(0, 0, 0, .96); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  min-height: 100vh; background: transparent; color: var(--text); font-family: var(--font);
  padding-top: calc(var(--header-height) + 35px); padding-bottom: 105px; transition: background .2s, color .2s;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.header { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: var(--header-height); background: var(--header-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1250px; margin: auto; height: 100%; }
.header-top { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: -0.8px; }
.logo span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 10px; }
.status { display: flex; align-items: center; gap: 7px; color: var(--light-muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--light-muted); }
.status-dot.ok { background: var(--accent); }
.status-dot.err { background: #ef4444; }
.hdr-btn { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--text); }
.hdr-btn:hover { border-color: var(--accent); }
.hdr-btn svg { width: 17px; height: 17px; }
.bell-dot { position: absolute; top: 5px; right: 6px; min-width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid var(--card); }
.header-auth { display: flex; align-items: center; font-size: 12px; font-weight: 600; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--card); }
.header-auth:hover { border-color: var(--accent); }
.header-auth.has-user { padding: 0; border: none; background: none; }

/* ---------- Search ---------- */
.search-wrapper { padding: 0 24px 10px; }
.search { height: 45px; max-width: 1250px; margin: auto; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); transition: .2s; }
.search:focus-within { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 17px; height: 17px; margin-left: 14px; color: var(--light-muted); }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text); font-size: 13px; }
.search input::placeholder { color: var(--light-muted); }
.shortcut { display: flex; align-items: center; gap: 4px; margin-right: 10px; color: var(--light-muted); font-size: 10px; }
.key { border: 1px solid var(--border); border-radius: 5px; padding: 2px 5px; background: var(--card); }

/* ---------- Layout ---------- */
main { max-width: 1100px; margin: auto; }
.page { display: block; min-height: calc(100vh - 190px); padding: 35px 24px 65px; }
.hero { text-align: center; padding: 45px 0 65px; }
.eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.hero h1 { margin-bottom: 22px; font-size: clamp(43px, 7vw, 72px); line-height: 1; letter-spacing: -4px; font-weight: 700; }
.hero h1 span { color: var(--accent); }
.hero-description { max-width: 650px; margin: auto; color: var(--muted); font-size: 15px; line-height: 1.7; }
.ticker { margin-top: 25px; display: inline-flex; align-items: center; gap: 7px; color: var(--light-muted); font-size: 12px; }
.ticker-word { color: var(--text); font-weight: 600; transition: opacity .2s, transform .2s; }
.ticker-word.hide { opacity: 0; transform: translateY(4px); }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-header h2 { font-size: 20px; letter-spacing: -.6px; }
.section-header p { color: var(--light-muted); font-size: 12px; }

/* ---------- Type cards (image) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { position: relative; display: block; min-height: 245px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #111; transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; color: #fff; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 15px 35px var(--shadow); }
.card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .63; transition: transform .4s; }
.card:hover .card-image { transform: scale(1.05); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 15%, rgba(0, 0, 0, .92)); }
.card-content { position: absolute; z-index: 2; left: 17px; right: 17px; bottom: 17px; color: #fff; }
.card-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; border: 1px solid var(--accent); border-radius: 22%; background: rgba(0, 0, 0, .4); backdrop-filter: blur(8px); color: var(--accent); overflow: hidden; }
.card-icon svg { width: 17px; height: 17px; }
.card-icon-img { width: 100%; height: 100%; object-fit: cover; }
.card-icon span { font-size: 11px; font-weight: 700; }
.card h3 { margin-bottom: 5px; font-size: 15px; font-weight: 600; }
.card p { color: #d1d1d1; font-size: 11px; line-height: 1.6; }

/* ---------- Featured ---------- */
.featured { margin-top: 60px; }
.featured-box { position: relative; height: 280px; overflow: hidden; border-radius: 10px; border: 1px solid var(--border); background: #111; }
.featured-box img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .15)); }
.featured-content { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); max-width: 550px; color: #fff; }
.featured-content h2 { margin-bottom: 9px; font-size: 30px; letter-spacing: -1px; }
.featured-content p { margin-bottom: 18px; color: #c5c5c5; font-size: 13px; line-height: 1.7; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; border: none; border-radius: 7px; padding: 9px 15px; font-size: 12px; font-weight: 600; text-align: center; }
.btn-dark { background: var(--btn-bg); color: var(--btn-text); }
.btn-dark:hover { opacity: .85; }
.btn-white { background: #fff; color: #171717; }
.btn-mint { background: var(--accent); color: var(--accent-ink); }
.btn-mint:hover { filter: brightness(.93); }
.btn-outline { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); }
.btn-block { width: 100%; padding: 11px 15px; }
.btn-lg { padding: 12px 28px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.link-btn { background: none; border: none; color: var(--accent-dark); font-size: 12px; font-weight: 600; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { border: none; background: none; color: var(--light-muted); font-size: 18px; padding: 4px 9px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.danger { color: var(--bad-text); }
.danger-btn { color: var(--bad-text); border-color: var(--bad-text); }

/* ---------- Small shared bits ---------- */
.muted { color: var(--muted); font-size: 12px; }
.muted-center { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }
.chip { display: inline-block; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.chip-soft { background: var(--surface); color: var(--muted); }
.prewrap { white-space: pre-wrap; line-height: 1.7; color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; border: 1px dashed var(--border); border-radius: 12px; padding: 44px 20px; background: var(--surface); }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.status-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.status-badge.ok { background: var(--accent-soft); color: var(--accent-dark); }
.status-badge.wait { background: var(--warn-bg); color: var(--warn-text); }
.status-badge.bad { background: var(--bad-bg); color: var(--bad-text); }
.status-badge.muted { background: var(--surface); color: var(--muted); }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-border); color: var(--warn-text); border-radius: 10px; padding: 12px 14px; font-size: 12px; margin: 14px 0; line-height: 1.6; }
.notice.bad { background: var(--bad-bg); border-color: var(--bad-text); color: var(--bad-text); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 7px 18px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Avatars and badges ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--accent-soft); }
.avatar-sm { width: 30px; height: 30px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 84px; height: 84px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--accent-dark); font-weight: 700; font-size: 12px; }
.avatar-md.avatar-fallback { font-size: 16px; }
.avatar-lg.avatar-fallback { font-size: 28px; }
.badges { display: inline-flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .4px; }
.badge-founder { background: var(--accent); color: var(--accent-ink); }
.badge-admin { background: var(--btn-bg); color: var(--btn-text); }
.badge-mod { background: #dbeafe; color: #1e40af; }
.badge-dev { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Forms and auth ---------- */
.auth-wrap { max-width: 420px; margin: 20px auto 0; }
.auth-title { font-size: 28px; letter-spacing: -1px; margin-bottom: 16px; }
.auth-card, .card-form { border: 1px solid var(--border); border-radius: 12px; padding: 24px; background: var(--card); }
.card-form h3 { margin-bottom: 14px; font-size: 17px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--surface); padding: 4px; border-radius: 9px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.auth-tabs button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 11px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field span em { font-style: normal; float: right; color: var(--light-muted); font-weight: 500; }
.field input, .field textarea, .select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; background: var(--card); color: var(--text); outline: none; font-family: inherit; }
.field input:focus, .field textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.select { width: auto; }
.select.full { width: 100%; padding: 10px 12px; }
.form-msg { min-height: 18px; font-size: 12px; margin-bottom: 10px; color: var(--bad-text); }
.form-msg.ok { color: var(--accent-dark); }
.form-foot { text-align: center; margin-top: 14px; }
.form-intro { margin-bottom: 14px; line-height: 1.6; }
.dash { max-width: 760px; margin: 20px auto 0; }
.dash-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.dash-id { flex: 1; min-width: 200px; }
.dash-id h2 { font-size: 24px; letter-spacing: -.8px; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.about { margin-top: 50px; padding-top: 30px; text-align: left; border-top: 1px solid var(--border); }
.about h3 { margin-bottom: 10px; font-size: 20px; }
.about-text { color: var(--muted); line-height: 1.7; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.about-item { padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.about-item span { display: block; margin-bottom: 4px; color: var(--light-muted); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.about-item strong { font-size: 13px; }
.copyright { margin-top: 25px; text-align: center; color: var(--light-muted); font-size: 11px; }

/* ---------- Software cards, rows, grids ---------- */
.sw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sw-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: transform .2s, box-shadow .2s, border-color .2s; }
.sw-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 28px var(--shadow); }
.sw-icon { width: 52px; height: 52px; border-radius: 22%; margin-bottom: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 16px; }
.sw-icon img { width: 100%; height: 100%; object-fit: cover; }
.sw-card h3 { font-size: 14px; }
.sw-dev { font-size: 11px; color: var(--light-muted); }
.sw-desc { font-size: 12px; color: var(--muted); line-height: 1.5; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; color: var(--light-muted); }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.carousel .sw-card { flex: 0 0 220px; scroll-snap-align: start; }
.row-block { margin-top: 50px; }
.load-more { text-align: center; margin-top: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip-btn { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 500; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: border-color .2s, box-shadow .2s, transform .2s; }
.tile:hover { border-color: var(--accent); box-shadow: 0 8px 24px var(--shadow); transform: translateY(-2px); }
.tile-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tile-icon svg { width: 20px; height: 20px; }
.tile h3 { font-size: 15px; }
.tile p { font-size: 12px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-count { font-size: 11px; color: var(--light-muted); }

/* ---------- Game cards (tall covers) ---------- */
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.game-card { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: #111; border: 1px solid var(--border); color: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.game-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 34px var(--shadow); }
.game-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-cover-fallback { background: linear-gradient(160deg, #064e3b, #111); }
.game-info { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; color: #fff; }
.game-info h3 { font-size: 14px; margin: 8px 0 2px; }
.game-info p { font-size: 11px; color: #d1d1d1; }
.carousel .game-card { flex: 0 0 170px; scroll-snap-align: start; }
.preview-game { width: 150px; flex: none; }
.preview-app { width: 200px; flex: none; }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.user-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: .2s; }
.user-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow); }
.user-card h3 { font-size: 14px; }
.user-card .badges { margin-top: 4px; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.profile-head h1 { font-size: 30px; letter-spacing: -1.2px; }
.profile-bio { margin-top: 10px; max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.social-links { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; flex-wrap: wrap; }
.social-links a { color: var(--accent-dark); font-weight: 600; }
.social-links a:hover { text-decoration: underline; }

/* ---------- Software detail ---------- */
.detail-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.detail-icon { width: 96px; height: 96px; border-radius: 22%; overflow: hidden; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; flex: none; }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { flex: 1; min-width: 220px; }
.detail-title h1, .game-detail-main h1 { font-size: 32px; letter-spacing: -1.4px; margin-bottom: 4px; }
.detail-short { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
.stat { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface); text-align: center; }
.stat strong { display: block; font-size: 18px; }
.stat span { font-size: 10px; color: var(--light-muted); text-transform: uppercase; letter-spacing: .8px; }
.detail-platforms { margin-bottom: 12px; }
.gallery { display: flex; gap: 10px; overflow-x: auto; margin: 16px 0; }
.gallery img { height: 220px; border-radius: 10px; border: 1px solid var(--border); flex: none; }
.panel { border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-top: 16px; background: var(--card); }
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.spec-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; }
.spec-list dt { color: var(--light-muted); text-transform: capitalize; }
.table-wrap { overflow-x: auto; }
.versions, .specs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.versions th, .specs-table th { text-align: left; color: var(--light-muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.versions td, .specs-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.versions td { white-space: nowrap; }
.specs-table tbody th { color: var(--muted); font-weight: 600; width: 120px; }
.game-detail { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.game-detail-cover { width: 240px; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #064e3b, #111); flex: none; box-shadow: 0 18px 40px var(--shadow); }
.game-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-detail-main { flex: 1; min-width: 260px; }
.banner { width: 100%; aspect-ratio: 16 / 6; border-radius: 14px; overflow: hidden; margin-bottom: 18px; background: linear-gradient(160deg, #064e3b, #111); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.get-row { display: flex; gap: 12px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.act-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.stars { color: #f59e0b; letter-spacing: 2px; font-size: 13px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.review-head a { font-weight: 600; }
.review p { font-size: 13px; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.rating-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.rating-summary strong { font-size: 34px; letter-spacing: -1px; }

/* ---------- Upload lists ---------- */
.up-list { margin-top: 14px; }
.up-row { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--card); }
.up-icon { width: 48px; height: 48px; border-radius: 22%; overflow: hidden; flex: none; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.up-icon img { width: 100%; height: 100%; object-fit: cover; }
.up-main { flex: 1; min-width: 0; }
.up-main h3 { font-size: 14px; margin-bottom: 3px; }
.up-actions { display: flex; gap: 8px; flex: none; }
.up-row.compact { padding: 8px 10px; gap: 10px; margin-bottom: 6px; }
.up-row.compact .up-icon { width: 28px; height: 28px; font-size: 10px; }
.up-row.compact .up-main h3 { font-size: 13px; margin: 0; display: flex; align-items: center; gap: 8px; }
.up-row.compact .up-main h3 a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row.compact .btn { padding: 6px 12px; }
.uploads-compact { margin-bottom: 22px; }
.uploads-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.uploads-head h3 { font-size: 17px; }

/* ---------- Upload wizard ---------- */
.wiz { max-width: 760px; margin: 10px auto 0; }
.stepper { display: flex; gap: 6px; list-style: none; margin-bottom: 18px; overflow-x: auto; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 11px; color: var(--light-muted); min-width: 88px; }
.stepper li span { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; flex: none; }
.stepper li em { font-style: normal; font-weight: 600; }
.stepper li.on { border-color: var(--accent); color: var(--text); }
.stepper li.on span { background: var(--accent); color: var(--accent-ink); }
.stepper li.done span { background: var(--accent-soft); color: var(--accent-dark); }
.wiz-card { border: 1px solid var(--border); border-radius: 14px; padding: 26px; background: var(--card); }
.wiz-card h2 { font-size: 24px; letter-spacing: -.9px; margin-bottom: 6px; }
.wiz-sub { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.type-opt { text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--card); display: flex; flex-direction: column; gap: 4px; transition: .15s; }
.type-opt:hover { border-color: var(--accent); }
.type-opt.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.type-opt .tile-icon { margin-bottom: 4px; }
.type-opt strong { font-size: 13px; }
.type-opt small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tag { display: inline-flex; gap: 6px; align-items: center; background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; }
.tag button { border: none; background: none; color: inherit; font-size: 14px; line-height: 1; padding: 0; }
.chip-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 500; cursor: pointer; background: var(--card); }
.chip-check input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.drop { display: flex; align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--border); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; overflow: hidden; position: relative; transition: .15s; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop img { width: 100%; height: 100%; object-fit: cover; }
.drop-square { width: 132px; height: 132px; border-radius: 22%; }
.drop-portrait { width: 170px; aspect-ratio: 2 / 3; }
.drop-wide { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; }
.drop-file { padding: 26px; margin-bottom: 10px; }
.drop-add { width: 110px; height: 110px; }
.media-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 22px; }
.media-col p { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.media-col small { display: block; color: var(--light-muted); font-size: 11px; margin-top: 6px; max-width: 220px; line-height: 1.5; }
.thumb-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.thumb { position: relative; width: 110px; height: 110px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .65); color: #fff; font-size: 14px; line-height: 1; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.radio-card { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: var(--card); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card.active { border-color: var(--accent); background: var(--accent-soft); }
.radio-card.disabled { opacity: .5; filter: grayscale(1); cursor: not-allowed; background: var(--surface); }
.radio-card.disabled:hover { border-color: var(--border); }
.beta-tag { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); margin-left: 6px; vertical-align: middle; }
.radio-card strong { font-size: 13px; }
.radio-card small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.file-chip { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; font-size: 12px; }
.file-chip strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.6; margin: 10px 0; }
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.preview-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 16px; }
.review-grid { flex: 1; min-width: 220px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 12px; }
.review-grid dt { color: var(--light-muted); }
.progress { height: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.publishing, .success { text-align: center; padding: 40px 20px; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.spec-grid { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 8px 10px; align-items: center; margin-bottom: 16px; }
.spec-grid b { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.spec-grid .spec-l { font-size: 12px; color: var(--muted); font-weight: 600; }
.spec-grid input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; font-size: 12px; background: var(--card); color: var(--text); outline: none; }
.spec-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.edit-wrap { max-width: 820px; margin: 10px auto 0; }
.panel-form { margin-top: 16px; }
.sub-title { font-size: 13px; margin: 18px 0 10px; }
.danger-zone { border-color: var(--bad-text); }

/* ---------- Downloads page ---------- */
.dl-row { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--card); }
.dl-icon { width: 48px; height: 48px; border-radius: 22%; overflow: hidden; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.dl-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-main { flex: 1; min-width: 0; }
.dl-name { font-size: 14px; font-weight: 600; }

/* ---------- Popovers: themes and notifications ---------- */
.pop-back { position: fixed; inset: 0; z-index: 1900; }
.pop { position: fixed; top: 60px; right: 14px; z-index: 2000; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px var(--shadow); padding: 14px; width: min(380px, calc(100vw - 28px)); max-height: 72vh; overflow-y: auto; }
.pop h3 { font-size: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 12px; font-weight: 500; text-align: left; }
.theme-opt:hover { border-color: var(--accent); }
.theme-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); font-weight: 700; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid; position: relative; flex: none; }
.swatch i { position: absolute; right: 3px; bottom: 3px; width: 10px; height: 10px; border-radius: 50%; }
.notif { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.notif:last-child { border-bottom: 0; }
.notif b { display: block; font-size: 13px; margin-bottom: 2px; }
.notif.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.notif p { color: var(--muted); line-height: 1.5; }
.notif small { color: var(--light-muted); }

/* ---------- Menu drawer, footer, legal pages, social sign-in ---------- */
.header-left { display: flex; align-items: center; gap: 12px; }
.menu-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 2100; opacity: 0; pointer-events: none; transition: opacity .2s; }
.menu-back.open { opacity: 1; pointer-events: auto; }
.menu { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--card); border-right: 1px solid var(--border); z-index: 2200; transform: translateX(-105%); transition: transform .22s ease; overflow-y: auto; padding: 16px 14px 28px; box-shadow: 20px 0 50px var(--shadow); }
.menu.open { transform: none; }
.menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.menu-user { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 6px; }
.menu-user strong { display: block; font-size: 13px; }
.menu h4 { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--light-muted); margin: 18px 8px 6px; }
.menu a, .menu .menu-btn { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13px; color: var(--text); width: 100%; border: none; background: none; text-align: left; }
.menu a:hover, .menu .menu-btn:hover { background: var(--accent-soft); }
.menu a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.menu a.menu-user { display: flex; }
.menu svg { width: 17px; height: 17px; color: var(--accent-dark); flex: none; }
.menu a.menu-cta { background: var(--accent); color: var(--accent-ink); font-weight: 700; justify-content: center; margin-top: 12px; }
.menu a.menu-cta:hover { background: var(--accent); filter: brightness(.93); }
.menu-foot { margin: 22px 8px 0; font-size: 11px; color: var(--light-muted); }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 10px 24px 30px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--light-muted); }
.site-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 34px; letter-spacing: -1.4px; margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; letter-spacing: -.4px; }
.legal p, .legal li { font-size: 14px; line-height: 1.75; color: var(--muted); }
.legal p { margin-bottom: 10px; }
.legal ul { padding-left: 20px; margin-bottom: 10px; }
.legal a { color: var(--accent-dark); font-weight: 600; }
.legal a.chip { font-weight: 600; }
.legal .lead { font-size: 16px; color: var(--text); margin: 10px 0; }
.legal .about-grid { margin-bottom: 8px; }
.legal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--light-muted); font-size: 11px; margin: 14px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Polish: logo mark, home layout, skeletons, lightbox ---------- */
.status { display: none; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.logo .logo-text { color: var(--text); }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { stroke: var(--accent-ink); }
.logo-mark circle { fill: var(--accent-ink); }
.sw-card { position: relative; }
.new-tag { position: absolute; top: 10px; right: 10px; font-size: 9px; font-weight: 800; letter-spacing: .6px; padding: 3px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.hero-slim { padding: 34px 0 40px; }
.hero-slim h1 { font-size: clamp(34px, 5.5vw, 56px); letter-spacing: -2.6px; margin-bottom: 14px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.cat-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.cat-pill { display: inline-flex; align-items: center; gap: 9px; flex: none; padding: 11px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; scroll-snap-align: start; transition: .15s; }
.cat-pill svg { width: 17px; height: 17px; color: var(--accent-dark); }
.cat-pill:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.cta-panel { margin-top: 60px; padding: 38px 30px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--card); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-panel h2 { font-size: 26px; letter-spacing: -1px; margin-bottom: 6px; }
.cta-panel p { color: var(--muted); font-size: 14px; max-width: 480px; line-height: 1.6; }
.skeleton { pointer-events: none; }
.sk { background: linear-gradient(90deg, var(--surface), var(--border), var(--surface)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 8px; }
.sk-icon { width: 52px; height: 52px; border-radius: 22%; margin-bottom: 10px; }
.sk-line { height: 12px; margin: 6px 0; }
.sk-line.short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-row { display: flex; gap: 12px; overflow: hidden; margin-top: 50px; }
.skeleton-row .sw-card { flex: 0 0 220px; }
.lightbox { position: fixed; inset: 0; z-index: 5000; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.gallery img { cursor: zoom-in; }
.badge-custom { background: color-mix(in srgb, var(--bc) 16%, transparent); color: var(--bc); border: 1px solid color-mix(in srgb, var(--bc) 45%, transparent); }
.live-tag { font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); margin-left: 6px; }

/* ---------- Messages, communities, organizations, video ---------- */
.chat-shell { display: grid; grid-template-columns: 300px 1fr; border: 1px solid var(--border); border-radius: 14px; background: var(--card); height: calc(100vh - 250px); min-height: 460px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--border); overflow-y: auto; padding: 14px; }
.chat-side h4 { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--light-muted); margin: 16px 6px 6px; }
.chat-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; width: 100%; border: none; background: none; text-align: left; color: var(--text); }
.chat-row:hover, .chat-row.active { background: var(--accent-soft); }
.chat-row .meta { flex: 1; min-width: 0; }
.chat-row strong { display: block; font-size: 13px; }
.chat-row small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-row { display: block; width: 100%; text-align: left; border: none; background: none; padding: 6px 10px 6px 44px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.chan-row:hover, .chan-row.active { background: var(--accent-soft); color: var(--text); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-head h3 { flex: 1; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-back { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 10px; max-width: 85%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; min-width: 0; }
.msg.mine .msg-bubble { background: var(--accent-soft); border-color: transparent; }
.msg-meta { font-size: 11px; color: var(--light-muted); margin-bottom: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.msg-meta b { color: var(--text); font-weight: 600; }
.msg-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-img { max-width: min(320px, 100%); max-height: 320px; border-radius: 10px; margin-top: 6px; display: block; }
.msg-actions { display: none; gap: 10px; margin-top: 4px; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { display: flex; }
.msg-actions button { border: none; background: none; font-size: 11px; color: var(--light-muted); padding: 0; }
.msg-actions button:hover { color: var(--accent-dark); text-decoration: underline; }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-compose textarea { flex: 1; resize: none; max-height: 120px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--text); font-size: 13px; outline: none; font-family: inherit; }
.chat-compose textarea:focus { border-color: var(--accent); }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; padding: 30px; }
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 2500; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(640px, 100%); max-height: 88vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px 16px 0 0; padding: 20px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.member-row .meta { flex: 1; min-width: 0; font-size: 13px; }
.member-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.member-acts .btn, .member-row > .btn { padding: 5px 10px; }
.comm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.comm-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.comm-card h3 { font-size: 14px; }
.comm-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; overflow: hidden; }
.comm-icon img { width: 100%; height: 100%; object-fit: cover; }
.by-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.org-logo-sm { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.verified { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 10px; align-items: center; justify-content: center; font-weight: 800; }
.org-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.org-head h1 { font-size: 28px; letter-spacing: -1px; }
.org-logo { width: 84px; height: 84px; border-radius: 22%; object-fit: cover; background: var(--accent-soft); }
.video-box { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.video-box img, .video-box iframe { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.play-btn { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .65); color: #fff; font-size: 24px; }
@media (max-width: 700px) {
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 230px); }
  .chat-shell .chat-main { display: none; }
  .chat-shell.show-main .chat-side { display: none; }
  .chat-shell.show-main .chat-main { display: flex; }
  .chat-back { display: inline-block; }
  .comm-grid { grid-template-columns: 1fr; }
  .msg { max-width: 95%; }
}

/* ---------- Bottom nav and toast ---------- */
.bottom-nav { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--header-bg); backdrop-filter: blur(18px); border-top: 1px solid var(--border); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--light-muted); font-size: 10px; font-weight: 500; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item.active { color: var(--text); }
.nav-item.active svg { color: var(--accent-dark); }
.toast { position: fixed; z-index: 3000; left: 50%; bottom: 90px; transform: translate(-50%, 15px); padding: 9px 15px; border-radius: 7px; background: var(--btn-bg); color: var(--btn-text); font-size: 11px; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid, .tiles, .people-grid { grid-template-columns: repeat(2, 1fr); }
  .sw-grid { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: repeat(4, 1fr); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  :root { --header-height: 116px; }
  body { padding-top: calc(var(--header-height) + 25px); padding-bottom: 100px; }
  .header-top { height: 52px; padding: 0 15px; }
  .search-wrapper { padding: 0 15px 9px; }
  .search { height: 44px; }
  .shortcut { display: none; }
  .status span:last-child { display: none; }
  .page { padding: 30px 15px 55px; }
  .hero { padding: 30px 0 50px; }
  .hero h1 { font-size: 46px; letter-spacing: -2.8px; }
  .hero-description { font-size: 13px; }
  .grid { gap: 8px; }
  .card { min-height: 215px; }
  .card-content { left: 13px; right: 13px; bottom: 13px; }
  .featured-content { left: 20px; right: 20px; }
  .featured-content h2 { font-size: 25px; }
  .about-grid, .field-grid { grid-template-columns: 1fr; }
  .sw-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles, .people-grid { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row-3 { grid-template-columns: repeat(3, 1fr); }
  .radio-cards { grid-template-columns: 1fr; }
  .wiz-card { padding: 18px; }
  .up-row { flex-wrap: wrap; }
  .up-actions { width: 100%; }
  .up-row.compact { flex-wrap: nowrap; }
  .game-detail-cover { width: 180px; }
  .game-detail-main h1, .detail-title h1 { font-size: 26px; }
  .spec-grid { grid-template-columns: 90px 1fr 1fr; }
  .theme-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 195px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec-grid > span, .spec-grid .spec-l { grid-column: 1 / -1; }
}


/* ---------- UI polish: keyboard focus and drawer ergonomics ---------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

.menu {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.menu a,
.menu .menu-btn {
  min-height: 40px;
  transition: background .16s ease, color .16s ease;
}

.menu h4 {
  margin-top: 20px;
  margin-bottom: 7px;
}

.menu .menu-head .logo {
  font-size: 19px;
}

.menu .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .menu,
  .menu-back,
  .menu a,
  .menu .menu-btn {
    transition: none !important;
  }
}


/* ---------- Site-wide refinement ---------- */
.skip-link {
  position: fixed;
  z-index: 6000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--shadow);
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}
:where(button, input, select, textarea) { accent-color: var(--accent-dark); }
::selection { background: var(--accent); color: var(--accent-ink); }
html { scroll-padding-top: calc(var(--header-height) + 18px); }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
main:focus { outline: none; }
.page > :first-child { margin-top: 0; }
.page > :last-child { margin-bottom: 0; }
.section-header { min-width: 0; }
.section-header > * { min-width: 0; }
.section-header p:not(.eyebrow) { line-height: 1.5; }
.row-block { margin-top: 42px; }
.row-block:first-child { margin-top: 0; }
.empty-state { max-width: 560px; margin: 28px auto; padding: 30px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); text-align: center; }
.empty-state h3 { margin-bottom: 8px; font-size: 17px; letter-spacing: -.3px; }
.empty-state p { max-width: 420px; margin: 0 auto 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
:where(input, select, textarea) { min-width: 0; }
:where(input:not([type='checkbox']):not([type='radio']), select, textarea) { max-width: 100%; }
:where(.btn, .btn-outline, .btn-dark, .btn-mint) { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
:where(.sw-card, .game-card, .tile, .user-card, .cat-pill) { -webkit-tap-highlight-color: transparent; }
.sw-card, .user-card, .dl-row, .up-row { min-width: 0; }
.sw-card h3, .sw-card p, .up-main, .dl-main { overflow-wrap: anywhere; }
.menu { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.menu a, .menu .menu-btn { min-height: 42px; transition: background .16s ease, color .16s ease; }
.menu h4 { margin-top: 20px; margin-bottom: 7px; }
.menu .menu-head .logo { font-size: 19px; }
.menu .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
.site-footer { align-items: center; row-gap: 12px; }
.site-footer > span { flex-basis: 100%; text-align: center; }
.site-footer img { max-width: 100%; object-fit: contain; }
.bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(72px + env(safe-area-inset-bottom)); }
body { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

@media (max-width: 600px) {
  .header-right { gap: 7px; }
  .header-left { gap: 9px; }
  .logo { gap: 6px; font-size: 18px; }
  .logo-mark { width: 24px; height: 24px; }
  .hero-slim { padding-top: 24px; padding-bottom: 30px; }
  .hero-slim h1 { max-width: 620px; margin-left: auto; margin-right: auto; font-size: clamp(34px, 9vw, 46px); line-height: 1.08; letter-spacing: -2px; }
  .hero-actions > a { flex: 1 1 145px; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-header h2 { font-size: 19px; }
  .cta-panel { margin-top: 38px; padding: 24px 20px; }
  .cta-panel h2 { font-size: 22px; }
  .cta-panel > a { width: 100%; }
  .site-footer { padding-bottom: 24px; gap: 13px 18px; }
}
@media (max-width: 390px) {
  .header-top { padding-inline: 11px; }
  .header-left { gap: 7px; }
  .header-right { gap: 5px; }
  .header-auth { padding-inline: 9px; }
  .logo { font-size: 17px; }
  .page { padding-inline: 12px; }
  .hero-slim h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}



/* ---------- Mobile-first refinement: November 2026 ---------- */
:root { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
body { line-height: 1.5; }
button, .btn, .btn-outline, .btn-dark, .btn-mint, .nav-item, .hdr-btn {
  -webkit-tap-highlight-color: transparent;
}
:where(button, .btn, .btn-outline, .btn-dark, .btn-mint) {
  touch-action: manipulation;
}
main { width: min(100%, 1100px); }
.page { min-width: 0; }
.page img { max-width: 100%; }
.panel, .sw-card, .game-card, .user-card, .tile, .up-row, .dl-row {
  min-width: 0;
}
:where(.panel, .sw-card, .user-card, .tile, .up-row, .dl-row) {
  overflow-wrap: anywhere;
}
:where(.field input, .field select, .field textarea, .input, .select, .textarea) {
  min-height: 44px;
}
textarea { resize: vertical; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 560px; }
.cat-strip, .chip-row, .carousel {
  scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar, .chip-row::-webkit-scrollbar, .carousel::-webkit-scrollbar {
  display: none;
}
.cat-strip, .chip-row { overscroll-behavior-inline: contain; }
.sw-card, .game-card, .cat-pill, .user-card { min-width: 0; }
.sw-card h3, .sw-card .sw-desc, .sw-card .sw-dev { overflow-wrap: anywhere; }
.toolbar { min-width: 0; }
.toolbar > * { min-width: 0; }
.pop { overscroll-behavior: contain; }
.notif { padding: 13px 10px; }
.notif a { display: block; color: inherit; }
.notif a:focus-visible { border-radius: 8px; }
.notif small { display: block; margin-top: 5px; }
.notif.unread { background: var(--accent-soft); border-radius: 9px; padding-inline: 12px; }
.notif b { line-height: 1.35; }
#notifPop h3 { position: sticky; top: -14px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; background: var(--card); border-bottom: 1px solid var(--border); }
#notifPop .icon-btn { flex: none; }
.header-right { flex-shrink: 0; }
.search { min-width: 0; }
.header-auth { white-space: nowrap; }
.site-footer { padding-inline: max(15px, env(safe-area-inset-left)); padding-right: max(15px, env(safe-area-inset-right)); }

@media (max-width: 760px) {
  .page { padding-top: 26px; }
  .section-header { gap: 8px; }
  .toolbar { display: flex; flex-wrap: wrap; gap: 9px; }
  .toolbar #typeChips { flex: 1 1 100%; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding: 2px 2px 8px; }
  .toolbar #platformSel, .toolbar #sortSel { flex: 1 1 140px; width: auto; }
  .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-head { align-items: flex-start; }
  .game-detail { gap: 16px; }
  .spec-list { overflow-wrap: anywhere; }
  .bottom-nav { z-index: 1500; }
  .site-footer { padding-bottom: 28px; }
}

@media (max-width: 600px) {
  :root { --header-height: 108px; }
  body { padding-top: calc(var(--header-height) + 18px); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .header { height: var(--header-height); }
  .header-top { height: 52px; padding-inline: 12px; }
  .header-left { gap: 8px; }
  .header-right { gap: 6px; }
  .hdr-btn { width: 36px; height: 36px; flex: none; }
  .hdr-btn svg { width: 18px; height: 18px; }
  .header-auth { min-height: 34px; padding: 5px 10px; font-size: 11px; }
  .search-wrapper { padding: 0 12px 8px; }
  .search { height: 40px; border-radius: 10px; }
  .search input { font-size: 14px; }
  .search svg { margin-left: 12px; }
  .page { padding: 24px 13px 42px; }
  .hero { padding: 25px 0 36px; }
  .hero h1 { max-width: 560px; margin-inline: auto; font-size: clamp(36px, 10vw, 46px); line-height: 1.04; letter-spacing: -.055em; }
  .hero-description { max-width: 42ch; font-size: 13px; line-height: 1.65; }
  .hero-actions { gap: 8px; }
  .hero-actions > a { flex: 1 1 145px; min-height: 44px; }
  .section-header { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .section-header h2 { font-size: 18px; }
  .section-header p { font-size: 11px; }
  .row-block { margin-top: 32px; }
  .cat-strip { margin-inline: -2px; padding-bottom: 8px; }
  .cat-pill { min-height: 42px; padding: 9px 13px; font-size: 12px; }
  .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .sw-card { padding: 12px; border-radius: 12px; }
  .sw-card h3 { font-size: 13px; line-height: 1.35; }
  .sw-card .sw-desc { font-size: 11px; line-height: 1.45; }
  .sw-icon { width: 44px; height: 44px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .featured { margin-top: 36px; }
  .featured-box { height: 230px; }
  .featured-content { left: 17px; right: 17px; }
  .featured-content h2 { font-size: 22px; }
  .cta-panel { margin-top: 34px; padding: 21px 17px; border-radius: 13px; }
  .cta-panel h2 { font-size: 20px; }
  .cta-panel p { font-size: 13px; }
  .cta-panel > a { width: 100%; }
  .bottom-nav { height: calc(66px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-item { gap: 4px; font-size: 10px; min-width: 0; }
  .nav-item svg { width: 19px; height: 19px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .site-footer { gap: 12px 16px; font-size: 11px; }
  .pop { top: auto; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 8px; width: auto; max-height: min(68vh, 560px); border-radius: 16px; padding: 14px; }
  .pop-back { z-index: 1900; background: rgba(0, 0, 0, .24); }
  .menu { width: min(340px, 88vw); padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .menu a, .menu .menu-btn { min-height: 44px; }
  .detail-head { gap: 12px; }
  .detail-icon { flex: none; }
  .detail-title { min-width: 0; }
  .game-detail { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); align-items: start; gap: 13px; }
  .game-detail-cover { width: 100%; max-width: 160px; }
  .game-detail-main h1, .detail-title h1 { font-size: clamp(21px, 6vw, 27px); overflow-wrap: anywhere; }
  .table-wrap { margin-inline: -2px; }
  .form-actions, .up-actions { flex-wrap: wrap; }
  .form-actions > *, .up-actions > * { flex: 1 1 130px; }
}

@media (max-width: 380px) {
  .logo { font-size: 16px; gap: 5px; }
  .logo-mark { width: 22px; height: 22px; }
  .header-top { padding-inline: 9px; }
  .header-left { gap: 6px; }
  .header-right { gap: 4px; }
  .hdr-btn { width: 33px; height: 33px; }
  .header-auth { padding-inline: 8px; }
  .page { padding-inline: 11px; }
  .sw-grid { gap: 7px; }
  .sw-card { padding: 10px; }
  .sw-card .sw-meta { gap: 5px; flex-wrap: wrap; }
  .nav-item { font-size: 9px; }
  .nav-item svg { width: 18px; height: 18px; }
}

@media (hover: none) {
  .card:hover, .cat-pill:hover { transform: none; }
  .sw-card:hover, .game-card:hover { transform: none; }
}


/* Numeric unread badge for the notification bell. */
.bell-dot.has-count {
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
