:root {
  /* Light brand theme (DEFAULT after redesign) */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --mut: #64748b;
  --line: #e7ecf3;
  --brand: #3b82f6;
  --brand-2: #22d3ee;
  --brand-grad: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --brand-d: #1e40af;
  --ok: #16a34a;
  --shadow: 0 6px 24px rgba(15, 23, 42, .06);
  --shadow-h: 0 12px 34px rgba(59, 130, 246, .18);
  --radius: 16px;
}
/* Dark variant (toggle only) */
[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #111a2e;
  --card: #121b31;
  --ink: #e8edf7;
  --mut: #8fa0bd;
  --line: #1e2a44;
  --brand: #4f8ff7;
  --brand-2: #2fd8f6;
  --brand-grad: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --brand-d: #1e40af;
  --ok: #22c55e;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-h: 0 10px 34px rgba(59, 130, 246, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header / nav */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-size: 18px; box-shadow: var(--shadow-h);
}
.logo b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .tld { font-size: 12.5px; font-weight: 700; letter-spacing: 0; opacity: .85; }
nav { display: flex; gap: 4px; margin-left: 10px; align-items: center; }
nav a { padding: 9px 14px; border-radius: 10px; color: var(--mut); font-weight: 600; font-size: 14.5px; }
nav a:hover, nav a.active { color: var(--ink); background: var(--bg-soft); }
.theme-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); cursor: pointer; font-size: 17px; display: grid; place-items: center;
}
.theme-btn:hover { box-shadow: var(--shadow); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-pill { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--mut); font-size: 14px; min-width: 190px; }
.search-pill input { border: 0; background: transparent; outline: 0; font: inherit; color: var(--ink); width: 100%; }

/* Hero (redesign) */
.hero { position: relative; text-align: center; padding: 72px 0 40px; background: radial-gradient(1200px 420px at 50% -140px, #eff6ff, transparent); }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; max-width: 16ch; margin: 0 auto; }
.hero h1 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--mut); font-size: 18px; max-width: 56ch; margin: 18px auto 0; }
.hero-search { display: flex; align-items: center; gap: 6px; max-width: 640px; margin: 30px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 20px; box-shadow: var(--shadow); transition: .2s; }
.hero-search:focus-within { box-shadow: var(--shadow-h); border-color: transparent; }
.hero-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; padding: 10px 0; }
.hero-search .btn-primary { padding: 12px 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.chip { font-size: 13.5px; font-weight: 600; color: var(--mut); background: var(--bg-soft); border: 1px solid var(--line); padding: 7px 15px; border-radius: 999px; transition: .15s; cursor: default; }
.chip:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.hero-note { margin-top: 16px; color: var(--mut); font-size: 13.5px; }

/* button helpers */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: .18s; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 22px rgba(59,130,246,.32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(59,130,246,.42); }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 46px 0 8px; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--mut); font-size: 13.5px; }

/* Sections */
section { padding: 40px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-head h2 { font-size: 28px; letter-spacing: -.02em; font-weight: 800; margin: 0; }
.sec-head p { color: var(--mut); font-size: 15px; max-width: 60ch; margin: 0; }
.sec-head .more { margin-left: auto; color: var(--brand); font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* Category grid (redesign home) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: .18s; box-shadow: var(--shadow); }
.cat-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow-h); }
.cat-card .emo { width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, transparent); display: grid; place-items: center; font-size: 26px; flex: none; }
.cat-card .nm { font-weight: 700; font-size: 15.5px; }
.cat-card .ct { color: var(--mut); font-size: 13px; }

