:root {
    --bg: #000;
    --ink: #fff;
    --ink-weak: #d0d0d0;
    --line: rgba(255,255,255,.22);
    --line-strong: rgba(255,255,255,.65);
    --muted: rgba(255,255,255,.42);
    --serif: 'Noto Serif TC',serif;
    --display: 'Noto Serif TC',serif;
    --content-pad: 48px;
    --maxw: 720px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
}

/* ══ FIXED ART DECO OVERLAYS ══ */
.art-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    color: var(--ink);
    opacity: 1;
    transition: opacity .6s ease;
}
.art-layer.dim {
    opacity: .32;
}

    .art-layer svg {
        overflow: visible;
    }

.art-tl {
    position: absolute;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
}

    .art-tl svg {
        width: 100%;
        height: 100%;
    }

.art-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 220px;
    height: 220px;
}

    .art-bl svg {
        width: 100%;
        height: 100%;
    }

.art-tr {
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 220px;
}

    .art-tr svg {
        width: 100%;
        height: 100%;
    }

/* ══ APP LAYOUT ══ */
#app {
    width: 100%;
    max-width: var(--maxw);
    padding: 80px 24px 120px;
    position: relative;
    z-index: 10;
}

.section {
    position: relative;
    padding: 0 var(--content-pad) 64px;
}

/* ══ TITLE AREA ══ */
.title-wrap {
    position: relative;
    margin-top: 60px;
    margin-bottom: 40px;
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.h1 {
    font-family: var(--display);
    font-style: normal;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 56px;
    line-height: 1.1;
    color: transparent;
    -webkit-text-stroke: 1px var(--ink);
    text-align: left;
    position: relative;
    z-index: 2;
}

.subtitle {
    margin-top: 16px;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 6px;
    text-align: center;
}

.lead {
    margin-top: 32px;
    color: var(--ink-weak);
    line-height: 2.4;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-align: center;
}

    .lead strong {
        color: var(--ink);
        font-weight: 700;
    }

    .lead + .lead {
        margin-top: 20px;
    }

.title-deco-left {
    position: absolute;
    left: -20px;
    top: 0;
    width: 80px;
    height: 220px;
    pointer-events: none;
}

.title-deco-right {
    position: absolute;
    right: -80px;
    top: 10px;
    width: 140px;
    height: 200px;
    pointer-events: none;
}

/* ══ BANNER ══ */
.banner-wrap {
    margin: 0 calc(-1 * var(--content-pad));
    position: relative;
    overflow: hidden;
    aspect-ratio: 2400/900;
}

    .banner-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        filter: brightness(.78) saturate(0) contrast(1.05);
    }

    .banner-wrap::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(to bottom,transparent 40%,rgba(0,0,0,.9) 100%);
    }

.banner-caption {
    position: absolute;
    bottom: 20px;
    right: 24px;
    z-index: 2;
    font-family: var(--display);
    font-style: italic;
    font-size: 10px;
    letter-spacing: 4px; /* 字距稍微收斂一點點，讓長句更易讀 */
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    text-align: right; /* ✦ 新增：讓兩行字向右邊整齊對齊 */
    line-height: 1.8;  /* ✦ 新增：拉開兩行字之間的垂直距離，增加高級感 */
}

/* ══ DIVIDER ══ */
.rule {
    margin: 38px auto;
    height: 1px;
    width: 40%;
    background: var(--line);
    position: relative;
}

    .rule::after {
        content: "✦";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        color: var(--ink);
        font-size: 11px;
        background: var(--bg);
        padding: 0 14px;
    }

/* ══ BUTTONS ══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--ink);
    background: var(--bg);
    color: var(--ink);
    padding: 18px 42px;
    font-family: var(--serif);
    letter-spacing: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
    user-select: none;
    text-transform: uppercase;
}

    .btn:hover {
        background: var(--ink);
        color: var(--bg);
    }

.btn-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

.btn.mini {
    padding: 11px 24px;
    font-size: 13px;
    letter-spacing: 3px;
    border-color: var(--line-strong);
    color: var(--ink-weak);
}

    .btn.mini:hover {
        background: var(--ink);
        color: var(--bg);
        border-color: var(--ink);
    }

/* ══ SHARE BUTTONS ══ */
.share-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15), transparent);
    margin: 32px auto 0;
}

