/* SB Sans — как developers.sber.ru (нужен на главной/расчёте без style.css) */
@font-face {
  font-family: "SB Sans Text";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansText/SBSansText-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Text";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansText/SBSansText-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Text";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansText/SBSansText-Semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Text";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansText/SBSansText-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Display";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansDisplay/SBSansDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Display";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansDisplay/SBSansDisplay-Semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SB Sans Display";
  src: url("https://cdn-app.sberdevices.ru/shared-static/0.0.0/fonts/SBSansDisplay/SBSansDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Спокойный «банковский» зелёный, без оранжевого */
  --bg: #f3f6f5;
  --surface: #ffffff;
  --text: #0a1f18;
  --muted: #5a6b64;
  --line: rgba(10, 40, 30, 0.09);
  --accent: #1a9f4b;
  --accent-hover: #15803d;
  --accent-soft: #e8f8ef;
  --teal: #12a38a;
  --teal-deep: #0b7a68;
  --dark: #0d291f;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 12px 40px rgba(13, 41, 31, 0.06);
  --font-sans: "SB Sans Text", Roboto, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "SB Sans Display", "SB Sans Text", Roboto, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font: var(--font-sans);
  --max: 1040px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
::selection { background: rgba(26, 159, 75, 0.22); color: var(--text); }
.is-hidden { display: none !important; }

.page { max-width: var(--max); margin: 0 auto; padding: 16px 16px 48px; }

/* ===== Capsule nav (Sber-like) ===== */
.nav-wrap {
  position: sticky;
  top: 12px;
  z-index: 100;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.nav-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: var(--max);
  padding: 8px 10px 8px 12px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(16, 40, 32, 0.06);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  flex-shrink: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #22c55e, #15803d);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
}
.brand-name { font-size: 0.95rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-links button:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-links button.is-active {
  background: var(--dark);
  color: #fff;
}
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 159, 75, 0.28);
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #1a3d32; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(0,0,0,0.03); }

.screen { display: none; animation: rise 0.35s ease; }
.screen.is-on { display: block; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 12px 28px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin-bottom: 14px;
}
.hero-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 480px;
  margin: 0 auto 28px;
}

.search-card { max-width: 640px; margin: 0 auto; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
}
.search-field:focus-within {
  border-color: var(--accent, #1a9f4b);
  box-shadow: 0 0 0 3px var(--accent-soft, #e8f8ef);
}
.search-ico { color: var(--muted); flex-shrink: 0; }
.search-field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  min-width: 0;
  padding: 10px 4px;
  color: var(--text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
}
.chip:hover {
  border-color: rgba(26, 159, 75, 0.4);
  color: var(--text);
  background: var(--accent-soft);
}

/* Soft cards — Sber signature */
.card-soft {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 36px 36px 36px 40px;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f0faf8 100%);
}
.feature-hero-text { position: relative; z-index: 1; align-self: center; }
.feature-hero-text h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.feature-hero-text p {
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 360px;
}
.feature-hero-art {
  position: relative;
  min-height: 200px;
}
.blob {
  position: absolute;
  border-radius: 28px;
}
.blob-1 {
  width: 70%; height: 55%;
  right: 8%; top: 28%;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  opacity: 0.85;
  transform: rotate(-8deg);
}
.blob-2 {
  width: 48%; height: 42%;
  right: 28%; top: 12%;
  background: linear-gradient(160deg, #99f6e4, #2dd4bf);
  opacity: 0.7;
  transform: rotate(12deg);
}
.slab {
  position: absolute;
  width: 36%; height: 48%;
  right: 18%; top: 18%;
  background: linear-gradient(180deg, #e5e7eb, #9ca3af);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  transform: perspective(400px) rotateY(-12deg) rotateX(8deg);
}
.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #5eead4, #0d9488);
  box-shadow: inset -4px -6px 12px rgba(0,0,0,0.15);
}
.orb-a { width: 28px; height: 28px; right: 12%; bottom: 22%; }
.orb-b { width: 18px; height: 18px; right: 42%; bottom: 18%; opacity: 0.8; }
.orb-c { width: 14px; height: 14px; right: 55%; top: 20%; opacity: 0.6; }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.feature-tile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 28px;
  align-items: center;
}
.feature-tile h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.feature-tile p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.mini-art {
  width: 120px;
  height: 100px;
  border-radius: 20px;
  flex-shrink: 0;
}
.mini-art-green {
  background:
    linear-gradient(135deg, transparent 40%, rgba(16,185,129,0.3)),
    linear-gradient(160deg, #34d399, #059669);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.25);
  transform: rotate(6deg);
}
.mini-art-glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(148,163,184,0.35));
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 12px 28px rgba(100, 116, 139, 0.2);
  transform: rotate(-6deg);
}

.block { margin-bottom: 40px; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.block-head h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.text-link {
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.text-link:hover { color: var(--accent-hover); }

.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.idea-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.idea-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.idea-cover {
  height: 112px;
  background: linear-gradient(135deg, #0f3d32, #1a9f4b);
}
.idea-cover.c2 { background: linear-gradient(135deg, #1e3a5f, #38bdf8); }
.idea-cover.c3 { background: linear-gradient(135deg, #14532d, #22c55e); }
.idea-cover.c4 { background: linear-gradient(135deg, #14532d, #84cc16); }
.idea-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.idea-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
}
.idea-body h3 { font-size: 1.05rem; letter-spacing: -0.015em; }
.idea-body p { color: var(--muted); font-size: 0.88rem; flex: 1; }
.idea-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.idea-meta strong { color: var(--text); font-weight: 600; }

.tools-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tool-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}
.tool-card:hover {
  border-color: rgba(26, 159, 75, 0.35);
  box-shadow: var(--shadow);
}
.tool-ico {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #ecfdf5;
  color: var(--teal-deep);
  font-weight: 700;
  margin-bottom: 12px;
}
.tool-card strong { display: block; margin-bottom: 4px; }
.tool-card span { color: var(--muted); font-size: 0.85rem; }

/* Inner pages */
.back {
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  margin: 20px 0 12px;
  padding: 4px 0;
}
.back:hover { color: var(--text); }
.page-h {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.page-lead { color: var(--muted); margin-bottom: 20px; }

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 20px;
}
.seg-item {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}
.seg-item.is-on {
  background: var(--dark);
  color: #fff;
}

.picker-box { padding: 28px; }
.progress {
  height: 6px;
  background: #e8eeec;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress span {
  display: block;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--accent), #34d399);
  transition: width 0.25s ease;
}
.picker-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.picker-box h2 { font-size: 1.25rem; margin-bottom: 16px; letter-spacing: -0.02em; }
.picker-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.opt {
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fafbfb;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 500;
}
.opt:hover, .opt.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.picker-nav { display: flex; justify-content: space-between; gap: 12px; }
.picker-out { margin-top: 20px; }
.match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.match:hover { border-color: rgba(245,158,11,0.5); }
.match-score { font-weight: 800; color: var(--accent-hover); }

.article-stack { display: flex; flex-direction: column; gap: 12px; }
.article-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.article-card:hover { box-shadow: var(--shadow); }
.article-thumb {
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e, #34d399);
  min-height: 80px;
}
.article-card h3 { font-size: 1rem; margin-bottom: 6px; }
.article-card p { color: var(--muted); font-size: 0.88rem; }

.calc { padding: 28px; display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.field input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fafbfb;
  font-weight: 500;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}
.calc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.calc-metrics span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.calc-metrics strong { font-size: 1.15rem; }

.idea-page { padding: 28px; }
.idea-page h1 { font-size: 1.55rem; letter-spacing: -0.03em; margin-bottom: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  background: #f0faf8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-deep);
}
.idea-page .block-t { margin-bottom: 16px; }
.idea-page .block-t h3 { font-size: 0.95rem; margin-bottom: 6px; }
.idea-page ul { padding-left: 1.15em; color: var(--muted); }
.idea-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.footer {
  text-align: center;
  padding: 36px 12px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer .dot { margin: 0 6px; opacity: 0.5; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .feature-hero { grid-template-columns: 1fr; padding: 28px; }
  .feature-hero-art { min-height: 140px; }
  .feature-grid { grid-template-columns: 1fr; }
  .tools-row { grid-template-columns: 1fr; }
  .search-field { flex-wrap: wrap; border-radius: 20px; }
  .search-field .btn { width: 100%; }
  .calc-metrics { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
}

.muted-line{color:var(--muted);padding:12px 0;}
.shell-body .footer a{color:var(--muted);text-decoration:none;margin:0 2px;}
.shell-body .footer a:hover{color:var(--accent-hover);}

/* Profile sheet */
.profile-sheet {
  position: fixed;
  right: 16px;
  top: 72px;
  width: min(340px, calc(100vw - 24px));
  z-index: 220;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 999px; background: var(--line);
  margin: 0 auto 14px; cursor: pointer;
}
.profile-sheet-head {
  display: flex; gap: 12px; align-items: center; margin-bottom: 14px;
}
.profile-ava {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, #22c55e, #15803d);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.profile-actions { display: flex; flex-direction: column; gap: 8px; }
.profile-actions .btn { width: 100%; justify-content: center; }

/* Mobile capsule */
.mobile-capsule {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 90;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: 0 10px 32px rgba(13, 41, 31, 0.12);
  gap: 2px;
  max-width: calc(100vw - 20px);
}
.m-item {
  border: none; background: transparent; border-radius: 999px;
  padding: 10px 14px; font-size: 0.72rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 64px;
}
.m-item span { font-size: 1rem; line-height: 1; }
.m-item.is-on { background: var(--dark); color: #fff; }
[data-theme="dark"] .mobile-capsule { background: rgba(21,32,27,0.92); }
[data-theme="dark"] .m-item.is-on { background: #e8f0ec; color: #0c1411; }

@media (max-width: 800px) {
  .mobile-capsule { display: flex; }
  .page { padding-bottom: 88px; }
  .nav-links { display: none; }
}

.page { padding-bottom: 24px; }


/* ===== Magnetic nav indicator ===== */
.shell-nav-links, .nav-links {
  position: relative;
}
.nav-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  height: 36px;
  width: 72px;
  border-radius: 999px;
  background: var(--dark, #0d291f);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, -50%, 0);
  transition: none;
  box-shadow: none;
}
.nav-indicator.is-ready { opacity: 1; }
.shell-nav-item, .nav-links > a.shell-nav-item, .nav-links > button {
  position: relative;
  z-index: 1;
}
.shell-nav-item {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.shell-nav-item:hover { color: var(--text); }
.shell-nav-item.is-active { color: #fff; font-weight: 600; }
.nav-links button.is-active { color: #fff !important; background: transparent !important; }

/* When indicator is green, active text white */
.shell-nav-links .shell-nav-item.is-active,
#shellNavLinks .shell-nav-item.is-active {
  color: #fff;
}

/* ===== Footer ===== */
.shell-footer {
  margin-top: 48px;
  padding: 40px 20px 28px;
  background: #0d291f;
  color: rgba(255,255,255,0.78);
  border-radius: 24px 24px 0 0;
}
.shell-footer a { color: rgba(255,255,255,0.78); text-decoration: none; display: block; margin: 6px 0; font-size: 0.9rem; }
.shell-footer a:hover { color: #fff; }
.shell-footer-inner {
  max-width: 1040px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px;
}
.shell-footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.shell-footer-brand p { margin-top: 6px; font-size: 0.88rem; opacity: 0.75; }
.shell-footer-brand strong { color: #fff; }
.shell-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shell-footer-cols h4 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; opacity: 0.9; }
.shell-footer-copy { max-width: 1040px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; opacity: 0.55; text-align: center; }
[data-theme="dark"] .shell-footer { background: #060d0a; }

/* ===== Auth modal animations ===== */
.modal-bg {
  position: fixed; inset: 0; background: rgba(10, 30, 24, 0.45);
  z-index: 1200; opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(6px);
}
.modal-bg.is-open { opacity: 1; pointer-events: auto; }
/* Только окно входа shell — не трогаем .modal.idea-modal */
#shellAuthModal.modal {
  position: fixed; left: 50%; top: 50%; z-index: 1210;
  width: min(400px, 92vw); padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transform: translate(-50%, -42%) scale(0.92);
  opacity: 0; pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.16, 1.1, 0.3, 1),
    opacity 0.28s ease,
    height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity, height;
  border-radius: 24px;
  background: var(--surface, #fff);
}
#shellAuthModal.modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; pointer-events: auto;
}
.field input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field input:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}

/* Legacy page under shell */
.shell-site header.navbar { display: none !important; }
.shell-site .bottom-nav { display: none !important; }
.shell-site main, .shell-site .page-content, .shell-site .container {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}
.shell-site .footer:not(.shell-footer) { display: none; }
body.shell-site { background: var(--bg); padding-bottom: 24px; }
@media (max-width: 800px) {
  body.shell-site { padding-bottom: 96px; }
  .shell-footer-inner { grid-template-columns: 1fr; }
}

.shell-nav-wrap { margin-bottom: 12px; }
#shellChromeRoot { position: relative; z-index: 2000; }

/* Sticky shell layout */
html.shell-site, body.shell-site {
  min-height: 100%;
}
body.shell-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.35s ease, color 0.35s ease;
}
body.shell-site > #shellChromeRoot { flex: 0 0 auto; }
body.shell-site > main,
body.shell-site > .page,
body.shell-site > .shell-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
body.shell-site > #shellFooter,
body.shell-site > .shell-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  max-width: none;
  border-radius: 0;
}

.nav-wrap.is-sticky,
.shell-nav-wrap.is-sticky {
  position: sticky;
  top: 12px;
  z-index: 100;
}

/* Theme smooth */
html.theme-animating,
html.theme-animating body,
html.theme-animating .card-soft,
html.theme-animating .nav-capsule,
html.theme-animating .shell-footer {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

/* Dark: feature cards readable */
[data-theme="dark"] .feature-hero {
  background: linear-gradient(145deg, #1a2822 0%, #15201c 100%) !important;
}
[data-theme="dark"] .feature-hero-text h2,
[data-theme="dark"] .feature-tile h3 {
  color: var(--text) !important;
}
[data-theme="dark"] .feature-hero-text p,
[data-theme="dark"] .feature-tile p {
  color: var(--muted) !important;
}
[data-theme="dark"] .feature-tile,
[data-theme="dark"] .card-soft {
  background: var(--surface);
  color: var(--text);
}
[data-theme="dark"] .feature-tile .btn-dark {
  background: #e8f0ec;
  color: #0c1411;
}

/* Hide legacy hard */
.shell-site header.navbar,
.shell-site .navbar,
.shell-site [data-shell-hidden],
.shell-site .bottom-nav,
.shell-site #bottomNav {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.shell-site a.btn { text-decoration: none; }


/* Fixed capsule nav — всегда на месте */
.shell-nav-wrap.is-fixed,
#shellNavWrap.is-fixed {
  position: fixed !important;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none;
}
#shellNavWrap.is-fixed .nav-capsule {
  pointer-events: auto;
  margin-left: auto;
  margin-right: auto;
}
body.shell-site {
  padding-top: 72px !important;
  padding-bottom: 0 !important;
}
@media (max-width: 800px) {
  body.shell-site {
    padding-bottom: 88px !important;
  }
}

/* Полные переменные тёмной темы */
[data-theme="dark"] {
  --bg: #0c1411 !important;
  --surface: #15201b !important;
  --text: #e8f0ec !important;
  --muted: #8aa399 !important;
  --line: rgba(255,255,255,0.08) !important;
  --dark: #e8f0ec !important;
  --accent-soft: #143528 !important;
  color-scheme: dark;
}
[data-theme="dark"] body,
[data-theme="dark"] .shell-body {
  background: var(--bg) !important;
  color: var(--text) !important;
}
[data-theme="dark"] .nav-capsule {
  background: rgba(21, 32, 27, 0.78) !important;
}
[data-theme="dark"] .btn-dark {
  background: #e8f0ec !important;
  color: #0c1411 !important;
}
[data-theme="dark"] .shell-nav-item.is-active {
  color: #fff !important;
}

/* style.css не должен показывать старый navbar */
body.shell-site > header.navbar,
body.shell-site header.navbar {
  display: none !important;
}


/* ===== Idea modal: центр, ровные углы, без полосы скролла ===== */
.modal-backdrop#ideaBackdrop,
.modal-backdrop {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1100 !important;
  padding: 24px !important;
}
.modal-backdrop .modal.idea-modal,
.modal.idea-modal {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 auto !important;
  transform: translateY(12px) scale(0.98) !important;
  width: min(520px, 92vw) !important;
  max-width: 520px !important;
  max-height: min(82vh, 680px) !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  padding: 28px 28px 24px !important;
  box-sizing: border-box;
}
.modal-backdrop.active .modal.idea-modal {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
}
.idea-modal #ideaModalBody {
  max-height: min(70vh, 560px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.idea-modal #ideaModalBody::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
@media (max-width: 760px) {
  .modal-backdrop {
    align-items: flex-end !important;
  }
  .modal-backdrop .modal.idea-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: min(88vh, 720px) !important;
    transform: translateY(20px) !important;
  }
  .modal-backdrop.active .modal.idea-modal {
    transform: translateY(0) !important;
  }
}

/* ===== Сетка идей по центру ===== */
body.shell-site > main.detail-main--wide {
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}
.ideas-page-layout {
  width: 100%;
  margin: 0 auto;
}
.grid-cards {
  justify-content: center;
  justify-items: stretch;
}

/* ===== Капсула активная — тёмная (не зелёная), без «магнита» ===== */
.nav-indicator {
  background: var(--dark, #0d291f) !important;
  box-shadow: none !important;
  transition: none !important;
}
.shell-nav-item.is-active {
  color: #fff !important;
  font-weight: 600;
}
[data-theme="dark"] .nav-indicator {
  background: #e8f0ec !important;
}
[data-theme="dark"] .shell-nav-item.is-active {
  color: #0c1411 !important;
}

/* ===== 2. Back circle left of navbar ===== */
.shell-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 12px;
  pointer-events: none;
}
.shell-nav-row .nav-capsule,
.shell-nav-row .shell-back-btn {
  pointer-events: auto;
}
.shell-back-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line, rgba(10,40,30,0.09));
  color: var(--text, #0a1f18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(13, 41, 31, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.2s ease, transform 0.15s ease;
}
.shell-back-btn:hover {
  background: #fff;
  transform: scale(1.04);
}
[data-theme="dark"] .shell-back-btn {
  background: rgba(21, 32, 27, 0.85);
  color: #e8f0ec;
  border-color: rgba(255,255,255,0.08);
}

/* ===== 5–6. Navbar more transparent + scrim gradient only at top ===== */
.nav-capsule {
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
}
[data-theme="dark"] .nav-capsule {
  background: rgba(21, 32, 27, 0.62) !important;
}
.shell-nav-scrim {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 999;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(15, 30, 25, 0.14) 0%,
    rgba(15, 30, 25, 0.06) 45%,
    transparent 100%
  );
}
[data-theme="dark"] .shell-nav-scrim {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.12) 50%,
    transparent 100%
  );
}

/* ===== 3. Close button top-right ===== */
#shellAuthModal .modal-x,
.modal-x {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 50% !important;
  color: #5a6b64 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer;
  padding: 0 !important;
  transition: transform 0.25s ease, color 0.2s ease, background 0.2s ease;
}
#shellAuthModal .modal-x:hover {
  color: #0a1f18 !important;
  background: rgba(0,0,0,0.05) !important;
  transform: rotate(90deg);
}

/* ===== 4. Auth actions: primary + text link ===== */
.auth-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.auth-text-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted, #5a6b64);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.auth-text-link:hover {
  color: var(--accent-hover, #15803d);
  border-bottom-color: currentColor;
}
.auth-actions-row.is-signup {
  flex-direction: row;
  align-items: center;
}

/* ===== 7. Theme button spin + expand veil ===== */
.shell-theme-btn {
  position: relative;
  overflow: visible;
}
.shell-theme-btn .theme-ico {
  display: grid;
  place-items: center;
  line-height: 0;
}
.shell-theme-btn .theme-ico-sun { display: none; }
.shell-theme-btn.is-dark .theme-ico-moon { display: none; }
.shell-theme-btn.is-dark .theme-ico-sun { display: grid; }
.shell-theme-btn.is-spinning {
  animation: themeSpin 0.55s cubic-bezier(0.4, 0.0, 0.2, 1);
}
@keyframes themeSpin {
  0% { transform: rotateY(0deg) scaleX(1); }
  40% { transform: rotateY(90deg) scaleX(0.55); }
  50% { transform: rotateY(180deg) scaleX(0.35); }
  60% { transform: rotateY(270deg) scaleX(0.55); }
  100% { transform: rotateY(360deg) scaleX(1); }
}
.theme-veil {
  position: fixed;
  left: var(--tx, 50%);
  top: var(--ty, 50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5000;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.theme-veil.is-on {
  opacity: 1;
  width: calc(var(--tr, 100vmax) * 2);
  height: calc(var(--tr, 100vmax) * 2);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.15s ease;
}
.theme-veil-dark {
  background: #0c1411;
}
.theme-veil-light {
  background: #f3f6f5;
}

/* ===== 8. Dark theme cards / search lighter than bg ===== */
[data-theme="dark"] {
  --bg: #0c1411 !important;
  --surface: #1a2621 !important;
  --text: #f2f7f4 !important;
  --muted: #9aafa4 !important;
}
[data-theme="dark"] body,
[data-theme="dark"] .shell-body {
  background: #0c1411 !important;
  color: #f2f7f4 !important;
}
[data-theme="dark"] .card,
[data-theme="dark"] .idea-card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .card-soft,
[data-theme="dark"] .feature-tile,
[data-theme="dark"] .feature-hero,
[data-theme="dark"] .ideas-filter-sidebar,
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .sort-dropdown,
[data-theme="dark"] .sort-dropdown-btn {
  background: #1a2621 !important;
  color: #f2f7f4 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .card h3,
[data-theme="dark"] .idea-card h3,
[data-theme="dark"] .article-card h3,
[data-theme="dark"] .card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] h1, [data-theme="dark"] h2 {
  color: #fff !important;
}
[data-theme="dark"] .card p,
[data-theme="dark"] .idea-card p,
[data-theme="dark"] .article-card p,
[data-theme="dark"] .text-muted {
  color: #9aafa4 !important;
}
[data-theme="dark"] input,
[data-theme="dark"] .ideas-search-wrap,
[data-theme="dark"] .search-field,
[data-theme="dark"] .search-card {
  background: #1a2621 !important;
  color: #f2f7f4 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
[data-theme="dark"] input::placeholder {
  color: #7a9086 !important;
}
[data-theme="dark"] .btn-dark {
  background: #e8f0ec !important;
  color: #0c1411 !important;
}

/* Hide leftover "На главную" text links */
a.back-link, .back-to-home, .detail-back {
  display: none !important;
}

a[href="index.html"]:not(.nav-brand):not(.shell-back-btn):not(.shell-nav-item),
a[href="../index.html"]:not(.nav-brand):not(.shell-back-btn):not(.shell-nav-item) {
  /* keep visible unless it is only back text - handled per page */
}

/* ===== 9. Footer simplified ===== */
.shell-footer {
  margin-top: auto;
  padding: 36px 20px 28px;
  background: #0d291f;
  color: rgba(255,255,255,0.72);
  border-radius: 0;
}
.shell-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.shell-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shell-footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
}
.shell-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.shell-footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.18s ease, opacity 0.18s ease;
}
.shell-footer-links a:hover {
  color: rgba(255,255,255,0.95);
}
.shell-footer-copy,
.shell-footer h4,
.shell-footer-cols h4 {
  display: none !important;
}
/* hide duplicate old footers */
body.shell-site .site-footer,
body.shell-site footer:not(.shell-footer) {
  display: none !important;
}

/* ===== 10. Scrollbar ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: #3d5c4f #e8eeec;
}
html::-webkit-scrollbar {
  width: 10px;
}
html::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
html::-webkit-scrollbar-track {
  background: #e8eeec;
  margin-block: 12vh; /* ~20%–80% visual track */
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb {
  background: #3d5c4f;
  border-radius: 999px;
  border: 2px solid #e8eeec;
}
html::-webkit-scrollbar-thumb:hover {
  background: #2f4a40;
}
[data-theme="dark"] {
  scrollbar-color: #4a6b5c #15201b;
}
[data-theme="dark"] html::-webkit-scrollbar-track {
  background: #15201b;
}
[data-theme="dark"] html::-webkit-scrollbar-thumb {
  background: #4a6b5c;
  border-color: #15201b;
}

/* ===== 11. No text select on nav & cards ===== */
.nav-capsule,
.shell-nav-row,
.shell-back-btn,
.idea-card,
.article-card,
.card,
.card-soft,
.feature-tile,
.feature-hero {
  -webkit-user-select: none;
  user-select: none;
}

/* ===== 12. "Все" like section title ===== */
.text-link,
a.text-link {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  opacity: 1;
}
.text-link:hover {
  opacity: 0.7;
}

/* ===== 13. Avatar button + profile pop ===== */
.shell-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line, rgba(10,40,30,0.1));
  background: var(--surface, #fff);
  color: var(--text, #0a1f18);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.shell-avatar-btn-sm {
  width: 36px;
  height: 36px;
}
.shell-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shell-avatar-fallback {
  display: grid;
  place-items: center;
}
.nav-right {
  position: relative;
}
.shell-profile-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(260px, 86vw);
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(10,40,30,0.1));
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(13,41,31,0.12);
  padding: 14px;
  z-index: 1300;
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.shell-profile-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.shell-profile-pop-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.shell-profile-pop-text strong {
  font-size: 0.95rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-profile-pop-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 4px;
}
.shell-pop-link {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.shell-pop-link:hover {
  background: rgba(0,0,0,0.05);
}
.shell-pop-link.danger {
  color: #b91c1c;
}
[data-theme="dark"] .shell-profile-pop {
  background: #1a2621;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .shell-pop-link:hover {
  background: rgba(255,255,255,0.06);
}

/* ===== 14. Slightly smaller navbar ===== */
.nav-capsule {
  padding: 5px 8px 5px 12px !important;
  min-height: 48px;
}
.shell-nav-item {
  padding: 8px 12px !important;
  font-size: 0.86rem !important;
}
.brand-mark {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.65rem !important;
}
.brand-name {
  font-size: 0.95rem !important;
}

/* ===== 15–16. Legal checks, password, hints ===== */
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap input {
  width: 100%;
  padding-right: 42px !important;
}
.pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted, #5a6b64);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}
.pass-toggle .is-hidden { display: none !important; }
.forgot-link {
  display: inline-block;
  margin: 4px 0 0 auto;
  font-size: 0.85rem;
  width: 100%;
  text-align: right;
}
.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -4px 0 10px;
}
.field-hint.is-bad { color: #b91c1c; }
.field-hint.is-ok { color: #15803d; }
.auth-err.is-ok-msg { color: #15803d !important; }

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
}
.legal-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.legal-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #5a6b64;
  margin-top: 1px;
  position: relative;
  background: transparent;
  transition: border-color 0.25s ease;
}
.legal-box::before {
  content: '';
  position: absolute;
  inset: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent, #1a9f4b);
  transform: translate(-50%, -50%);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.legal-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.2s ease 0.12s, opacity 0.2s ease 0.12s;
}
.legal-check input:checked + .legal-box {
  border-color: transparent;
}
.legal-check input:checked + .legal-box::before {
  width: 100%;
  height: 100%;
}
.legal-check input:checked + .legal-box::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}
.legal-text a {
  color: var(--accent-hover, #15803d);
  text-decoration: underline;
}
#shellAuthSignupFields.is-hidden,
#shellAuthLoginFields.is-hidden {
  display: none !important;
}
#shellAuthModal {
  max-height: min(90vh, 640px);
  overflow-y: auto;
  scrollbar-width: none;
}
#shellAuthModal::-webkit-scrollbar { display: none; }

/* ===== Fixes: theme reveal as site (not solid disk) ===== */
@property --theme-r {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
html.theme-circle-reveal body {
  /* невидимая круглая «рамка»: снаружи старый вид через изоляцию не нужен —
     тема уже применена, круг лишь clip-path расширения */
  clip-path: circle(var(--theme-r, 0px) at var(--theme-cx, 50%) var(--theme-cy, 50%));
}
/* fallback without @property */
html.theme-circle-reveal body {
  will-change: clip-path;
}

/* Remove solid veil look */
.theme-veil { display: none !important; }

/* ===== Search card: contain bg in dark ===== */
.search-card {
  overflow: hidden;
  border-radius: 28px;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.search-field {
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface, #fff);
}
.chips {
  background: transparent !important;
  padding: 10px 4px 0;
}
[data-theme="dark"] .search-card {
  background: transparent !important;
  box-shadow: none !important;
}
[data-theme="dark"] .search-field {
  background: #1a2621 !important;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== Navbar size restored ===== */
.nav-capsule {
  padding: 8px 10px 8px 14px !important;
  min-height: 56px !important;
}
.shell-nav-item {
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
}
.brand-mark {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.7rem !important;
}
.brand-name {
  font-size: 1rem !important;
}

/* ===== Scrim only under navbar width + side fade ===== */
.shell-nav-scrim {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(1040px, calc(100% - 24px)) !important;
  height: 76px !important;
  background: linear-gradient(
    to bottom,
    rgba(15, 30, 25, 0.12) 0%,
    rgba(15, 30, 25, 0.05) 55%,
    transparent 100%
  ) !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
[data-theme="dark"] .shell-nav-scrim {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    transparent 100%
  ) !important;
}

/* ===== Footer full structure again (single block) ===== */
.shell-footer {
  margin-top: auto;
  padding: 40px 20px 32px !important;
  background: #0d291f !important;
  color: rgba(255,255,255,0.78);
}
.shell-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: 1.2fr 1fr !important;
  gap: 28px !important;
  align-items: start;
}
.shell-footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.shell-footer-brand p {
  margin-top: 6px;
  font-size: 0.88rem;
  opacity: 0.75;
  display: block !important;
}
.shell-footer-brand strong {
  color: #fff;
  display: block;
}
.shell-footer-cols {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.shell-footer-cols h4 {
  display: block !important;
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  opacity: 0.9;
}
.shell-footer-cols a {
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  display: block;
  margin: 6px 0;
  font-size: 0.9rem;
  transition: color 0.18s ease;
}
.shell-footer-cols a:hover {
  color: rgba(255,255,255,0.95);
}
.shell-footer-copy,
.shell-footer-links {
  display: none !important;
}
@media (max-width: 800px) {
  .shell-footer-inner {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Profile pop: glass like nav, animation from avatar ===== */
.shell-profile-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, 86vw);
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(10, 40, 30, 0.1);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(13, 41, 31, 0.12);
  padding: 12px;
  z-index: 1300;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.86) translateY(-8px);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.shell-profile-pop:not(.is-hidden) {
  pointer-events: auto;
}
.shell-profile-pop.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
}
[data-theme="dark"] .shell-profile-pop {
  background: rgba(21, 32, 27, 0.78) !important;
  border-color: rgba(255,255,255,0.08);
}
.shell-profile-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.shell-profile-pop-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.shell-pop-login-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center;
}
.shell-pop-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.shell-pop-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

/* ===== Auth spacing, forgot underline, legal box ===== */
#shellAuthModal h2 {
  margin-bottom: 20px !important;
}
#shellAuthModal .field {
  margin-bottom: 14px;
}
#shellAuthModal .field + .field {
  margin-top: 4px;
}
.field-hint {
  margin: 8px 0 14px !important;
}
.forgot-link {
  display: inline-block !important;
  width: auto !important;
  margin: 2px 0 8px auto !important;
  text-align: left !important;
  border-bottom: 1px solid currentColor;
  padding: 0;
  align-self: flex-end;
}
#shellAuthLoginFields {
  display: flex;
  flex-direction: column;
}
.legal-box {
  width: 16px !important;
  height: 16px !important;
  border-radius: 5px !important;
  border: 1.5px solid #5a6b64;
  margin-top: 3px;
}
.legal-box::after {
  left: 4px !important;
  top: 1px !important;
  width: 4px !important;
  height: 8px !important;
  border-width: 0 1.5px 1.5px 0 !important;
}
.legal-check {
  gap: 8px !important;
  font-size: 0.84rem !important;
}


.theme-snap {
  position: fixed;
  inset: 0;
  z-index: 4000;
  pointer-events: none;
  /* цвет = фон ПРЕЖНЕЙ темы; дыра расширяется → виден новый сайт */
}


/* ===== CRITICAL FIXES: nav clickable, short scrim, profile glass ===== */
#shellChromeRoot {
  position: relative;
  z-index: 2000 !important;
}
.shell-nav-wrap.is-fixed,
#shellNavWrap.is-fixed {
  z-index: 2001 !important;
  pointer-events: none !important;
}
#shellNavWrap.is-fixed .nav-capsule,
#shellNavWrap.is-fixed .shell-back-btn,
#shellNavWrap.is-fixed .shell-nav-row {
  pointer-events: auto !important;
}
.shell-nav-row {
  pointer-events: auto !important;
}
.nav-capsule {
  overflow: visible !important;
  position: relative;
  z-index: 2;
}
.nav-right {
  position: relative;
  overflow: visible !important;
  z-index: 3;
}

