/* ==========================================================================
   white light tarot / 白光塔罗牌
   ========================================================================== */

.tarot {
    overflow: clip;
    border-top: 1px solid var(--gold-line);
}

.tarot::before {
    background:
        radial-gradient(48% 36% at 50% 0%, rgba(108, 84, 190, .13) 0%, transparent 72%),
        radial-gradient(38% 42% at 7% 58%, rgba(214, 179, 122, .05) 0%, transparent 76%),
        radial-gradient(42% 40% at 94% 72%, rgba(95, 70, 170, .08) 0%, transparent 76%);
}

.tarot .sec-head {
    margin-bottom: clamp(28px, 3.8vw, 44px);
}

/* ---------- table toolbar ---------- */
.tarot-table-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
}

.tarot-table-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: .04em;
}

.tarot-table-hint i {
    color: var(--gold);
    font-size: 12px;
}

.tarot-mode-buttons {
    display: flex;
    gap: 8px;
    flex: none;
}

.tarot-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--gold-line-strong);
    border-radius: 2px;
    background: rgba(5, 9, 17, .3);
    color: var(--gold-bright);
    font-family: var(--font-serif);
    font-size: 12px;
    line-height: 1;
    letter-spacing: .08em;
    transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.tarot-mode i {
    font-size: 12px;
}

.tarot-mode:hover {
    border-color: var(--gold);
    background: rgba(214, 179, 122, .09);
    transform: translateY(-1px);
}

.tarot-mode--arrange {
    color: var(--gold-bright);
}

.tarot-mode--draw {
    border-color: rgba(246, 228, 184, .4);
    background: linear-gradient(180deg, #d1583f 0%, #b43a28 58%, #8f281c 100%);
    color: #fff5de;
    box-shadow: 0 9px 22px rgba(130, 35, 22, .25);
}

.tarot-mode--draw:hover {
    border-color: rgba(246, 228, 184, .62);
    background: linear-gradient(180deg, #e16a4e 0%, #c44a33 58%, #9e3021 100%);
    color: #fff8e8;
}

/* ---------- scattered table ---------- */
.tarot-table {
    --cols: 6;
    --gap: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 22px var(--gap);
    padding: 8px 0 4px;
}

.tarot-item {
    position: relative;
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    perspective: 1100px;
    transform: translateX(var(--shift, 0px)) rotate(var(--tilt, 0deg)) translateY(calc(var(--lift, 0px) + 18px));
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 24ms);
    -webkit-tap-highlight-color: transparent;
}

.tarot-item.is-in {
    opacity: 1;
    transform: translateX(var(--shift, 0px)) rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px));
}

.tarot-item:hover,
.tarot-item:focus-visible {
    transform: translateX(var(--shift, 0px)) rotate(var(--tilt, 0deg)) translateY(calc(var(--lift, 0px) - 6px));
    transition-delay: 0s;
}

.tarot-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 600 / 1001;
    border-radius: 7px;
    background: transparent;
    box-shadow: 0 15px 28px rgba(0, 0, 0, .34);
    transform-style: preserve-3d;
    transition: box-shadow .3s var(--ease);
}

.tarot-card-stage {
    position: relative;
    display: block;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform .35s var(--ease-out);
    will-change: transform;
}

.tarot-item.is-holo .tarot-card-stage {
    transition-duration: .08s;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.tarot-holo {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    border-radius: 7px;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .16) 18%, transparent 44%),
        conic-gradient(from var(--angle, 120deg) at var(--mx, 50%) var(--my, 50%),
            rgba(255, 78, 140, .34),
            rgba(255, 211, 110, .30),
            rgba(96, 255, 184, .24),
            rgba(82, 184, 255, .32),
            rgba(176, 100, 255, .36),
            rgba(255, 78, 140, .34));
    background-size: 100% 100%, 220% 220%;
    background-position: center, var(--mx, 50%) var(--my, 50%);
    mix-blend-mode: color-dodge;
    filter: saturate(1.2);
    box-shadow: inset 0 0 28px rgba(255, 255, 255, .12);
    transition: opacity .25s var(--ease);
}