.share-row {
    gap: 14px !important;
    margin-top: 0 !important;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 13px 22px !important;
    font-size: 12px !important;
    letter-spacing: 2.5px !important;
    border-color: rgba(255,255,255,0.18) !important;
    color: rgba(255,255,255,0.65) !important;
    position: relative;
    transition: all .25s ease;
}

.share-btn:hover {
    border-color: rgba(255,255,255,0.55) !important;
    color: rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.04) !important;
}

.share-btn-icon {
    font-size: 11px;
    opacity: 0.6;
}

.back-to-forest {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 40px !important;
    font-size: 13px !important;
    letter-spacing: 4px !important;
    border-color: rgba(255,255,255,0.30) !important;
    color: rgba(255,255,255,0.85) !important;
}

.back-to-forest:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.70) !important;
    color: #fff !important;
}

/* ══ SKIP BUTTON ══ */
.skip-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.78);
    font-family: var(--display);
    font-style: italic;
    font-size: 12px;
    letter-spacing: 3px;
    cursor: pointer;
    padding: 4px 0;
    transition: color .2s ease;
    user-select: none;
}

    .skip-btn:hover {
        color: var(--ink);
    }

/* ══ QUIZ ══ */
.meta {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,.78);
    font-family: var(--display);
    font-style: italic;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.progress {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.seg {
    flex: 1;
    height: 1px;
    background: transparent;
    border-top: 1px dashed var(--line);
    position: relative;
}

    .seg.done {
        border-top-style: solid;
        border-color: var(--ink);
    }

    .seg.active {
        border-top-style: solid;
        border-color: var(--ink-weak);
    }

.qno {
    margin-top: 60px;
    font-family: var(--display);
    font-style: italic;
    letter-spacing: 6px;
    color: var(--ink-weak);
    font-size: 18px;
    text-align: center;
}

.qtext {
    margin-top: 20px;
    font-size: 20px;
    line-height: 1.85;
    letter-spacing: 1px;
    font-family: var(--serif);
    text-align: center;
    font-weight: 500;
    min-height: 60px;
}

.options {
    margin-top: 48px;
}

.opt {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--ink-weak);
    text-align: left;
    padding: 16px 0;
    cursor: pointer;
    transition: color .2s ease, padding-left .2s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    opacity: 0;
}

    .opt.visible {
        animation: optFadeIn .3s ease forwards;
    }

    .opt:hover {
        color: var(--ink);
        padding-left: 10px;
    }

    .opt:disabled {
        cursor: default;
        opacity: .28 !important;
        pointer-events: none;
    }

    .opt.selected {
        color: var(--ink);
    }

.bullet {
    width: 7px;
    height: 7px;
    border: 1px solid var(--line-strong);
    margin-top: 10px;
    flex: 0 0 auto;
    transform: rotate(45deg);
    transition: all .2s ease;
}

.opt:hover .bullet, .opt.selected .bullet {
    background: var(--ink);
    border-color: var(--ink);
    transform: rotate(45deg) scale(1.25);
}

.opt .txt {
    line-height: 1.9;
    font-size: 16px;
    letter-spacing: 1px;
}

@keyframes optFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
        filter: blur(.8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.78);
    cursor: pointer;
    font-family: var(--display);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 2px;
    padding: 0;
    margin-bottom: 24px;
    transition: color .2s ease;
}

    .back-btn:hover {
        color: var(--ink);
    }

    .back-btn svg {
        width: 18px;
        height: 18px;
        transition: transform .2s ease;
    }

    .back-btn:hover svg {
        transform: translateX(-3px);
    }

/* ══ RESULT ══ */
.result-hero {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: center; 
    margin-top: 20px;
}