/* Scrim shorter + only under capsule width */
.shell-nav-scrim {
  height: 52px !important;
  top: 0 !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(1040px, calc(100% - 32px)) !important;
  z-index: 1999 !important;
  pointer-events: none !important;
  background: linear-gradient(
    to bottom,
    rgba(15, 30, 25, 0.1) 0%,
    rgba(15, 30, 25, 0.04) 60%,
    transparent 100%
  ) !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
[data-theme="dark"] .shell-nav-scrim {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0%,
    rgba(0, 0, 0, 0.08) 60%,
    transparent 100%
  ) !important;
}

/* Profile pop: glass + symmetric anim + gap from nav */
.shell-profile-pop {
  position: absolute !important;
  top: calc(100% + 14px) !important;
  right: 0 !important;
  width: min(280px, 86vw) !important;
  padding: 12px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(10, 40, 30, 0.1) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  box-shadow: 0 12px 40px rgba(13, 41, 31, 0.12) !important;
  transform-origin: top right !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.88) translateY(-10px) !important;
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.22s !important;
  z-index: 2100 !important;
  display: block !important; /* override is-hidden display:none */
}
.shell-profile-pop.is-hidden {
  display: block !important; /* animated via opacity, not display */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.88) translateY(-10px) !important;
}
.shell-profile-pop.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) translateY(0) !important;
}
[data-theme="dark"] .shell-profile-pop {
  background: rgba(21, 32, 27, 0.82) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* theme snap never blocks clicks */
.theme-snap {
  pointer-events: none !important;
}

/* Не скрывать сетки каталога даже если когда-то попали в старый header */
.shell-site #ideasGrid,
.shell-site #articlesPageGrid,
.shell-site .grid-cards,
.shell-site main.detail-main {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
.shell-site #ideasGrid.grid-cards,
.shell-site #articlesPageGrid.grid-cards {
  display: grid !important;
}

.shell-site #ideasGrid,
.shell-site #articlesPageGrid,
.shell-site main.detail-main {
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
.shell-site #ideasGrid.grid-cards,
.shell-site #articlesPageGrid.grid-cards {
  display: grid !important;
}

/* Always kill legacy navbar when shell is present */
html.shell-site header.navbar,
body.shell-site header.navbar,
.shell-site header.navbar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
/* Indicator: dark pill, no green flash */
#shellNavIndicator.nav-indicator,
.nav-indicator {
  background: var(--dark, #0d291f) !important;
  box-shadow: none !important;
}
[data-theme="dark"] #shellNavIndicator.nav-indicator {
  background: #e8f0ec !important;
}

/* ALWAYS_KILL_LEGACY_NAV */
html.shell-site header.navbar,
body.shell-site header.navbar {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.shell-site #articlesPageGrid.grid-cards,
.shell-site #ideasGrid.grid-cards {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 120px;
}

/* ===== Dark theme: forms on match + settings ===== */
[data-theme="dark"] .match-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .settings-panel,
[data-theme="dark"] .card-soft,
[data-theme="dark"] .idea-match-form,
[data-theme="dark"] form.card,
[data-theme="dark"] .settings-content > div,
[data-theme="dark"] .settings-main .card {
  background: #15201b !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .field input,
[data-theme="dark"] .field select {
  background: #0c1411 !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #6b857a !important;
}
[data-theme="dark"] label,
[data-theme="dark"] .field,
[data-theme="dark"] .settings-hint,
[data-theme="dark"] .muted,
[data-theme="dark"] .section-desc {
  color: #a8bfb4 !important;
}
[data-theme="dark"] .settings-nav button,
[data-theme="dark"] .settings-side a,
[data-theme="dark"] .settings-tab {
  color: #c5d6cd !important;
}
[data-theme="dark"] .settings-nav button.is-active,
[data-theme="dark"] .settings-tab.is-active {
  background: #1a2e26 !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] select option {
  background: #15201b;
  color: #e8f0ec;
}
[data-theme="dark"] .toggle-row,
[data-theme="dark"] .settings-row {
  border-color: rgba(255,255,255,0.06) !important;
}

/* Centered catalog-like pages */
.shell-centered-page {
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
  box-sizing: border-box;
  padding-left: 24px;
  padding-right: 24px;
}
.shell-centered-page .page-h,
.shell-centered-page .page-lead,
.shell-centered-page .section-title {
  text-align: left;
}
.shell-center-card {
  margin-left: auto !important;
  margin-right: auto !important;
}
/* Match form dark */
[data-theme="dark"] .idea-match-form,
[data-theme="dark"] #ideaMatchForm {
  background: #15201b !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: none !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .idea-match-form input,
[data-theme="dark"] .idea-match-form select,
[data-theme="dark"] #ideaMatchForm input,
[data-theme="dark"] #ideaMatchForm select {
  background: #0c1411 !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] .idea-match-field,
[data-theme="dark"] .idea-match-form label {
  color: #a8bfb4 !important;
}
/* Theme icon: full sideways tumble 360 */
.shell-theme-btn {
  perspective: 480px;
  transform-style: preserve-3d;
}
.shell-theme-btn .theme-ico {
  display: grid;
  place-items: center;
  transition: opacity 0.15s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.shell-theme-btn.is-spinning {
  animation: theme-tumble 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes theme-tumble {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(-360deg); }
}
.shell-theme-btn.is-spinning-right {
  animation: theme-tumble-right 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes theme-tumble-right {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}


/* ========== UI polish: search, dropdowns, filters, dark, center ========== */

/* Search: no black strip — input inherits wrap bg */
.ideas-search-wrap,
.ideas-search-wrap input,
[data-theme="dark"] .ideas-search-wrap,
[data-theme="dark"] .ideas-search-wrap input {
  background: var(--surface-color, #fff) !important;
  color: var(--text-main, #111) !important;
}
[data-theme="dark"] .ideas-search-wrap {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] .ideas-search-wrap input {
  background: transparent !important;
  color: #e8f0ec !important;
  -webkit-text-fill-color: #e8f0ec;
}
[data-theme="dark"] .ideas-search-wrap input::placeholder {
  color: #6b857a !important;
  -webkit-text-fill-color: #6b857a;
}
/* kill autofill yellow/black */
.ideas-search-wrap input:-webkit-autofill,
.ideas-search-wrap input:-webkit-autofill:hover,
.ideas-search-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--surface-color, #fff) inset !important;
  -webkit-text-fill-color: var(--text-main, #111) !important;
}
[data-theme="dark"] .ideas-search-wrap input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #15201b inset !important;
  -webkit-text-fill-color: #e8f0ec !important;
}

.sort-dropdown-menu {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Dropdown items: ellipsis */
.sort-dropdown-item,
.sort-dropdown-menu button {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;
  display: block !important;
  text-align: left;
  box-sizing: border-box;
}

/* Dark solid dropdowns (no white bleed) */
[data-theme="dark"] .sort-dropdown-menu {
  background: #1a2621 !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45) !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .sort-dropdown-item,
[data-theme="dark"] .sort-dropdown-menu button {
  background: transparent !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .sort-dropdown-item:hover,
[data-theme="dark"] .sort-dropdown-menu button:hover {
  background: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .sort-dropdown-item.active {
  background: var(--accent, #1a9f4b) !important;
  color: #fff !important;
}
[data-theme="dark"] .sort-dropdown-btn {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .sort-dropdown-empty {
  color: #8aa398 !important;
}

/* Filter sidebar dark */
[data-theme="dark"] .ideas-filter-sidebar {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .ideas-filter-title,
[data-theme="dark"] .slider-label,
[data-theme="dark"] #ratingValue {
  color: #e8f0ec !important;
}
[data-theme="dark"] .ideas-filter-block-label {
  color: #8aa398 !important;
}
[data-theme="dark"] .filter-btn {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #c5d6cd !important;
  overflow: hidden;
  border-radius: 999px !important;
}
[data-theme="dark"] .filter-btn.active {
  background: var(--accent, #1a9f4b) !important;
  border-color: var(--accent, #1a9f4b) !important;
  color: #fff !important;
}

/* Rating slider dark — visible track + thumb */
[data-theme="dark"] .custom-slider {
  background: rgba(255,255,255,0.18) !important;
}
[data-theme="dark"] .slider-track-fill {
  background: var(--accent, #1a9f4b) !important;
}
[data-theme="dark"] .custom-slider::-webkit-slider-thumb {
  background: #e8f0ec !important;
  border: 2px solid var(--accent, #1a9f4b) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
}
[data-theme="dark"] .custom-slider::-moz-range-thumb {
  background: #e8f0ec !important;
  border: 2px solid var(--accent, #1a9f4b) !important;
}
[data-theme="dark"] .custom-slider::-moz-range-track {
  background: rgba(255,255,255,0.18) !important;
}

/* Native select: light by default, dark only in dark theme */
.shell-select,
.idea-match-form select,
#ideaMatchForm select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 12px !important;
  color: var(--text-main, #111) !important;
  border: 1px solid var(--border-color, rgba(0,0,0,0.12)) !important;
  border-radius: 12px !important;
  padding: 10px 36px 10px 12px !important;
  overflow: hidden;
}
[data-theme="dark"] .shell-select,
[data-theme="dark"] select.shell-select,
[data-theme="dark"] .idea-match-form select,
[data-theme="dark"] #ideaMatchForm select {
  background: #0c1411 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8bfb4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 12px !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
}
[data-theme="dark"] .idea-match-form input,
[data-theme="dark"] #ideaMatchForm input {
  background: #0c1411 !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 12px !important;
}
[data-theme="dark"] .idea-match-form,
[data-theme="dark"] #ideaMatchForm {
  background: #15201b !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 18px !important;
  overflow: hidden;
}

/* Center match + tools */
.shell-centered-page {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}
.shell-tools-inner {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}
.shell-centered-page .section-title,
.shell-centered-page .page-h {
  text-align: center;
  width: 100%;
}
.shell-centered-page .page-lead,
.shell-centered-page > p,
.shell-centered-page .idea-match-status {
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.shell-centered-page .idea-match-form,
.shell-centered-page #ideaMatchForm {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.shell-center-card {
  width: 100% !important;
  max-width: 480px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Profile pop: same blur as nav */
.shell-profile-pop {
  backdrop-filter: blur(14px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
  background: rgba(255, 255, 255, 0.72) !important;
}
[data-theme="dark"] .shell-profile-pop {
  background: rgba(21, 32, 27, 0.72) !important;
  backdrop-filter: blur(14px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
}

/* Login btn must fully hide when logged in */
#shellPopLogin.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

/* No theme icon animation */
.shell-theme-btn.is-spinning,
.shell-theme-btn.is-spinning-right {
  animation: none !important;
}


/* ===== FIX 2026-09: search / sort / profile blur / icons ===== */

/* Search field: single solid bg, visible search icon */
.ideas-search-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: var(--surface-color, #fff) !important;
  border: 1px solid var(--border-color, rgba(0,0,0,0.12)) !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
  height: 44px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  isolation: isolate !important;
}
.ideas-search-wrap i,
.ideas-search-wrap svg,
.ideas-search-wrap [data-lucide],
.ideas-search-wrap .lucide {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex-shrink: 0 !important;
  color: var(--text-muted, #6b857a) !important;
  stroke: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.ideas-search-wrap input {
  flex: 1 1 auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-main, #111) !important;
  -webkit-text-fill-color: var(--text-main, #111) !important;
  font-size: 0.92rem !important;
  height: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
.ideas-search-wrap input::placeholder {
  color: var(--text-muted, #888) !important;
  -webkit-text-fill-color: var(--text-muted, #888) !important;
  opacity: 1 !important;
}
.ideas-search-wrap input:-webkit-autofill,
.ideas-search-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface-color, #fff) inset !important;
  -webkit-text-fill-color: var(--text-main, #111) !important;
  transition: background-color 99999s ease-out;
}

[data-theme="dark"] .ideas-search-wrap {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.14) !important;
}
[data-theme="dark"] .ideas-search-wrap input {
  background: transparent !important;
  color: #e8f0ec !important;
  -webkit-text-fill-color: #e8f0ec !important;
}
[data-theme="dark"] .ideas-search-wrap input:-webkit-autofill,
[data-theme="dark"] .ideas-search-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #15201b inset !important;
  -webkit-text-fill-color: #e8f0ec !important;
}
[data-theme="dark"] .ideas-search-wrap i,
[data-theme="dark"] .ideas-search-wrap svg {
  color: #8aa398 !important;
}

/* Sort / filter buttons: bg clipped to radius, no halo */
.sort-dropdown-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border-color, rgba(0,0,0,0.12)) !important;
  background: var(--surface-color, #fff) !important;
  background-clip: padding-box !important;
  color: var(--text-main, #111) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.sort-dropdown-btn::before,
.sort-dropdown-btn::after {
  display: none !important;
}
.sort-dropdown-btn i,
.sort-dropdown-btn svg,
.sort-dropdown-btn .lucide {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  color: var(--text-muted, #6b857a) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.sort-dropdown-btn .sort-btn-label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

[data-theme="dark"] .sort-dropdown-btn {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .sort-dropdown-btn i,
[data-theme="dark"] .sort-dropdown-btn svg {
  color: #8aa398 !important;
}

/* Dropdown menu: solid, clipped corners, no bleed */
.sort-dropdown-menu {
  background: var(--surface-color, #fff) !important;
  border: 1px solid var(--border-color, rgba(0,0,0,0.1)) !important;
  border-radius: 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  isolation: isolate !important;
  background-clip: padding-box !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}
[data-theme="dark"] .sort-dropdown-menu {
  background: #1a2621 !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5) !important;
}
.sort-dropdown-item {
  border-radius: 10px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

/* Do NOT force black bg on search inputs globally */
[data-theme="dark"] .ideas-search-wrap input,
[data-theme="dark"] input#ideaSearchInput,
[data-theme="dark"] input#articleSearchInput {
  background: transparent !important;
}

/* Profile pop: explicit blur like navbar */
#shellProfilePop.shell-profile-pop,
.shell-profile-pop {
  backdrop-filter: blur(16px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.25) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop,
[data-theme="dark"] .shell-profile-pop {
  background: rgba(18, 28, 24, 0.72) !important;
  backdrop-filter: blur(16px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.25) !important;
  border-color: rgba(255,255,255,0.1) !important;
}


/* ===== FINAL: match selects light/dark + theme icons ===== */

/* Light theme selects — white */
html:not([data-theme="dark"]) .shell-select,
html:not([data-theme="dark"]) .idea-match-form select,
html:not([data-theme="dark"]) #ideaMatchForm select,
html:not([data-theme="dark"]) .idea-match-field select,
body:not([data-theme="dark"]) .shell-select,
body:not([data-theme="dark"]) .idea-match-form select,
body:not([data-theme="dark"]) #ideaMatchForm select {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  color: #0d291f !important;
  border: 1px solid rgba(13, 41, 31, 0.14) !important;
  border-radius: 12px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  padding: 10px 36px 10px 12px !important;
}

/* Dark theme selects — dark */
html[data-theme="dark"] .shell-select,
html[data-theme="dark"] .idea-match-form select,
html[data-theme="dark"] #ideaMatchForm select,
html[data-theme="dark"] .idea-match-field select {
  background-color: #0c1411 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8bfb4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
}

/* Theme button: only ONE icon visible */
.shell-theme-btn .theme-ico {
  display: none !important;
  place-items: center;
  line-height: 0;
}
.shell-theme-btn:not(.is-dark) .theme-ico-moon {
  display: grid !important;
}
.shell-theme-btn.is-dark .theme-ico-sun {
  display: grid !important;
}
.shell-theme-btn.is-dark .theme-ico-moon {
  display: none !important;
}
.shell-theme-btn:not(.is-dark) .theme-ico-sun {
  display: none !important;
}


/* Profile pop OUTSIDE nav — real page backdrop blur, same as .nav-capsule */
#shellProfilePop.shell-profile-pop {
  position: fixed !important;
  z-index: 3000 !important;
  width: min(280px, 86vw) !important;
  padding: 12px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(10, 40, 30, 0.1) !important;
  /* exactly like nav-capsule */
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  box-shadow: 0 12px 40px rgba(13, 41, 31, 0.14) !important;
  transform-origin: top right !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop {
  background: rgba(21, 32, 27, 0.62) !important;
  border-color: rgba(255,255,255,0.1) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
}


/* ===== 2026-09-18: profile opaque, search fix, mobile ===== */

/* Profile pop: almost opaque */
#shellProfilePop.shell-profile-pop,
.shell-profile-pop {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  border: 1px solid rgba(13, 41, 31, 0.12) !important;
  box-shadow: 0 16px 48px rgba(13, 41, 31, 0.18) !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop,
[data-theme="dark"] .shell-profile-pop {
  background: #15201b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* Home main search: no black strip, less rounded */
.search-field {
  border-radius: 16px !important;
  overflow: hidden !important;
  isolation: isolate !important;
  background: var(--surface, #fff) !important;
}
.search-field input,
.search-field input[type="search"],
#searchInput {
  background: transparent !important;
  -webkit-text-fill-color: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
[data-theme="dark"] .search-field {
  background: #1a2621 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] .search-field input,
[data-theme="dark"] #searchInput {
  background: transparent !important;
  color: #e8f0ec !important;
  -webkit-text-fill-color: #e8f0ec !important;
}
[data-theme="dark"] .search-field input:-webkit-autofill,
[data-theme="dark"] #searchInput:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1a2621 inset !important;
  -webkit-text-fill-color: #e8f0ec !important;
}
.search-card {
  border-radius: 16px !important;
  background: transparent !important;
}

/* Mobile nav: no underlines, slightly larger */
@media (max-width: 800px) {
  .shell-nav-item,
  .nav-links a,
  .mobile-capsule a,
  .m-item {
    text-decoration: none !important;
  }
  .shell-nav-item::after,
  .nav-links a::after {
    display: none !important;
  }
  .mobile-capsule {
    padding: 8px 10px !important;
    gap: 4px !important;
  }
  .m-item {
    font-size: 0.78rem !important;
    min-width: 70px !important;
    padding: 12px 14px !important;
  }
  .m-item span {
    font-size: 1.15rem !important;
  }
  .nav-capsule {
    transform: scale(1.04);
    transform-origin: top center;
  }
}

/* Settings tabs: always visible, rectangular, no scroll */
@media (max-width: 760px) {
  .settings-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    overflow: visible !important;
    flex-direction: unset !important;
    width: 100% !important;
  }
  .settings-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 12px !important;
    padding: 10px 6px !important;
    font-size: 0.72rem !important;
    white-space: normal !important;
    min-width: 0 !important;
    line-height: 1.2 !important;
    gap: 4px !important;
  }
  .settings-nav-item i {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Mobile profile sheet: center modal */
.shell-profile-backdrop {
  display: none;
}
@media (max-width: 800px) {
  .shell-profile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2090;
    background: rgba(8, 14, 12, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .shell-profile-backdrop.is-hidden {
    display: block !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .shell-profile-backdrop.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  #shellProfilePop.shell-profile-pop,
  .shell-profile-pop {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100vw - 40px) !important;
    max-width: 360px !important;
    min-height: 25vh !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    transform: translate(-50%, -46%) scale(0.96) !important;
    border-radius: 20px !important;
    padding: 20px 18px !important;
    z-index: 2100 !important;
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28) !important;
  }
  [data-theme="dark"] #shellProfilePop.shell-profile-pop,
  [data-theme="dark"] .shell-profile-pop {
    background: #15201b !important;
  }
  #shellProfilePop.shell-profile-pop.is-open,
  .shell-profile-pop.is-open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .shell-profile-pop-head {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
  .shell-profile-pop-text {
    align-items: center !important;
  }
  .shell-profile-pop .shell-avatar-img,
  .shell-profile-pop #shellPopAvaImg,
  .shell-profile-pop .shell-avatar-fallback,
  .shell-profile-pop #shellPopAvaFb {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    margin: 0 auto !important;
  }
  .shell-profile-pop-body {
    border-top: none !important;
    padding-top: 8px !important;
    gap: 6px !important;
  }
  .shell-pop-link {
    text-align: center !important;
    border-radius: 12px !important;
    padding: 12px !important;
    background: rgba(0,0,0,0.04) !important;
  }
  [data-theme="dark"] .shell-pop-link {
    background: rgba(255,255,255,0.06) !important;
  }
  #shellPopLogout.shell-pop-link.danger,
  .shell-pop-link.danger {
    background: #dc2626 !important;
    color: #fff !important;
    font-size: 0.85rem !important;
    padding: 10px 14px !important;
    margin-top: 8px !important;
    width: auto !important;
    align-self: center !important;
    display: inline-block !important;
  }
  #shellPopLogin.shell-pop-login-btn {
    background: #0d291f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
  }
  [data-theme="dark"] #shellPopLogin.shell-pop-login-btn {
    background: #e8f0ec !important;
    color: #0c1411 !important;
  }
}


/* ===== 2026-09-18b: profile pop fix + footer ===== */

/* Sticky full-height layout — no white gap under footer */
html {
  height: 100%;
}
body.shell-site,
body.shell-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex !important;
  flex-direction: column !important;
  padding-bottom: 0 !important;
}
body.shell-site > main,
body.shell-site > .page,
body.shell-body > .page,
body.shell-site > .detail-main {
  flex: 1 0 auto;
}
#shellFooter.shell-footer,
.shell-footer {
  margin-top: auto !important;
  border-radius: 0 !important;
  width: 100% !important;
  flex-shrink: 0;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
}
@media (max-width: 800px) {
  body.shell-site {
    padding-bottom: 0 !important;
  }
  #shellFooter.shell-footer {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Profile pop: always animatable, never display:none */
#shellProfilePop.shell-profile-pop,
.shell-profile-pop {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 4000 !important;
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(13,41,31,0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 56px rgba(13,41,31,0.2) !important;
  padding: 20px 18px !important;
  width: min(300px, 90vw) !important;
  overflow: visible !important;
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
}
#shellProfilePop.shell-profile-pop.is-hidden {
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#shellProfilePop.shell-profile-pop.is-open {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* Head: avatar centered on top */
.shell-profile-pop-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
  overflow: visible !important;
}
.shell-pop-ava-wrap {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #e8f0ec !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
}
.shell-pop-ava-wrap .shell-avatar-img,
.shell-pop-ava-wrap #shellPopAvaImg {
  width: 72px !important;
  height: 72px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}
.shell-pop-ava-wrap .shell-avatar-fallback,
.shell-pop-ava-wrap #shellPopAvaFb {
  width: 72px !important;
  height: 72px !important;
  display: grid !important;
  place-items: center !important;
  color: #5a6b64 !important;
}
.shell-profile-pop-text strong {
  font-size: 1.05rem !important;
  display: block !important;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-profile-pop-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
  padding-top: 12px !important;
}
[data-theme="dark"] .shell-profile-pop-body {
  border-top-color: rgba(255,255,255,0.08) !important;
}
.shell-pop-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: inherit !important;
  background: rgba(0,0,0,0.04) !important;
  border: none !important;
  font: inherit !important;
  cursor: pointer !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
[data-theme="dark"] .shell-pop-link {
  background: rgba(255,255,255,0.06) !important;
}
.shell-pop-link.danger,
#shellPopLogout {
  background: #dc2626 !important;
  color: #fff !important;
  justify-content: center !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
}

/* Desktop: under avatar button */
@media (min-width: 801px) {
  #shellProfileBackdrop {
    display: none !important;
  }
  #shellProfilePop.shell-profile-pop {
    position: fixed !important;
    /* top/right set by JS */
  }
  #shellProfilePop.shell-profile-pop.is-open {
    transform: translateY(0) scale(1) !important;
  }
  #shellProfilePop.shell-profile-pop:not(.is-open) {
    transform: translateY(-6px) scale(0.96) !important;
  }
}

/* Mobile: larger centered sheet */
@media (max-width: 800px) {
  #shellProfileBackdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 3990 !important;
    background: rgba(8, 14, 12, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  #shellProfileBackdrop.is-hidden {
    display: block !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  #shellProfileBackdrop.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  #shellProfilePop.shell-profile-pop {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    width: calc(100vw - 32px) !important;
    max-width: 380px !important;
    min-height: 280px !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    transform: translate(-50%, -48%) scale(0.96) !important;
    padding: 28px 22px !important;
  }
  #shellProfilePop.shell-profile-pop.is-open {
    transform: translate(-50%, -50%) scale(1) !important;
  }
  .shell-pop-ava-wrap {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    min-height: 88px !important;
  }
  .shell-pop-ava-wrap .shell-avatar-img,
  .shell-pop-ava-wrap #shellPopAvaImg,
  .shell-pop-ava-wrap .shell-avatar-fallback,
  .shell-pop-ava-wrap #shellPopAvaFb {
    width: 88px !important;
    height: 88px !important;
  }
}


/* ===== 2026-09-18c: force profile pop visible ===== */
#shellChromeRoot,
.shell-nav-wrap,
.nav-capsule,
.nav-right {
  overflow: visible !important;
}
#shellProfilePop {
  z-index: 5000 !important;
}
#shellProfilePop.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#shellProfileBackdrop.is-open {
  z-index: 4990 !important;
}
.shell-pop-ava-wrap #shellPopAvaImg:not(.is-hidden),
.shell-pop-ava-wrap img.shell-avatar-img:not(.is-hidden) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.shell-avatar-btn #shellAvatarImg:not(.is-hidden) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50%;
}


/* =========================================================
   FINAL profile pop (2026-09-19)
   PC: glass under avatar (working pre-opaque version)
   Mobile: opaque centered sheet; blur ONLY on backdrop under it
   ========================================================= */

.nav-right {
  position: relative !important;
  overflow: visible !important;
}
.shell-nav-wrap,
.nav-capsule,
#shellChromeRoot {
  overflow: visible !important;
}

/* Base pop — desktop glass */
#shellProfilePop.shell-profile-pop {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(280px, 86vw) !important;
  padding: 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(10, 40, 30, 0.1) !important;
  /* как навбар: полупрозрачный + blur */
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  box-shadow: 0 12px 40px rgba(13, 41, 31, 0.14) !important;
  z-index: 5000 !important;
  transform-origin: top right !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.92) translateY(-8px) !important;
  transition:
    opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.2s !important;
  display: block !important; /* не display:none — анимация */
  overflow: visible !important;
}
#shellProfilePop.shell-profile-pop.is-hidden {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#shellProfilePop.shell-profile-pop.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) translateY(0) !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop {
  background: rgba(21, 32, 27, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Head / avatar */
#shellProfilePop .shell-profile-pop-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  overflow: visible !important;
}
#shellProfilePop .shell-pop-ava-wrap {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #e8f0ec !important;
  display: grid !important;
  place-items: center !important;
  order: 2;
}
#shellProfilePop .shell-profile-pop-text {
  order: 1;
  flex: 1;
  min-width: 0;
  text-align: left !important;
}
#shellProfilePop .shell-pop-ava-wrap img,
#shellProfilePop #shellPopAvaImg:not(.is-hidden) {
  width: 44px !important;
  height: 44px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Desktop: NO page backdrop */
@media (min-width: 801px) {
  #shellProfileBackdrop {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Mobile: centered opaque sheet; blur only on backdrop UNDER the sheet */
@media (max-width: 800px) {
  #shellProfileBackdrop {
    position: fixed !important;
    inset: 0 !important;
    /* MUST be lower than pop */
    z-index: 4000 !important;
    background: rgba(8, 14, 12, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.22s ease !important;
    display: block !important;
  }
  #shellProfileBackdrop.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  #shellProfileBackdrop.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #shellProfilePop.shell-profile-pop {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    /* MUST be higher than backdrop */
    z-index: 4100 !important;
    width: calc(100vw - 36px) !important;
    max-width: 360px !important;
    min-height: 260px !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    padding: 24px 20px !important;
    /* полностью непрозрачное — blur не затрагивает окно */
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3) !important;
    transform: translate(-50%, -48%) scale(0.96) !important;
    transform-origin: center center !important;
  }
  #shellProfilePop.shell-profile-pop.is-open {
    transform: translate(-50%, -50%) scale(1) !important;
  }
  [data-theme="dark"] #shellProfilePop.shell-profile-pop {
    background: #15201b !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #shellProfilePop .shell-profile-pop-head {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  #shellProfilePop .shell-pop-ava-wrap {
    order: 0 !important;
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
  }
  #shellProfilePop .shell-pop-ava-wrap img,
  #shellProfilePop #shellPopAvaImg:not(.is-hidden) {
    width: 80px !important;
    height: 80px !important;
  }
  #shellProfilePop .shell-profile-pop-text {
    order: 1 !important;
    text-align: center !important;
    align-items: center !important;
  }
}


/* ===== 2026-09-19b: circle avatar, plain links, mobile center ===== */

/* Круглая аватарка — не овал */
#shellProfilePop .shell-pop-ava-wrap,
#shellProfilePop #shellPopAva {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  align-self: center !important;
}
#shellProfilePop .shell-pop-ava-wrap img,
#shellProfilePop #shellPopAvaImg,
#shellProfilePop .shell-pop-ava-wrap .shell-avatar-fallback,
#shellProfilePop #shellPopAvaFb {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* Ссылки без заливки (как обычные пункты меню) */
#shellProfilePop .shell-pop-link:not(.danger):not(#shellPopLogout) {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 10px 8px !important;
  border-radius: 10px !important;
  text-align: left !important;
  justify-content: flex-start !important;
}
#shellProfilePop .shell-pop-link:not(.danger):not(#shellPopLogout):hover {
  background: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="dark"] #shellProfilePop .shell-pop-link:not(.danger):not(#shellPopLogout):hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
