h1:focus {
    outline: none;
}

.validation-message {
    color: #e50000;
}
/* Mystic Tools is intentionally a site section, not a separate app. Keep it light,
   indexable, and visually aligned with the existing Amira Asmodea pages. */
.mystic-compact-hero {
    background: linear-gradient(135deg, rgba(68, 68, 68, 0.82), rgba(158, 158, 158, 0.68)), url('/img/page-top-bg.webp') center/cover no-repeat;
    color: #fff;
    min-height: 170px;
    padding: 0;
}

.mystic-page-heading {
    padding: 44px 0 8px;
    background: #fff;
}

.mystic-page-heading h1 {
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    font-size: clamp(2.25rem, 5vw, 4.2rem);
    line-height: 1.08;
    margin: 0 0 14px;
}

.mystic-page-heading p {
    max-width: 680px;
    margin: 0;
    font-size: 18px;
    color: #555;
}

.mystic-eyebrow {
    margin: 0 0 10px;
    color: #d94f4f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mystic-page-heading .mystic-eyebrow {
    color: #d94f4f;
}

.mystic-tools-section,
.tarot-reading-section,
.mystic-seo-section {
    background: #fff;
}

.mystic-page-heading + .mystic-tools-section,
.mystic-page-heading + .tarot-reading-section {
    padding-top: 34px;
}

.mystic-tools-intro,
.mystic-seo-copy,
.mystic-seo-section .container {
    max-width: 900px;
}

.mystic-tools-intro h2,
.mystic-seo-copy h2,
.mystic-seo-section h2,
.tarot-intro-panel h2,
.tarot-instructions h2 {
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    line-height: 1.18;
}

.mystic-tool-card {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 36px;
    align-items: center;
    margin: 38px 0;
    padding: 28px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(31, 31, 31, 0.08);
}

.mystic-tool-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: radial-gradient(circle at center, #fff7ef 0, #f5f5f5 58%, #ece7df 100%);
}

.mystic-tool-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.mystic-tool-image:hover img,
.mystic-tool-image:focus-visible img {
    transform: scale(1.035);
}

.mystic-tool-orbit,
.mystic-tool-card-back {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
}

.mystic-tool-orbit {
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(216, 180, 106, 0.55);
    border-radius: 50%;
}

.mystic-tool-card-back {
    width: 110px;
    height: 168px;
    border: 2px solid #3f3f3f;
    border-radius: 10px;
    background:
        radial-gradient(circle at center, rgba(255, 160, 106, 0.28) 0 18%, transparent 19%),
        linear-gradient(135deg, #fffaf2, #f4eee5);
    box-shadow: 0 12px 24px rgba(31, 31, 31, 0.18);
}

.mystic-tool-card-back::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(217, 79, 79, 0.6);
    border-radius: 7px;
}

.mystic-tool-card-back::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 1px solid #d8b46a;
    background: rgba(255, 111, 97, 0.08);
}

.mystic-tool-card-back.card-a {
    transform: translate(-70%, -48%) rotate(-12deg);
}

.mystic-tool-card-back.card-b {
    transform: translate(-48%, -52%) rotate(3deg);
}

.mystic-tool-card-back.card-c {
    transform: translate(-24%, -46%) rotate(15deg);
}

.mystic-tool-content h2 a {
    color: #1f1f1f;
}

.tarot-dictionary-section,
.tarot-card-detail-section {
    background: #fff;
}

.tarot-dictionary-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 520px) auto;
    gap: 10px 18px;
    align-items: end;
    max-width: 860px;
    margin-bottom: 32px;
}

.tarot-dictionary-toolbar label {
    grid-column: 1 / -1;
    margin: 0;
    color: #1f1f1f;
    font-weight: 800;
}

.tarot-dictionary-toolbar input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    color: #333;
}

.tarot-dictionary-toolbar p {
    margin: 0;
    color: #666;
    font-weight: 700;
}

.tarot-dictionary-group {
    margin-bottom: 42px;
}

.tarot-dictionary-group h2,
.tarot-card-detail-copy h2 {
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    line-height: 1.18;
}

.tarot-dictionary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 20px;
}

.tarot-dictionary-card {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    text-align: center;
    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.tarot-dictionary-group[hidden],
.tarot-dictionary-card[hidden] {
    display: none !important;
}

.tarot-dictionary-card:hover,
.tarot-dictionary-card:focus-visible {
    color: #d94f4f;
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(31, 31, 31, 0.11);
}

.tarot-dictionary-card img {
    width: 100%;
    max-width: 124px;
    aspect-ratio: 2 / 3;
    height: auto;
    border-radius: 7px;
    object-fit: cover;
}

.tarot-dictionary-card span {
    min-height: 42px;
    font-weight: 800;
    line-height: 1.2;
}

.tarot-back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #d94f4f;
    font-weight: 800;
}

.tarot-card-detail {
    display: grid;
    grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.tarot-card-detail-image {
    position: sticky;
    top: 20px;
}

.tarot-card-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(31, 31, 31, 0.16);
}