.result-img-wrap {
    border-radius: 0;
    padding: 14px;
    background: #ffffff; 
    flex-shrink: 0;
    aspect-ratio: 1000 / 1343; /* 修改圖片比例完全展現 */
    position: relative;
    box-shadow: none;
    border: 1px solid var(--line-strong);
}

    .result-img-wrap::before {
        content: "";
        position: absolute;
        inset: 6px;
        border: 1px solid #111;
        outline: 1px dashed #777; 
        outline-offset: -3px;
        pointer-events: none;
        z-index: 2;
    }

    .result-img-wrap::after {
        content: "";
        position: absolute;
        inset: 10px;
        border: 1px solid #111;
        background: linear-gradient(135deg, #fff 5px, transparent 0) top left, linear-gradient(225deg, #fff 5px, transparent 0) top right, linear-gradient(315deg, #fff 5px, transparent 0) bottom right, linear-gradient(45deg, #fff 5px, transparent 0) bottom left;
        background-size: 8px 8px;
        background-repeat: no-repeat;
        pointer-events: none;
        z-index: 3;
    }

.result-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    border: 1px solid #000; 
    filter: contrast(1.05) saturate(0.9) sepia(0.05);
    position: relative;
    z-index: 1;
}

.result-hero-info {
    padding-top: 0;
    position: relative;
}

.r-eyebrow {
    display: inline-block;
    font-family: var(--display);
    font-style: italic;
    letter-spacing: 6px;
    color: rgba(255,255,255,.8); 
    font-size: 12px; 
    text-transform: uppercase;
    margin-bottom: 16px;
}

.r-name {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 32px; /* 將靈魂名稱大幅放大 */
    letter-spacing: 8px; /* 拉開字距，更有氣勢 */
    color: var(--ink);
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(255,255,255,0.15); /* 微微發光 */
}

.r-compound {
    font-family: var(--display);
    font-style: italic;
    font-size: 15px; /* 將描述縮小作為副標題 */
    letter-spacing: 3px;
    color: rgba(255,255,255,.75);
    line-height: 1.6;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
    margin-bottom: 16px;
    position: relative;
}

    .r-compound::before {
        content: "";
        position: absolute;
        bottom: 3px;
        left: 0;
        width: 100%;
        height: 1px;
        background: repeating-linear-gradient(90deg, var(--line) 0, var(--line) 3px, transparent 3px, transparent 6px);
    }

    .r-compound::after {
        content: "✦";
        position: absolute;
        bottom: -7px;
        left: 0;
        color: var(--ink);
        font-size: 10px;
        background: var(--bg);
        padding-right: 12px;
        z-index: 2;
    }

.r-desc {
    margin-top: 16px;
    line-height: 2.2;
    color: var(--ink-weak);
    font-size: 16px; 
    letter-spacing: 1.5px;
    text-align: justify;
}

.r-mbti {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    font-family: var(--display);
    font-style: italic;
    font-size: 14px;
    letter-spacing: 2px;
}

.r-mbti-label {
    color: rgba(255,255,255,.7); 
    font-size: 12px; 
    letter-spacing: 2px;
}

.r-mbti strong {
    color: var(--ink);
    font-size: 18px; 
    letter-spacing: 3px;
}