#shellProfilePop #shellPopLogout,
#shellProfilePop .shell-pop-link.danger {
  background: #dc2626 !important;
  color: #fff !important;
  justify-content: center !important;
  text-align: center !important;
  margin-top: 6px !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
}

@media (max-width: 800px) {
  /* Окно строго по центру экрана */
  #shellProfilePop.shell-profile-pop,
  #shellProfilePop.shell-profile-pop.is-open,
  #shellProfilePop.shell-profile-pop.is-hidden {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 4100 !important;
  }
  #shellProfilePop.shell-profile-pop.is-open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  #shellProfilePop.shell-profile-pop:not(.is-open) {
    transform: translate(-50%, -50%) scale(0.96) !important;
  }

  /* Аватар крупнее и круглый */
  #shellProfilePop .shell-pop-ava-wrap,
  #shellProfilePop #shellPopAva {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
  }
  #shellProfilePop .shell-pop-ava-wrap img,
  #shellProfilePop #shellPopAvaImg,
  #shellProfilePop .shell-pop-ava-wrap .shell-avatar-fallback,
  #shellProfilePop #shellPopAvaFb {
    width: 80px !important;
    height: 80px !important;
  }

  #shellProfilePop .shell-pop-link:not(.danger):not(#shellPopLogout) {
    background: transparent !important;
    justify-content: center !important;
    text-align: center !important;
  }
}


