:root {
  --bg: #f7f9fc;
  --bg-2: #ffffff;
  --surface: rgba(255,255,255,0.55);
  --surface-strong: rgba(255,255,255,0.72);
  --surface-soft: rgba(255,255,255,0.42);
  --text: #000000;
  --muted: #3f4754;
  --border: rgba(255,255,255,0.62);
  --border-strong: rgba(255,255,255,0.9);
  --shadow: 0 18px 55px rgba(16,24,40,0.10);
  --shadow-soft: 0 10px 30px rgba(16,24,40,0.07);
  --radius: 22px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --premium-1: #0f172a;
  --premium-2: #312e81;
  --premium-3: #6d28d9;
  --premium-4: #f59e0b;
  --dark-glass: rgba(17,24,39,0.76);
  --dark-glass-soft: rgba(49,46,129,0.60);
  --dark-border: rgba(255,255,255,0.16);
  --dark-border-strong: rgba(255,255,255,0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  position: relative;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.98), rgba(255,255,255,0.88) 32%, rgba(244,248,255,0.92) 60%, rgba(239,246,255,0.80) 100%),
    linear-gradient(135deg, #f8fbff 0%, #f7f8fb 35%, #f9fbfd 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -60px;
  background: rgba(255,255,255,0.95);
}
body::after {
  width: 440px;
  height: 440px;
  right: -120px;
  top: 140px;
  background: rgba(226,236,255,0.72);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; border: none; outline: none; }

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15,23,42,0.90), rgba(49,46,129,0.82) 48%, rgba(109,40,217,0.72));
  color: #ffffff;
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  border-bottom: 1px solid var(--dark-border);
  box-shadow: 0 18px 50px rgba(15,23,42,0.26);
}
.topbar-glow,
.footer-glow {
  position: absolute;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(42px);
}
.topbar-glow {
  width: 280px;
  height: 280px;
  top: -150px;
  right: -30px;
  background: rgba(245,158,11,0.22);
}
.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 1.22rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.logo,
.footer-logo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.76));
  color: var(--premium-1);
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.54);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.brand-mark,
.brand-script {
  display: inline-block;
  line-height: 1;
}
.brand-mark {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
}
.brand-script {
  font-size: 1.35rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #fde68a, #ffffff 42%, #dbeafe 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 18px rgba(255,255,255,0.14);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-link,
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 20px rgba(0,0,0,0.12);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nav-link:hover,
.search-toggle:hover {
  background: rgba(255,255,255,0.14);
  border-color: var(--dark-border-strong);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 26px rgba(0,0,0,0.14);
}
.search-shell { position: relative; }
.search-toggle {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(380px, 90vw);
  background: linear-gradient(135deg, rgba(15,23,42,0.88), rgba(49,46,129,0.82) 52%, rgba(91,33,182,0.76));
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15,23,42,0.30);
  padding: 12px;
  display: none;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}
.search-panel.show { display: block; }
.search-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.84));
  color: #000000;
  border: 1px solid rgba(255,255,255,0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 8px 20px rgba(0,0,0,0.08);
}
.search-input::placeholder { color: #6b7280; }
.search-input:focus {
  border-color: rgba(255,255,255,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 3px rgba(255,255,255,0.10);
}
.results-dropdown {
  margin-top: 10px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.82));
  border-radius: 18px;
  display: none;
  box-shadow: 0 18px 30px rgba(16,24,40,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.results-dropdown.show { display: block; }
.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.58);
  font-size: 0.93rem;
}
.result-item:last-child { border-bottom: 0; }
.result-item:hover { background: rgba(255,255,255,0.54); }
.result-cat { font-size: 0.8rem; color: var(--muted); }

