:root {
  --esy-bg: #faf6f0;
  --esy-panel: #ffffff;
  --esy-footer: #f3ebe0;
  --esy-text: #2a1f14;
  --esy-muted: #6b5a48;
  --esy-link: #a25700;
  --esy-border: #e4d5c0;
  --esy-heading: #7d5329;
  --esy-nav: #996600;
  --esy-accent: #c9a227;
  --esy-radius: 14px;
  --esy-shadow: rgba(120, 80, 20, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --esy-bg: #24180e;
  --esy-panel: #3d2c18;
  --esy-footer: #18120c;
  --esy-text: #f4ead8;
  --esy-muted: #d4c3a8;
  --esy-link: #e8b84a;
  --esy-border: #6a5238;
  --esy-heading: #f0cc7a;
  --esy-nav: #6b4700;
  --esy-accent: #e6c37a;
  --esy-shadow: rgba(0, 0, 0, 0.35);
}

html { color-scheme: light; }

body {
  background-color: var(--esy-bg) !important;
  color: var(--esy-text);
}

a { color: var(--esy-link); }
a:hover { color: var(--esy-heading); }

h1, h2, h3, h4, h5, h6 { color: var(--esy-heading); }

main h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  font-size: 1.75rem;
  min-height: 2.2em;
}

.esyn-lemma-wrap,
.esy-lemma-wrap {
  padding-top: 1rem;
  min-height: 14rem;
}

.esyn-lemma-wrap h1,
.esy-lemma-wrap h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  min-height: 2.2em;
}

.okr-sub {
  color: var(--esy-muted);
  font-weight: 500;
  font-size: 1rem;
}

.esy-crumbs .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.esy-crumbs .breadcrumb-item.active {
  color: var(--esy-text);
}

.esy-ad-slot,
.esyn-ad-slot {
  min-height: 90px;
  margin: 0.75rem 0 1rem;
  width: 100%;
}

.adsbygoogle,
ins.adsbygoogle {
  color-scheme: light;
}

.esy-count-muted,
i[style*="color:#a3a59c"] {
  color: var(--esy-muted) !important;
  font-size: 16px;
}

.navbar.backolnav {
  padding: 0.45rem 0.6rem;
  box-shadow: 0 6px 20px rgba(120, 80, 20, 0.22);
}

.navbar .nav-link {
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
}

.navbar .nav-link:hover { background: rgba(255, 255, 255, 0.12); }

.navbar #search-data {
  border-radius: 999px;
  border: 0;
  height: 44px;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.navbar #search-data:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.site-search-bar {
  background-color: var(--esy-panel);
  border-bottom: 1px solid var(--esy-border);
}

.ad-head-slot {
  margin-bottom: 0.5rem;
  min-height: 285px;
}

.word-entry,
.site-panel {
  background-color: var(--esy-panel);
  color: var(--esy-text);
  border: 1px solid var(--esy-border);
  border-radius: var(--esy-radius);
  box-shadow: 0 1px 2px rgba(120, 80, 20, 0.04), 0 8px 20px var(--esy-shadow);
}

.site-section a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.word-entry {
  padding: 1.5rem 1.4rem 1.25rem;
  margin-bottom: 1.5rem;
}

.word-card,
.esyn-word-card {
  padding: 0 0 1.15rem;
  margin: 0 0 1.15rem;
  border-bottom: 1px solid var(--esy-border);
  background: transparent;
  box-shadow: none;
  min-height: 12rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.word-card-term {
  color: var(--esy-link);
  font-size: 2rem;
}

.word-card-label {
  color: var(--esy-muted);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
}

.esyn-syn-list {
  color: var(--esy-heading);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: none;
  text-align: center;
  margin: 0.75rem 1rem 0;
  overflow-wrap: anywhere;
}

.word-entry-actions {
  margin: 1.1rem 0 0;
}

.site-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 1.35rem 0.15rem;
  margin: 0;
  border-top: 1px solid var(--esy-border);
}

.site-panel {
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
}

.esy-sisters p { margin-bottom: 0.35rem; }

.esy-sisters a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  font-weight: 600;
}

.esy-sisters a:hover { text-decoration: none; background: rgba(153, 102, 0, 0.08); }

.esy-wiki-ico {
  font-size: 1.15rem;
  color: var(--esy-muted);
  vertical-align: middle;
}

a:hover .esy-wiki-ico {
  color: var(--esy-link);
}

.esy-glyph-img,
.mig img,
.brail img {
  height: 60px;
  width: auto;
  vertical-align: bottom;
  opacity: 1;
  filter: none;
}

html[data-theme="dark"] .esy-glyph-img,
html[data-theme="dark"] .mig img,
html[data-theme="dark"] .brail img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.esy-sisters img,
.site-footer-sites img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  border-radius: 4px;
}