/* ===== 2026-09-19c ===== */
[data-theme="dark"] .settings-nav-item {
  color: #c5d6cd !important;
  background: transparent !important;
}
[data-theme="dark"] .settings-nav-item:hover {
  background: rgba(255,255,255,0.06) !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .settings-nav-item.active {
  background: var(--accent, #1a9f4b) !important;
  color: #fff !important;
}
[data-theme="dark"] .settings-nav-item.active i { color: #fff !important; }
[data-theme="dark"] .settings-content,
[data-theme="dark"] .settings-panel,
[data-theme="dark"] .settings-panel-title { color: #e8f0ec !important; }
[data-theme="dark"] .settings-content label,
[data-theme="dark"] .settings-toggle-label,
[data-theme="dark"] .settings-toggle-desc { color: #c5d6cd !important; }
[data-theme="dark"] .settings-content input,
[data-theme="dark"] .settings-content select,
[data-theme="dark"] .settings-content textarea {
  background: #0c1411 !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.12) !important;
}
#shellPopLogout { display: none !important; }

@media (max-width: 800px) {
  body > #shellProfileBackdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 4000 !important;
    background: rgba(8, 14, 12, 0.45) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  body > #shellProfilePop,
  body > #shellProfilePop.is-open {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 4100 !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: calc(100vw - 36px) !important;
    max-width: 360px !important;
    max-height: 75vh !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  [data-theme="dark"] body > #shellProfilePop {
    background: #15201b !important;
  }
}


/* Main search focus — thin green like login fields */
.search-field:focus-within {
  outline: none !important;
  border-color: var(--accent, #1a9f4b) !important;
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(26, 159, 75, 0.18)) !important;
}
.search-field input:focus,
#searchInput:focus {
  outline: none !important;
  box-shadow: none !important;
}
[data-theme="dark"] .search-field:focus-within {
  border-color: var(--accent, #1a9f4b) !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.22) !important;
}


/* Article cards hover like idea cards */
.article-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.article-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow, 0 12px 28px rgba(13,41,31,0.12)) !important;
}

/* Search weak hover */
.search-field:hover:not(:focus-within) {
  border-color: color-mix(in srgb, var(--accent, #1a9f4b) 35%, var(--line, #e5e7eb)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #1a9f4b) 10%, transparent) !important;
}

/* Profile small pop more opaque */
#shellProfilePop.shell-profile-pop {
  background: rgba(255, 255, 255, 0.96) !important;
}
[data-theme="dark"] #shellProfilePop.shell-profile-pop {
  background: rgba(21, 32, 27, 0.96) !important;
}

/* Default accent green if orange stuck in old CSS vars */
:root {
  --accent-primary: #1a9f4b;
  --accent-hover: #15803d;
  --accent-light: #e8f8ef;
}


/* Force green primary buttons (kill leftover orange) */
.btn-accent,
.btn-primary,
button.btn-accent,
a.btn-accent {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
}
.btn-accent:hover,
.btn-primary:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}
.seg-item.is-on,
.chip.is-on,
.filter-chip.active {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
}

/* Smoother search hover */
.search-field {
  transition: border-color 0.35s ease, box-shadow 0.35s ease !important;
}
.search-field:hover:not(:focus-within) {
  border-color: color-mix(in srgb, #1a9f4b 40%, var(--line, #e5e7eb)) !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.12) !important;
  transition: border-color 0.35s ease, box-shadow 0.35s ease !important;
}

/* Avatar hover: soft green ring */
.shell-avatar-btn {
  border-radius: 50% !important;
  transition: box-shadow 0.3s ease, outline 0.3s ease !important;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.shell-avatar-btn:hover {
  box-shadow: 0 0 0 2px rgba(26, 159, 75, 0.55) !important;
  outline-color: rgba(26, 159, 75, 0.35);
}


/* ===== 2026-09-19d: green everywhere, profile modal, thin avatar ===== */

/* Kill orange accents from old --accent-primary in localStorage mid-page */
.btn-accent,
.btn-primary,
button.btn-accent,
a.btn-accent,
button.btn-primary,
.settings-nav-item.active,
.filter-btn.active,
.chip.is-on,
.seg-item.is-on,
.category-btn.active,
.match-form .btn,
#matchSubmit,
button[type="submit"].btn-accent {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
  overflow: hidden !important;
}
.btn-accent:hover,
.btn-primary:hover,
.settings-nav-item.active:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

/* Range / slider track */
input[type="range"] {
  accent-color: #1a9f4b !important;
}
input[type="range"]::-webkit-slider-thumb {
  background: #1a9f4b !important;
}
input[type="range"]::-moz-range-thumb {
  background: #1a9f4b !important;
}
.filter-chip,
.chip-active,
.rating-chip {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
  overflow: hidden !important;
}

/* Clip backgrounds to border-radius */
.btn, .btn-accent, .btn-primary, .settings-nav-item,
.filter-btn, .chip, .search-field, input, select, textarea {
  background-clip: padding-box !important;
  -webkit-background-clip: padding-box !important;
}

/* Profile window MUST be fixed overlay (opacity system) */
#profileWindow.profile-window,
.profile-window {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 6000 !important;
  max-height: min(90vh, 820px) !important;
  width: min(440px, 94vw) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #fff !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25) !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.96);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
#profileWindow.profile-window.active,
.profile-window.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}
#profileWindowBackdrop.profile-window-backdrop,
.profile-window-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5990 !important;
  background: rgba(10, 20, 16, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
#profileWindowBackdrop.profile-window-backdrop.active,
.profile-window-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}
[data-theme="dark"] #profileWindow.profile-window,
[data-theme="dark"] .profile-window {
  background: #15201b !important;
  color: #e8f0ec !important;
}

/* Thin avatar ring on hover */
.shell-avatar-btn {
  outline: none !important;
  box-shadow: none !important;
  transition: box-shadow 0.25s ease !important;
  border-radius: 50% !important;
}
.shell-avatar-btn:hover {
  box-shadow: 0 0 0 1.5px #1a9f4b !important;
  outline: none !important;
}
.shell-avatar-btn:focus-visible {
  box-shadow: 0 0 0 1.5px #1a9f4b !important;
}


/* ===== 2026-09-19 final: green accents, profile modal, thin avatar ring ===== */

:root, html {
  --accent: #1a9f4b !important;
  --accent-primary: #1a9f4b !important;
  --accent-hover: #15803d !important;
  --accent-light: #e8f8ef !important;
  --accent-soft: #e8f8ef !important;
}

/* Kill orange on interactive controls */
.settings-nav-item.active,
.settings-nav-item.active i,
button.settings-nav-item.active {
  background: #1a9f4b !important;
  color: #fff !important;
  border-color: #1a9f4b !important;
}
.filter-btn.active,
.filter-btn.is-active,
.category-pill.active,
.chip.is-on,
.seg-item.is-on {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
  box-shadow: none !important;
}
.filter-chip,
.filter-chip-row .filter-chip {
  background: color-mix(in srgb, #1a9f4b 16%, transparent) !important;
  border-color: color-mix(in srgb, #1a9f4b 35%, transparent) !important;
  color: var(--text-main, #e8f0ec) !important;
}
input[type="range"] {
  accent-color: #1a9f4b !important;
}
input[type="range"]::-webkit-slider-thumb {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
}
input[type="range"]::-moz-range-thumb {
  background: #1a9f4b !important;
}
.btn-accent,
.btn-primary,
button.btn-accent,
button.btn-primary,
a.btn-accent {
  background: #1a9f4b !important;
  border: 1px solid #1a9f4b !important;
  color: #fff !important;
  box-shadow: none !important;
}
.btn-accent:hover,
.btn-primary:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

/* Contain backgrounds inside rounded controls */
.filter-btn,
.settings-nav-item,
.btn,
.btn-accent,
.chip,
.category-pill {
  background-clip: padding-box !important;
  overflow: hidden !important;
}

/* Thin avatar ring */
.shell-avatar-btn {
  box-shadow: none !important;
  outline: none !important;
  border: 1.5px solid transparent !important;
  transition: border-color 0.25s ease !important;
}
.shell-avatar-btn:hover {
  border-color: #1a9f4b !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Profile modal — full styles in shell so works even if style.css order fails */
#profileWindowBackdrop.profile-window-backdrop,
.profile-window-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 7000 !important;
  background: rgba(8, 14, 12, 0.35) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease !important;
}
#profileWindowBackdrop.profile-window-backdrop.active,
.profile-window-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}
#profileWindow.profile-window,
.profile-window {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) scale(0.96) !important;
  z-index: 7010 !important;
  width: min(440px, calc(100vw - 32px)) !important;
  max-height: min(88vh, 720px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 28px 24px 24px !important;
  background: #ffffff !important;
  color: #0c1411 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.22,1,0.36,1) !important;
}
#profileWindow.profile-window.active,
.profile-window.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}
[data-theme="dark"] #profileWindow.profile-window,
[data-theme="dark"] .profile-window {
  background: #15201b !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.1) !important;
}
.profile-window-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(0,0,0,0.06) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  z-index: 2 !important;
}
.profile-page-avatar {
  width: 96px !important;
  height: 96px !important;
  max-width: 96px !important;
  max-height: 96px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}
.profile-page-avatar-wrap {
  position: relative !important;
  width: 96px !important;
  height: 96px !important;
  flex-shrink: 0 !important;
}
.profile-window .form-group input,
.profile-window input[type="text"],
.profile-window input[type="email"],
.profile-window input[type="password"] {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  font: inherit !important;
  background: #fff !important;
  color: #0c1411 !important;
}
[data-theme="dark"] .profile-window input {
  background: #0c1411 !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.12) !important;
}
.profile-window .nickname-input-wrapper {
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  background: #fff !important;
}
[data-theme="dark"] .profile-window .nickname-input-wrapper {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.12) !important;
}


/* ===== Force green accents site-wide ===== */
:root, [data-theme="dark"], [data-theme="light"] {
  --accent: #1a9f4b !important;
  --accent-primary: #1a9f4b !important;
  --accent-hover: #15803d !important;
  --accent-light: #e8f8ef !important;
}
[data-theme="dark"] {
  --accent-hover: #22c55e !important;
  --accent-light: #143528 !important;
}
.settings-nav-item.active,
.settings-nav button.is-active,
.filter-btn.active, .filter-btn.is-active,
.chip.is-on, .seg-item.is-on,
.btn-accent, .btn-primary,
button.btn-accent, a.btn-accent {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
}
input[type="range"] {
  accent-color: #1a9f4b !important;
}
input[type="range"]::-webkit-slider-thumb {
  background: #1a9f4b !important;
}
input[type="range"]::-moz-range-thumb {
  background: #1a9f4b !important;
}
.filter-chip, .rating-chip, .chip-active {
  background: #1a9f4b !important;
  border-color: #1a9f4b !important;
  color: #fff !important;
}

/* ===== Profile window layout fix ===== */
#profileWindow.profile-window,
.profile-window {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
  max-height: min(88vh, 720px) !important;
  margin: 0 !important;
  padding: 28px 24px 24px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: 6000 !important;
  border-radius: 20px !important;
  transform: translate(-50%, -50%) scale(0.96) !important;
}
#profileWindow.profile-window.active,
.profile-window.active {
  transform: translate(-50%, -50%) scale(1) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  display: block !important;
}
#profileWindow .profile-page-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  padding-right: 28px !important;
}
#profileWindow .profile-page-avatar-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 88px !important;
  height: 88px !important;
}
#profileWindow .profile-page-avatar,
#profileWindow #profilePageAvatar {
  width: 88px !important;
  height: 88px !important;
  max-width: 88px !important;
  max-height: 88px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}
