:root {
  --radius: 0.75rem;
  --background: #f7f8fb;
  --foreground: #1d2637;
  --card: #ffffff;
  --card-foreground: #1d2637;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --secondary: #e9eef7;
  --secondary-foreground: #24304a;
  --muted: #edf1f7;
  --muted-foreground: #59647a;
  --accent: #dfe8f8;
  --accent-foreground: #1e2a46;
  --destructive: #bb3a3a;
  --border: rgba(29, 38, 55, 0.12);
  --ring: rgba(37, 99, 235, 0.4);
  --shadow: 0 20px 45px rgba(30, 42, 70, 0.1);
  color-scheme: light;
}
html.dark {
  --background: #141210;
  --foreground: #f0edea;
  --card: #1c1b18;
  --card-foreground: #f0edea;
  --primary: #f0b04a;
  --primary-foreground: #241a08;
  --secondary: #262421;
  --secondary-foreground: #ebe8e6;
  --muted: #232120;
  --muted-foreground: #a8a49d;
  --accent: #2b2926;
  --accent-foreground: #f0edea;
  --destructive: #cf4b4b;
  --border: rgba(240, 237, 234, 0.12);
  --ring: rgba(240, 176, 74, 0.55);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01" on; min-height: 100vh; display: flex; flex-direction: column;
}
.container { width: min(1152px, calc(100% - 2rem)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
.site-header { position: fixed; inset-inline: 0; top: 0; z-index: 50; height: 64px; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s; }
.site-header.scrolled { background: color-mix(in srgb, var(--background) 85%, transparent); backdrop-filter: blur(20px); border-bottom-color: var(--border); box-shadow: 0 8px 32px rgba(0,0,0,.35); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; font-family: Manrope, Inter, sans-serif; font-weight: 800; letter-spacing: -.01em; font-size: 1.125rem; }
.brand-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: .75rem; background: color-mix(in srgb, var(--primary) 15%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); color: var(--primary); }
.brand-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(.75rem - 1px); display: block; }
.brand .dot { color: var(--primary); }
.main-nav { display: none; align-items: center; gap: .125rem; }
.main-nav a { padding: .5rem .625rem; border-radius: .5rem; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--muted-foreground); }
.main-nav a:hover { color: var(--foreground); background: var(--secondary); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.theme-toggle { display: inline-flex; align-items: center; gap: .125rem; padding: .25rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--card) 70%, transparent); }
.theme-toggle button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; color: var(--muted-foreground); }
.theme-toggle button svg { width: 16px; height: 16px; }
.theme-toggle button:hover { background: var(--secondary); color: var(--foreground); }
.theme-toggle button.active { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.ai-button { position: relative; display: inline-flex; height: 40px; align-items: center; justify-content: center; gap: .375rem; padding-inline: .625rem; border-radius: .5rem; background: var(--primary); color: var(--primary-foreground); font-size: .875rem; font-weight: 700; box-shadow: 0 10px 25px color-mix(in srgb, var(--primary) 25%, transparent); transition: transform .2s; }
.ai-button:hover { transform: scale(1.03); }
.ai-button .crown { width: 18px; height: 18px; color: #fcd34d; }
html.dark .ai-button .crown { color: var(--primary-foreground); }
.ai-button-label { display: none; }
.ai-status-dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border: 2px solid var(--background); border-radius: 999px; background: #34d399; }
.ai-status-dot.limit { background: #ef4444; }
.menu-toggle { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: .5rem; color: var(--muted-foreground); }
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-nav { display: flex; flex-direction: column; gap: .25rem; padding: .75rem 1rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--background) 95%, transparent); backdrop-filter: blur(20px); }
.mobile-nav a { padding: .625rem .75rem; border-radius: .5rem; color: var(--muted-foreground); }
.mobile-nav a:hover { color: var(--foreground); background: var(--secondary); }
@media (min-width: 1024px) { .main-nav { display: flex; } .menu-toggle { display: none; } .ai-button-label { display: inline; } .ai-button { padding-inline: .875rem; } }
.hero { position: relative; padding: 8rem 0 5rem; background-image: radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent), linear-gradient(color-mix(in srgb, var(--foreground) 3%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--foreground) 3%, transparent) 1px, transparent 1px); background-size: 100% 100%, 44px 44px, 44px 44px; }
.hero-glow { position: absolute; top: -10rem; left: 50%; width: 720px; height: 480px; transform: translateX(-50%); background: color-mix(in srgb, var(--primary) 10%, transparent); filter: blur(120px); pointer-events: none; }
.hero-content { position: relative; max-width: 48rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem 1rem; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); font-size: .875rem; font-weight: 500; }
.hero-badge svg { width: 16px; height: 16px; }
.hero h1 { margin: 1.5rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.hero .accent { color: var(--primary); text-shadow: 0 0 28px color-mix(in srgb, var(--primary) 45%, transparent); }
.hero p { margin: 1.5rem 0 0; max-width: 42rem; color: var(--muted-foreground); line-height: 1.625; font-size: clamp(1rem, 2vw, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-flex; height: 3rem; align-items: center; gap: .5rem; padding-inline: 1.5rem; border-radius: .75rem; font-size: .875rem; font-weight: 600; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 10px 25px color-mix(in srgb, var(--primary) 25%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 90%, var(--foreground)); }
.btn-secondary { border: 1px solid var(--border); background: color-mix(in srgb, var(--secondary) 60%, transparent); color: var(--foreground); }
.btn-secondary:hover { background: var(--secondary); }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; margin-top: 3rem; }
.hero-stats div { padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--card) 60%, transparent); backdrop-filter: blur(8px); }
.hero-stats strong { display: block; font-family: Manrope, Inter, sans-serif; color: var(--primary); font-size: 1.25rem; }
.hero-stats span { display: block; margin-top: .25rem; color: var(--muted-foreground); font-size: .75rem; line-height: 1.3; }
.hero-note { display: flex; align-items: center; gap: .5rem; margin-top: 1.5rem; font-size: .75rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.sections-divider { border-top: 1px solid var(--border); background: linear-gradient(to bottom, var(--background), color-mix(in srgb, var(--card) 30%, var(--background)), var(--background)); }
.section { padding: 3.5rem 0; }
.section-heading { max-width: 42rem; }
.kicker { display: block; color: var(--primary); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; }
.section-heading h2 { margin: .5rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; }
.section-heading p { margin: .75rem 0 0; color: var(--muted-foreground); font-size: .9375rem; line-height: 1.625; }
@media (min-width: 768px) { .section { padding: 5rem 0; } .section-heading p { font-size: 1rem; } }
.knowledge-panel { padding: 1rem; border: 1px solid var(--border); border-radius: 1.5rem; background: color-mix(in srgb, var(--card) 50%, transparent); box-shadow: var(--shadow); }
.mode-switch { display: flex; flex-wrap: wrap; gap: .5rem; }
.mode-switch button { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .875rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--secondary) 50%, transparent); color: var(--muted-foreground); font-size: .875rem; font-weight: 700; }
.mode-switch button svg { width: 16px; height: 16px; }
.mode-switch button small { font-size: 11px; font-weight: 500; opacity: .7; }
.mode-switch button.active { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.server-switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.server-switch button { padding: .375rem .875rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--muted-foreground); font-size: .8125rem; font-weight: 700; }
.server-switch button.active { border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.search-box { position: relative; margin-top: 1rem; }
.search-box .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--primary); pointer-events: none; }
.search-box input { width: 100%; height: 56px; padding: 0 2.75rem 0 3rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--background); color: var(--foreground); outline: none; font-size: 1rem; }
.search-box input:focus { border-color: color-mix(in srgb, var(--primary) 40%, transparent); box-shadow: 0 0 0 3px var(--ring); }
.clear-search { position: absolute; right: .875rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; color: var(--muted-foreground); }
.clear-search svg { width: 16px; height: 16px; }
.section-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.section-filter button { padding: .375rem .875rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--secondary) 40%, transparent); color: var(--muted-foreground); font-size: .75rem; font-weight: 700; }
.section-filter button.active { color: var(--foreground); border-color: color-mix(in srgb, var(--section-color, var(--primary)) 47%, transparent); background: color-mix(in srgb, var(--section-color, var(--primary)) 12%, transparent); }
.search-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1rem; color: var(--muted-foreground); font-size: .75rem; }
.search-hint { display: inline-flex; align-items: center; gap: .375rem; }
.search-hint svg { width: 14px; height: 14px; color: var(--primary); }
.search-results { display: flex; flex-direction: column; gap: .625rem; margin-top: 1.25rem; }
.result-card { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 80%, transparent); box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: border-color .2s, transform .2s, box-shadow .2s; }
.result-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.result-card.open { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.result-accent { position: absolute; inset-block: 0; left: 0; width: 6px; opacity: .8; }
.result-card > button { width: 100%; padding: 1rem 1rem 1rem 1.25rem; text-align: left; }
.result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rule-number { padding: .125rem .5rem; border: 1px solid color-mix(in srgb, var(--accent-color) 33%, transparent); border-radius: .5rem; background: color-mix(in srgb, var(--accent-color) 8%, transparent); color: var(--accent-color); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; font-weight: 800; }
.section-short { padding: .125rem .5rem; border-radius: .375rem; background: color-mix(in srgb, var(--secondary) 70%, transparent); color: var(--muted-foreground); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.result-source { color: var(--muted-foreground); font-size: 11px; font-weight: 600; }
.result-title { margin: .5rem 0 0; color: color-mix(in srgb, var(--foreground) 90%, transparent); font-size: .875rem; line-height: 1.625; }
.result-title.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.result-chevron { width: 16px; height: 16px; margin-top: .25rem; color: var(--muted-foreground); transition: transform .2s, color .2s; }
.result-card.open .result-chevron { transform: rotate(180deg); color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .75rem; }
.chip { padding: .25rem .5rem; border: 1px solid rgba(245,158,11,.35); border-radius: .5rem; background: rgba(245,158,11,.1); color: #b45309; font-size: 11px; font-weight: 600; }
html.dark .chip { color: #fcd34d; }
.result-details { display: none; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding: 1rem 1.25rem; }
.result-card.open .result-details { display: block; }
.details-label { color: var(--muted-foreground); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.points-list { margin: .5rem 0 0; padding-left: 1.25rem; color: color-mix(in srgb, var(--foreground) 85%, transparent); font-size: .875rem; line-height: 1.625; }
.note { margin-top: .5rem; padding: .75rem; border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--muted-foreground); font-size: .875rem; line-height: 1.625; }
.result-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: .75rem; color: var(--muted-foreground); font-size: 11px; }
.source-link { display: inline-flex; align-items: center; gap: .25rem; color: var(--primary); font-weight: 600; }
.source-link:hover { text-decoration: underline; }
.rules-browser { display: grid; gap: 1rem; margin-top: 1.25rem; }
.section-cards { display: grid; gap: 1rem; }
.section-card { position: relative; overflow: hidden; padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 80%, transparent); text-align: left; }
.section-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.section-card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.section-card-short { padding: .25rem .625rem; border: 1px solid color-mix(in srgb, var(--section-color) 33%, transparent); border-radius: .5rem; background: color-mix(in srgb, var(--section-color) 8%, transparent); color: var(--section-color); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.section-card-count { font-family: Manrope, Inter, sans-serif; color: var(--section-color); font-size: 1.875rem; font-weight: 800; }
.section-card h3 { margin: .75rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: .875rem; font-weight: 700; line-height: 1.35; }
.section-card p { margin: .5rem 0 0; color: var(--muted-foreground); font-size: .75rem; }
@media (min-width: 640px) { .section-cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .section-cards { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.browser-item { overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 75%, transparent); }
.browser-item > button { display: flex; width: 100%; align-items: center; gap: .75rem; padding: 1rem; text-align: left; }
.browser-item > button:hover { background: color-mix(in srgb, var(--secondary) 40%, transparent); }
.browser-count { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); font-size: .875rem; font-weight: 800; }
.browser-title { flex: 1; min-width: 0; font-family: Manrope, Inter, sans-serif; font-size: .875rem; font-weight: 700; }
.browser-subtitle { display: block; color: var(--muted-foreground); font-size: 11px; font-weight: 400; }
.browser-body { display: none; max-height: 460px; overflow-y: auto; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding: 1rem; }
.browser-item.open .browser-body { display: block; }
.browser-entry { padding: .875rem; border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--background) 70%, transparent); margin-bottom: .5rem; }
.browser-entry:last-child { margin-bottom: 0; }
.browser-entry .entry-number { color: var(--primary); font-size: .8125rem; font-weight: 700; }
.browser-entry p { margin: .25rem 0 0; color: color-mix(in srgb, var(--foreground) 90%, transparent); font-size: .8125rem; line-height: 1.625; }
.browser-entry .chapter { margin: .5rem 0 0; color: var(--muted-foreground); font-size: 11px; }
.loading { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 2.5rem; border: 1px solid var(--border); border-radius: 1rem; color: var(--muted-foreground); font-size: .875rem; }
.support-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.support-card { display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 60%, transparent); }
.support-card.twitch:hover { border-color: rgba(145,70,255,.6); background: rgba(145,70,255,.05); }
.support-card.telegram:hover { border-color: rgba(14,165,233,.6); background: rgba(14,165,233,.05); }
.support-card.promo { border-color: color-mix(in srgb, var(--primary) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), color-mix(in srgb, var(--card) 60%, transparent)); }
.support-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: .75rem; }
.support-icon svg { width: 22px; height: 22px; }
.twitch-icon { border: 1px solid rgba(145,70,255,.3); background: rgba(145,70,255,.15); color: #b47cf5; }
.telegram-icon { border: 1px solid rgba(14,165,233,.3); background: rgba(14,165,233,.15); color: #38bdf8; }
.promo-icon { border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); background: color-mix(in srgb, var(--primary) 15%, transparent); color: #dc2626; }
.support-title { margin-top: 1rem; font-family: Manrope, Inter, sans-serif; font-size: 1rem; font-weight: 700; }
.support-text { flex: 1; margin-top: .25rem; color: var(--muted-foreground); font-size: .8125rem; line-height: 1.625; }
.support-link { display: inline-flex; align-items: center; gap: .375rem; margin-top: 1rem; font-size: .8125rem; font-weight: 600; }
.twitch .support-link { color: #b47cf5; } .telegram .support-link { color: #38bdf8; }
.promo-code { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; padding: .625rem 1rem; border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.promo-code span:first-child { color: var(--primary); font-family: Manrope, Inter, sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: .15em; }
.copy-label { color: var(--primary); font-size: .8125rem; font-weight: 600; }
.support-card.promo .btn { margin-top: .625rem; justify-content: center; }
.support-note { margin-top: 1.25rem; color: var(--muted-foreground); font-size: .78125rem; text-align: center; }
@media (min-width: 768px) { .support-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.glossary-filters { display: flex; flex-direction: column; gap: 1rem; }
.glossary-search { position: relative; max-width: 28rem; }
.glossary-search svg { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-foreground); }
.glossary-search input { width: 100%; height: 44px; padding-inline: 2.5rem .75rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--card); color: var(--foreground); outline: none; }
.tag-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-filter button { padding: .375rem .875rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--secondary) 40%, transparent); color: var(--muted-foreground); font-size: .75rem; font-weight: 600; }
.tag-filter button.active { border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.glossary-grid { display: grid; gap: .75rem; margin-top: 1rem; }
.glossary-card { padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 70%, transparent); }
.glossary-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.glossary-term { color: var(--primary); font-family: Manrope, Inter, sans-serif; font-size: 1rem; font-weight: 800; }
.glossary-tag { padding: .125rem .5rem; border: 1px solid var(--tag-color, transparent); border-radius: 999px; background: color-mix(in srgb, var(--tag-color) 12%, transparent); color: var(--tag-color); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.glossary-full { margin-top: .25rem; color: var(--muted-foreground); font-size: .75rem; font-weight: 600; }
.glossary-simple { margin-top: .5rem; color: color-mix(in srgb, var(--foreground) 85%, transparent); font-size: .875rem; line-height: 1.625; }
@media (min-width: 640px) { .glossary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .glossary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.punishments-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.punishment-card { position: relative; overflow: hidden; padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 70%, transparent); }
.punishment-card::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--pun-color); opacity: .7; }
.punishment-top { display: flex; align-items: center; gap: .75rem; }
.punishment-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--pun-color) 27%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--pun-color) 8%, transparent); color: var(--pun-color); }
.punishment-code { color: var(--pun-color); font-family: Manrope, Inter, sans-serif; font-size: 1.125rem; font-weight: 800; }
.punishment-name { color: var(--muted-foreground); font-size: .75rem; }
.punishment-card p:last-child { margin: .75rem 0 0; color: color-mix(in srgb, var(--foreground) 85%, transparent); font-size: .875rem; line-height: 1.625; }
.info-block { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 1rem; background: color-mix(in srgb, var(--primary) 8%, transparent); }
.info-title { margin: 0; color: var(--primary); font-weight: 600; }
.info-block p:last-child { margin: .25rem 0 0; color: var(--muted-foreground); font-size: .875rem; line-height: 1.625; }
@media (min-width: 640px) { .punishments-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .punishments-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.quiz-card { max-width: 42rem; margin: 2rem auto 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: 1.5rem; background: color-mix(in srgb, var(--card) 80%, transparent); }
.quiz-top { display: flex; justify-content: space-between; color: var(--muted-foreground); font-size: .75rem; font-weight: 600; }
.quiz-progress { height: 8px; margin-top: .75rem; border-radius: 999px; background: var(--secondary); overflow: hidden; }
.quiz-progress div { height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s ease; }
.quiz-question { margin: 1.5rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: 1.125rem; font-weight: 700; line-height: 1.35; }
.quiz-options { display: flex; flex-direction: column; gap: .625rem; margin-top: 1.25rem; }
.quiz-option { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--secondary) 40%, transparent); text-align: left; font-size: .875rem; }
.quiz-option:hover:not(:disabled) { border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: var(--secondary); }
.quiz-option.correct { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.1); color: #16a34a; }
html.dark .quiz-option.correct { color: #4ade80; }
.quiz-option.wrong { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.1); color: #b91c1c; }
html.dark .quiz-option.wrong { color: #f87171; }
.quiz-explanation { margin-top: 1.25rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 8%, transparent); font-size: .875rem; line-height: 1.625; }
.quiz-rule { margin-top: .5rem; color: var(--primary); font-size: .75rem; font-weight: 700; }
.quiz-next { margin-top: 1.25rem; width: 100%; height: 44px; border-radius: .75rem; background: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.quiz-result { text-align: center; margin-top: 2rem; }
.quiz-result-icon { display: inline-flex; width: 80px; height: 80px; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--rank-color) 33%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--rank-color) 8%, transparent); color: var(--rank-color); font-size: 1.5rem; }
.quiz-result h3 { margin: 1.25rem 0 0; color: var(--rank-color); font-family: Manrope, Inter, sans-serif; font-size: 1.5rem; font-weight: 800; }
.quiz-result p { margin: .5rem 0 0; color: var(--muted-foreground); font-size: .875rem; }
.quiz-score { margin: 1rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: 2.25rem; font-weight: 800; }
.quiz-score small { color: var(--muted-foreground); font-size: 1.25rem; }
.quiz-restart { margin-top: 1.5rem; height: 44px; padding-inline: 1.5rem; border-radius: .75rem; background: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.faq-list { max-width: 48rem; margin: 2rem auto 0; border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in srgb, var(--card) 60%, transparent); }
.faq-item { border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.faq-item:last-child { border-bottom: none; }
.faq-question { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; text-align: left; font-family: Manrope, Inter, sans-serif; font-size: .875rem; font-weight: 700; }
.faq-question:hover { color: var(--primary); }
.faq-answer { display: none; padding: 0 1.25rem 1rem; color: var(--muted-foreground); font-size: .875rem; line-height: 1.625; }
.faq-item.open .faq-answer { display: block; }
.faq-chevron { width: 16px; height: 16px; color: var(--muted-foreground); transition: transform .2s, color .2s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--card) 40%, transparent); }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
.site-footer .brand { display: inline-flex; }
.site-footer p { color: var(--muted-foreground); font-size: .875rem; line-height: 1.625; margin: .75rem 0 0; max-width: 20rem; }
.site-footer h3 { margin: 0; font-family: Manrope, Inter, sans-serif; font-size: .875rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.site-footer ul a { display: inline-flex; align-items: center; gap: .375rem; color: var(--muted-foreground); font-size: .875rem; }
.site-footer ul a:hover { color: var(--primary); }
.footer-dot { width: 6px; height: 6px; border-radius: 999px; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding: 1.5rem 0; color: var(--muted-foreground); font-size: .75rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .footer-bottom { flex-direction: row; } }
.chat-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.chat-overlay[hidden] { display: none; }
.chat-modal { display: flex; flex-direction: column; width: 100%; max-width: 32rem; height: 92dvh; overflow: hidden; border: 1px solid var(--border); border-radius: 1.5rem 1.5rem 0 0; background: var(--card); box-shadow: 0 25px 60px rgba(0,0,0,.4); }
@media (min-width: 640px) { .chat-overlay { align-items: center; padding: 1rem; } .chat-modal { height: 82vh; border-radius: 1.5rem; } }
.chat-header { position: relative; padding: 1rem 1rem .75rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--card) 80%, transparent); }
.chat-title { display: flex; align-items: center; gap: .75rem; }
.bot-avatar { position: relative; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: .75rem; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 68%, #000)); color: var(--primary-foreground); box-shadow: 0 8px 20px rgba(0,0,0,.2); flex: none; }
.bot-avatar svg { width: 20px; height: 20px; }
.chat-name { margin: 0; font-family: Manrope, Inter, sans-serif; font-size: .9375rem; font-weight: 700; line-height: 1.2; }
.chat-name span { color: var(--primary); }
.chat-subtitle { margin: 0; color: var(--muted-foreground); font-size: .75rem; }
.chat-header-actions { position: absolute; top: 1rem; right: 1rem; display: flex; align-items: center; gap: .35rem; }
.chat-quota-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 .625rem; border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.chat-quota-badge.empty { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); color: #f87171; }
.icon-button { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: .5rem; color: var(--muted-foreground); transition: background .2s, color .2s; }
.icon-button:hover { background: var(--secondary); color: var(--foreground); }
.icon-button svg { width: 18px; height: 18px; }
.chat-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .25rem; margin-top: .75rem; padding: .25rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--background) 60%, transparent); }
.chat-mode-switch button { padding: .375rem; border-radius: .5rem; color: var(--muted-foreground); font-size: .78125rem; font-weight: 600; }
.chat-mode-switch button.active { background: var(--primary); color: var(--primary-foreground); }
.chat-server-switch { display: flex; align-items: center; gap: .25rem; padding-top: .5rem; color: var(--muted-foreground); font-size: 11px; }
.chat-server-switch span { padding-right: .25rem; }
.chat-server-switch button { padding: .25rem .625rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--background) 60%, transparent); color: var(--muted-foreground); font-size: 11px; font-weight: 600; }
.chat-server-switch button.active { border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; }
.chat-message { display: flex; gap: .5rem; margin-bottom: .75rem; }
.chat-message.user { justify-content: flex-end; }
.chat-message.assistant .bot-avatar { width: 28px; height: 28px; }
.chat-message.assistant .bot-avatar svg { width: 16px; height: 16px; }
.chat-bubble { max-width: 82%; padding: .625rem .875rem; border-radius: 1rem; font-size: .84375rem; line-height: 1.625; white-space: pre-wrap; }
.chat-message.user .chat-bubble { border-bottom-right-radius: .375rem; background: var(--primary); color: var(--primary-foreground); }
.chat-message.assistant .chat-bubble { border: 1px solid var(--border); border-bottom-left-radius: .375rem; background: color-mix(in srgb, var(--background) 80%, transparent); white-space: normal; }
.chat-bubble .rule-chip { display: inline-flex; align-items: center; margin: 0 .125rem; padding: 0 .375rem; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: .375rem; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); font-weight: 600; }
.chat-bubble b { font-weight: 600; }
.typing { display: flex; gap: .375rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 1rem; border-bottom-left-radius: .375rem; background: color-mix(in srgb, var(--background) 80%, transparent); }
.typing span { width: 6px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--muted-foreground) 70%, transparent); animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
.chat-bubble.is-typing { display: flex; flex-direction: column; gap: .25rem; }
.chat-bubble.is-typing .typing { padding: 0; border: 0; border-radius: 0; background: transparent; }
.chat-progress { font-size: .75rem; color: var(--muted-foreground); animation: chat-progress-in .25s ease; }
@keyframes chat-progress-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat-progress { animation: none; } }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-login { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1.25rem; text-align: center; }
.chat-login-icon { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; border-radius: 1.125rem; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 68%, #000)); color: var(--primary-foreground); box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 28%, transparent); }
.chat-login-icon svg { width: 34px; height: 34px; }
.chat-login h3, .chat-login h4 { margin: 1rem 0 0; font-family: Manrope, Inter, sans-serif; font-size: 1.375rem; font-weight: 800; letter-spacing: -.015em; }
.chat-login h3 span, .chat-login h4 span { color: var(--primary); }
.chat-login > p { margin: .45rem 0 0; max-width: 22rem; color: var(--muted-foreground); font-size: .84375rem; line-height: 1.55; }
.chat-login ul { list-style: none; width: 100%; max-width: 22rem; margin: 1.125rem 0 0; padding: 0; text-align: left; }
.chat-login li { display: flex; align-items: center; gap: .625rem; margin-bottom: .5rem; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--background) 65%, transparent); color: color-mix(in srgb, var(--foreground) 88%, transparent); font-size: .8125rem; line-height: 1.35; }
.chat-login li:last-child { margin-bottom: 0; }
.chat-login li .feat-icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: .5rem; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); flex: none; }
.chat-login li .feat-icon svg { width: 15px; height: 15px; }
.chat-login-actions { display: flex; flex-direction: column; gap: .5rem; width: 100%; max-width: 22rem; margin-top: 1.25rem; }
.chat-login-actions button { height: 44px; padding: 0 1rem; border-radius: .75rem; background: var(--primary); color: var(--primary-foreground); font-size: .875rem; font-weight: 700; transition: transform .15s, background .2s, box-shadow .2s; }
.chat-login-actions button.quick-question { height: auto; min-height: 40px; padding: .55rem .875rem; border: 1px solid var(--border); background: color-mix(in srgb, var(--background) 75%, transparent); color: var(--foreground); font-size: .8125rem; font-weight: 600; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.chat-login-actions button.quick-question:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); transform: translateY(-1px); }
.chat-login-actions .guest-button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: 46px; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 82%, #d97706)); color: var(--primary-foreground); box-shadow: 0 10px 25px color-mix(in srgb, var(--primary) 28%, transparent); }
.chat-login-actions .guest-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 38%, transparent); }
.chat-login-actions .guest-button:disabled { opacity: .65; cursor: wait; }
.chat-login-actions .guest-button svg { width: 19px; height: 19px; flex: none; }
.chat-login-actions small { color: color-mix(in srgb, var(--muted-foreground) 75%, transparent); font-size: 11px; }
.chat-input-area { border-top: 1px solid var(--border); padding: .625rem .75rem .75rem; background: color-mix(in srgb, var(--card) 80%, transparent); }
.chat-input-row { display: flex; align-items: flex-end; gap: .5rem; }
.chat-input-row textarea { flex: 1; min-height: 42px; max-height: 112px; resize: none; padding: .625rem .875rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--background); color: var(--foreground); outline: none; font-size: .84375rem; }
.chat-input-row textarea:focus { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.send-button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 1rem; background: var(--primary); color: var(--primary-foreground); flex: none; }
.send-button svg { width: 18px; height: 18px; }
.send-button:disabled { opacity: .5; cursor: not-allowed; }
.chat-disclaimer { margin: .375rem 0 0; color: color-mix(in srgb, var(--muted-foreground) 65%, transparent); font-size: 11px; text-align: center; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; z-index: 100; transform: translateX(-50%); max-width: calc(100% - 2rem); padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--card); color: var(--foreground); box-shadow: var(--shadow); font-size: .875rem; text-align: center; }
.toast[hidden] { display: none; }
.empty-state { margin-top: 1rem; padding: 2rem; border: 1px dashed var(--border); border-radius: 1rem; color: var(--muted-foreground); text-align: center; font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.chat-bullet { margin: 0; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: 0; left: -9999px; z-index: 200; padding: .5rem 1rem; border-radius: 0 0 .75rem 0; background: var(--primary); color: var(--primary-foreground); font-size: .875rem; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ================= Yare Helper v2: стриминг, источники, избранное, PWA ================= */

/* --- Кликабельные ссылки на пункты в ответах ИИ --- */
.chat-bubble .rule-ref { cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.chat-bubble .rule-ref:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); border-color: color-mix(in srgb, var(--primary) 55%, transparent); transform: translateY(-1px); }
.chat-bubble .rule-ref:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }

/* --- Блок «Источники» под ответом --- */
.chat-sources { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin: .5rem 0 0; }
.chat-sources-label { color: color-mix(in srgb, var(--muted-foreground) 70%, transparent); font-size: 11px; }
.source-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); border-radius: .5rem; background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--primary); font-size: 11px; font-weight: 700; transition: background .15s, transform .15s, border-color .15s; }
.source-chip small { color: color-mix(in srgb, var(--muted-foreground) 85%, transparent); font-weight: 500; font-size: 10px; }
.source-chip:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); border-color: color-mix(in srgb, var(--primary) 50%, transparent); transform: translateY(-1px); }

/* --- Стриминг ответа (эффект печати) --- */
.chat-bubble.is-streaming { display: flex; flex-direction: column; gap: .25rem; border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.chat-bubble.is-streaming .stream-text p { margin: 0; }
.stream-caret { display: inline-block; width: 8px; height: 1em; margin-left: 2px; vertical-align: text-bottom; border-radius: 2px; background: var(--primary); animation: stream-caret 1s steps(2) infinite; }
@keyframes stream-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stream-caret { animation: none; } }

/* --- Звёздочка «в избранное» --- */
.result-card .fav-star { position: absolute; top: .55rem; right: .55rem; z-index: 2; display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: .5rem; color: var(--muted-foreground); opacity: .75; transition: color .15s, background .15s, opacity .15s, transform .15s; }
.result-card .fav-star svg { width: 16px; height: 16px; }
.result-card .fav-star:hover { opacity: 1; background: var(--secondary); color: var(--primary); transform: scale(1.08); }
.result-card .fav-star.active { color: var(--primary); opacity: 1; }
.result-card .fav-star.active svg { fill: color-mix(in srgb, var(--primary) 35%, transparent); }
.result-card > button:not(.fav-star) { padding-right: 2.75rem; }
.browser-entry { position: relative; }
.browser-entry > .fav-star.mini { position: absolute; top: .45rem; right: .45rem; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: .45rem; color: var(--muted-foreground); opacity: .45; transition: color .15s, background .15s, opacity .15s, transform .15s; }
.browser-entry > .fav-star.mini svg { width: 14px; height: 14px; }
.browser-entry > .fav-star.mini:hover { opacity: 1; background: var(--secondary); color: var(--primary); transform: scale(1.1); }
.browser-entry > .fav-star.mini.active { color: var(--primary); opacity: 1; }
.browser-entry > .fav-star.mini.active svg { fill: color-mix(in srgb, var(--primary) 35%, transparent); }
.browser-entry { padding-right: 2.25rem; }

