:root{--midnight: #050a18;--gold: #d8bd86;--ivory: #f2e7cd;--serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;--sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;color-scheme:dark}*{box-sizing:border-box}html{height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation}html,body,#root{min-height:100%;margin:0}body{background:var(--midnight);color:var(--ivory);font-family:var(--serif);-webkit-font-smoothing:antialiased;overflow-x:hidden;overscroll-behavior-y:none}button{font-family:var(--serif);-webkit-user-select:none;user-select:none}.app{position:relative;display:flex;justify-content:center;height:100vh;height:100dvh;min-height:100vh;min-height:100dvh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;background:radial-gradient(120% 80% at 50% 0%,rgba(33,56,100,.52),transparent 62%),radial-gradient(90% 60% at 12% 90%,rgba(21,40,78,.42),transparent 60%),linear-gradient(165deg,#060c1e,#0a142c 48%,#040817)}html.keyboard-open .app{height:var(--vvh, 100dvh);min-height:0}.night-sky{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden}.sky-glow{position:absolute;border-radius:50%;filter:blur(12px)}.sky-glow-a{top:-18vh;left:50%;width:78vw;height:78vw;max-width:760px;max-height:760px;transform:translate(-50%);background:radial-gradient(circle,rgba(216,189,134,.09),transparent 68%);animation:breathe 9s ease-in-out infinite alternate}.sky-glow-b{bottom:-24vh;right:-18vw;width:70vw;height:70vw;max-width:680px;max-height:680px;background:radial-gradient(circle,rgba(92,124,190,.12),transparent 70%);animation:breathe 12s ease-in-out infinite alternate-reverse}.star{position:absolute;border-radius:50%;background:#f6ebd0;box-shadow:0 0 7px #f0dcb0bf;animation-name:twinkle;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-direction:alternate}.stage{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;width:min(100%,480px);min-height:100%;padding:calc(clamp(26px,5.5vh,54px) + env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) calc(18px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px))}.masthead{text-align:center;animation:fadeUp .9s ease-out both}.crest{font-size:17px;color:#d8bd86cc;letter-spacing:.4em;text-shadow:0 0 16px rgba(216,189,134,.55)}.masthead h1{margin:12px 0;padding-left:.28em;font-size:clamp(30px,8vw,40px);font-weight:500;letter-spacing:.28em;color:var(--ivory);text-shadow:0 0 30px rgba(216,189,134,.32)}.tagline{margin:0;font-size:13px;letter-spacing:.18em;color:#e6d9bea8}.oracle{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:clamp(16px,3vh,28px);width:100%;padding:14px 0}.prompt{height:20px;margin:0;font-size:13px;letter-spacing:.16em;text-align:center;color:#e6d9beb8;transition:opacity .5s ease;animation:fadeUp .9s .12s ease-out both}.prompt.is-hidden{animation:none;transform:none;opacity:0}.card{position:relative;width:min(76vw,330px);height:min(50vh,430px);min-height:290px;perspective:1400px;animation:fadeUp 1s .22s ease-out both}.card-halo{position:absolute;top:-26px;right:-26px;bottom:-26px;left:-26px;z-index:0;border-radius:34px;background:radial-gradient(circle at 50% 50%,rgba(216,189,134,.28),transparent 68%);opacity:0;pointer-events:none}.card.is-revealing .card-halo{animation:haloPulse .9s ease-out both}.card-inner{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;transform-style:preserve-3d;transition:transform .72s cubic-bezier(.22,.68,.16,1)}.card.is-revealing .card-inner{transform:rotateY(180deg);transition-delay:.16s}.card.is-revealed .card-inner{transform:rotateY(180deg)}.card-face{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(216,189,134,.42);border-radius:18px;background:linear-gradient(155deg,#172646f7,#081024fa 55%,#0f1c38f7);box-shadow:inset 0 0 60px #d8bd8612,0 22px 60px #00000085,0 0 44px #d8bd8617;backface-visibility:hidden;-webkit-backface-visibility:hidden}.card-face:before{content:"";position:absolute;top:10px;right:10px;bottom:10px;left:10px;border:1px solid rgba(216,189,134,.18);border-radius:12px;pointer-events:none}.card-face:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle at 50% 30%,rgba(216,189,134,.11),transparent 64%);pointer-events:none}.card-art{width:100%;height:100%}.writing-face{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,2vh,16px);width:100%;height:100%;padding:22px;animation:fadeIn .42s ease-out both}.writing-moon{width:clamp(66px,20vw,92px);height:clamp(66px,20vw,92px);flex:none;filter:drop-shadow(0 0 12px rgba(216,189,134,.28))}.writing-label{font-size:12px;letter-spacing:.16em;color:#e6d9bea8}.question-input{display:block;width:100%;min-height:92px;max-height:132px;padding:12px 14px;border:1px solid rgba(216,189,134,.32);border-radius:10px;outline:none;background:#d8bd860b;color:var(--ivory);font-family:var(--serif);font-size:16px;line-height:1.7;letter-spacing:.06em;text-align:center;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 24px #00000029;transition:border-color .24s ease,box-shadow .24s ease;-webkit-tap-highlight-color:transparent}.question-input::placeholder{color:#e6d9be57}.question-input:focus{border-color:#d8bd86b8;box-shadow:inset 0 0 24px #00000029,0 0 22px #d8bd8624}.card-back{transform:rotateY(180deg);padding:20px 20px 16px}.card-back-ornament{font-size:14px;color:#d8bd86b3;letter-spacing:.3em}.answer-area{display:flex;flex:1;align-items:center;justify-content:center;width:100%}.answer-text{margin:0;max-width:100%;font-size:clamp(21px,6.2vw,29px);font-weight:500;line-height:1.95;letter-spacing:.1em;text-align:center;color:var(--ivory);text-shadow:0 0 24px rgba(216,189,134,.3);animation:answerIn .62s cubic-bezier(.2,.7,.2,1) both}.card-back-foot{display:flex;align-items:center;justify-content:center;height:16px;opacity:.6}.card-back-foot span{display:block;width:52px;height:1px;background:linear-gradient(90deg,transparent,rgba(216,189,134,.85),transparent)}.card-sheen{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:18px;overflow:hidden;opacity:0;background:linear-gradient(115deg,transparent 34%,rgba(246,232,199,.3) 50%,transparent 66%);transform:translate(-120%);pointer-events:none}.card.is-revealing .card-sheen{animation:sheen .8s ease-in-out both}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;min-height:56px;width:100%;animation:fadeUp .9s .34s ease-out both}.btn{min-width:132px;min-height:46px;padding:12px 24px;border-radius:999px;font-size:14px;letter-spacing:.16em;cursor:pointer;transition:transform .22s ease,box-shadow .22s ease,opacity .22s ease,background .22s ease;-webkit-tap-highlight-color:transparent}.btn:active:not(:disabled){transform:translateY(1px) scale(.985)}.btn:disabled{opacity:.48;cursor:default}.btn-primary{border:1px solid rgba(246,232,199,.75);background:linear-gradient(135deg,#edd6a8,#c8a66c);color:#20190d;box-shadow:0 10px 28px #d8bd8633}.btn-primary:hover:not(:disabled){box-shadow:0 12px 34px #d8bd8657}.btn-ghost{border:1px solid rgba(216,189,134,.4);background:#d8bd860f;color:#ead9b6}.btn-ghost:hover:not(:disabled){background:#d8bd8624}.actions>.btn-primary:only-child{min-width:190px}.text-link{min-height:44px;padding:10px 6px;border:none;background:none;color:#e6d9be85;font-family:var(--serif);font-size:12px;letter-spacing:.14em;cursor:pointer;transition:color .22s ease;-webkit-tap-highlight-color:transparent}.text-link:hover{color:#f0e3c8e0}.notice{margin:-4px 0 0;font-size:12px;letter-spacing:.1em;text-align:center;color:#eecdaac7}.footnote{margin-top:auto;padding-top:10px;font-size:11px;letter-spacing:.12em;text-align:center;color:#d8cdb46b;animation:fadeUp .9s .46s ease-out both}.fatal{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px;font-size:14px;color:#ead9b6}.poster-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:calc(16px + env(safe-area-inset-top,0px)) 14px calc(16px + env(safe-area-inset-bottom,0px));overflow-y:auto;background:#030712e0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);animation:fadeIn .26s ease-out both}.poster-dialog{display:flex;flex-direction:column;align-items:center;gap:14px;max-width:100%}.poster-image{display:block;width:auto;max-width:100%;max-height:min(70vh,900px);border-radius:10px;box-shadow:0 24px 70px #0009,0 0 0 1px #d8bd8647}.poster-tip{margin:0;font-size:12px;letter-spacing:.12em;color:#e6d9be9e}.poster-actions{display:flex;gap:12px}@keyframes twinkle{0%{opacity:.16;transform:scale(.7)}to{opacity:.92;transform:scale(1)}}@keyframes breathe{0%{opacity:.45}to{opacity:1}}@keyframes fadeUp{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes haloPulse{0%{opacity:0;transform:scale(.96)}35%{opacity:1}to{opacity:0;transform:scale(1.05)}}@keyframes sheen{0%{opacity:0;transform:translate(-120%)}30%{opacity:.9}to{opacity:0;transform:translate(120%)}}@keyframes answerIn{0%{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}@media(min-width:720px){.stage{width:min(100%,520px)}.card{width:340px;height:440px}.btn{min-width:148px}}@media(max-width:380px),(max-height:720px){.stage{padding-top:calc(clamp(16px,3vh,28px) + env(safe-area-inset-top,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}.crest{font-size:14px}.masthead h1{margin:8px 0;font-size:clamp(26px,7.4vw,32px)}.tagline,.prompt{font-size:12px}.prompt{height:18px}.oracle{gap:clamp(10px,1.8vh,16px);padding:6px 0}.card{width:min(78vw,310px);height:min(46vh,360px);min-height:210px}.writing-face{gap:10px;padding:16px 18px}.writing-moon{width:62px;height:62px}.question-input{min-height:78px;max-height:108px;padding:10px 12px}.answer-text{font-size:clamp(19px,5.8vw,26px);line-height:1.75}.actions{min-height:48px;gap:8px}.btn{min-height:44px;padding:11px 20px}.text-link{min-height:44px}.footnote{padding-top:6px;font-size:10px}}@media(max-width:340px){.card{width:80vw;height:min(44vh,320px);min-height:190px}.masthead h1{font-size:26px}.writing-moon{width:54px;height:54px}.answer-text{font-size:19px}}@media(orientation:landscape)and (max-height:540px){.stage{padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}.crest,.tagline,.footnote{display:none}.masthead h1{margin:0 0 6px;font-size:24px}.oracle{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:0}.prompt{width:100%;height:16px}.card{width:min(38vw,240px);height:min(56vh,250px);min-height:150px}.writing-moon{width:48px;height:48px}.question-input{min-height:62px;max-height:84px}.answer-text{font-size:18px;line-height:1.6}.actions{width:auto;min-height:44px}}html.is-typing .stage{padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}html.is-typing .crest,html.is-typing .tagline,html.is-typing .footnote,html.is-typing .writing-moon{display:none}html.is-typing .masthead h1{margin:0 0 4px;font-size:22px;letter-spacing:.22em}html.is-typing .oracle{gap:8px;padding:4px 0}html.is-typing .prompt{height:0;margin:0;opacity:0;animation:none}html.is-typing .card{height:clamp(180px,30vh,250px);min-height:180px}html.is-typing .writing-face{gap:8px;padding:14px 18px}html.is-typing .question-input{min-height:76px;max-height:96px}html.is-typing .actions{min-height:44px;gap:8px}html.is-typing .btn{min-height:44px;padding:10px 20px}html.is-typing .text-link{min-height:44px}@media(max-width:480px){.poster-overlay{align-items:flex-start}.poster-dialog{gap:10px;margin:auto}.poster-image{max-height:min(58vh,620px);max-height:min(58dvh,620px)}.poster-tip{font-size:11px}.poster-actions{width:100%;gap:10px}.poster-actions .btn{flex:1;min-width:0;padding:12px 8px}}.gate-label{position:relative;z-index:1;margin:0;font-size:12px;letter-spacing:.16em;text-align:center;color:#f0e1c3c7}.app.is-entering{animation:gateEnter .62s ease-out both}@keyframes gateEnter{0%{opacity:0}to{opacity:1}}.gate-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,2.6vh,22px);width:min(78vw,310px);min-height:270px;padding:28px 24px 24px;border:1px solid rgba(216,189,134,.42);border-radius:18px;background:linear-gradient(155deg,#172646f7,#081024fa 55%,#0f1c38f7);box-shadow:inset 0 0 60px #d8bd8612,0 22px 60px #00000085,0 0 44px #d8bd8617;animation:fadeUp 1s .22s ease-out both}.gate-card:before{content:"";position:absolute;top:10px;right:10px;bottom:10px;left:10px;border:1px solid rgba(216,189,134,.18);border-radius:12px;pointer-events:none}.gate-card:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:18px;background:radial-gradient(circle at 50% 30%,rgba(216,189,134,.11),transparent 64%);pointer-events:none}.gate-moon{position:relative;z-index:1;width:78px;height:78px;flex:none;filter:drop-shadow(0 0 12px rgba(216,189,134,.28))}.gate-form{position:relative;z-index:1;display:flex;flex-direction:column;gap:14px;width:100%}.gate-input{display:block;width:100%;min-height:48px;padding:10px 14px;border:1px solid rgba(216,189,134,.36);border-radius:10px;outline:none;background:#d8bd860b;color:var(--ivory);font-family:var(--serif);font-size:20px;letter-spacing:.4em;text-indent:.4em;text-align:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:inset 0 0 24px #00000029;transition:border-color .24s ease,box-shadow .24s ease;-webkit-tap-highlight-color:transparent}.gate-input::placeholder{color:#e6d9be4d;letter-spacing:.3em;text-indent:.3em}.gate-input:focus{border-color:#d8bd86b8;box-shadow:inset 0 0 24px #00000029,0 0 22px #d8bd8624}.gate-input:disabled{opacity:.5;cursor:default}.gate-submit{width:100%;min-height:46px}.gate-message{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:32px}.gate-error,.gate-locked{margin:0;font-size:12px;letter-spacing:.12em;text-align:center}.gate-error{color:#f0bea0e6}.gate-locked{font-size:11px;color:#e6d9be99}@media(max-width:380px),(max-height:720px){.gate-card{min-height:230px;padding:20px 20px 18px;gap:12px}.gate-moon{width:60px;height:60px}.gate-input{min-height:44px;font-size:18px}.gate-message{min-height:28px}}@media(orientation:landscape)and (max-height:540px){.gate-app .tagline{display:block}.gate-card{width:min(46vw,300px);min-height:0;padding:14px 18px;gap:8px}.gate-moon{width:44px;height:44px}.gate-input{min-height:40px;padding:8px 12px}.gate-message{min-height:24px}}html.keyboard-open .gate-app .stage{padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}html.keyboard-open .gate-app .crest,html.keyboard-open .gate-app .gate-moon,html.keyboard-open .gate-app .footnote{display:none}html.keyboard-open .gate-app .masthead h1{margin:0 0 4px;font-size:22px}html.keyboard-open .gate-app .oracle{gap:6px;padding:2px 0}html.keyboard-open .gate-app .gate-card{width:min(86vw,340px);min-height:0;gap:10px;padding:16px 20px}html.keyboard-open .gate-app .gate-form{gap:10px}html.keyboard-open .gate-app .gate-input,html.keyboard-open .gate-app .gate-submit{min-height:44px}html.keyboard-open .gate-app .gate-message{min-height:22px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:1ms!important;animation-delay:0ms!important;transition-duration:1ms!important;transition-delay:0ms!important}}