/* Channel cards (four channels) */
.chan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chan { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px; transition: .2s; box-shadow: var(--shadow); }
.chan:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.chan .ic { position: relative; overflow: hidden; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; color: #fff; flex: none; box-shadow: var(--shadow); }
.chan .ic svg { width: 32px; height: 32px; position: relative; z-index: 1; }
.chan .ic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(165deg, rgba(255,255,255,.38), rgba(255,255,255,0) 46%); }
.chan .ic::before { content: ""; position: absolute; right: -13px; bottom: -13px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); }
.chan.c1 .ic { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.chan.c2 .ic { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.chan.c3 .ic { background: linear-gradient(135deg, #10b981, #22d3ee); }
.chan.c4 .ic { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.chan h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.chan p { color: var(--mut); font-size: 14px; margin: 4px 0 12px; }
.chan .lk { font-weight: 700; color: var(--brand); font-size: 14px; }
.tag-new { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--brand); padding: 4px 10px; border-radius: 999px; }

/* Badge strip (homepage featured) */
.badge-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.badge-strip figure { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: .18s; box-shadow: var(--shadow); }
.badge-strip figure:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.badge-strip img { width: 100%; height: auto; border-radius: 10px; }
.badge-strip figcaption { font-size: 12.5px; font-weight: 600; color: var(--mut); }

/* Grid of glyph cards (emoji/symbols) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.glyph {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; transition: .15s; position: relative; box-shadow: var(--shadow);
}
.glyph:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow-h); }
.glyph .ch { font-size: 30px; line-height: 1; }
.glyph .nm { font-size: 10.5px; color: var(--mut); max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; padding: 0 4px; }

/* Detail page */
.detail { padding: 30px 0 50px; }
.loading { padding: 48px 0; color: var(--mut); font-size: 16px; }
.back { color: var(--mut); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.detail-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 28px; }
@media (max-width: 820px) { .detail-wrap { grid-template-columns: 1fr; } }
.preview {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; position: sticky; top: 86px;
}
.preview .big { font-size: 96px; line-height: 1; }
.preview .name { font-weight: 700; font-size: 17px; text-align: center; }
.preview .icon-big { color: var(--brand); display: grid; place-items: center; }
.preview .icon-big svg { width: 120px; height: 120px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--mut); margin: 18px 0 8px; }
.copy-row { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.copy-row code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { border: 0; background: var(--brand-grad); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.copy-btn:hover { filter: brightness(1.06); }
.copy-row img { width: 28px; height: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12px; color: var(--mut); }

/* Detail page SEO block */
.seo { margin-top: 30px; max-width: 880px; }
.seo h2 { font-size: 20px; margin: 26px 0 10px; letter-spacing: -.02em; }
.seo h3 { font-size: 15px; margin: 20px 0 8px; color: var(--mut); }
.seo p { color: var(--ink); opacity: .88; margin: 8px 0; }
.seo ul { margin: 10px 0; padding-left: 20px; }
.seo li { margin: 6px 0; color: var(--ink); opacity: .88; }
.seo code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Search results */
#results { margin-top: 14px; }
.empty { text-align: center; color: var(--mut); padding: 40px 0; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 40px; padding: 46px 0 28px; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot h4 { font-size: 14px; font-weight: 800; margin: 0 0 14px; }
.foot a { display: block; color: var(--mut); font-size: 14px; padding: 5px 0; }
.foot a:hover { color: var(--brand); }
.foot .about { color: var(--mut); font-size: 14px; max-width: 36ch; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; color: var(--mut); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; box-shadow: var(--shadow-h); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Ad placeholder (not active) */
.ad-slot { margin: 22px 0; border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--mut); font-size: 12px; background: var(--bg-soft); }
.ad-slot b { color: var(--brand); }
.ad-slot:empty { display: none; }
.pro .ad-slot { display: none !important; }

/* Homepage SEO intro */
.intro { max-width: 880px; margin: 6px auto 0; }
.intro h2 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 10px; }
.intro p { color: var(--mut); font-size: 15.5px; margin: 8px 0; }
.intro b { color: var(--ink); }
.intro a { color: var(--brand); font-weight: 600; }

/* Icons category */
.cat-intro { color: var(--mut); margin: 0 0 16px; font-size: 15px; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.iicon { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: .15s; box-shadow: var(--shadow); }
.iicon:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow-h); }
.iicon .ic { width: 44px; height: 44px; color: var(--brand); display: grid; place-items: center; }
.iicon .ic svg { width: 40px; height: 40px; }
.iicon .nm { font-size: 12px; color: var(--mut); font-weight: 600; text-align: center; }
.dl-btn { display: inline-block; margin-top: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 9px; font-size: 13px; text-align: center; }
.dl-btn:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow); }

/* Emoji page groups */
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tagbar a { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--mut); font-weight: 600; }
.tagbar a:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.group-head { font-size: 18px; margin: 30px 0 14px; letter-spacing: -.02em; scroll-margin-top: 84px; }
.group-head span { color: var(--mut); font-size: 13px; font-weight: 600; margin-left: 6px; }

/* PNG icons bar */
.png-head { margin-top: 34px; }
.png-head .more, .dl-all { margin-left: auto; color: #fff; font-weight: 700; font-size: 14px; background: var(--brand-grad); padding: 8px 14px; border-radius: 10px; }
.dl-all:hover { box-shadow: var(--shadow-h); }
.png-grid { margin-top: 4px; }
.png-ic .ic img { width: 40px; height: 40px; display: block; }
.png-dl { display: block; margin: 6px auto 0; font-size: 11px; font-weight: 700; color: var(--brand); text-decoration: none; padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px; }
.png-dl:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.dl-btn.alt { margin-top: 8px; }

/* PNG icon sets (themed packs) */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.set-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.set-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow-h); }
.set-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.set-thumbs .ic { width: 40px; height: 40px; color: var(--brand); display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 10px; }
.set-thumbs .ic svg { width: 26px; height: 26px; }
.set-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.set-cn { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.set-en { font-size: 13px; color: var(--mut); }
.set-n { font-size: 12px; color: var(--mut); margin-top: 2px; }
.set-dl { display: inline-block; background: var(--brand-grad); color: #fff; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 10px; }
.set-hero { margin-bottom: 18px; }
.set-hero h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.02em; }
.set-hero h1 span { color: var(--brand); font-weight: 800; }
.set-hero .dl-all { display: inline-block; margin-top: 4px; }

/* Page hero (fonts / illustrations) */
.page-hero { background: color-mix(in srgb, var(--brand) 6%, transparent); border-bottom: 1px solid var(--line); padding: 54px 0 40px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-hero h1 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero p { color: var(--mut); font-size: 17px; max-width: 62ch; margin: 12px 0 0; }

/* Filter bar (fonts / illustrations) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filter-bar .chip { cursor: pointer; }
.filter-bar .chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* Fonts channel */
.font-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.font-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: .18s; box-shadow: var(--shadow); }
.font-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.font-spec { font-size: 34px; line-height: 1.15; font-weight: 600; color: var(--ink); margin-bottom: 14px; word-break: break-word; }
.font-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.font-meta .nm { font-weight: 700; font-size: 15px; }
.font-meta .cat { display: block; color: var(--mut); font-size: 13px; }
.badge-free { font-size: 11px; font-weight: 800; color: #047857; background: #d1fae5; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Illustrations channel */
.ill-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 26px; box-shadow: var(--shadow); }
.ill-toolbar .search-pill { flex: 1; min-width: 220px; }
.color-pick { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--mut); }
.color-pick input[type=color] { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; padding: 3px; }
.ill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ill-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: .18s; text-align: center; box-shadow: var(--shadow); }
.ill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.ill-card svg { width: 100%; height: auto; max-height: 170px; display: block; }
.ill-card .nm { font-weight: 700; font-size: 14.5px; margin-top: 10px; }
.ill-card .dl { margin-top: 10px; display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand); }
.ill-detail-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 28px; }
@media (max-width: 820px) { .ill-detail-wrap { grid-template-columns: 1fr; } }
.ill-preview { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; text-align: center; position: sticky; top: 86px; }
.ill-preview svg { width: 100%; max-width: 280px; height: auto; }