/* ════════════════════════════════
   塔羅牌陣風格統整 (Tarot Frame)
════════════════════════════════ */
.seals.tarot-frame {
    margin-top: 56px;
    padding: 32px 16px 24px 16px;
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    border: 1px solid var(--line-strong);
    outline: 1px solid var(--line);
    outline-offset: -5px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tarot-star {
    position: absolute;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(255,255,255,0.85)'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
}
.ts-tl { top: -7px; left: -7px; }
.ts-tr { top: -7px; right: -7px; }
.ts-bl { bottom: -7px; left: -7px; }
.ts-br { bottom: -7px; right: -7px; }

.tarot-pendant {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
}
.top-pendant {
    top: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 40'%3E%3Cline x1='10' y1='0' x2='10' y2='20' stroke='rgba(255,255,255,0.3)' stroke-width='1' stroke-dasharray='2 2'/%3E%3Cpolygon points='10,20 15,30 10,40 5,30' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='30' r='1.5' fill='rgba(255,255,255,0.9)'/%3E%3C/svg%3E");
}
.bottom-pendant {
    bottom: -40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 40'%3E%3Cline x1='10' y1='0' x2='10' y2='15' stroke='rgba(255,255,255,0.3)' stroke-width='1' stroke-dasharray='2 2'/%3E%3Cpolygon points='10,15 15,25 10,35 5,25' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='25' r='1.5' fill='rgba(255,255,255,0.9)'/%3E%3C/svg%3E");
}

/* 專屬徽章容器 */
.tarot-emblem {
    width: 52px;
    height: 52px;
    margin: 36px auto 0; 
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}
.tarot-emblem svg {
    width: 100%;
    height: 100%;
}

.tarot-title {
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    letter-spacing: 5px;
    margin: 16px 0 8px;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.tarot-title:first-of-type {
    margin-top: 12px; 
}

.tarot-divider {
    margin: 16px auto;
    width: 60%;
    height: 10px;
    display: flex;
    justify-content: center;
}
.tarot-divider svg {
    width: 100%;
    height: 100%;
}

.tarot-frame .seal {
    padding: 16px 12px; 
}

.seal {
    border-bottom: 1px dashed var(--line);
    display: grid;
    grid-template-columns: 76px 1fr 52px;
    align-items: center;
    gap: 16px;
}

    .seal:last-child {
        border-bottom: none;
    }

    .seal .lab {
        font-family: var(--display);
        font-style: italic;
        letter-spacing: 1.5px;
        color: rgba(255,255,255,.78);
        font-size: 11px;
        white-space: nowrap;
    }

.seal-ruler {
    position: relative;
    height: 18px; 
    display: flex;
    align-items: center;
    margin: 0 12px;
}

.seal-ruler-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px; 
    background: rgba(255,255,255,.25); 
}

    .seal-ruler-track::before, .seal-ruler-track::after {
        content: "";
        position: absolute;
        top: -1.5px;
        width: 5px;
        height: 5px; 
        border-radius: 50%;
        border: 1.5px solid rgba(255,255,255,.7); 
        background: var(--bg);
    }

    .seal-ruler-track::before {
        left: -5px;
    }

    .seal-ruler-track::after {
        right: -5px;
    }

.seal-ruler-ticks {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
}

    .seal-ruler-ticks span {
        display: block;
        width: 1px;
        height: 4px;
        background: rgba(255,255,255,.35);
        transform: translateY(-1px);
    }

        .seal-ruler-ticks span:first-child,
        .seal-ruler-ticks span:last-child {
            opacity: 0;
        }

.seal-ruler-fill {
    position: absolute;
    left: 0;
    height: 2px; 
    background: var(--ink);
    box-shadow: 0 0 6px rgba(255,255,255,.9); 
    transition: width 1.3s cubic-bezier(.22,1,.36,1);
    width: 0;
}

.seal-ruler-pointer {
    position: absolute;
    top: 50%;
    width: 12px;   
    height: 12px;
    border: none;
    background: transparent;
    transform: translateY(-50%); 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L14 10 L24 12 L14 14 L12 24 L10 14 L0 12 L10 10 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.9));
    transition: left 1.3s cubic-bezier(.22,1,.36,1);
    left: 0;
    z-index: 2;
}

#result.capturing .seal-ruler-pointer {
    filter: none !important;
}

.seal .val {
    font-family: var(--display);
    font-style: italic;
    color: var(--ink);
    letter-spacing: 1px;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.block {
    margin-top: 48px;
    padding: 40px 24px;
    position: relative;
    text-align: center;
    background: transparent;
    border: 1px solid var(--line-strong);
    outline: 1px solid var(--line);
    outline-offset: -5px;
}

    .block .lab {
        font-family: var(--display);
        font-style: italic;
        letter-spacing: 4px;
        color: rgba(255,255,255,.8);
        font-size: 13px;
        text-transform: uppercase;
        margin-bottom: 20px;
        display: block;
    }

    .block .txt {
        line-height: 2.4;
        color: #fff;
        font-size: 17px;
        letter-spacing: 2px;
        font-weight: 500;
    }

        .block .txt.muted {
            color: rgba(255,255,255,.85);
        }

#r-quote {
    margin-bottom: 24px;
}

    #r-quote::after {
        content: "";
        display: block;
        width: 100%;
        max-width: 280px;
        height: 10px;
        margin: 32px auto 16px auto;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cline x1='10' y1='5' x2='190' y2='5' stroke='rgba(255,255,255,0.2)' stroke-dasharray='2 4'/%3E%3Cpolygon points='100,0 105,5 100,10 95,5' fill='rgba(255,255,255,0.6)'/%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }

.cta {
    margin-top: 16px;
}

    .cta a {
        display: flex;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.03); 
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--ink);
        text-decoration: none;
        overflow: hidden;
        transition: all .3s ease;
        position: relative;
    }

        .cta a:hover {
            border-color: rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.08);
        }

.cta-cover {
    width: 120px; 
    flex-shrink: 0;
    object-fit: contain;
    background: #050505; 
    padding: 12px; 
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    position: relative;
    z-index: 3;
}

.cta-info {
    flex: 1;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: 16px;
    position: relative;
    z-index: 3; 
}

.cta-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    font-family: var(--display);
    font-style: italic;
}

.cta-arrow {
    font-size: 14px;
    color: rgba(255,255,255,.4);
    transition: color .25s, transform .25s;
}

.cta a:hover .cta-arrow {
    color: var(--ink);
    transform: translateX(4px);
}

.cta-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.cta-title {
    font-size: 18px; 
    letter-spacing: 2px;
    font-family: var(--serif);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,255,255,0.3); 
}

.cta-author {
    font-size: 13px;
    letter-spacing: 2px;
    font-style: italic;
    color: rgba(255,255,255,.6);
}

.cta-bot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cta-fairy {
    font-size: 11px;
    letter-spacing: 1.5px;
    font-style: italic;
    color: rgba(255,255,255,.4);
    padding-right: 10px;
    border-right: 1px solid rgba(255,255,255,.2);
}

.cta-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cta-tag {
    font-size: 10px;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,.25);
    padding: 3px 8px;
    color: rgba(255,255,255,.6);
}
/* ════════════════════════════════
   BUY BOOK BUTTON (實體書購書卡片與 18+ 標記)
════════════════════════════════ */

/* ── 18禁警語 ── */
.adult-warning {
    margin: 0 0 20px 0;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 1.5px;
    line-height: 1.7;
    text-align: center;
}

/* ── 18+ 標記：暗紅霓虹強烈脈動效果 ── */
@keyframes agePulse {
    0%, 100% {
        text-shadow: 
            0 0 4px rgba(220, 20, 60, 0.8),
            0 0 10px rgba(220, 20, 60, 0.3);
        opacity: 0.8;
        transform: scale(1);
        border-color: rgba(220, 20, 60, 0.4);
    }
    50% {
        text-shadow: 
            0 0 8px rgba(255, 50, 50, 1), 
            0 0 15px rgba(220, 20, 60, 0.8),
            0 0 25px rgba(220, 20, 60, 0.5);
        opacity: 1;
        transform: scale(1.12); /* 放大比例增加，呼吸感更明顯 */
        border-color: rgba(255, 50, 50, 0.8);
    }
}

.age-badge {
    display: inline-block;
    font-size: 0.9em;
    letter-spacing: 1px;
    color: #fff;
    font-weight: 800;
    vertical-align: baseline;
    font-style: normal;
    margin-left: 6px;
    padding: 2px 5px;
    border: 1px solid rgba(220, 20, 60, 0.5);
    border-radius: 3px;
    line-height: 1;
    animation: agePulse 1.6s ease-in-out infinite; /* 稍微加快一點呼吸節奏 */
    /* 漸層帶有一點點暗紅血色感 */
    background: linear-gradient(135deg, #ffffff 0%, #ff8888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 針對卡片與連結內的 18+ 標記微調 */
.cta-label .age-badge,
.bbc-action .age-badge {
    font-size: 10px;
    margin-top: -2px;
    margin-left: 8px;
}

/* ── 實體書購書卡片 (與解鎖故事樣本統一風格) ── */
.buy-book-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* 稍微縮小間距，與上方區塊更協調 */
    position: relative;
    z-index: 5;
    width: 100%;
}

.buy-book-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* 移除最大寬度限制，讓它跟上方的 cta 區塊等寬對齊 */
    padding: 16px 20px;
    
    /* ✦ 完全比照 .cta a 的設定 ✦ */
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--ink);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all .3s ease;
}