.tarot-card-detail-copy {
    max-width: 820px;
}

.tarot-card-detail-copy p {
    color: #444;
    font-size: 18px;
    line-height: 1.75;
}

.tarot-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tarot-keywords a {
    padding: 7px 11px;
    border: 1px solid #ead8d8;
    border-radius: 999px;
    background: #fff8f5;
    color: #8f3434;
    font-size: 13px;
    font-weight: 800;
}

.tarot-keywords a:hover,
.tarot-keywords a:focus-visible {
    border-color: #d94f4f;
    background: #fff0ec;
    color: #7d2525;
}

.tarot-keyword-section {
    background: #fff;
}

.tarot-keyword-list {
    display: grid;
    gap: 28px;
}

.tarot-keyword-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 28px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 31, 31, 0.08);
}

.tarot-keyword-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f4f4;
}

.tarot-keyword-thumb img {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
}

.tarot-keyword-text h2 {
    margin-bottom: 12px;
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    font-size: 34px;
    line-height: 1.16;
}

.tarot-keyword-text h2 a {
    color: #1f1f1f;
}

.tarot-keyword-text h2 a:hover {
    color: #d94f4f;
}

.tarot-keyword-text p:last-child {
    margin-bottom: 0;
    color: #555;
    font-size: 18px;
    line-height: 1.7;
}

.tarot-keyword-pagination {
    margin-top: 34px;
}

.tarot-intro-panel,
.tarot-workspace {
    padding: 28px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 31, 31, 0.08);
}

.tarot-intro-panel {
    max-width: 920px;
    margin: 0 auto 28px;
}

.tarot-workspace[hidden] {
    display: none;
}

.tarot-instructions {
    max-width: 820px;
    margin: 0 auto 24px;
    text-align: center;
}

.tarot-fan {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 245px;
    margin: 28px auto 20px;
    padding: 38px 8px 18px;
    overflow-x: clip;
}

.tarot-fan-card {
    --fan-angle: 0deg;
    --fan-offset: 0px;
    --fan-index: 0;
    position: relative;
    width: 78px;
    height: 128px;
    margin-left: -42px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(var(--fan-offset)) rotate(var(--fan-angle));
    transform-origin: 50% 105%;
    transition: transform 180ms ease, filter 180ms ease;
    z-index: var(--fan-index);
}

.tarot-fan-card:first-child {
    margin-left: 0;
}

.tarot-fan-card:hover,
.tarot-fan-card:focus-visible {
    transform: translateY(calc(var(--fan-offset) - 18px)) rotate(var(--fan-angle)) scale(1.04);
    z-index: 90;
    outline: none;
}

.tarot-fan-card:disabled {
    cursor: default;
    opacity: 1;
}

.tarot-fan-card.is-selected {
    transform: translateY(calc(var(--fan-offset) - 28px)) rotate(var(--fan-angle)) scale(1.06);
    z-index: 100;
    filter: drop-shadow(0 12px 18px rgba(217, 79, 79, 0.32));
}

.tarot-card-back {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 2px solid #3f3f3f;
    border-radius: 9px;
    background:
        linear-gradient(135deg, rgba(255, 160, 106, 0.26), transparent 38%),
        radial-gradient(circle at center, rgba(216, 180, 106, 0.3) 0 16%, transparent 17%),
        #faf7f2;
    box-shadow: 0 8px 20px rgba(31, 31, 31, 0.16);
}

.tarot-card-back::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(217, 79, 79, 0.72);
    border-radius: 6px;
}

.tarot-card-back::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 1px solid #d8b46a;
    border-radius: 4px;
}

.tarot-card-back span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #ff6f61;
}

.tarot-selected-count {
    min-height: 28px;
    margin: 8px 0 24px;
    text-align: center;
    color: #444;
    font-weight: 700;
}

.tarot-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tarot-result-slot {
    min-height: 280px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f8f8f8;
}

.tarot-result-empty {
    display: grid;
    min-height: 190px;
    place-items: center;
    color: #777;
    text-align: center;
}

.tarot-result-card {
    display: grid;
    gap: 16px;
}

.tarot-result-image {
    display: flex;
    justify-content: center;
    min-height: 230px;
}

.tarot-result-image img,
.tarot-result-placeholder {
    width: min(100%, 150px);
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 12px 24px rgba(31, 31, 31, 0.14);
}

.tarot-result-image img.is-reversed {
    transform: rotate(180deg);
}