.tarot-holo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/ornament/holo-foil.svg") center / 180px 180px;
    mix-blend-mode: soft-light;
    opacity: .72;
}

.tarot-holo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, .95) 0%,
        rgba(255, 255, 255, .18) 18%,
        transparent 42%);
    mix-blend-mode: screen;
    opacity: .7;
}

.tarot-item.is-holo .tarot-holo {
    opacity: .62;
}

.tarot-item:hover .tarot-card,
.tarot-item:focus-visible .tarot-card {
    box-shadow: 0 22px 40px rgba(0, 0, 0, .48), 0 0 24px rgba(214, 179, 122, .12);
}

.tarot-card::before {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid transparent;
    border-radius: 10px;
    pointer-events: none;
    transition: border-color .3s var(--ease);
}

.tarot-item:hover .tarot-card::before,
.tarot-item:focus-visible .tarot-card::before {
    border-color: var(--gold-line-strong);
}

.tarot-card img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
    user-select: none;
}

.tarot-card-back,
.tarot-card-front {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tarot-card-back {
    transform: rotateY(0deg);
}

.tarot-card-front {
    transform: rotateY(180deg);
}

.tarot-item.is-open .tarot-card {
    transform: rotateY(180deg);
}

.tarot-item.is-reversed .tarot-card-front {
    transform: rotateY(180deg) rotate(180deg);
}

.tarot-item.is-open .tarot-card-label {
    transition: none;
}

.tarot-item.is-open .tarot-card::before {
    border-color: var(--gold-line-strong);
}

.tarot-card-label {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    min-height: 18px;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: .05em;
    transition: opacity .25s var(--ease), visibility .25s var(--ease);
}

.tarot-table[data-mode="divination"] .tarot-item:not(.is-open) .tarot-card-label {
    opacity: 0;
    visibility: hidden;
}

.tarot-card-label b {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .02em;
}

.tarot-card-label span {
    color: var(--cream-soft, var(--cream));
}

.tarot-item.is-reversed .tarot-card-label span {
    color: #e8694b;
}

.tarot-item:hover .tarot-card-label span,
.tarot-item:focus-visible .tarot-card-label span {
    color: var(--gold-bright);
}

.tarot-item.is-reversed:hover .tarot-card-label span,
.tarot-item.is-reversed:focus-visible .tarot-card-label span {
    color: #f08a6d;
}

/* ---------- shuffle motion + banner ---------- */
.tarot-table.is-shuffling .tarot-item {
    pointer-events: none;
}

.tarot-table.is-shuffling .tarot-card-label {
    opacity: 0;
    visibility: hidden;
}

.tarot-mode:disabled {
    opacity: .45;
    pointer-events: none;
}

.tarot-banner {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 90;
    width: min(560px, calc(100vw - 40px));
    padding: 24px 32px;
    border: 1px solid var(--gold-line-strong);
    background: linear-gradient(180deg, rgba(5, 9, 17, .96) 0%, rgba(5, 9, 17, .84) 52%, rgba(5, 9, 17, .96) 100%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .65), inset 0 0 44px rgba(214, 179, 122, .045);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--cream);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) translateY(12px);
}

.tarot-banner::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 7px;
    height: 7px;
    background: var(--gold-bright);
    box-shadow: 0 0 12px rgba(246, 228, 184, .7);
    transform: translateX(-50%) rotate(45deg);
}

.tarot-banner.is-live {
    visibility: visible;
    animation: tarotBanner 3s var(--ease-out) both;
}

.tarot-banner-kicker {
    display: block;
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .28em;
}

.tarot-banner p {
    margin: 8px 0 0;
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: .08em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}

@keyframes tarotBanner {
    0% { opacity: 0; transform: translate(-50%, -50%) translateY(12px); }
    16% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
    76% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) translateY(-8px); }
}

