/* Контраст секцій головної: старий стиль WordPress задає темний колір заголовкам. */
.hb-scope h2.wp-block-heading,
.hb-scope h3.wp-block-heading { color: #f5f6fa !important; }
.hb-scope .hb-steps h3.wp-block-heading { color: #cbb8ff !important; }
.hb-scope .hb-card { min-width: 0; }
.hb-scope .hb-card .wp-block-button,
.hb-scope .hb-card .wp-block-button__link { max-width: 100%; }
.hb-scope .hb-card .wp-block-button__link { overflow-wrap: anywhere; }
.hb-scope .mp-home-links h2 { color: #f5f6fa !important; }

.mp-directory,.mp-profile,.mp-tarot-page,.mp-home-links { font-family: Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.mp-directory *,.mp-profile *,.mp-tarot-page *,.mp-home-links * { box-sizing: border-box; }
.mp-directory,.mp-profile,.mp-tarot-page { width: min(100% - 32px,1100px); max-width: 1100px !important; margin: 24px auto 80px !important; color: #202337; }
.mp-directory a,.mp-profile a,.mp-tarot-page a { text-decoration: none; }
.mp-kicker { margin: 0 0 12px; color: #7657a5; font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.mp-lead { max-width: 710px; font-size: clamp(1.05rem,1.8vw,1.25rem); line-height: 1.65; color: #4a4b5c; }
.mp-note { padding: 16px 20px; border-left: 4px solid #b59adb; background: #f6f2fb; border-radius: 0 12px 12px 0; color: #454056; font-size: .94rem; line-height: 1.6; }
.mp-directory-hero,.mp-tarot-hero { padding: clamp(30px,5vw,64px); border-radius: 24px; background: radial-gradient(circle at 80% 15%,#3e345d 0,#171725 52%,#10151e 100%); color: #fff; overflow: hidden; }
.mp-directory-hero h2,.mp-tarot-hero h2 { max-width: 760px; color: #fff !important; font-family: Georgia,serif; font-size: clamp(2rem,4.5vw,3.7rem); line-height: 1.12; margin: 0 0 18px; }
.mp-directory-hero .mp-lead,.mp-tarot-hero .mp-lead { color: #e0dce9; }
.mp-directory-hero .mp-kicker,.mp-tarot-hero .mp-kicker { color: #cbb8ff; }
.mp-section-title { font-family: Georgia,serif; font-size: clamp(1.7rem,3vw,2.5rem); color: #232036 !important; margin: 54px 0 16px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); gap: 20px; margin: 28px 0 36px; }
.mp-card { display: flex; flex-direction: column; min-width: 0; padding: 26px; border: 1px solid #ddd6e9; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px #1f173d0d; }
.mp-card:hover { border-color: #a386d2; box-shadow: 0 18px 40px #1f173d1a; }
.mp-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(145deg,#30264b,#846da7); color: #fff; font: 600 1.55rem Georgia,serif; letter-spacing: .02em; }
.mp-card h3 { color: #252137 !important; margin: 18px 0 5px; font: 600 1.36rem Georgia,serif; }
.mp-card p,.mp-profile p { line-height: 1.65; }
.mp-role { color: #665d79; font-size: .93rem; margin: 0 0 14px; }
.mp-tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 12px 0 20px; padding: 0; }
.mp-tags li { padding: 6px 9px; border-radius: 999px; background: #f2edf8; color: #514265; font-size: .79rem; font-weight: 650; }
.mp-link { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; color: #654996 !important; font-weight: 750; }
.mp-link:hover,.mp-link:focus-visible { text-decoration: underline; }
.mp-profile { max-width: 980px !important; }
.mp-profile-head { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 28px; align-items: center; padding: clamp(26px,4vw,48px); border-radius: 22px; background: #f5f1fa; }
.mp-profile-head .mp-avatar { width: 112px; height: 112px; font-size: 2.2rem; }
.mp-profile-head h2 { color: #201d30 !important; font: 600 clamp(2rem,4vw,3.1rem) Georgia,serif; margin: 0 0 6px; }
.mp-profile-panel { padding: 26px 0; max-width: 740px; }
.mp-profile-panel h3 { color: #282039 !important; font: 600 1.7rem Georgia,serif; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.mp-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border-radius: 11px; background: #bba6e7; color: #1b1727 !important; font: 750 .98rem Inter,system-ui,sans-serif; border: 2px solid #bba6e7; cursor: pointer; }
.mp-button:hover,.mp-button:focus-visible { background: #d7c5f5; border-color: #d7c5f5; color: #171324 !important; }
.mp-button-secondary { background: transparent; border-color: #a891cc; color: #674c8e !important; }
.mp-button-secondary:hover,.mp-button-secondary:focus-visible { color: #241733 !important; }

.mp-tarot-page { max-width: 1080px !important; }
.mp-tarot-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 32px; }
.mp-tarot-nav a { padding: 10px 15px; border: 1px solid #dfd7ea; border-radius: 999px; color: #59446f; font-weight: 650; }
.mp-tarot-nav a[aria-current="page"] { background: #302548; border-color: #302548; color: #fff; }
.mp-tarot-nav a:hover,.mp-tarot-nav a:focus-visible { border-color: #8365aa; text-decoration: underline; }
.mp-tool { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 24px; margin: 30px 0; }
.mp-tool-panel { padding: clamp(20px,3vw,30px); border: 1px solid #dcd4e7; border-radius: 18px; background: #fff; }
.mp-tool-panel h3 { margin: 0 0 16px; color: #2b223c !important; font: 600 1.5rem Georgia,serif; }
.mp-tool label { display: block; margin: 18px 0 8px; color: #2d2940; font-weight: 700; }
.mp-tool textarea { display: block; width: 100%; min-height: 108px; padding: 12px; border: 1px solid #bfb6cc; border-radius: 10px; font: inherit; resize: vertical; }
.mp-tool textarea:focus-visible,.mp-tool button:focus-visible,.mp-button:focus-visible,.mp-tarot-nav a:focus-visible { outline: 3px solid #f0ab4b; outline-offset: 3px; }
.mp-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mp-suggestions button { border: 1px solid #cfc3e0; border-radius: 999px; background: #f8f5fc; color: #4c3a65; padding: 8px 11px; cursor: pointer; font: 600 .83rem Inter,system-ui,sans-serif; }
.mp-hint { font-size: .86rem; color: #655d71; line-height: 1.55; }
.mp-results[hidden] { display: none; }
.mp-results { background: #f8f5fc; }
.mp-results h3 { margin-bottom: 10px; }
.mp-results h3:focus { outline: none; }
.mp-card-preview { display: flex; justify-content: center; gap: 12px; margin: 25px 0 0; }
.mp-card-preview[hidden] { display: none; }
.mp-card-preview img { display: block; width: min(27%,110px); height: auto; aspect-ratio: 360 / 604; object-fit: cover; border-radius: 7px; box-shadow: 0 10px 22px #1e153942; transform: rotate(-5deg); }
.mp-card-preview img:only-child { width: min(50%,145px); }
.mp-card-preview img:nth-child(2) { transform: translateY(-7px); }
.mp-card-preview img:nth-child(3) { transform: rotate(5deg); }
.mp-drawn { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,172px),1fr)); gap: 12px; margin: 20px 0; }
.mp-drawn article { min-width: 0; padding: 15px; border: 1px solid #d6c8e7; border-radius: 13px; background: #fff; }
.mp-card-visual { width: min(100%,190px); aspect-ratio: 360 / 604; margin: 0 auto 17px; perspective: 900px; filter: drop-shadow(0 9px 11px #33234333); }
.mp-card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s ease; }
.mp-card-visual.is-revealed .mp-card-inner { transform: rotateY(180deg); }
.mp-card-side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; border-radius: 8px; background: #302548; }
.mp-card-front { transform: rotateY(180deg); background: #f7f0df; }
.mp-card-side img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mp-tool[data-mp-tarot="yesno"] .mp-drawn { grid-template-columns: 1fr; }
.mp-tool[data-mp-tarot="yesno"] .mp-drawn article { display: grid; grid-template-columns: minmax(145px,190px) minmax(0,1fr); align-items: center; gap: 24px; }
.mp-tool[data-mp-tarot="yesno"] .mp-card-visual { width: 100%; margin: 0; }
.mp-drawn h4 { color: #2e2541 !important; margin: 5px 0; font: 600 1.15rem Georgia,serif; }
.mp-drawn p { margin: 6px 0; line-height: 1.55; font-size: .92rem; }
.mp-position { text-transform: uppercase; letter-spacing: .1em; font-size: .69rem !important; font-weight: 800; color: #7657a5; }
.mp-outcome { padding: 13px 16px; border-radius: 10px; background: #e9ddf7; color: #30213f; font-weight: 750; }
.mp-related { margin: 42px 0; }
.mp-related .mp-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); }
.mp-related .mp-card { padding: 20px; }
.mp-related .mp-card h3 { margin-top: 0; }
.mp-home-links { max-width: 1080px; padding: 48px 22px; margin: 0 auto; color: #f5f6fa; }
.mp-home-links h2 { font: 600 clamp(1.8rem,3vw,2.5rem) Georgia,serif; }
.mp-home-links p { color: #d8d8e4; }
.mp-home-links .mp-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.mp-home-links .mp-card { background: #151825; border-color: #414058; }
.mp-home-links .mp-card h3 { color: #f5f6fa !important; }
.mp-home-links .mp-card p { color: #d8d8e4; }
.mp-home-links .mp-link { color: #cdb7f5 !important; }
@media (max-width: 760px) {
  .mp-tool { grid-template-columns: 1fr; }
  .mp-profile-head { grid-template-columns: 1fr; }
  .mp-directory,.mp-profile,.mp-tarot-page { width: min(100% - 24px,1100px); }
  .mp-directory-hero,.mp-tarot-hero { border-radius: 16px; }
  .mp-card { padding: 21px; }
  .mp-actions .mp-button { width: 100%; }
}
@media (max-width: 540px) {
  .mp-tool[data-mp-tarot="yesno"] .mp-drawn article { grid-template-columns: 1fr; }
  .mp-tool[data-mp-tarot="yesno"] .mp-card-visual { width: min(100%,190px); margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-card-inner { transition: none; }
}