.page-wrap { padding: 30px 0 48px; }
.hero-app,
.page-header {
  position: relative;
  overflow: hidden;
}
.hero-app::before,
.page-header::before,
.app-card::before,
.simple-link::before,
.section-title::before,
.breadcrumb a::before,
.breadcrumb span.current::before,
.btn-open::before,
.tag::before,
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15) 42%, rgba(255,255,255,0.03) 100%);
}
.hero-app {
  padding: 44px 28px;
  text-align: center;
  margin-bottom: 8px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.34));
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  box-shadow: 0 18px 50px rgba(16,24,40,0.10);
}
.hero-app h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.2rem, 5vw, 3.35rem);
  font-weight: 900;
  letter-spacing: -1.15px;
  margin-bottom: 10px;
}
.hero-app p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
}
.section-title {
  position: relative;
  overflow: hidden;
  font-size: 1.26rem;
  font-weight: 800;
  margin: 34px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  letter-spacing: -0.02em;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.56), rgba(255,255,255,0.32));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.section-title > * { position: relative; z-index: 1; }
.section-title span,
.pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.54));
  border: 1px solid rgba(255,255,255,0.88);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(16,24,40,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.grid-app {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.app-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.64), rgba(255,255,255,0.36));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(16,24,40,0.10);
  backdrop-filter: blur(20px) saturate(155%);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.app-card > * { position: relative; z-index: 1; }
.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.92);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.44));
  box-shadow: 0 22px 52px rgba(16,24,40,0.12);
}
.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.app-card h3 {
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.tag {
  position: relative;
  overflow: hidden;
  font-size: .75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.58));
  border: 1px solid rgba(255,255,255,0.86);
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(16,24,40,0.08);
}
.btn-open {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 11px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.62));
  border: 1px solid rgba(255,255,255,0.94);
  color: #000000;
  font-weight: 700;
  margin-top: 12px;
  box-shadow: 0 10px 24px rgba(16,24,40,0.09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn-open span,
.btn-open strong { position: relative; z-index: 1; }
.btn-open:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,1);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.74));
  box-shadow: 0 14px 28px rgba(16,24,40,0.11);
}
.page-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.64), rgba(255,255,255,0.36));
  border: 1px solid rgba(255,255,255,0.74);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 18px 50px rgba(16,24,40,0.10);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  margin-bottom: 24px;
}
.page-header > * { position: relative; z-index: 1; }
.page-header h1 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.page-header p { color: var(--muted); }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .92rem;
}
.breadcrumb a,
.breadcrumb span.current {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58));
  border: 1px solid rgba(255,255,255,0.9);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(16,24,40,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.breadcrumb a > *,
.breadcrumb span.current > * { position: relative; z-index: 1; }
.list-stack { display: grid; gap: 16px; }
.related-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.simple-list { display: grid; gap: 12px; }
body.page-calculator #calculator-related {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-calculator #calculator-related > .simple-link:only-child {
  grid-column: 1 / -1;
}
.simple-link {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.38));
  box-shadow: 0 12px 26px rgba(16,24,40,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.simple-link > * { position: relative; z-index: 1; }
.simple-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.95);
  box-shadow: 0 16px 30px rgba(16,24,40,0.10);
}
.muted { color: var(--muted); }

