:root {
    --gy-charcoal: #292c2a;
    --gy-charcoal-2: #363b37;
    --gy-sand: #b69a68;
    --gy-sand-soft: #dcc9a7;
    --gy-sage: #718078;
    --gy-mist: #e4e9e4;
    --gy-ivory: #f8f6f1;
    --gy-warm: #f1eee7;
    --gy-ink: #30322f;
    --gy-muted: #6d716c;
    --gy-line: #d9d4c9;
    --gy-white: #fff;
    --gy-danger: #8b4d43;
}

.gy-container { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }
.gy-hero { position: relative; overflow: hidden; padding: 84px 0 72px; color: #fff; background: radial-gradient(circle at 78% 25%, rgba(182,154,104,.2), transparent 28%), linear-gradient(135deg, #222622, #303630 65%, #252925); }
.gy-hero::after { content: ""; position: absolute; width: 460px; height: 460px; right: -130px; top: 15px; border: 1px solid rgba(220,201,167,.18); border-radius: 50%; box-shadow: inset 0 0 0 56px rgba(255,255,255,.01); }
.gy-hero-inner { position: relative; z-index: 1; }
.gy-kicker, .gy-stage-label { margin: 0 0 12px; color: var(--gy-sand-soft); font-size: 13px; font-weight: 700; letter-spacing: .18em; }
.gy-hero h1 { margin: 0; font-family: "Noto Serif TC", serif; font-size: clamp(46px, 6vw, 72px); letter-spacing: .06em; }
.gy-hero-copy { max-width: 760px; margin: 20px 0 14px; color: #d8ddd8; font-size: 19px; line-height: 1.9; }
.gy-disclaimer { margin: 0; color: #aeb5af; font-size: 14px; }

.gy-main-section { padding: 68px 0 90px; background: var(--gy-warm); color: var(--gy-ink); }
.gy-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 0; margin: 0 0 26px; list-style: none; }
.gy-progress li { min-height: 78px; padding: 14px 16px; border: 1px solid var(--gy-line); border-radius: 18px; background: rgba(255,255,255,.56); color: var(--gy-muted); transition: .25s ease; }
.gy-progress li span { display: block; margin-bottom: 4px; color: var(--gy-sand); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.gy-progress li strong { font-family: "Noto Serif TC", serif; font-size: 16px; }
.gy-progress li.is-active { border-color: rgba(182,154,104,.65); background: var(--gy-charcoal); color: #fff; box-shadow: 0 14px 36px rgba(41,44,42,.12); }
.gy-progress li.is-complete { border-color: rgba(113,128,120,.35); background: var(--gy-mist); color: #465049; }

.gy-stage-shell { min-height: 650px; border: 1px solid var(--gy-line); border-radius: 30px; background: var(--gy-ivory); box-shadow: 0 22px 60px rgba(39,42,39,.08); overflow: hidden; }
.gy-stage[hidden] { display: none !important; }
.gy-stage-grid { display: grid; grid-template-columns: .86fr 1.14fr; min-height: 650px; }
.gy-ritual-visual { position: relative; min-height: 100%; display: grid; place-items: center; padding: 42px; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(182,154,104,.22), transparent 35%), linear-gradient(155deg, #202521, #343a35); color: #fff; text-align: center; }
.gy-ritual-visual::before, .gy-ritual-visual::after { content: ""; position: absolute; border: 1px solid rgba(220,201,167,.18); border-radius: 50%; }
.gy-ritual-visual::before { width: 360px; height: 360px; }
.gy-ritual-visual::after { width: 260px; height: 260px; }
.gy-ritual-visual--quiet { align-content: center; gap: 18px; }
.gy-character { position: relative; z-index: 2; display: grid; place-items: center; width: 132px; height: 132px; border: 1px solid rgba(220,201,167,.55); border-radius: 50%; font-family: "Noto Serif TC", serif; font-size: 58px; color: var(--gy-sand-soft); background: rgba(255,255,255,.025); box-shadow: 0 0 60px rgba(182,154,104,.16); }
.gy-ritual-visual--quiet p { position: relative; z-index: 2; margin: 0; color: #d9ddd9; letter-spacing: .15em; }
.gy-halo { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(216,198,165,.16), transparent 66%); }
.gy-ritual-image { position: relative; z-index: 2; display: block; max-width: min(88%, 330px); max-height: 410px; object-fit: contain; filter: drop-shadow(0 22px 36px rgba(0,0,0,.24)); }
.gy-ritual-image.is-shaking { animation: gy-shake .62s ease-in-out 2; }
@keyframes gy-shake { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-4deg) translateX(-4px)} 40%{transform:rotate(4deg) translateX(4px)} 60%{transform:rotate(-3deg)} 80%{transform:rotate(3deg)} }

/* 抽籤後，讓實際抽到的籤號從籤筒位置上浮顯示。 */
.gy-drawn-lot { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.gy-drawn-lot[hidden] { display: none !important; }
.gy-drawn-lot-stick { position: absolute; left: 50%; top: 50%; width: 72px; height: 278px; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; border: 1px solid rgba(230,196,132,.78); border-radius: 32px 32px 12px 12px; background: linear-gradient(180deg, #a43d34 0%, #7f2925 58%, #64201d 100%); color: #f7e8c9; box-shadow: 0 24px 48px rgba(0,0,0,.28), inset 0 0 0 4px rgba(255,255,255,.035); opacity: 0; transform: translate(-50%, 86px) scale(.76) rotate(0deg); transform-origin: 50% 100%; }
.gy-drawn-lot-stick::before { content: ''; position: absolute; top: -22px; left: 50%; width: 28px; height: 34px; transform: translateX(-50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #9a342e; border-bottom: 1px solid rgba(230,196,132,.6); }
.gy-drawn-lot-stick span, .gy-drawn-lot-stick strong { writing-mode: vertical-rl; letter-spacing: .14em; }
.gy-drawn-lot-stick span { font-size: 12px; color: #e5cda2; }
.gy-drawn-lot-stick strong { font-family: "Noto Serif TC", serif; font-size: 21px; font-weight: 700; color: #fff1d5; }
.gy-drawn-lot.is-rising .gy-drawn-lot-stick { animation: gy-drawn-lot-rise 1.35s cubic-bezier(.2,.78,.2,1) forwards; }
@keyframes gy-drawn-lot-rise {
    0% { opacity: 0; transform: translate(-50%, 92px) scale(.72) rotate(0deg); }
    18% { opacity: 1; }
    64% { opacity: 1; transform: translate(calc(-50% + 82px), -92px) scale(1.02) rotate(5deg); }
    78% { transform: translate(calc(-50% + 78px), -82px) scale(1) rotate(2deg); }
    90% { transform: translate(calc(-50% + 80px), -88px) scale(1) rotate(4deg); }
    100% { opacity: 1; transform: translate(calc(-50% + 80px), -84px) scale(1) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .gy-drawn-lot.is-rising .gy-drawn-lot-stick { animation: none; opacity: 1; transform: translate(calc(-50% + 80px), -84px) scale(1) rotate(3deg); }
}

.gy-stage-content { padding: 54px 56px; align-self: center; }
.gy-stage-content .gy-stage-label, .gy-reveal-wrap .gy-stage-label, .gy-result-head .gy-stage-label, .gy-final .gy-stage-label { color: var(--gy-sage); }
.gy-stage-content h2, .gy-reveal-wrap h2, .gy-result-head h2, .gy-final h2 { margin: 0; font-family: "Noto Serif TC", serif; font-size: clamp(30px, 4vw, 42px); line-height: 1.45; }
.gy-guidance { margin: 24px 0 26px; padding: 18px 20px; border-left: 3px solid var(--gy-sand); background: #f3eee5; color: #555b56; }
.gy-guidance p { margin: 0; line-height: 1.9; }
.gy-guidance p + p { margin-top: 8px; }
.gy-field-label { display: block; margin-bottom: 9px; font-weight: 700; }
.gy-question { width: 100%; resize: vertical; min-height: 120px; padding: 15px 16px; border: 1px solid #cfc9bd; border-radius: 14px; background: #fff; color: var(--gy-ink); font: inherit; line-height: 1.7; outline: none; }
.gy-question:focus { border-color: var(--gy-sand); box-shadow: 0 0 0 3px rgba(182,154,104,.13); }
.gy-field-help { margin: 5px 2px 20px; color: var(--gy-muted); font-size: 12px; text-align: right; }
.gy-btn { min-height: 48px; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: .22s ease; }
.gy-btn:disabled { cursor: wait; opacity: .6; }
.gy-btn-primary { background: var(--gy-sand); color: #202320; }
.gy-btn-primary:hover:not(:disabled) { transform: translateY(-2px); background: #c3a777; }
.gy-btn-secondary { border: 1px solid #bfc4be; background: transparent; color: var(--gy-ink); }
.gy-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.gy-question-summary { margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: var(--gy-mist); color: #505853; font-size: 14px; }
.gy-question-summary::before { content: "本次請示｜"; color: var(--gy-sage); font-weight: 700; }
.gy-ritual-copy { color: var(--gy-muted); line-height: 1.9; }
.gy-cup-result { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; padding: 17px 18px; border: 1px solid var(--gy-line); border-radius: 15px; background: #fff; }
.gy-cup-result strong { font-family: "Noto Serif TC", serif; color: var(--gy-sand); font-size: 24px; }
.gy-cup-result span { color: var(--gy-muted); }
.gy-confirmation { margin-top: 20px; padding: 18px; border-radius: 16px; background: #f0ece4; }
.gy-confirmation > span { display: block; margin-bottom: 10px; color: var(--gy-sage); font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.gy-confirm-dots { display: flex; gap: 9px; margin-bottom: 10px; }
.gy-confirm-dots i { width: 18px; height: 18px; border: 1px solid #b9b4aa; border-radius: 50%; background: #fff; }
.gy-confirm-dots i.is-on { border-color: var(--gy-sand); background: var(--gy-sand); box-shadow: 0 0 0 4px rgba(182,154,104,.12); }
.gy-confirmation small { color: var(--gy-muted); }

.gy-reveal-wrap { min-height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 54px 24px; text-align: center; background: radial-gradient(circle at 50% 55%, rgba(182,154,104,.18), transparent 30%), var(--gy-ivory); }
.gy-reveal-copy { max-width: 640px; color: var(--gy-muted); }
.gy-lot-stick { width: 154px; min-height: 360px; margin-top: 28px; border: 1px solid #9f713a; border-radius: 16px; padding: 24px 14px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: #f6e9d3; background: linear-gradient(180deg, #8d2e2b, #6f1f1c); box-shadow: 0 24px 52px rgba(75,33,29,.22), inset 0 0 0 5px rgba(216,198,165,.08); cursor: pointer; animation: gy-float 2.6s ease-in-out infinite; }
.gy-lot-stick span, .gy-lot-stick small { writing-mode: vertical-rl; letter-spacing: .16em; }
.gy-lot-stick strong { font-family: "Noto Serif TC", serif; font-size: 24px; writing-mode: vertical-rl; letter-spacing: .2em; }
@keyframes gy-float { 50% { transform: translateY(-7px); } }

.gy-result-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 42px 48px 28px; border-bottom: 1px solid var(--gy-line); }
.gy-result-meta { display: flex; gap: 10px; margin-top: 12px; color: var(--gy-muted); font-size: 13px; }
.gy-result-meta span:first-child { padding: 4px 10px; border-radius: 999px; background: #efe5d5; color: #7b6239; font-weight: 700; }
.gy-result-question { max-width: 420px; margin: 0; color: var(--gy-muted); text-align: right; }
.gy-result-question span { display: block; margin-bottom: 4px; color: var(--gy-sage); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.gy-result-question strong { color: var(--gy-ink); font-weight: 600; }
.gy-result-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 34px 48px 28px; }
.gy-lot-image-card { margin: 0; align-self: start; padding: 12px; border: 1px solid var(--gy-line); border-radius: 18px; background: #fff; }
.gy-lot-image-card--result-bottom { width: min(520px, calc(100% - 96px)); margin: 0 auto 28px; }
.gy-lot-image-card img { display: block; width: 100%; height: auto; border-radius: 10px; }
.gy-lot-image-card figcaption { padding: 10px 4px 2px; color: var(--gy-muted); font-size: 12px; text-align: center; }
.gy-result-content { display: grid; gap: 14px; }
.gy-reading-card { display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 22px; border: 1px solid var(--gy-line); border-radius: 18px; background: #fff; }
.gy-reading-card--poem { background: linear-gradient(145deg, #2a302c, #384039); color: #fff; border-color: transparent; }
.gy-reading-card--overall { border-color: rgba(182,154,104,.45); background: #f4efe6; }
.gy-reading-no { display: grid; place-items: center; align-self: start; width: 36px; height: 36px; border-radius: 10px; background: var(--gy-charcoal); color: #fff; font-size: 12px; font-weight: 700; }
.gy-reading-card--poem .gy-reading-no { background: var(--gy-sand); color: #242724; }
.gy-reading-kicker { margin: 0 0 8px; color: var(--gy-sage); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.gy-reading-card--poem .gy-reading-kicker { color: var(--gy-sand-soft); }
.gy-reading-card p:last-child { margin: 0; color: #555c56; line-height: 1.9; }
.gy-reading-card--poem p:last-child { color: #fff; }
.gy-poem { display: grid; gap: 5px; font-family: "Noto Serif TC", serif; font-size: 21px; line-height: 1.7; }
.gy-sacred-items { display: flex; flex-wrap: wrap; gap: 8px; }
.gy-sacred-items span { padding: 7px 10px; border-radius: 999px; background: var(--gy-mist); color: #4d5650; font-size: 13px; }
.gy-result-actions { padding: 0 48px 42px; text-align: right; }

.gy-final { min-height: 650px; padding: 64px 54px; display: flex; flex-direction: column; justify-content: center; }
.gy-final > p:not(.gy-stage-label) { max-width: 720px; color: var(--gy-muted); line-height: 1.9; }
.gy-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.gy-next-card { min-height: 190px; padding: 24px; border: 1px solid var(--gy-line); border-radius: 20px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; background: #fff; color: var(--gy-ink); text-align: left; font: inherit; cursor: pointer; transition: .22s ease; text-decoration: none; }
.gy-next-card:hover:not(.gy-next-card--disabled) { transform: translateY(-4px); border-color: var(--gy-sand); box-shadow: 0 16px 34px rgba(43,47,43,.08); }
.gy-next-card span { margin-bottom: auto; color: var(--gy-sage); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.gy-next-card strong { font-family: "Noto Serif TC", serif; font-size: 21px; }
.gy-next-card small { margin-top: 8px; color: var(--gy-muted); line-height: 1.6; }
.gy-next-card--disabled { opacity: .58; cursor: not-allowed; }
.gy-source-note { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--gy-sage); background: rgba(255,255,255,.48); color: var(--gy-muted); font-size: 13px; }
.gy-source-note strong { color: var(--gy-ink); }
.gy-source-note p { margin: 4px 0 0; }

.gy-toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translateX(-50%); max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 999px; background: #222722; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.2); font-size: 14px; }

@media (max-width: 900px) {
    .gy-progress { grid-template-columns: repeat(5, minmax(92px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
    .gy-stage-grid, .gy-result-grid { grid-template-columns: 1fr; }
    .gy-ritual-visual { min-height: 380px; }
    .gy-result-head { align-items: start; flex-direction: column; }
    .gy-result-question { text-align: left; }
    .gy-lot-image-card { max-width: 520px; margin: 0 auto; }
    .gy-lot-image-card--result-bottom { width: min(520px, calc(100% - 48px)); margin-bottom: 24px; }
    .gy-next-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .gy-container { width: min(100% - 24px, 1160px); }
    .gy-hero { padding: 58px 0 52px; }
    .gy-hero-copy { font-size: 17px; }
    .gy-main-section { padding: 38px 0 68px; }
    .gy-progress { gap: 8px; margin-bottom: 16px; }
    .gy-progress li { min-height: 70px; padding: 10px 12px; }
    .gy-stage-shell { min-height: 0; border-radius: 22px; }
    .gy-stage-grid { min-height: 0; }
    .gy-ritual-visual { min-height: 300px; padding: 28px; }
    .gy-ritual-visual::before { width: 290px; height: 290px; }
    .gy-ritual-visual::after { width: 210px; height: 210px; }
    .gy-ritual-image { max-height: 280px; }
    .gy-drawn-lot-stick { width: 58px; height: 224px; padding: 14px 8px; }
    .gy-drawn-lot-stick strong { font-size: 18px; }
    .gy-drawn-lot.is-rising .gy-drawn-lot-stick { animation-name: gy-drawn-lot-rise-mobile; }
    @keyframes gy-drawn-lot-rise-mobile {
        0% { opacity: 0; transform: translate(-50%, 70px) scale(.72) rotate(0deg); }
        18% { opacity: 1; }
        66% { opacity: 1; transform: translate(calc(-50% + 58px), -66px) scale(1.02) rotate(5deg); }
        82% { transform: translate(calc(-50% + 55px), -58px) scale(1) rotate(2deg); }
        100% { opacity: 1; transform: translate(calc(-50% + 56px), -62px) scale(1) rotate(3deg); }
    }
    .gy-stage-content { padding: 34px 24px 40px; }
    .gy-stage-content h2, .gy-reveal-wrap h2, .gy-result-head h2, .gy-final h2 { font-size: 28px; }
    .gy-reveal-wrap { min-height: 570px; padding: 44px 18px; }
    .gy-lot-stick { min-height: 330px; }
    .gy-result-head { padding: 30px 22px 22px; }
    .gy-result-grid { padding: 24px 20px 34px; gap: 20px; }
    .gy-reading-card { grid-template-columns: 36px 1fr; gap: 12px; padding: 18px 16px; }
    .gy-reading-no { width: 32px; height: 32px; }
    .gy-poem { font-size: 19px; }
    .gy-lot-image-card--result-bottom { width: calc(100% - 40px); margin-bottom: 20px; }
    .gy-result-actions { padding: 0 20px 30px; }
    .gy-final { min-height: 0; padding: 46px 22px; }
}

/* Phase 2: question direction + pre-generated AI guidance */
.gy-topic-section { margin: 24px 0 28px; }
.gy-topic-help { margin: -2px 0 14px; color: var(--gy-muted); font-size: 13px; line-height: 1.7; }
.gy-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gy-topic-option { min-height: 86px; padding: 14px 15px; border: 1px solid #d7d1c6; border-radius: 15px; background: #fff; color: var(--gy-ink); text-align: left; cursor: pointer; transition: .2s ease; }
.gy-topic-option:hover { transform: translateY(-2px); border-color: var(--gy-sand); box-shadow: 0 10px 24px rgba(43,47,43,.06); }
.gy-topic-option strong { display: block; margin-bottom: 5px; color: var(--gy-ink); font-size: 15px; }
.gy-topic-option small { display: block; color: var(--gy-muted); font-size: 12px; line-height: 1.5; }
.gy-topic-option.is-selected { border-color: var(--gy-sage); background: #e9eeea; box-shadow: 0 0 0 2px rgba(113,128,120,.12); }
.gy-topic-option.is-selected strong { color: #34493f; }

.gy-ai-focus-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border: 1px solid rgba(113,128,120,.28); border-radius: 18px; background: linear-gradient(135deg, #eef2ee, #f7f5ef); }
.gy-ai-focus-card h3 { margin: 0; font-family: "Noto Serif TC", serif; font-size: 24px; }
.gy-sacred-focus { min-width: 150px; padding: 12px 15px; border-radius: 14px; background: var(--gy-charcoal); color: #fff; text-align: center; }
.gy-sacred-focus span { display: block; margin-bottom: 3px; color: var(--gy-sand-soft); font-size: 11px; letter-spacing: .12em; }
.gy-sacred-focus strong { font-size: 17px; }
.gy-reading-card--ai { border-color: rgba(113,128,120,.42); background: #f5f7f4; }
.gy-reading-card--ai .gy-reading-no { background: var(--gy-sage); }
.gy-reading-card--advice { border-color: rgba(182,154,104,.5); background: #f7f1e7; }
.gy-reading-card--advice .gy-reading-no { background: var(--gy-sand); color: #252725; font-size: 18px; }
.gy-reading-card--ai p:last-child, .gy-reading-card--advice p:last-child { white-space: pre-line; }

.gy-source-details { border: 1px solid var(--gy-line); border-radius: 18px; overflow: hidden; background: #fff; }
.gy-source-details summary { padding: 16px 18px; color: #515852; font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.gy-source-details summary::-webkit-details-marker { display: none; }
.gy-source-details summary::after { content: "＋"; float: right; color: var(--gy-sand); font-size: 18px; line-height: 1; }
.gy-source-details[open] summary::after { content: "−"; }
.gy-source-details[open] summary { border-bottom: 1px solid var(--gy-line); background: #faf8f3; }
.gy-source-details-body { display: grid; gap: 14px; padding: 16px; }

@media (max-width: 900px) {
    .gy-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .gy-topic-grid { grid-template-columns: 1fr; }
    .gy-topic-option { min-height: 0; }
    .gy-ai-focus-card { align-items: stretch; flex-direction: column; }
    .gy-sacred-focus { min-width: 0; text-align: left; }
}

/* Phase 2.1: result reading order follows the user's selected direction. */
.gy-ai-focus-card--direction {
    justify-content: flex-start;
}
.gy-reading-card--sacred-selected {
    border-color: rgba(113,128,120,.36);
    background: #f6f8f5;
}
.gy-reading-card--sacred-selected .gy-reading-no {
    background: var(--gy-sage);
}
.gy-selected-sacred {
    margin: 0;
    font-family: "Noto Serif TC", serif;
    font-size: 19px;
    line-height: 1.8;
    color: #303630 !important;
}

/* Phase 2.4: admin may temporarily disable one guidance without breaking the lot result. */
.gy-ai-unavailable {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(155, 129, 86, 0.28);
    border-radius: 14px;
    background: rgba(155, 129, 86, 0.08);
}

.gy-ai-unavailable[hidden] {
    display: none;
}

.gy-ai-unavailable strong {
    display: block;
    margin-bottom: 6px;
}

.gy-ai-unavailable p {
    margin: 0;
    line-height: 1.8;
}

/* Phase 2.6: 自占／代占與會員求籤紀錄 */
.gy-scope-section { margin: 24px 0 20px; }
.gy-scope-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gy-scope-option { position: relative; min-height: 78px; padding: 14px 46px 14px 15px; border: 1px solid #d7d1c6; border-radius: 15px; background: #fff; color: var(--gy-ink); text-align: left; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.gy-scope-option:hover { transform: translateY(-2px); border-color: var(--gy-sand); box-shadow: 0 10px 24px rgba(43,47,43,.06); }
.gy-scope-option:focus-visible { outline: 3px solid rgba(184,143,63,.28); outline-offset: 2px; }
.gy-scope-option strong { display: block; margin-bottom: 5px; font-size: 16px; }
.gy-scope-option small { display: block; color: var(--gy-muted); font-size: 12px; line-height: 1.5; }
.gy-scope-option.is-selected,
.gy-scope-option[aria-checked="true"] { border-color: #435c52; background: #435c52; color: #fff; box-shadow: 0 10px 24px rgba(52,73,63,.18); }
.gy-scope-option.is-selected::after,
.gy-scope-option[aria-checked="true"]::after { content: '✓'; position: absolute; top: 50%; right: 16px; display: grid; width: 24px; height: 24px; place-items: center; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.52); border-radius: 50%; color: #fff; font-size: 14px; font-weight: 800; }
.gy-scope-option.is-selected strong,
.gy-scope-option[aria-checked="true"] strong { color: #fff; }
.gy-scope-option.is-selected small,
.gy-scope-option[aria-checked="true"] small { color: rgba(255,255,255,.82); }
.gy-result-meta .gy-result-scope { padding: 4px 10px; border-radius: 999px; background: var(--gy-mist); color: #435249; font-weight: 700; }

.gy-journal-card { margin-top: 34px; padding: 26px; border: 1px solid rgba(113,128,120,.32); border-radius: 22px; background: linear-gradient(145deg, #f8faf7, #f3efe7); }
.gy-journal-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 22px; }
.gy-journal-head span { color: var(--gy-sage); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.gy-journal-head h3 { margin: 5px 0 0; font-family: "Noto Serif TC", serif; font-size: 25px; }
.gy-journal-head p { max-width: 420px; margin: 0; color: var(--gy-muted); font-size: 13px; line-height: 1.7; }
.gy-journal-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); gap: 18px; }
.gy-journal-fields, .gy-review-setting { padding: 20px; border: 1px solid var(--gy-line); border-radius: 16px; background: #fff; }
.gy-journal-fields > label { display: block; margin: 0 0 7px; font-weight: 700; }
.gy-journal-fields > textarea { width: 100%; min-height: 96px; margin: 0 0 17px; padding: 13px 14px; border: 1px solid #d4cec2; border-radius: 12px; resize: vertical; color: var(--gy-ink); background: #fff; font: inherit; line-height: 1.7; }
.gy-journal-fields > textarea:focus, .gy-review-custom input:focus { border-color: var(--gy-sand); outline: 0; box-shadow: 0 0 0 3px rgba(182,154,104,.12); }
.gy-journal-choice { margin: 0; padding: 0; border: 0; }
.gy-journal-choice legend { margin-bottom: 9px; font-weight: 700; }
.gy-journal-choice label { display: inline-flex; gap: 7px; align-items: center; margin: 0 12px 8px 0; color: #555c56; font-size: 13px; }
.gy-review-setting > span { color: var(--gy-sage); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.gy-review-setting h4 { margin: 6px 0 8px; font-family: "Noto Serif TC", serif; font-size: 20px; }
.gy-review-setting p { margin: 0 0 14px; color: var(--gy-muted); font-size: 13px; line-height: 1.7; }
.gy-review-options { display: grid; gap: 8px; }
.gy-review-options label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #f7f4ee; color: #565b57; font-size: 13px; }
.gy-review-custom { margin-top: 12px; }
.gy-review-custom label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.gy-review-custom input { width: 100%; padding: 10px 11px; border: 1px solid #d4cec2; border-radius: 10px; background: #fff; font: inherit; }
.gy-save-reading { margin-top: 18px; }
.gy-save-success { display: grid; gap: 5px; margin-top: 16px; padding: 15px 17px; border: 1px solid rgba(113,128,120,.38); border-radius: 14px; background: #e8efe9; }
.gy-save-success[hidden] { display: none; }
.gy-save-success strong { color: #315044; }
.gy-save-success span { color: #5e685f; font-size: 13px; }
.gy-save-success a { width: max-content; margin-top: 4px; color: #315044; font-weight: 700; text-decoration: none; }
.gy-login-save { margin-top: 18px; padding: 16px; border: 1px solid var(--gy-line); border-radius: 14px; background: #fff; }
.gy-login-save p { margin: 0 0 12px; color: var(--gy-muted); font-size: 13px; }
.gy-login-save > div { display: flex; gap: 9px; flex-wrap: wrap; }
.gy-login-save .gy-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (max-width: 760px) {
    .gy-scope-options, .gy-journal-grid { grid-template-columns: 1fr; }
    .gy-journal-card { padding: 18px 15px; }
    .gy-journal-head { display: block; }
    .gy-journal-head p { margin-top: 10px; }
    .gy-journal-choice label { display: flex; margin-right: 0; }
}


/* Phase 2.7: 第二幕未得聖筊時保留第一幕輸入；第五幕保留完整籤意供邊看邊寫。 */
.gy-final {
    justify-content: flex-start;
}

.gy-final-workspace {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
    margin-top: 30px;
}

.gy-final-reference {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 118px);
    overflow: hidden;
    border: 1px solid rgba(113,128,120,.34);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(41,44,42,.06);
}

.gy-final-reference-head {
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--gy-line);
    background: linear-gradient(145deg, #edf2ee, #f8f5ee);
}

.gy-final-reference-head > span,
.gy-final-question > span,
.gy-final-reading-section > span {
    display: block;
    color: var(--gy-sage);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.gy-final-reference-head h3 {
    margin: 5px 0 7px;
    font-family: "Noto Serif TC", serif;
    font-size: 24px;
}

.gy-final-reference-head p {
    margin: 0;
    color: var(--gy-muted);
    font-size: 12px;
    line-height: 1.6;
}

.gy-final-question {
    padding: 15px 22px;
    border-bottom: 1px solid var(--gy-line);
    background: #faf8f3;
}

.gy-final-question strong {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.7;
}

.gy-final-reading-list {
    max-height: calc(100vh - 315px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.gy-final-reading-section {
    padding: 17px 22px;
    border-bottom: 1px solid #ece8df;
}

.gy-final-reading-section:last-child {
    border-bottom: 0;
}

.gy-final-reading-section strong,
.gy-final-reading-section p,
.gy-final-poem {
    margin: 6px 0 0;
    color: #454a46;
    font-size: 14px;
    line-height: 1.85;
}

.gy-final-poem {
    font-family: "Noto Serif TC", serif;
    font-size: 17px;
    color: var(--gy-ink);
}

.gy-final-sacred {
    color: #34493f !important;
    font-family: "Noto Serif TC", serif;
    font-size: 17px !important;
}

.gy-final-reading-section--ai {
    background: #f5f7f4;
}

.gy-final-reading-section--advice {
    background: #f7f1e7;
}

.gy-final-reading-section--ai p,
.gy-final-reading-section--advice p {
    white-space: pre-line;
}

.gy-final-ai-unavailable {
    margin: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(155,129,86,.28);
    border-radius: 13px;
    background: rgba(155,129,86,.08);
}

.gy-final-ai-unavailable[hidden] {
    display: none;
}

.gy-final-ai-unavailable strong {
    display: block;
    margin-bottom: 5px;
}

.gy-final-ai-unavailable p {
    margin: 0;
    color: var(--gy-muted);
    font-size: 13px;
    line-height: 1.7;
}

.gy-final-workspace .gy-journal-card {
    margin-top: 0;
}

.gy-final-workspace .gy-journal-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    .gy-final-workspace {
        grid-template-columns: 1fr;
    }

    .gy-final-reference {
        position: static;
        max-height: none;
    }

    .gy-final-reading-list {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .gy-final-workspace {
        gap: 18px;
        margin-top: 22px;
    }

    .gy-final-reference {
        border-radius: 18px;
    }

    .gy-final-reference-head,
    .gy-final-question,
    .gy-final-reading-section {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Phase 2.8: reader-facing structured AI interpretation */
.gy-ai-structured {
    color: #4f5651;
    line-height: 1.9;
}

.gy-ai-structured p {
    margin: 0;
    color: inherit;
    line-height: inherit;
}

.gy-ai-structured .gy-ai-lead {
    color: var(--gy-ink);
    font-family: "Noto Serif TC", serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.9;
}

.gy-ai-structured .gy-ai-section-title {
    margin: 18px 0 8px;
    color: var(--gy-sage);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
}

.gy-ai-structured .gy-ai-keypoint {
    position: relative;
    margin-top: 9px;
    padding-left: 18px;
}

.gy-ai-structured .gy-ai-keypoint::before {
    content: "";
    position: absolute;
    top: .78em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--gy-sand);
}

.gy-ai-structured .gy-ai-keypoint strong {
    color: #34493f;
    font-weight: 800;
}

.gy-ai-structured--compact .gy-ai-lead {
    font-size: 15px;
}

.gy-ai-structured--compact .gy-ai-section-title {
    margin-top: 14px;
}

.gy-ai-structured--compact .gy-ai-keypoint {
    font-size: 14px;
}

/* Phase 2.9: make every user-facing prompt unmistakable */
.gy-question-prompt {
    display: block;
    margin-bottom: 12px;
    color: var(--gy-ink);
    font-family: "Noto Serif TC", serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .015em;
}

.gy-scope-section > .gy-question-prompt,
.gy-topic-section > .gy-question-prompt {
    margin-top: 4px;
}

.gy-question-summary {
    font-size: 16px;
    line-height: 1.75;
}

.gy-question-summary::before {
    font-size: 15px;
}

.gy-confirmation > span {
    font-size: 16px;
    letter-spacing: .08em;
}

.gy-result-question span,
.gy-final-question > span {
    font-size: 14px;
}

.gy-result-question strong,
.gy-final-question strong {
    font-size: 17px;
    line-height: 1.7;
}

.gy-question-prompt--journal {
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 18px;
}

.gy-journal-choice .gy-question-prompt {
    padding: 0;
}

.gy-review-setting h4.gy-question-prompt {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .gy-question-prompt { font-size: 18px; }
    .gy-question-prompt--journal { font-size: 17px; }
    .gy-question-summary { font-size: 15px; }
}


/* Phase 2.9.1: stronger visual highlight for request/question summaries */
.gy-question-summary::before { content: none; }
.gy-request-callout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid rgba(174, 181, 173, .88);
    border-radius: 18px;
    background: linear-gradient(145deg, #f4f7f4, #eef3ef);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.gy-request-callout__label {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(43, 73, 62, .10);
    color: var(--gy-sage);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gy-request-callout__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gy-request-callout__tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.2;
}

.gy-request-callout__tag--scope {
    background: #e8efe9;
    color: #234637;
    border: 1px solid rgba(60, 96, 82, .18);
}

.gy-request-callout__tag--topic {
    background: #f3ead9;
    color: #8c6534;
    border: 1px solid rgba(169, 130, 73, .22);
}

.gy-request-callout__question {
    display: block;
    font-family: "Noto Serif TC", serif;
    font-size: 28px;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: .01em;
}

.gy-request-callout__question.is-accent-gold {
    color: #9b6d1f;
}

.gy-request-callout__question.is-accent-emerald {
    color: #274e3f;
}

.gy-question-summary {
    margin: 18px 0;
    font-size: 16px;
}

.gy-result-question {
    max-width: 450px;
    margin: 0;
    text-align: left;
    align-self: center;
    background: linear-gradient(145deg, #f8fbf8, #eef3ef);
}

.gy-final-question {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gy-line);
    background: linear-gradient(145deg, #fafbf8, #eef3ef);
}

.gy-result-question .gy-request-callout__question {
    font-size: 25px;
}

.gy-final-question .gy-request-callout__question {
    font-size: 24px;
}

@media (max-width: 900px) {
    .gy-result-question {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .gy-request-callout {
        padding: 16px;
        gap: 9px;
    }

    .gy-request-callout__label {
        font-size: 13px;
        letter-spacing: .12em;
    }

    .gy-request-callout__tag {
        min-height: 32px;
        font-size: 13px;
        padding: 5px 11px;
    }

    .gy-request-callout__question,
    .gy-result-question .gy-request-callout__question,
    .gy-final-question .gy-request-callout__question {
        font-size: 22px;
        line-height: 1.5;
    }
}


/* 2026-09-02 v2｜觀音聖籤第一幕重新排版
   第一幕不再讓左側深色視覺跟著表單高度延伸。
   改成「上方短版儀式橫幅 + 下方表單」，並用獨立 class 鎖定，避免受其他 stage 規則影響。 */
@media (min-width: 901px) {
    .gy-stage--intro .gy-stage-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        min-height: 0 !important;
    }

    .gy-stage--intro .gy-ritual-visual {
        min-height: 190px !important;
        height: 190px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 30px !important;
        padding: 28px 52px !important;
        text-align: left !important;
        background:
            radial-gradient(circle at 15% 50%, rgba(182,154,104,.22), transparent 20%),
            radial-gradient(circle at 86% 18%, rgba(113,128,120,.14), transparent 30%),
            linear-gradient(118deg, #202521 0%, #2d342f 58%, #242a26 100%) !important;
    }

    .gy-stage--intro .gy-ritual-visual::before {
        width: 156px !important;
        height: 156px !important;
        left: 34px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .gy-stage--intro .gy-ritual-visual::after {
        width: 112px !important;
        height: 112px !important;
        left: 56px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .gy-stage--intro .gy-halo {
        width: 178px !important;
        height: 178px !important;
        left: 23px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .gy-stage--intro .gy-character {
        flex: 0 0 96px !important;
        width: 96px !important;
        height: 96px !important;
        font-size: 44px !important;
    }

    .gy-stage--intro .gy-ritual-visual--quiet p {
        margin: 0 !important;
        max-width: 620px !important;
        font-family: "Noto Serif TC", serif !important;
        font-size: 24px !important;
        line-height: 1.6 !important;
        letter-spacing: .12em !important;
        color: #e9e3d8 !important;
    }

    .gy-stage--intro .gy-stage-content {
        width: 100% !important;
        padding: 42px 52px 52px !important;
        align-self: stretch !important;
    }

    .gy-stage--intro .gy-stage-content h2 {
        max-width: 850px;
    }

    .gy-stage--intro .gy-guidance {
        max-width: 980px;
    }

    .gy-stage--intro .gy-scope-options {
        max-width: 720px;
    }

    .gy-stage--intro .gy-topic-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1200px) {
    .gy-stage--intro .gy-topic-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .gy-stage--intro .gy-stage-grid {
        min-height: 0 !important;
    }

    .gy-stage--intro .gy-ritual-visual {
        min-height: 210px !important;
        height: auto !important;
    }
}

@media (max-width: 640px) {
    .gy-stage--intro .gy-ritual-visual {
        min-height: 180px !important;
        padding: 24px !important;
    }

    .gy-stage--intro .gy-character {
        width: 92px !important;
        height: 92px !important;
        font-size: 42px !important;
    }

    .gy-stage--intro .gy-stage-content {
        padding: 32px 22px 40px !important;
    }
}

/* 2026-09-02 v5：改用真實圖檔呈現筊杯正反面；位移與翻面分層動畫。 */
.gy-jiaobei-stage{
    position:relative;
    z-index:3;
    width:min(84%,350px);
    height:310px;
    margin:auto;
    overflow:visible;
    perspective:1100px;
}
.gy-jiaobei-stage[hidden]{display:none!important}
.gy-jiaobei-piece{
    position:absolute;
    left:50%;
    top:50%;
    width:104px;
    height:158px;
    will-change:transform,filter;
    transform-style:preserve-3d;
    filter:drop-shadow(0 18px 18px rgba(0,0,0,.28));
}
.gy-jiaobei-piece.is-round{--face-angle:0deg}
.gy-jiaobei-piece.is-flat{--face-angle:180deg}
.gy-jiaobei-flipper{
    position:relative;
    width:100%;
    height:100%;
    transform-style:preserve-3d;
    transform:rotateY(var(--face-angle));
}
.gy-jiaobei-face{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
    transform-origin:center center;
    image-rendering:auto;
}
.gy-jiaobei-face--round{transform:rotateY(0deg)}
.gy-jiaobei-face--flat{transform:rotateY(180deg)}
.gy-jiaobei-piece--left{--settle-x:-82px;--settle-y:-5px;--settle-rot:-17deg;transform:translate3d(var(--settle-x),var(--settle-y),0) rotate(var(--settle-rot))}
.gy-jiaobei-piece--right{--settle-x:10px;--settle-y:4px;--settle-rot:15deg;transform:translate3d(var(--settle-x),var(--settle-y),0) rotate(var(--settle-rot))}
.gy-jiaobei-floor-shadow{
    position:absolute;
    left:50%;
    bottom:42px;
    width:172px;
    height:30px;
    border-radius:50%;
    background:radial-gradient(ellipse,rgba(0,0,0,.30) 0%,rgba(0,0,0,.12) 52%,rgba(0,0,0,0) 76%);
    transform:translateX(-50%) scale(.9);
    opacity:.72;
}
.gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--left{animation:gy-jiaobei-photo-toss-left 1.78s cubic-bezier(.18,.72,.2,1) both}
.gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--right{animation:gy-jiaobei-photo-toss-right 1.78s cubic-bezier(.18,.72,.2,1) both}
.gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--left .gy-jiaobei-flipper{animation:gy-jiaobei-photo-flip-left 1.78s cubic-bezier(.18,.72,.2,1) both}
.gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--right .gy-jiaobei-flipper{animation:gy-jiaobei-photo-flip-right 1.78s cubic-bezier(.18,.72,.2,1) both}
.gy-jiaobei-stage.is-tossing .gy-jiaobei-floor-shadow{animation:gy-jiaobei-photo-shadow 1.78s ease-in-out both}
@keyframes gy-jiaobei-photo-toss-left{
    0%{transform:translate3d(-80px,58px,0) rotate(-10deg) scale(.86);filter:drop-shadow(0 8px 10px rgba(0,0,0,.18))}
    16%{transform:translate3d(-118px,-34px,75px) rotate(-42deg) scale(.94)}
    35%{transform:translate3d(-62px,-142px,145px) rotate(24deg) scale(1.04);filter:drop-shadow(0 36px 28px rgba(0,0,0,.15))}
    53%{transform:translate3d(-126px,-92px,92px) rotate(-32deg) scale(1)}
    70%{transform:translate3d(-88px,-26px,36px) rotate(18deg) scale(.97)}
    82%{transform:translate3d(-78px,10px,8px) rotate(-8deg) scale(.94,.86)}
    90%{transform:translate3d(-82px,-10px,4px) rotate(-22deg) scale(1.02)}
    96%{transform:translate3d(-80px,3px,1px) rotate(calc(var(--settle-rot) - 5deg)) scale(.98,.94)}
    100%{transform:translate3d(var(--settle-x),var(--settle-y),0) rotate(var(--settle-rot)) scale(1);filter:drop-shadow(0 18px 18px rgba(0,0,0,.28))}
}
@keyframes gy-jiaobei-photo-toss-right{
    0%{transform:translate3d(8px,60px,0) rotate(11deg) scale(.86);filter:drop-shadow(0 8px 10px rgba(0,0,0,.18))}
    15%{transform:translate3d(48px,-38px,80px) rotate(48deg) scale(.95)}
    34%{transform:translate3d(0,-150px,150px) rotate(-26deg) scale(1.05);filter:drop-shadow(0 38px 28px rgba(0,0,0,.15))}
    52%{transform:translate3d(58px,-88px,90px) rotate(36deg) scale(1)}
    69%{transform:translate3d(18px,-22px,32px) rotate(-17deg) scale(.97)}
    82%{transform:translate3d(10px,10px,8px) rotate(9deg) scale(.94,.86)}
    90%{transform:translate3d(14px,-9px,4px) rotate(23deg) scale(1.02)}
    96%{transform:translate3d(10px,4px,1px) rotate(calc(var(--settle-rot) + 5deg)) scale(.98,.94)}
    100%{transform:translate3d(var(--settle-x),var(--settle-y),0) rotate(var(--settle-rot)) scale(1);filter:drop-shadow(0 18px 18px rgba(0,0,0,.28))}
}
@keyframes gy-jiaobei-photo-flip-left{
    0%{transform:rotateY(0deg) rotateX(0deg)}
    18%{transform:rotateY(250deg) rotateX(32deg)}
    38%{transform:rotateY(545deg) rotateX(-24deg)}
    58%{transform:rotateY(785deg) rotateX(20deg)}
    78%{transform:rotateY(1010deg) rotateX(-12deg)}
    90%{transform:rotateY(1060deg) rotateX(5deg)}
    100%{transform:rotateY(calc(1080deg + var(--face-angle))) rotateX(0deg)}
}
@keyframes gy-jiaobei-photo-flip-right{
    0%{transform:rotateY(0deg) rotateX(0deg)}
    17%{transform:rotateY(-270deg) rotateX(-30deg)}
    37%{transform:rotateY(-565deg) rotateX(26deg)}
    57%{transform:rotateY(-805deg) rotateX(-18deg)}
    78%{transform:rotateY(-1035deg) rotateX(10deg)}
    90%{transform:rotateY(-1080deg) rotateX(-4deg)}
    100%{transform:rotateY(calc(-1080deg + var(--face-angle))) rotateX(0deg)}
}
@keyframes gy-jiaobei-photo-shadow{
    0%{transform:translateX(-50%) scale(.94);opacity:.62}
    34%{transform:translateX(-50%) scale(.38);opacity:.14}
    54%{transform:translateX(-50%) scale(.5);opacity:.22}
    82%{transform:translateX(-50%) scale(1.10,.75);opacity:.82}
    91%{transform:translateX(-50%) scale(.78,.9);opacity:.56}
    100%{transform:translateX(-50%) scale(.92);opacity:.7}
}
.gy-final-restart{display:flex;justify-content:center;padding:10px 0 8px}
.gy-btn-restart-bottom{min-width:150px;padding-inline:28px}
@media(max-width:720px){
    .gy-jiaobei-stage{width:min(88%,310px);height:270px}
    .gy-jiaobei-piece{width:86px;height:132px}
    .gy-jiaobei-floor-shadow{bottom:36px;width:148px}
    .gy-jiaobei-piece--left{--settle-x:-70px;--settle-y:-4px}
    .gy-jiaobei-piece--right{--settle-x:5px;--settle-y:2px}
}
@media(prefers-reduced-motion:reduce){
    .gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--left,
    .gy-jiaobei-stage.is-tossing .gy-jiaobei-piece--right,
    .gy-jiaobei-stage.is-tossing .gy-jiaobei-piece .gy-jiaobei-flipper,
    .gy-jiaobei-stage.is-tossing .gy-jiaobei-floor-shadow{animation-duration:.45s;animation-timing-function:ease-out}
}

/* Phase 2.7: 第四幕完成即保存，並提供三個清楚去向 */
.gy-result-auto-save{margin:0 48px 16px;padding:13px 16px;border:1px solid rgba(113,128,120,.28);border-radius:14px;background:#eef3ef;color:#526159;display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:13px}
.gy-result-auto-save.is-saved{background:#e8efe9;border-color:rgba(113,128,120,.42);color:#315044}
.gy-result-auto-save.is-error{background:#f8efe6;border-color:#dfc8ad;color:#805d39}
.gy-result-auto-save a{color:inherit;font-weight:800;text-decoration:none;white-space:nowrap}
.gy-result-actions--choices{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;text-align:initial}
.gy-result-actions--choices .gy-btn{text-decoration:none}
@media(max-width:720px){.gy-result-auto-save{margin:0 20px 14px;align-items:flex-start;flex-direction:column}.gy-result-actions--choices{justify-content:stretch}.gy-result-actions--choices .gy-btn{width:100%}}

/* Phase 1M-3｜免費／完整雙層結果 + Tool Result Snapshot */
.gy-result-layer{display:grid;gap:4px;padding:15px 17px;border-radius:14px;border:1px solid #e5e0d5;background:#fbfaf6}
.gy-result-layer span{font-size:11px;font-weight:800;letter-spacing:.08em;color:#8a795a}
.gy-result-layer strong{font-family:"Noto Serif TC",serif;font-size:19px;color:#343832}
.gy-result-layer small{font-size:13px;line-height:1.8;color:#6f756f}
.gy-result-layer--premium{margin-top:8px;border-color:#cddbd2;background:#f4f8f5}
.gy-result-layer--premium span{color:#61786a}
.gy-snapshot-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border:1px solid #d9d3c7;border-radius:16px;background:linear-gradient(135deg,#fbfaf6,#f2f5f1)}
.gy-snapshot-copy{display:grid;gap:6px;min-width:0}
.gy-snapshot-kicker{font-size:11px;font-weight:800;letter-spacing:.06em;color:#8b7653}
.gy-snapshot-copy>strong{font-family:"Noto Serif TC",serif;font-size:18px;color:#333831}
.gy-snapshot-copy>p{margin:0;color:#6e746f;font-size:13px;line-height:1.8}
.gy-snapshot-product{margin-top:3px;display:flex;flex-wrap:wrap;gap:6px}
.gy-snapshot-product span{display:inline-flex;padding:8px 12px;border-radius:999px;font-size:14px;font-weight:800;line-height:1.5}
.gy-snapshot-product .is-configured{background:#e7f2e9;color:#3e6849}
.gy-snapshot-product .is-inactive{background:#f2ece4;color:#7b674d}
.gy-snapshot-product .is-unconfigured{background:#f1efeb;color:#737873}
.gy-snapshot-link{flex:0 0 auto;text-align:center}
@media(max-width:720px){.gy-snapshot-panel{align-items:stretch;flex-direction:column}.gy-snapshot-link{width:100%}}

/* Phase 1M-4 monetization / access resolver */
.gy-premium-locked{display:grid;gap:8px;padding:18px;border:1px solid #dfcfad;border-radius:16px;background:#fff9ed;color:#655234}
.gy-premium-locked[hidden]{display:none!important}.gy-premium-locked strong{font-family:"Noto Serif TC",serif;font-size:18px;color:#4f4029}.gy-premium-locked p{margin:0;line-height:1.75;color:#76664e}.gy-premium-locked .gy-btn{justify-self:start;margin-top:4px}.gy-premium-locked--compact{margin-top:12px;padding:14px}.gy-premium-locked--compact strong{font-size:15px}
@media(max-width:560px){.gy-premium-locked .gy-btn{width:100%;justify-self:stretch}}