#profileWindow .profile-page-avatar-edit {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 32px !important;
  height: 32px !important;
}
#profileWindow .profile-page-identity {
  min-width: 0 !important;
  flex: 1 !important;
}
#profileWindow .profile-page-identity h2 {
  font-size: 1.15rem !important;
  margin: 0 0 4px !important;
  line-height: 1.3 !important;
}
#profileWindowBackdrop.profile-window-backdrop.active {
  z-index: 5990 !important;
}


/* ===== Shell homepage layout lock (do not use style.css hero) ===== */
body.shell-site .hero {
  text-align: center !important;
  padding: 48px 16px 40px !important;
  max-width: 720px !important;
  margin: 0 auto !important;
  background-image: none !important;
  display: block !important;
}
body.shell-site .hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em !important;
  color: var(--text, #0c1411) !important;
  margin: 0 0 16px !important;
  text-align: center !important;
}
body.shell-site .hero-lead {
  color: var(--muted, #5a6f66) !important;
  font-size: 1.08rem !important;
  max-width: 480px !important;
  margin: 0 auto 28px !important;
  text-align: center !important;
  display: block !important;
}
body.shell-site .search-card {
  max-width: 640px !important;
  margin: 0 auto !important;
  display: block !important;
}
body.shell-site .search-field {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-radius: 999px !important;
  padding: 8px 8px 8px 18px !important;
}
body.shell-site .chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  margin-top: 12px !important;
  padding: 0 !important;
}
body.shell-site .feature-hero {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr !important;
  gap: 24px !important;
  padding: 36px !important;
  margin: 28px auto 28px !important;
  max-width: 1040px !important;
}
body.shell-site .feature-grid {
  margin-top: 0 !important;
  margin-bottom: 36px !important;
  gap: 16px !important;
}
@media (max-width: 800px) {
  body.shell-site .feature-hero {
    grid-template-columns: 1fr !important;
    padding: 28px !important;
  }
}
body.shell-site .page {
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 0 20px 48px !important;
}