/* ✦ Hover 互動效果：完全比照 .cta a:hover ✦ */
.buy-book-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.bbc-shop {
    display: flex;
    align-items: center;
    font-family: var(--display);
    font-size: 15px;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,255,255,0.3); /* 沿用故事標題的微光字體 */
}

.bbc-action {
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4); /* 沿用 cta-arrow 的顏色 */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* Hover 時右側文字變化 (模擬 cta-arrow 向右推) */
.buy-book-card:hover .bbc-action {
    color: var(--ink);
    transform: translateX(4px);
}

/* 清除舊有裝飾 */
.buy-book-card::before { display: none; }
.bbc-bg { display: none !important; }

.buy-book-card:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 8px 25px rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.buy-book-card:hover::after {
    border-color: rgba(255,255,255,0.3);
}

.buy-book-card:hover .bbc-bg {
    left: 200%;
}

.bbc-top, .bbc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.bbc-top {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.bbc-shop {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 500;
}

.bbc-price {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.bbc-action {
    font-family: var(--serif);
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
}

.bbc-note {
    font-family: var(--serif);
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.45);
    font-style: italic;
}

.stats {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px dotted var(--line-strong);
    color: rgba(255,255,255,.78);
    line-height: 2;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-align: center;
}

    .stats strong {
        color: var(--ink);
        font-weight: 700;
    }

.cp-block {
    min-height: 0;
}

    .cp-block:empty {
        display: none;
    }

.cp-mbti {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(255,255,255,.78);
}

    .cp-mbti strong {
        color: var(--ink);
        font-size: 15px;
        letter-spacing: 3px;
    }

.cp-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 10px;
    font-family: var(--serif);
}

    .cp-row:last-child {
        margin-bottom: 0;
    }

.cp-label {
    font-family: var(--display);
    font-style: italic;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
    min-width: 46px;
}

.cp-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ink);
}

.cp-alt {
    font-size: 13px;
    letter-spacing: 1px;
    color: rgba(255,255,255,.75);
}

.cp-sep {
    font-size: 11px;
    color: rgba(255,255,255,.3);
    margin: 0 2px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.in {
    animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both;
}

.hidden {
    display: none !important;
}

@media(max-width:560px) {
    .result-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .result-img-wrap {
        width: 75%;
        margin: 0 auto; 
        border-radius: 0;
        padding: 8px;
        aspect-ratio: 1000 / 1343; /* 修改圖片比例完全展現 */
    }

    .result-img {
        object-fit: cover;
        object-position: top center;
    }
    .r-name, .r-eyebrow, .r-desc {
        text-align: center;
        display: block;
    }

    .r-mbti {
        justify-content: center;
    }

    .r-compound {
        text-align: center;
        border-bottom: none;
        margin-bottom: 16px; /* 手機版加上稍微寬鬆的間距 */
        padding-bottom: 0;
    }

        .r-compound::before,
        .r-compound::after {
            display: none; 
        }

    .r-desc {
        font-size: 16px;
    }
	.buy-book-btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
        letter-spacing: 2px;
    }
}

/* ══ 手機版微調：修正 Banner 英文副標題壓字 ══ */
@media (max-width: 768px) {
    .banner-caption {
        bottom: 6px;         /* 往下推到最邊緣，遠離主標題 */
        right: 16px;         /* 稍微靠右收攏 */
        font-size: 8.5px;    /* 字級微調，保持精緻感 */
        letter-spacing: 3px; /* 字距微縮 */
        line-height: 1.5;    /* 讓兩行字靠得緊湊一點 */
    }
}

#audio-btn {
    position: fixed; 
    top: 0;
    right: 0; 
    z-index: 220;
    pointer-events: auto;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    color: var(--ink);
    visibility: hidden;
}

.audio-icon-wrap {
    position: relative;
    width: 26px;
    height: 26px;
}

#audio-btn svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    display: block;
    transition: opacity .15s ease;
}

.icon-bars {
    opacity: 1;
}

.icon-note {
    opacity: 0;
}

#audio-btn.muted .icon-bars {
    opacity: 0;
}