.footer {
  position: relative;
  overflow: hidden;
  margin-top: 52px;
  padding: 34px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(49,46,129,0.84) 52%, rgba(109,40,217,0.74));
  color: #ffffff;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 -18px 48px rgba(15,23,42,0.18);
}
.footer-glow {
  width: 300px;
  height: 300px;
  left: -60px;
  bottom: -170px;
  background: rgba(245,158,11,0.22);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 16px 32px rgba(0,0,0,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.footer-brand-copy {
  display: grid;
  gap: 4px;
}
.footer-brand-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-tagline {
  color: rgba(255,255,255,0.82);
  font-size: 0.93rem;
}
.footer-copy {
  color: rgba(255,255,255,0.68);
  font-size: 0.88rem;
}
.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 22px rgba(0,0,0,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.footer-links a:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}
.footer .muted,
.footer .result-cat { color: rgba(255,255,255,0.74); }

@media (max-width: 768px) {
  body::before,
  body::after { filter: blur(56px); }
  .nav { min-height: 74px; }
  .nav-links { gap: 8px; }
  .nav-link { display: none; }
  .brand-mark { font-size: 0.96rem; }
  .brand-script { font-size: 1.2rem; }
  .grid-app { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-app,
  .page-header { padding: 22px 18px; border-radius: 24px; }
  .section-title { align-items: flex-start; padding: 14px 15px; }
  .footer-inner { align-items: flex-start; }
  .footer-brand { width: 100%; }
}


body.page-calculator .simple-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-calculator .simple-link {
  min-height: 66px;
}
body.page-calculator main.app-container.page-wrap {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
body.page-calculator .page-wrap {
  padding-top: 26px;
}
body.page-calculator #site-breadcrumb,
body.page-calculator .section-title,
body.page-calculator #calculator-related {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}
body.page-calculator .calc-shell-panel,
body.page-calculator .calc-shell-panel.is-embed,
body.page-calculator .calc-embed-wrap,
body.page-calculator .calc-embed-frame {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
}
.category-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.category-directory-grid .app-card.current-category {
  border-color: rgba(99,102,241,0.34);
  box-shadow: 0 18px 34px rgba(99,102,241,0.12);
}
.category-directory-grid .app-card.current-category .tag {
  color: #312e81;
  background: rgba(99,102,241,0.12);
}
@media (max-width: 340px) {
  .grid-app,
  .related-grid,
  .category-directory-grid,
  body.page-calculator .simple-list,
  body.page-calculator #calculator-related {
    grid-template-columns: 1fr;
  }
}


html,
body,
.topbar,
.footer,
.hero-app,
.page-header,
.app-card,
.section-title,
.breadcrumb a,
.breadcrumb span.current,
.simple-link,
.btn-open,
.tag,
.pill,
.search-panel,
.search-input,
.results-dropdown,
.result-item,
.footer-brand,
.footer-links a,
.nav-link,
.search-toggle,
.theme-toggle {
  transition: background .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease, transform .18s ease;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 70px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 20px rgba(0,0,0,0.12);
  cursor: pointer;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 14px 28px rgba(0,0,0,0.14);
}
.theme-toggle-track {
  position: relative;
  width: 62px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
}
.theme-toggle-icon {
  position: relative;
  z-index: 1;
  font-size: 0.88rem;
  line-height: 1;
  opacity: .86;
}
.theme-toggle-icon.sun {
  color: #fde68a;
}
.theme-toggle-icon.moon {
  color: #e0e7ff;
}
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(226,232,240,0.88));
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 10px 18px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.95);
}
html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(26px);
  background: linear-gradient(135deg, #1e293b, #475569);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 10px 18px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
}
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  color: #f8fafc;
  background:
    radial-gradient(circle at top left, rgba(45,55,72,0.60), rgba(15,23,42,0.92) 32%, rgba(2,6,23,0.98) 100%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}
