
/* Core 127 — Dictionnaire v3
   Force layer: applied only after JS adds body.core127-dictionary-force.
*/
body.core127-dictionary-force{
  --c127-bg:#0b0912;
  --c127-surface:#15111f;
  --c127-surface-2:#1c1629;
  --c127-line:rgba(221,194,138,.18);
  --c127-text:#f7f1fb;
  --c127-muted:#c3b9cb;
  --c127-gold:#d9b66f;
  --c127-violet:#8c6ac6;
  --c127-shadow:0 20px 50px rgba(0,0,0,.22);
  background:var(--c127-bg)!important;
  color:var(--c127-text)!important;
}

body.core127-dictionary-force.core127-light{
  --c127-bg:#f6f1f8;
  --c127-surface:#ffffff;
  --c127-surface-2:#f1eaf5;
  --c127-line:rgba(91,62,112,.14);
  --c127-text:#21192a;
  --c127-muted:#665d6d;
  --c127-gold:#8e682b;
  --c127-violet:#6b4d9f;
  --c127-shadow:0 18px 44px rgba(53,31,68,.08);
}

body.core127-dictionary-force main,
body.core127-dictionary-force #primary,
body.core127-dictionary-force .site-main{
  color:var(--c127-text)!important;
}

/* Main dictionary shell */
body.core127-dictionary-force main > article,
body.core127-dictionary-force .site-main > article,
body.core127-dictionary-force .entry-content,
body.core127-dictionary-force .page-content{
  max-width:1040px;
  margin-inline:auto;
}

/* Typography */
body.core127-dictionary-force h1{
  max-width:18ch;
  font-size:clamp(2.2rem,6vw,4.8rem)!important;
  line-height:.98!important;
  letter-spacing:-.045em!important;
  margin-bottom:.55em!important;
  color:var(--c127-text)!important;
}
body.core127-dictionary-force h2{
  margin-top:1.7em!important;
  color:var(--c127-text)!important;
  letter-spacing:-.02em;
}
body.core127-dictionary-force h3{color:var(--c127-text)!important}
body.core127-dictionary-force p,
body.core127-dictionary-force li{color:var(--c127-muted)!important;line-height:1.72}
body.core127-dictionary-force a{color:var(--c127-gold)}

/* Compact ALL old label clusters on dictionary pages */
body.core127-dictionary-force :is(
  [class*="tag"],[class*="badge"],[class*="chip"],[class*="label"],
  [class*="meta-item"],[class*="pill"]
){
  box-shadow:none!important;
}
body.core127-dictionary-force :is(
  [class*="tag"],[class*="badge"],[class*="chip"],[class*="pill"]
):not(button):not(a){
  display:inline-flex!important;
  align-items:center!important;
  min-height:26px!important;
  max-width:100%!important;
  padding:3px 8px!important;
  margin:2px 4px 2px 0!important;
  border:1px solid var(--c127-line)!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--c127-muted)!important;
  font-size:11px!important;
  font-weight:650!important;
  line-height:1.2!important;
  letter-spacing:.01em!important;
}

/* Cards: remove noisy gradients/borders and restore rhythm */
body.core127-dictionary-force :is(
  [class*="symbol-card"],[class*="symbol__card"],[class*="dictionary-card"],
  [class*="dream-symbol"],[class*="interpretation-card"]
){
  border:1px solid var(--c127-line)!important;
  border-radius:18px!important;
  background:var(--c127-surface)!important;
  box-shadow:var(--c127-shadow)!important;
}

/* Existing blocks become clean sections */
body.core127-dictionary-force .entry-content > :is(section,div):has(> h2),
body.core127-dictionary-force [class*="symbol"] :is(section,div):has(> h2){
  border-radius:18px;
}

/* Translation UI — aggressively compact without deleting functionality */
body.core127-dictionary-force [data-core127-translation-wrap]{
  position:fixed;
  z-index:999;
  right:16px;
  bottom:18px;
  display:flex!important;
  align-items:center;
  gap:6px;
  width:auto!important;
  max-width:calc(100vw - 32px);
  padding:6px!important;
  border:1px solid var(--c127-line)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--c127-surface) 94%,transparent)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.2)!important;
  backdrop-filter:blur(16px);
}
body.core127-dictionary-force [data-core127-translation-wrap] button,
body.core127-dictionary-force [data-core127-translation-wrap] select,
body.core127-dictionary-force [data-core127-translation-wrap] a{
  min-width:auto!important;
  width:auto!important;
  min-height:34px!important;
  padding:5px 10px!important;
  margin:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--c127-text)!important;
  font-size:12px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