/* =========================================================
   Profile window — full styles (works on index without style.css)
   ========================================================= */
#profileWindowBackdrop.profile-window-backdrop,
.profile-window-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5990 !important;
  background: rgba(10, 20, 16, 0.35) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
#profileWindowBackdrop.profile-window-backdrop.active,
.profile-window-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#profileWindow.profile-window,
.profile-window {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -48%) scale(0.97) !important;
  z-index: 6000 !important;
  width: min(440px, calc(100vw - 32px)) !important;
  max-height: min(88vh, 720px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 28px 24px 24px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid rgba(13, 41, 31, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
}
#profileWindow.profile-window.active,
.profile-window.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
  visibility: visible !important;
  display: block !important;
}
[data-theme="dark"] #profileWindow.profile-window,
[data-theme="dark"] .profile-window {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e8f0ec !important;
}

.profile-window-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 50% !important;
  background: #eef2f0 !important;
  color: #5a6f66 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 2 !important;
}
[data-theme="dark"] .profile-window-close {
  background: rgba(255,255,255,0.08) !important;
  color: #c5d6cd !important;
}
.profile-window-close:hover {
  background: #e0e8e4 !important;
  color: #0c1411 !important;
}

#profileWindow .profile-page-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  padding-right: 32px !important;
}
#profileWindow .profile-page-avatar-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 88px !important;
  height: 88px !important;
}
#profileWindow .profile-page-avatar,
#profileWindow #profilePageAvatar {
  width: 88px !important;
  height: 88px !important;
  max-width: 88px !important;
  max-height: 88px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  border: 3px solid #e5ebe8 !important;
  background: #e8f0ec !important;
}
#profileWindow .profile-page-avatar-edit {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 2px solid #fff !important;
  background: #1a9f4b !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
}
#profileWindow .profile-page-identity h2 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0 0 4px !important;
  line-height: 1.25 !important;
  color: inherit !important;
}
#profileWindow .profile-page-nick {
  font-size: 0.9rem !important;
  color: #5a6f66 !important;
  font-weight: 500 !important;
}
[data-theme="dark"] #profileWindow .profile-page-nick {
  color: #8aa399 !important;
}