html[data-theme="dark"] body::before {
  background: rgba(56,189,248,0.16);
}
html[data-theme="dark"] body::after {
  background: rgba(168,85,247,0.18);
}
html[data-theme="dark"] .topbar {
  background: linear-gradient(135deg, rgba(2,6,23,0.88), rgba(30,41,59,0.82) 50%, rgba(76,29,149,0.72));
  border-bottom-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.34);
}
html[data-theme="dark"] .footer {
  background: linear-gradient(135deg, rgba(2,6,23,0.92), rgba(15,23,42,0.86) 50%, rgba(67,56,202,0.72));
  border-top-color: rgba(255,255,255,0.10);
  box-shadow: 0 -18px 48px rgba(0,0,0,0.32);
}
html[data-theme="dark"] .hero-app,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .app-card,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .simple-link,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb span.current,
html[data-theme="dark"] .btn-open,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .footer-brand,
html[data-theme="dark"] .footer-links a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .search-toggle,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .search-panel,
html[data-theme="dark"] .results-dropdown {
  background: linear-gradient(180deg, rgba(15,23,42,0.60), rgba(15,23,42,0.42));
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 16px 40px rgba(0,0,0,0.24);
}
html[data-theme="dark"] .hero-app::before,
html[data-theme="dark"] .page-header::before,
html[data-theme="dark"] .app-card::before,
html[data-theme="dark"] .simple-link::before,
html[data-theme="dark"] .section-title::before,
html[data-theme="dark"] .breadcrumb a::before,
html[data-theme="dark"] .breadcrumb span.current::before,
html[data-theme="dark"] .btn-open::before,
html[data-theme="dark"] .tag::before,
html[data-theme="dark"] .pill::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03) 42%, rgba(255,255,255,0.01) 100%);
}
html[data-theme="dark"] .app-card:hover,
html[data-theme="dark"] .simple-link:hover,
html[data-theme="dark"] .btn-open:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .search-toggle:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .footer-links a:hover {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 20px 46px rgba(0,0,0,0.28);
}
html[data-theme="dark"] .search-input {
  background: linear-gradient(180deg, rgba(2,6,23,0.86), rgba(15,23,42,0.82));
  color: #f8fafc;
  border-color: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 20px rgba(0,0,0,0.20);
}
html[data-theme="dark"] .search-input::placeholder {
  color: #94a3b8;
}
html[data-theme="dark"] .result-item {
  border-bottom-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .result-item:hover {
  background: rgba(255,255,255,0.04);
}
html[data-theme="dark"] .result-cat,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hero-app p,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .section-title span,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .footer-copy,
html[data-theme="dark"] .footer-tagline,
html[data-theme="dark"] .footer .muted,
html[data-theme="dark"] .footer .result-cat {
  color: #cbd5e1;
}
html[data-theme="dark"] .btn-open,
html[data-theme="dark"] .app-card,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .simple-link,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb span.current,
html[data-theme="dark"] .hero-app,
html[data-theme="dark"] .search-input {
  color: #f8fafc;
}
html[data-theme="dark"] .logo,
html[data-theme="dark"] .footer-logo {
  background: linear-gradient(135deg, rgba(30,41,59,0.94), rgba(71,85,105,0.78));
  color: #ffffff;
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}
html[data-theme="dark"] .brand-mark {
  color: rgba(255,255,255,0.96);
}
html[data-theme="dark"] .brand-script {
  background: linear-gradient(135deg, #c4b5fd, #f8fafc 45%, #67e8f9 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="dark"] .category-directory-grid .app-card.current-category {
  border-color: rgba(129,140,248,0.34);
  box-shadow: 0 18px 34px rgba(129,140,248,0.16);
}

.calc-shell-panel {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.38));
  box-shadow: 0 18px 36px rgba(16,24,40,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0;
}
.calc-shell-panel.is-embed {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-height: 0;
  overflow: visible;
}
.calc-shell-panel::before,
.calc-fallback::before,
.code-path::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
  pointer-events: none;
}
.calc-shell-panel.is-embed::before { display: none; }
.calc-embed-wrap { position: relative; z-index: 1; width: 100%; }
.calc-embed-frame {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.calc-fallback {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.26));
  border: 1px solid rgba(255,255,255,0.72);
}
.calc-fallback h2 {
  margin: 0;
  font-size: 1.15rem;
}
.code-path {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(17,24,39,0.05);
  border: 1px solid rgba(17,24,39,0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  word-break: break-all;
}
html[data-theme="dark"] .calc-shell-panel:not(.is-embed),
html[data-theme="dark"] .calc-fallback,
html[data-theme="dark"] .code-path,
html[data-theme="dark"] .calc-embed-frame {
  background: linear-gradient(180deg, rgba(17,24,39,0.68), rgba(17,24,39,0.50));
  border-color: rgba(255,255,255,0.10);
  color: #f8fafc;
}


body.page-calculator .page-header { display: none !important; }