/* ---------- header tarot shortcut ---------- */
.tarot-nav-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    height: 38px;
    padding: 0 13px;
    margin-left: 2px;
    border: 1px solid var(--gold-line-strong);
    border-radius: 999px;
    background: rgba(6, 10, 18, .55);
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 12px;
    letter-spacing: .14em;
    text-decoration: none;
    transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}

.tarot-nav-trigger:hover,
.tarot-nav-trigger:focus-visible {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(214, 179, 122, .08);
    box-shadow: 0 0 24px rgba(214, 179, 122, .14);
    outline: none;
}

.tarot-nav-text {
    line-height: 1;
}

.tarot-nav-mobile {
    display: none;
}

.tarot-nav-icon {
    display: block;
    width: 22px;
    height: 25px;
    overflow: hidden;
    border: 1px solid var(--gold-line-strong);
    border-radius: 2px;
    background: #080c16;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .45);
}

.tarot-nav-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarot-mini {
    position: relative;
    display: block;
    width: 22px;
    height: 25px;
    flex: none;
}

.tarot-mini i {
    position: absolute;
    left: 4px;
    top: 2px;
    width: 14px;
    height: 21px;
    border: 1px solid var(--gold-line-strong);
    border-radius: 2px;
    background: linear-gradient(150deg, rgba(214, 179, 122, .18), rgba(5, 9, 17, .86));
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.tarot-mini i:nth-child(1) {
    opacity: .55;
    transform: rotate(-10deg) translateX(-3px);
}

.tarot-mini i:nth-child(2) {
    opacity: .82;
    transform: rotate(-2deg);
}

.tarot-mini i:nth-child(3) {
    opacity: .95;
    transform: rotate(7deg) translateX(3px);
}

/* ---------- teaser continue ---------- */
.tarot-teaser {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: clamp(40px, 5vw, 58px) auto 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: .08em;
    text-align: center;
}

.tarot-teaser::before,
.tarot-teaser::after {
    content: "";
    width: min(120px, 17vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-line-strong));
}

.tarot-teaser::after {
    background: linear-gradient(90deg, var(--gold-line-strong), transparent);
}

.tarot-teaser-kicker {
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .2em;
}

.tarot-teaser-text {
    color: var(--cream-soft, var(--cream));
}

.tarot-card,
.tarot-modal-card,
.tarot-card img,
.tarot-modal-face {
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.tarot-foot {
    margin: 16px 0 0;
    color: var(--faint);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .14em;
    text-align: center;
}

.tarot-copyright {
    max-width: 780px;
    margin: 10px auto 0;
    color: var(--faint);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .05em;
    text-align: center;
}

.tarot-foot span {
    color: var(--gold);
}

.tarot-noscript {
    margin: 22px 0 0;
    padding: 16px;
    border: 1px solid var(--gold-line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

/* ---------- detail dialog ---------- */
dialog.tarot-modal {
    width: min(980px, calc(100vw - 32px));
    max-width: 980px;
    max-height: calc(100svh - 30px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--gold-line-strong);
    border-radius: 2px;
    background: linear-gradient(150deg, #111a2d 0%, #080d18 58%, #060a13 100%);
    color: var(--text);
    box-shadow: 0 50px 140px -36px rgba(0, 0, 0, .96);
    overflow: visible;
}

dialog.tarot-modal::backdrop {
    background: rgba(3, 6, 12, .86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

dialog.tarot-modal.is-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

.tarot-modal-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
    align-items: center;
    gap: clamp(22px, 4vw, 48px);
    padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 46px);
    min-width: 0;
}

.tarot-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    color: var(--gold);
    font-size: 12px;
    transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.tarot-modal-close:hover {
    border-color: var(--gold-line-strong);
    color: var(--gold-bright);
    transform: rotate(90deg);
}

.tarot-modal-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 560px;
    min-width: 0;
    perspective: 1400px;
}

.tarot-modal-glow {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 88%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 100, 212, .16) 0%, rgba(214, 179, 122, .055) 38%, transparent 70%);
    filter: blur(18px);
    pointer-events: none;
}

.tarot-modal-card {
    position: relative;
    z-index: 2;
    width: min(340px, 34vw);
    max-width: 100%;
    aspect-ratio: 600 / 1001;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    transform-origin: top left;
    will-change: transform;
}

.tarot-modal-tilt {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .35s var(--ease-out);
    will-change: transform;
}

.tarot-modal-card.is-holo .tarot-modal-tilt {
    transition-duration: .08s;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.tarot-modal-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
}

.tarot-modal-face {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55), 0 0 34px rgba(214, 179, 122, .12);
}