.tarot-result-placeholder {
    border: 2px solid #3f3f3f;
    background: linear-gradient(135deg, #fffaf2, #f4eee5);
}

.tarot-result-copy h2 {
    margin-bottom: 4px;
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    font-size: 26px;
    line-height: 1.12;
}

.tarot-orientation {
    margin-bottom: 10px;
    color: #d94f4f;
    font-weight: 700;
}

.tarot-actions {
    margin-top: 24px;
    text-align: center;
}

.tarot-disclaimer {
    max-width: 920px;
    margin: 24px auto 0;
    padding: 16px 18px;
    border-left: 4px solid #ff6f61;
    background: #f5f5f5;
    color: #444;
}

.yes-no-panel {
    display: grid;
    gap: 16px;
}

.yes-no-question-label {
    margin-bottom: -8px;
    color: #1f1f1f;
    font-weight: 700;
}

.yes-no-question {
    width: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    resize: vertical;
}

.yes-no-result[hidden] {
    display: none;
}

.yes-no-card-wrap {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.yes-no-copy h2 {
    margin-bottom: 8px;
    color: #1f1f1f;
    font-family: "Playfair Display", serif;
    font-size: 34px;
    line-height: 1.1;
}

.yes-no-answer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    margin: 6px 0 14px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #333;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.yes-no-answer[data-answer="yes"] {
    background: #4c8a45;
}

.yes-no-answer[data-answer="no"] {
    background: #a93131;
}

.yes-no-answer[data-answer="maybe"] {
    background: #b77b25;
}

.mystic-seo-section {
    padding: 18px 0 72px;
}

.mystic-seo-section h2 {
    margin-top: 28px;
}

@media (max-width: 991px) {
    .mystic-tool-card,
    .tarot-results,
    .yes-no-card-wrap,
    .tarot-card-detail,
    .tarot-keyword-item {
        grid-template-columns: 1fr;
    }

    .yes-no-card-wrap {
        text-align: center;
    }

    .tarot-fan-card {
        width: 64px;
        height: 106px;
        margin-left: -36px;
    }

    .tarot-card-detail-image {
        position: static;
        max-width: 320px;
    }

    .tarot-keyword-thumb {
        max-width: 220px;
    }
}

@media (max-width: 575px) {
    .mystic-compact-hero {
        min-height: 148px;
        padding: 0;
    }

    .mystic-page-heading {
        padding: 32px 0 4px;
    }

    .mystic-page-heading h1 {
        font-size: 38px;
    }

    .mystic-tool-card,
    .tarot-intro-panel,
    .tarot-workspace {
        padding: 20px;
    }

    .tarot-fan {
        justify-content: flex-start;
        overflow-x: auto;
        min-height: 190px;
        padding-left: 12px;
    }

    .tarot-fan-card {
        flex: 0 0 auto;
        margin-left: -30px;
    }

    .tarot-dictionary-toolbar {
        grid-template-columns: 1fr;
    }

    .tarot-dictionary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .tarot-card-detail-copy p {
        font-size: 16px;
    }

    .tarot-keyword-item {
        padding: 20px;
        gap: 18px;
    }

    .tarot-keyword-text h2 {
        font-size: 27px;
    }

    .tarot-keyword-text p:last-child {
        font-size: 16px;
    }
}

@media (min-width: 992px) {
    .header-bottom {
        display: flex;
        align-items: center;
        min-height: 88px;
        padding: 18px 48px 0;
    }

    .site-logo {
        flex: 0 0 auto;
        margin-right: 34px;
    }

    .site-logo img {
        width: 228px;
        height: auto;
    }

    .header-bottom .container {
        flex: 1 1 auto;
        max-width: none;
        padding: 0;
    }

    .main-menu {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 24px;
        padding-top: 0;
        margin-bottom: 0;
    }

    .main-menu li {
        margin-right: 0;
    }

    .main-menu li > a {
        font-size: 14px;
        line-height: 1.2;
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1280px) {
    .header-bottom {
        padding-left: 28px;
        padding-right: 28px;
    }

    .site-logo {
        margin-right: 24px;
    }

    .site-logo img {
        width: 205px;
    }

    .main-menu {
        gap: 16px;
    }

    .main-menu li > a {
        font-size: 13px;
    }
}

@media (max-width: 991px) {
    .header-section .slicknav_menu {
        display: block;
        position: absolute;
        top: 18px;
        right: 18px;
        width: auto;
        z-index: 10000;
        background: transparent;
    }

    .header-section .slicknav_btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 52px;
        min-height: 52px;
        margin: 0;
        padding: 14px;
        border-radius: 4px;
        background: #333;
        top: 0;
        right: 0;
    }

    .header-section .slicknav_icon {
        margin: 0;
    }

    .header-section .slicknav_nav {
        position: fixed;
        inset: 0;
        width: 100vw;
        min-height: 100vh;
        margin: 0;
        padding: 84px 30px 36px;
        background: rgba(31, 31, 31, 0.97);
        overflow-y: auto;
        z-index: 10001;
        text-align: center;
    }

    .header-section .slicknav_nav li {
        display: block;
        margin: 0;
    }

    .header-section .slicknav_nav a {
        display: block;
        padding: 14px 10px;
        color: #fff;
        font-size: 24px;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .header-section .slicknav_nav a.active {
        color: #ffd2c1;
        text-decoration: underline;
        text-underline-offset: 8px;
    }

    .amira-mobile-menu-close {
        position: fixed;
        top: 18px;
        right: 22px;
        width: 54px;
        height: 54px;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.18);
        color: #fff;
        font-size: 38px;
        line-height: 1;
        cursor: pointer;
    }
}