/* Footer library block */
.c127-v3-grimoire{
  max-width:1040px;margin:34px auto 80px;padding:22px;
  display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;
  border:1px solid var(--c127-line);border-radius:20px;
  background:var(--c127-surface);box-shadow:var(--c127-shadow)
}
.c127-v3-grimoire strong{display:block;color:var(--c127-text);font-size:1.15rem;margin-bottom:5px}
.c127-v3-grimoire p{margin:0!important}
.c127-v3-grimoire a{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 16px;
  border-radius:999px;background:var(--c127-gold);color:#21182a!important;text-decoration:none!important;font-weight:850
}

/* Readability in light mode */
body.core127-dictionary-force.core127-light :is(input,select,textarea,button){
  color:var(--c127-text);
}
body.core127-dictionary-force.core127-light :is(
  .entry-content,.site-main,[class*="symbol"],[class*="dictionary"]
){
  color:var(--c127-text)!important;
}

/* prevent huge control groups */
body.core127-dictionary-force :is([class*="filters"],[class*="taxonomy"],[class*="chips"],[class*="tags"]){
  gap:6px!important;
  row-gap:6px!important;
}

/* Mobile */
@media(max-width:720px){
  .c127-v3-hero{margin:10px 12px 18px;padding:15px}
  .c127-v3-grimoire{margin:28px 12px 76px;grid-template-columns:1fr}
  .c127-v3-grimoire a{width:100%}
  body.core127-dictionary-force h1{font-size:clamp(2rem,12vw,3.4rem)!important}
  body.core127-dictionary-force [data-core127-translation-wrap]{right:10px;bottom:10px}
}

/* reduced motion */
@media(prefers-reduced-motion:reduce){
  body.core127-dictionary-force *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* 1.3.2 — calmer CTAs */
body.core127-dictionary-force .c127-force-soft-primary,
body.core127-dictionary-force a.c127-force-soft-primary,
body.core127-dictionary-force button.c127-force-soft-primary{
  background:rgba(217,182,111,.13)!important;
  color:var(--c127-text)!important;
  border:1px solid rgba(217,182,111,.32)!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-weight:700!important;
}
body.core127-dictionary-force .c127-force-soft-primary:hover{
  background:rgba(217,182,111,.20)!important;
  border-color:rgba(217,182,111,.42)!important;
  transform:none!important;
}

body.core127-dictionary-force .c127-force-soft-secondary,
body.core127-dictionary-force a.c127-force-soft-secondary,
body.core127-dictionary-force button.c127-force-soft-secondary{
  background:transparent!important;
  color:var(--c127-muted)!important;
  border:1px solid var(--c127-line)!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-weight:650!important;
}
body.core127-dictionary-force .c127-force-soft-secondary:hover{
  color:var(--c127-text)!important;
  background:rgba(255,255,255,.03)!important;
  transform:none!important;
}

/* generic button treatment inside dictionary only */
body.core127-dictionary-force .entry-content a.wp-element-button,
body.core127-dictionary-force .entry-content .wp-block-button__link{
  border-radius:999px!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

/* Library block moved to end */
.c127-v3-library-footer{
  max-width:1040px;
  margin:42px auto 72px;
  padding:22px 24px;
  border:1px solid var(--c127-line);
  border-radius:20px;
  background:var(--c127-surface);
  box-shadow:0 16px 36px rgba(0,0,0,.12);
}
.c127-v3-library-footer__brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--c127-gold);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.c127-v3-library-footer p{
  max-width:64ch;
  margin:.8rem 0 1rem!important;
}
.c127-v3-library-footer__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.c127-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:6px 13px;
  border-radius:999px;
  text-decoration:none!important;
  font-size:.84rem;
  font-weight:700;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.c127-btn--soft{
  background:rgba(217,182,111,.10);
  color:var(--c127-text)!important;
  border:1px solid rgba(217,182,111,.28);
}
.c127-btn--soft:hover{
  background:rgba(217,182,111,.16);
}
.c127-btn--ghost{
  background:transparent;
  color:var(--c127-muted)!important;
  border:1px solid var(--c127-line);
}
.c127-btn--ghost:hover{
  color:var(--c127-text)!important;
  background:rgba(255,255,255,.025);
}

@media(max-width:720px){
  .c127-v3-library-footer{margin:32px 12px 68px;padding:18px}
  .c127-v3-library-footer__actions{display:grid;grid-template-columns:1fr}
  .c127-btn{width:100%}
}