.tarot-modal-face--back {
    transform: rotateY(0deg);
}

.tarot-modal-face--front {
    transform: rotateY(180deg);
}

.tarot-modal-card.is-reversed .tarot-modal-face--front {
    transform: rotateY(180deg) rotate(180deg);
}

.tarot-modal-card.is-flipped .tarot-modal-inner {
    transform: rotateY(180deg);
}

.tarot-modal-card.is-holo .tarot-holo {
    opacity: .55;
}

.tarot-table-loader {
    position: fixed;
    z-index: 35;
    display: none;
    pointer-events: none;
    perspective: 1100px;
}

.tarot-table-loader.is-live {
    display: block;
}

.tarot-table-loader-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: tarotLoadingFlip 1.8s linear infinite;
}

.tarot-table-loader-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .5), 0 0 22px rgba(214, 179, 122, .12);
}

.tarot-table-loader-face--rear {
    transform: rotateY(180deg);
}

.tarot-item.is-table-loading {
    visibility: hidden;
}

.tarot-table.is-front-loading .tarot-item {
    pointer-events: none;
}

@keyframes tarotLoadingFlip {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.tarot-modal-info {
    min-width: 0;
    max-width: 100%;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}

.tarot-modal-info.is-ready {
    opacity: 1;
    transform: none;
}

.tarot-modal-kicker {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .2em;
    overflow-wrap: anywhere;
}

.tarot-modal-number {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.tarot-modal-number b {
    color: var(--cream);
    font-family: var(--font-serif);
    font-size: clamp(46px, 6vw, 64px);
    font-weight: 500;
    line-height: .86;
    letter-spacing: .03em;
    text-shadow: 0 0 26px rgba(246, 228, 184, .12);
}

.tarot-modal-number span {
    color: var(--faint);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .12em;
}

.tarot-modal-info h2 {
    margin: 14px 0 4px;
    color: var(--cream);
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: .08em;
    overflow-wrap: anywhere;
}

.tarot-modal-en {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .2em;
    overflow-wrap: anywhere;
}

.tarot-modal-orientation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0;
    padding: 4px 10px;
    border: 1px solid var(--gold-line);
    border-radius: 2px;
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: .16em;
}

.tarot-modal-orientation.is-reversed {
    border-color: rgba(200, 68, 47, .62);
    background: rgba(200, 68, 47, .08);
    color: #e8694b;
}

.tarot-modal-star {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid var(--gold-line);
}

.tarot-modal-star span {
    color: var(--faint);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .18em;
    overflow-wrap: anywhere;
}

.tarot-modal-star b {
    color: var(--gold-bright);
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .05em;
    overflow-wrap: anywhere;
}

.tarot-modal-desc {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    letter-spacing: .03em;
    overflow-wrap: anywhere;
}

.tarot-modal-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin-top: 24px;
    padding: 0 17px;
    border: 1px solid var(--gold-line-strong);
    border-radius: 2px;
    background: rgba(5, 9, 17, .32);
    color: var(--gold-bright);
    font-family: var(--font-serif);
    font-size: 12px;
    line-height: 1;
    letter-spacing: .1em;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}

.tarot-modal-return:hover {
    border-color: var(--gold);
    background: rgba(214, 179, 122, .09);
}

.tarot-modal-return i {
    font-size: 12px;
}