#audio-btn.muted .icon-note {
    opacity: 1;
}

#audio-btn:not(.muted) .bar1 {
    animation: barPulse 1.1s ease-in-out infinite;
}

#audio-btn:not(.muted) .bar2 {
    animation: barPulse 1.1s ease-in-out .18s infinite;
}

#audio-btn:not(.muted) .bar3 {
    animation: barPulse 1.1s ease-in-out .36s infinite;
}

@keyframes barPulse {
    0%,100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.8);
    }
}

#audio-btn.nudge {
    animation: nudgeGlow 1.6s ease 1;
}

@keyframes nudgeGlow {
    0%,100% {
        filter: none;
        color: var(--ink);
    }

    40% {
        filter: drop-shadow(0 0 8px rgba(255,255,255,.9));
        color: #fff;
    }
}

#audio-hint {
    position: fixed;
    z-index: 260;
    pointer-events: none;
    font-family: var(--display);
    font-style: italic;
    font-size: 12px;
    letter-spacing: 4px;
    color: #fff;
    background: rgba(0,0,0,.72);
    padding: 7px 14px;
    text-shadow: 0 0 8px rgba(255,255,255,1), 0 0 18px rgba(255,255,255,.6);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .45s ease, transform .45s ease;
}

    #audio-hint.show {
        opacity: 1;
        transform: translateX(0);
    }

@media(max-width:768px) {
    :root {
        --content-pad: 22px;
    }

    .h1 {
        font-size: 38px;
        text-align: center;
    }

    .title-deco-left {
        left: 0;
        height: 160px;
    }

    .title-deco-right {
        right: -16px;
        height: 140px;
    }

    .title-wrap {
        padding: 20px 0;
    }

    .btn-row {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .seal {
        grid-template-columns: 64px 1fr 44px;
        gap: 8px;
        padding: 13px 12px;
    }

        .seal .lab {
            font-family: var(--display);
            font-style: italic;
            letter-spacing: 1.5px;
            color: rgba(255,255,255,.9); 
            font-size: 13px; 
            white-space: nowrap;
        }

        .seal .val {
            font-family: var(--display);
            font-style: italic;
            color: var(--ink);
            letter-spacing: 1px;
            font-size: 14px; 
            text-align: right;
            white-space: nowrap;
            font-weight: bold; 
        }

    .art-tr {
        width: 160px;
        height: 160px;
    }

    .art-bl {
        width: 160px;
        height: 160px;
    }

    .meta {
        font-size: 12px;
        letter-spacing: 1px;
    }

    #result.capturing,
    #result.capturing .r-eyebrow,
    #result.capturing .r-compound,
    #result.capturing .r-name,
    #result.capturing .r-desc,
    #result.capturing .block .txt,
    #result.capturing .block .txt.muted,
    #result.capturing .block .lab,
    #result.capturing .seal .lab,
    #result.capturing .stats,
    #result.capturing .stats strong,
    #result.capturing .cp-label,
    #result.capturing .cp-name,
    #result.capturing .cp-alt,
    #result.capturing .cp-mbti,
    #result.capturing .cta a,
    #result.capturing .val,
    #result.capturing #pop-line,
    #result.capturing #pop-line span {
        color: #ffffff !important;
        opacity: 1 !important;
    }

        #result.capturing .block .txt.muted {
            color: rgba(255,255,255,.85) !important;
        }

        #result.capturing .r-desc {
            color: rgba(255,255,255,.92) !important;
        }

        #result.capturing .seal-ruler-track {
            background: rgba(255,255,255,.18) !important;
        }

        #result.capturing .seal-ruler-fill {
            background: rgba(255,255,255,.9) !important;
        }
}
/* ══ AUDIO ATTRIBUTION ══ */
.music-attribution {
    position: fixed;
    bottom: 12px;
    right: 12px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25); /* 透明度調低，極度不起眼 */
    font-family: var(--serif);
    letter-spacing: 1px;
    pointer-events: none; /* 避免擋住點擊 */
    z-index: 50;
    transition: opacity 0.5s ease;
}

/* 讓他在產生長圖時自動消失 (配合 ui.js 的設定) */
.capturing-global .music-attribution {
    display: none !important;
}