#profileWindow .profile-page-section {
  margin-top: 4px !important;
  padding-top: 16px !important;
  border-top: 1px solid #e5ebe8 !important;
}
[data-theme="dark"] #profileWindow .profile-page-section {
  border-top-color: rgba(255,255,255,0.1) !important;
}
#profileWindow .profile-page-section-title {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #5a6f66 !important;
  margin-bottom: 12px !important;
}
[data-theme="dark"] #profileWindow .profile-page-section-title {
  color: #8aa399 !important;
}

#profileWindow .form-group {
  margin-bottom: 12px !important;
}
#profileWindow .form-group label {
  display: block !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: #0c1411 !important;
}
[data-theme="dark"] #profileWindow .form-group label {
  color: #c5d6cd !important;
}
#profileWindow input[type="text"],
#profileWindow input[type="email"],
#profileWindow input[type="password"] {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid #d5e0db !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font: inherit !important;
  font-size: 0.95rem !important;
  background: #fff !important;
  color: #0c1411 !important;
}
[data-theme="dark"] #profileWindow input[type="text"],
[data-theme="dark"] #profileWindow input[type="email"],
[data-theme="dark"] #profileWindow input[type="password"] {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #e8f0ec !important;
}
#profileWindow .nickname-input-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid #d5e0db !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  background: #fff !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
[data-theme="dark"] #profileWindow .nickname-input-wrapper {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
#profileWindow .nickname-input-wrapper input {
  border: none !important;
  background: transparent !important;
  padding: 10px 4px !important;
  box-shadow: none !important;
}
#profileWindow .nickname-hint {
  font-size: 0.75rem !important;
  color: #5a6f66 !important;
  margin-top: 6px !important;
}
#profileWindow .profile-info-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #e5ebe8 !important;
}
[data-theme="dark"] #profileWindow .profile-info-row {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
#profileWindow .profile-info-label {
  font-size: 0.85rem !important;
  color: #5a6f66 !important;
}
#profileWindow .profile-info-value {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-align: right !important;
}

#profileWindow .profile-stats-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}
#profileWindow .profile-stat-card {
  background: #f3f6f5 !important;
  border: 1px solid #e5ebe8 !important;
  border-radius: 14px !important;
  padding: 14px 12px !important;
  text-align: center !important;
}
[data-theme="dark"] #profileWindow .profile-stat-card {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
#profileWindow .profile-stat-value {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #0c1411 !important;
}
[data-theme="dark"] #profileWindow .profile-stat-value {
  color: #e8f0ec !important;
}
#profileWindow .profile-stat-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #5a6f66 !important;
  margin-top: 4px !important;
}

#profileWindow .btn-primary,
#profileWindow #profileAccountSaveBtn {
  width: 100% !important;
  background: #1a9f4b !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 18px !important;
  font-weight: 600 !important;
  margin-top: 8px !important;
  cursor: pointer !important;
}
#profileWindow .btn-secondary,
#profileWindow #profilePasswordBtn {
  width: 100% !important;
  background: #f3f6f5 !important;
  color: #0c1411 !important;
  border: 1px solid #d5e0db !important;
  border-radius: 999px !important;
  padding: 12px 18px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
[data-theme="dark"] #profileWindow #profilePasswordBtn {
  background: #1e2b26 !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.12) !important;
}

#profileWindow .profile-page-actions-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  margin-top: 18px !important;
}
#profileWindow .profile-btn-logout {
  flex: 1 !important;
  background: #fff !important;
  color: #dc2626 !important;
  border: 1.5px solid #dc2626 !important;
  border-radius: 12px !important;
  padding: 12px 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
#profileWindow .profile-btn-logout:hover {
  background: #dc2626 !important;
  color: #fff !important;
}
#profileWindow .profile-btn-delete {
  flex: 1 !important;
  background: #dc2626 !important;
  color: #fff !important;
  border: 1.5px solid #dc2626 !important;
  border-radius: 12px !important;
  padding: 12px 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
#profileWindow .profile-btn-delete:hover {
  background: #b91c1c !important;
}
[data-theme="dark"] #profileWindow .profile-btn-logout {
  background: transparent !important;
  color: #f87171 !important;
  border-color: #f87171 !important;
}
[data-theme="dark"] #profileWindow .profile-btn-logout:hover {
  background: #dc2626 !important;
  color: #fff !important;
}


/* ========== Avatar source picker (fixed overlay) ========== */
.float-pop-backdrop,
.avatar-source-backdrop,
#avatarSourceBackdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 7000 !important;
  background: rgba(10, 20, 16, 0.28) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.float-pop-backdrop.active,