@media (max-width: 1120px) {
    .tarot-table {
        --cols: 5;
    }

    .tarot-modal-visual {
        min-height: 500px;
    }
}

@media (max-width: 1000px) {
    .tarot-nav-trigger {
        display: none;
    }

    .tarot-nav-mobile {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        flex: none;
        border: 1px solid var(--gold-line-strong);
        border-radius: 50%;
        background: rgba(6, 10, 18, .55);
        color: var(--gold);
        text-decoration: none;
        transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
    }

    .tarot-nav-mobile:hover,
    .tarot-nav-mobile:focus-visible {
        color: var(--gold-bright);
        border-color: var(--gold);
        background: rgba(214, 179, 122, .08);
        box-shadow: 0 0 20px rgba(214, 179, 122, .14);
        outline: none;
    }
}

@media (max-width: 920px) {
    .tarot-table {
        --cols: 4;
    }

    dialog.tarot-modal {
        max-height: calc(100svh - 24px);
    }

    .tarot-modal-shell {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 32px 22px 26px;
    }

    .tarot-modal-visual {
        min-height: 380px;
    }

    .tarot-modal-card {
        width: min(270px, 58vw);
    }

    .tarot-modal-info {
        text-align: center;
    }

    .tarot-modal-number,
    .tarot-modal-star {
        align-items: center;
        justify-content: center;
    }

    .tarot-modal-star {
        margin-top: 16px;
    }

    .tarot-modal-return {
        margin-top: 18px;
    }
}

@media (max-width: 760px) {
    .tarot-table {
        --cols: 3;
        --gap: 13px;
        gap: 20px var(--gap);
    }

    .tarot-table-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .tarot-mode-buttons {
        width: 100%;
    }

    .tarot-mode {
        flex: 1;
    }

    .tarot-teaser::before,
    .tarot-teaser::after {
        width: min(58px, 13vw);
    }
}

@media (max-width: 520px) {
    .tarot-table {
        --cols: 2;
        --gap: 12px;
    }

    .tarot-card-label {
        font-size: 12px;
    }

    .tarot-card-label b {
        font-size: 13px;
    }

    .tarot-modal-shell {
        padding: 28px 16px 22px;
    }

    .tarot-modal-visual {
        min-height: 320px;
    }

    .tarot-modal-card {
        width: min(220px, 62vw);
    }

    .tarot-modal-info h2 {
        font-size: 30px;
    }

    .tarot-modal-number b {
        font-size: 44px;
    }

    .tarot-teaser {
        gap: 6px 10px;
        font-size: 12px;
    }

    .tarot-teaser::before,
    .tarot-teaser::after {
        display: none;
    }

    .tarot-banner {
        width: calc(100vw - 28px);
        padding: 18px 20px;
    }

    .tarot-banner p {
        font-size: 15px;
        line-height: 1.8;
    }
}

@media (max-height: 720px) {
    .tarot-modal-shell {
        gap: 14px;
        padding-top: 22px;
        padding-bottom: 18px;
    }

    .tarot-modal-visual {
        min-height: 300px;
    }

    .tarot-modal-card {
        width: min(200px, 48vw);
    }

    .tarot-modal-number {
        margin-top: 8px;
    }

    .tarot-modal-number b {
        font-size: 40px;
    }

    .tarot-modal-info h2 {
        margin-top: 9px;
        font-size: 28px;
    }

    .tarot-modal-star {
        margin-top: 12px;
        padding-top: 10px;
    }

    .tarot-modal-desc {
        margin-top: 12px;
    }

    .tarot-modal-return {
        margin-top: 15px;
        min-height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tarot-item,
    .tarot-item.is-in,
    .tarot-mode,
    .tarot-card,
    .tarot-modal-info,
    .tarot-modal-close,
    .tarot-modal-return {
        transition: none;
        animation: none;
    }

    .tarot-item:hover,
    .tarot-item:focus-visible {
        transform: translateX(var(--shift, 0px)) rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px));
    }

    .tarot-table-loader-inner {
        animation: none;
    }
}