/* Auth pages (register / login) */
.auth { display: flex; justify-content: center; padding: 60px 0; }
.auth-card { width: min(400px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 30px; text-align: center; }
.auth-card .logo { justify-content: center; font-size: 22px; margin-bottom: 14px; }
.auth-card h1 { font-size: 22px; margin: 6px 0 4px; letter-spacing: -.02em; }
.auth-sub { color: var(--mut); font-size: 14px; margin: 0 0 18px; }
.auth-card input { width: 100%; margin: 8px 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font-size: 14px; outline: 0; box-sizing: border-box; }
.auth-card input:focus { border-color: var(--brand); }
.auth-alt { font-size: 13px; color: var(--mut); margin: 12px 0 0; }
.auth-alt a { color: var(--brand); font-weight: 700; }
.cap-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cap-row canvas { border-radius: 8px; border: 1px solid var(--line); }
.cap-refresh { background: transparent; border: 1px solid var(--line); color: var(--mut); border-radius: 8px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.forgot-box { margin-top: 16px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; display: grid; gap: 10px; text-align: left; }
.forgot-t { margin: 0; font-weight: 700; font-size: 14px; }
.forgot-msg { display: none; margin: 0; font-size: 13px; color: var(--brand); }
.acct-note { font-size: 12px; color: var(--mut); margin: 12px 0 0; }

/* Account modal */
#acct-overlay { display: none; position: fixed; inset: 0; z-index: 95; background: rgba(4, 8, 18, .62); backdrop-filter: blur(4px); }
.acct-modal { position: relative; width: min(400px, calc(100vw - 32px)); margin: 9vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; }
.acct-modal h3 { margin: 0 0 14px; font-size: 20px; }
.acct-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--mut); border-radius: 9px; cursor: pointer; font-size: 13px; }
.acct-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.acct-tabs button { flex: 1; border: 1px solid var(--line); background: transparent; color: var(--mut); padding: 9px 0; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.acct-tabs button.on { background: var(--brand-grad); border-color: transparent; color: #fff; }
.acct-modal input { width: 100%; margin: 8px 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font-size: 14px; outline: 0; box-sizing: border-box; }
.acct-modal input:focus { border-color: var(--brand); }
.acct-go { width: 100%; margin-top: 10px; border: 0; background: var(--brand-grad); color: #fff; font-weight: 700; padding: 11px 0; border-radius: 10px; cursor: pointer; font-size: 14px; }
.acct-go.ghost { background: transparent; border: 1px solid var(--line); color: var(--mut); }
#acct-signedin p { margin: 6px 0; font-size: 14px; color: var(--mut); }
#acct-signedin b { color: var(--ink); }

/* Cookie consent */
#cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 880px; margin: 0 auto; display: none; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-h); padding: 14px 18px; }
#cookie-bar.show { display: flex; animation: ckSlide .35s ease; }
@keyframes ckSlide { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#cookie-bar .ck-text { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--mut); }
#cookie-bar .ck-text b { color: var(--ink); font-size: 14px; }
#cookie-bar .ck-text a { color: var(--brand); font-weight: 600; }
.ck-actions { display: flex; gap: 8px; }
.ck-btn { border: 0; background: var(--brand-grad); color: #fff; font-weight: 700; padding: 9px 18px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.ck-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--mut); }

@media (max-width: 900px) {
  .stats, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .chan-grid, .font-grid { grid-template-columns: 1fr; }
  .badge-strip, .ill-grid { grid-template-columns: repeat(3, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
  nav { display: none; }
}
@media (max-width: 560px) {
  .badge-strip, .ill-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
}