.avatar-source-backdrop.active,
#avatarSourceBackdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.float-pop,
.avatar-source-pop {
  position: fixed !important;
  z-index: 7001 !important;
  width: min(300px, calc(100vw - 24px)) !important;
  max-height: min(70vh, 420px) !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 14px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid rgba(13, 41, 31, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 48px rgba(0,0,0,0.18) !important;
  opacity: 0;
  transform: scale(0.96) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.float-pop-backdrop.active .float-pop,
.avatar-source-backdrop.active .avatar-source-pop,
#avatarSourceBackdrop.active .avatar-source-pop {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
}
[data-theme="dark"] .float-pop,
[data-theme="dark"] .avatar-source-pop {
  background: #15201b !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #e8f0ec !important;
}

.avatar-source-title {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #5a6f66 !important;
  margin-bottom: 10px !important;
}
[data-theme="dark"] .avatar-source-title { color: #8aa399 !important; }

.avatar-source-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.avatar-source-opt {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid #d5e0db !important;
  border-radius: 12px !important;
  background: #f8faf9 !important;
  cursor: pointer !important;
  text-align: left !important;
  font-family: inherit !important;
  color: inherit !important;
  transition: background 0.15s, border-color 0.15s;
}
.avatar-source-opt:hover {
  background: #e8f8ef !important;
  border-color: #1a9f4b !important;
}
[data-theme="dark"] .avatar-source-opt {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
[data-theme="dark"] .avatar-source-opt:hover {
  background: #143528 !important;
  border-color: #1a9f4b !important;
}
.avatar-source-opt > i,
.avatar-source-opt svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  color: #0c1411 !important;
}
[data-theme="dark"] .avatar-source-opt > i,
[data-theme="dark"] .avatar-source-opt svg { color: #e8f0ec !important; }
.avatar-source-opt-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}
.avatar-source-opt-text strong {
  font-size: 0.92rem !important;
  font-weight: 650 !important;
}
.avatar-source-opt-text em {
  font-style: normal !important;
  font-size: 0.78rem !important;
  color: #5a6f66 !important;
}
[data-theme="dark"] .avatar-source-opt-text em { color: #8aa399 !important; }

/* Text avatar window */
#textAvatarBackdrop,
.text-avatar-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 7100 !important;
  background: rgba(10, 20, 16, 0.4) !important;
  backdrop-filter: blur(6px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#textAvatarBackdrop.active,
.text-avatar-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}
#textAvatarWindow,
.text-avatar-window {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -48%) scale(0.96) !important;
  z-index: 7101 !important;
  width: min(380px, calc(100vw - 28px)) !important;
  max-height: min(86vh, 640px) !important;
  overflow: auto !important;
  padding: 22px 20px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border-radius: 18px !important;
  border: 1px solid rgba(13,41,31,0.1) !important;
  box-shadow: 0 24px 56px rgba(0,0,0,0.2) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22,1,0.36,1);
  scrollbar-width: none !important;
}
#textAvatarWindow.active,
.text-avatar-window.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}
[data-theme="dark"] #textAvatarWindow {
  background: #15201b !important;
  color: #e8f0ec !important;
}
#textAvatarWindow::-webkit-scrollbar { display: none !important; }

/* Profile window: hide scrollbar hard */
#profileWindow.profile-window,
.profile-window {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
#profileWindow.profile-window::-webkit-scrollbar,
.profile-window::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Password btn: same radius as logout/delete (12px), not pill */
#profileWindow #profilePasswordBtn,
#profileWindow .btn-secondary {
  border-radius: 12px !important;
}

/* Avatar crop modal basics if missing */
#avatarCropBackdrop,
.avatar-crop-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 7200 !important;
  background: rgba(10,20,16,0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#avatarCropBackdrop.active,
.avatar-crop-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* Smooth focus rings for profile window inputs */
#profileWindow input[type="text"],
#profileWindow input[type="email"],
#profileWindow input[type="password"],
#profileWindow .nickname-input-wrapper {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}
#profileWindow input[type="text"]:focus,
#profileWindow input[type="email"]:focus,
#profileWindow input[type="password"]:focus {
  outline: none !important;
  border-color: #1a9f4b !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.18) !important;
}
#profileWindow .nickname-input-wrapper:focus-within {
  border-color: #1a9f4b !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.18) !important;
}

/* Auth modal Enter-friendly inputs */
#shellAuthModal input:focus {
  outline: none;
  border-color: #1a9f4b;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.18);
}


/* ========== Delete account nickname modal (fixed overlay) ========== */
#deleteNickBackdrop,
.delete-nick-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 8000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  background: rgba(10, 20, 16, 0.45) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#deleteNickBackdrop.active,
.delete-nick-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}
#deleteNickBackdrop .delete-nick-modal,
.delete-nick-modal {
  position: relative !important;
  width: min(400px, 100%) !important;
  margin: 0 !important;
  padding: 24px 22px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border-radius: 18px !important;
  border: 1px solid rgba(13,41,31,0.1) !important;
  box-shadow: 0 24px 56px rgba(0,0,0,0.2) !important;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
  color: #0c1411 !important;
}
#deleteNickBackdrop.active .delete-nick-modal,
.delete-nick-backdrop.active .delete-nick-modal {
  transform: scale(1) translateY(0) !important;
}
[data-theme="dark"] .delete-nick-modal {
  background: #15201b !important;
  color: #e8f0ec !important;
  border-color: rgba(255,255,255,0.12) !important;
}
.delete-nick-modal h3 {
  margin: 0 0 8px !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
}
.delete-nick-desc {
  margin: 0 0 16px !important;
  font-size: 0.92rem !important;
  color: #5a6f66 !important;
  line-height: 1.45 !important;
}
[data-theme="dark"] .delete-nick-desc { color: #8aa399 !important; }
.delete-nick-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 16px !important;
  justify-content: flex-end !important;
}
.delete-nick-actions .btn {
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: none !important;
}
.delete-nick-actions .btn-secondary {
  background: #f3f6f5 !important;
  color: #0c1411 !important;
}
#deleteNickSubmit {
  background: #dc2626 !important;
  color: #fff !important;
  border-radius: 12px !important;
}

/* Nickname field: single unified border (fix + delete modal) */
#profileWindow .nickname-input-wrapper,
#deleteNickBackdrop .nickname-input-wrapper,
.nickname-input-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1.5px solid #d5e0db !important;
  border-radius: 12px !important;
  padding: 0 12px 0 14px !important;
  background: #fff !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  overflow: hidden !important;
}
#profileWindow .nickname-input-wrapper:focus-within,
#deleteNickBackdrop .nickname-input-wrapper:focus-within,
.nickname-input-wrapper:focus-within {
  border-color: #1a9f4b !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.18) !important;
}
#profileWindow .nickname-at,
#deleteNickBackdrop .nickname-at,
.nickname-at {
  flex-shrink: 0 !important;
  color: #5a6f66 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}
#profileWindow .nickname-input-wrapper input,
#deleteNickBackdrop .nickname-input-wrapper input,
.nickname-input-wrapper input {
  flex: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 11px 8px 11px 6px !important;
  font: inherit !important;
  font-size: 0.95rem !important;
  color: inherit !important;
}
#profileWindow .nickname-input-wrapper input:focus,
#deleteNickBackdrop .nickname-input-wrapper input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
[data-theme="dark"] #profileWindow .nickname-input-wrapper,
[data-theme="dark"] #deleteNickBackdrop .nickname-input-wrapper {
  background: #0c1411 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
[data-theme="dark"] #profileWindow .nickname-input-wrapper:focus-within,
[data-theme="dark"] #deleteNickBackdrop .nickname-input-wrapper:focus-within {
  border-color: #1a9f4b !important;
  box-shadow: 0 0 0 3px rgba(26, 159, 75, 0.25) !important;
}

/* Smaller camera icon on avatar edit */
#profileWindow .profile-page-avatar-edit {
  width: 28px !important;
  height: 28px !important;
}
#profileWindow .profile-page-avatar-edit i,
#profileWindow .profile-page-avatar-edit svg {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.2 !important;
}


/* Text avatar modal layout */
.text-avatar-stack { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.text-avatar-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
#avatarTextPreview {
  width: 160px !important;
  height: 160px !important;
  border-radius: 50% !important;
  display: block !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.text-avatar-title {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  text-align: center !important;
}
.text-avatar-sub {
  margin: -4px 0 4px !important;
  font-size: 0.85rem !important;
  color: #5a6f66 !important;
  text-align: center !important;
}
.text-avatar-close {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  width: 32px !important;
  height: 32px !important;
  border: none !important;
  border-radius: 50% !important;
  background: #f3f6f5 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ta-field { display: flex; flex-direction: column; gap: 6px; }
.ta-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6f66;
}
.ta-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #d5e0db;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 1rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ta-field input[type="text"]:focus {
  outline: none;
  border-color: #1a9f4b;
  box-shadow: 0 0 0 3px rgba(26,159,75,0.18);
}
.ta-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ta-slider-row input[type="range"] { flex: 1; accent-color: #1a9f4b; }
#avatarTextSizeVal { font-size: 0.85rem; font-weight: 600; min-width: 40px; color: #5a6f66; }
.avatar-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ta-color-native {
  width: 36px;
  height: 28px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  margin-top: 4px;
}
.text-avatar-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.ta-btn {
  flex: 1 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: none !important;
}
#textAvatarCancel.ta-btn {
  background: #f3f6f5 !important;
  color: #0c1411 !important;
}
#avatarTextApply.ta-btn {
  background: #1a9f4b !important;
  color: #fff !important;
}

/* Profile window micro-interactions */
#profileWindow input[type="text"],
#profileWindow input[type="email"],
#profileWindow input[type="password"],
#profileWindow .nickname-input-wrapper {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease !important;
}
#profileWindow input[type="text"]:hover,
#profileWindow input[type="email"]:hover,
#profileWindow input[type="password"]:hover {
  border-color: #b7c9c0 !important;
}
#profileWindow .nickname-input-wrapper:hover {
  border-color: #b7c9c0 !important;
}
#profileWindow .profile-stat-card {
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease, border-color 0.25s ease !important;
  cursor: default;
}
#profileWindow .profile-stat-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px rgba(12, 20, 17, 0.08) !important;
  border-color: #c5d6cd !important;
}
#profileWindow #profileAccountSaveBtn,
#profileWindow #profilePasswordBtn {
  border-radius: 12px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
#profileWindow #profileAccountSaveBtn:hover,
#profileWindow #profilePasswordBtn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(26, 159, 75, 0.25) !important;
}
#profileWindow .profile-page-avatar-edit {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}
#profileWindow .profile-page-avatar-edit:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(26, 159, 75, 0.35) !important;
}


/* Email verify wait modal */
.email-verify-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #e8f0ec;
  border-top-color: #1a9f4b;
  animation: email-spin 0.9s linear infinite;
}
.email-verify-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
@keyframes email-spin {
  to { transform: rotate(360deg); }
}
.email-verify-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.email-verify-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1a9f4b;
  opacity: 0.35;
  animation: email-dot 1.2s ease-in-out infinite;
}
.email-verify-dots span:nth-child(2) { animation-delay: 0.2s; }
.email-verify-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes email-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1.15); }
}
[data-theme="dark"] .email-verify-modal {
  background: #15201b !important;
  color: #e8f0ec !important;
}
[data-theme="dark"] .email-verify-modal h2 { color: #e8f0ec !important; }


/* Profile pop — compact rows like Grok menu */
#shellProfilePop.shell-profile-pop,
.shell-profile-pop {
  min-width: 220px !important;
  padding: 8px !important;
  border-radius: 14px !important;
}
#shellProfilePop .shell-profile-pop-head {
  padding: 8px 8px 10px !important;
  gap: 10px !important;
  margin-bottom: 2px !important;
}
#shellProfilePop .shell-pop-ava-wrap,
#shellProfilePop #shellPopAva {
  width: 36px !important;
  height: 36px !important;
}
#shellProfilePop .shell-avatar-img,
#shellProfilePop #shellPopAvaImg {
  width: 36px !important;
  height: 36px !important;
}
#shellProfilePop .shell-avatar-fallback {
  width: 36px !important;
  height: 36px !important;
}
#shellProfilePop .shell-avatar-fallback svg {
  width: 18px !important;
  height: 18px !important;
}
#shellProfilePop .shell-profile-pop-text strong {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}
#shellProfilePop .shell-pop-login-btn {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 0.82rem !important;
}
#shellProfilePop .shell-profile-pop-body {
  padding: 4px 0 2px !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}
[data-theme="dark"] #shellProfilePop .shell-profile-pop-body {
  border-top-color: rgba(255,255,255,0.08) !important;
}
#shellProfilePop .shell-pop-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 7px 10px !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  color: inherit !important;
  text-decoration: none !important;
}
#shellProfilePop .shell-pop-link svg {
  width: 15px !important;
  height: 15px !important;
  opacity: 0.7 !important;
  flex-shrink: 0 !important;
}
#shellProfilePop .shell-pop-link:hover {
  background: rgba(0,0,0,0.05) !important;
}
[data-theme="dark"] #shellProfilePop .shell-pop-link:hover {
  background: rgba(255,255,255,0.07) !important;
}


/* Ensure profile pop opens when is-open */
#shellProfilePop.shell-profile-pop.is-open,
.shell-profile-pop.is-open {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
#shellProfilePop.shell-profile-pop.is-hidden:not(.is-open) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.article-hero, .idea-hero { border-radius: 20px !important; overflow: hidden !important; }
.infobox-warning { border-color: #f59e0b !important; border-left-color: #f59e0b !important; }


/* shell font force */
html, body, button, input, select, textarea {
  font-family: var(--font-sans) !important;
}
h1, h2, h3, h4, .brand-name, .hero-title, .section-title {
  font-family: var(--font-display) !important;
}