.esy-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  margin: 0;
  font-weight: 600;
  color: #fff !important;
  background-color: var(--esy-nav);
  box-shadow: 0 8px 18px rgba(153, 102, 0, 0.22);
}

.esy-btn:hover { color: #fff !important; filter: brightness(1.08); }

.esy-side-menu {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.jquery-accordion-menu {
  float: none !important;
  width: 100%;
  min-width: 0;
  border-radius: var(--esy-radius);
  overflow: hidden;
  box-shadow: 0 10px 24px var(--esy-shadow);
}

.jquery-accordion-menu ul li a,
.jquery-accordion-menu .jquery-accordion-menu-header,
.jquery-accordion-menu .jquery-accordion-menu-footer {
  color: #fff !important;
}

.col-md-4 .site-panel {
  clear: both;
  margin-top: 1.25rem;
}

hr.esy-rule {
  border: 0;
  border-top: 1px solid var(--esy-border);
  margin: 1.5rem 0;
}

.theme-button {
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.theme-button:hover,
.theme-button:focus {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.esy-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 0.25rem;
}

.esy-share-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--esy-text);
  margin-right: 0.25rem;
}

.esy-share-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  line-height: 1;
}

.esy-share-btn:hover { color: #fff !important; opacity: 0.9; }

.esy-share-native,
.esy-share-copy { background: #996600; }
.esy-share-facebook { background: #1877f2; }
.esy-share-x { background: #111; }
.esy-share-whatsapp { background: #25d366; }
.esy-share-telegram { background: #26a5e4; }
.esy-share-mail { background: #5b768c; }

#esy-share-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(12px);
  background: #2a1a10;
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 1080;
}

#esy-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-footer {
  background: var(--esy-footer);
  color: var(--esy-text);
  border-top: 4px solid var(--esy-accent);
  padding: 2.5rem 0 1.5rem;
  margin-top: 1.25rem;
  text-align: left;
}

.site-footer a { color: var(--esy-link); }

.site-footer-lead,
.site-footer-site-desc,
.site-footer-copy { color: var(--esy-muted); }

.site-footer-links,
.site-footer-sites { list-style: none; padding: 0; margin: 0; }

.site-footer-links li { margin-bottom: 0.4rem; }

.site-footer-sites li { margin-bottom: 0.75rem; }

.site-footer-sites a {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: inherit;
}

.site-footer-sites a:hover { text-decoration: none; }

.site-footer-site-name { display: block; font-weight: 700; }

.site-footer-site-desc { display: block; font-size: 0.85rem; font-weight: 400; }

.site-footer-copy {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--esy-border);
  text-align: center;
  font-size: 0.9rem;
}

.sister-edefinicje { color: #92400e; }
.sister-eodmiany { color: #a11d33; }
.sister-esynonimy { color: #7a4e00; }
.sister-ehasla { color: #1d4ed8; }
.sister-eanagramy { color: #006619; }
.sister-esylaby { color: #7418d1; }
.sister-eslowniki { color: #2c516f; }

.klingon,
.aurebesh,
.runes,
.fonetNato,
.mors,
.mig,
.brail,
.esy-morse-mark {
  color: var(--esy-text);
}

.note.yellow,
.quote-container blockquote.note {
  background: #ffffcc !important;
  color: #333 !important;
}

.note.yellow small {
  color: #5c4030 !important;
}

.note.yellow .esyn-note-term,
.note.yellow dt {
  color: #723216 !important;
}

.note.yellow .esyn-note-syn,
.note.yellow dd {
  color: #b77107 !important;
}

.note.yellow a {
  color: #7a5200 !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-body,
[data-theme="dark"] .text-muted { color: var(--esy-text) !important; }

[data-theme="dark"] .sister-edefinicje { color: #f0a45a !important; }
[data-theme="dark"] .sister-eodmiany { color: #f07a8a !important; }
[data-theme="dark"] .sister-esynonimy { color: #e0c15a !important; }
[data-theme="dark"] .sister-ehasla { color: #8eb6ff !important; }
[data-theme="dark"] .sister-eanagramy { color: #6dcf88 !important; }
[data-theme="dark"] .sister-esylaby { color: #e0b0f0 !important; }
[data-theme="dark"] .sister-eslowniki { color: #8eb6d4 !important; }

[data-theme="dark"] .word-entry,
[data-theme="dark"] .site-panel,
[data-theme="dark"] [style*="background-color:#FFFFFF"],
[data-theme="dark"] [style*="background-color:white"] {
  background-color: var(--esy-panel) !important;
}

[data-theme="dark"] .note.yellow,
[data-theme="dark"] .quote-container blockquote.note {
  background: #ffffcc !important;
  color: #333 !important;
}