/* --- Подсветка карточки при переходе из чата/избранного --- */
.result-card.flash { animation: result-flash 2.4s ease; }
@keyframes result-flash { 0%, 55% { border-color: color-mix(in srgb, var(--primary) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow); } 100% { border-color: var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.06); } }
@media (prefers-reduced-motion: reduce) { .result-card.flash { animation: none; border-color: color-mix(in srgb, var(--primary) 55%, transparent); } }

/* --- Кнопка избранного в шапке --- */
.favs-button { position: relative; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--muted-foreground); transition: color .15s, background .15s, border-color .15s; }
.favs-button svg { width: 18px; height: 18px; }
.favs-button:hover { color: var(--primary); background: var(--secondary); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.favs-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-size: 10px; font-weight: 800; line-height: 1; }

/* --- Панель избранного --- */
.favs-overlay { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.favs-panel { display: flex; flex-direction: column; width: min(24rem, 100%); height: 100%; overflow: hidden; border-left: 1px solid var(--border); background: var(--card); box-shadow: -20px 0 60px rgba(0,0,0,.35); animation: favs-slide-in .22s ease; }
@keyframes favs-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .favs-panel { animation: none; } }
.favs-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1rem .5rem; border-bottom: 1px solid var(--border); }
.favs-header h3 { margin: 0; font-family: Manrope, Inter, sans-serif; font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
.favs-header h3 span { color: var(--primary); }
.favs-header-actions { display: flex; align-items: center; gap: .375rem; }
.favs-clear { height: 32px; padding: 0 .75rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--muted-foreground); font-size: .75rem; font-weight: 600; transition: color .15s, border-color .15s; }
.favs-clear:hover { color: var(--destructive); border-color: color-mix(in srgb, var(--destructive) 45%, transparent); }
.favs-note { margin: 0; padding: .625rem 1rem 0; color: var(--muted-foreground); font-size: .75rem; }
.favs-list { flex: 1; overflow-y: auto; padding: .875rem 1rem 1.25rem; overscroll-behavior: contain; }
.favs-group-title { margin: .875rem 0 .5rem; color: var(--primary); font-size: .6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.favs-group-title:first-child { margin-top: 0; }
.favs-item { display: flex; align-items: stretch; gap: 0; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: .75rem; background: color-mix(in srgb, var(--background) 70%, transparent); overflow: hidden; transition: border-color .15s, transform .15s; }
.favs-item:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); transform: translateY(-1px); }
.favs-open { flex: 1; display: flex; flex-direction: column; gap: .125rem; padding: .625rem .75rem; text-align: left; min-width: 0; }
.favs-open .favs-num { color: var(--primary); font-size: .8125rem; font-weight: 800; }
.favs-open .favs-sec { color: var(--muted-foreground); font-size: .6875rem; }
.favs-open .favs-title { color: color-mix(in srgb, var(--foreground) 88%, transparent); font-size: .75rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.favs-remove { display: inline-flex; width: 40px; align-items: center; justify-content: center; border-left: 1px solid var(--border); color: var(--muted-foreground); transition: color .15s, background .15s; }
.favs-remove svg { width: 15px; height: 15px; }
.favs-remove:hover { color: var(--destructive); background: color-mix(in srgb, var(--destructive) 10%, transparent); }
.favs-empty { padding: 2rem 1.5rem; color: var(--muted-foreground); font-size: .875rem; text-align: center; line-height: 1.625; }

/* --- Кнопка установки PWA в футере --- */
.install-pwa { display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 1rem; margin: .25rem 0; border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-size: .8125rem; font-weight: 700; transition: background .15s, transform .15s; }
.install-pwa svg { width: 16px; height: 16px; }
.install-pwa:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); transform: translateY(-1px); }

/* === Ханипот против ботов: поле живёт в DOM, но полностью скрыто от человека === */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
