:root{--gold:#f6d69a}.sub-header{width:100%;display:flex!important;flex-direction:column;align-items:stretch!important;gap:12px!important;margin:0 0 14px!important;flex:none}.sub-nav{display:flex;align-items:center;gap:7px;justify-content:flex-start}.sub-nav a,.sub-nav button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:5px 11px!important;border:1px solid #d6ad6688;border-radius:999px;background:#510c18b8;color:var(--gold);font:inherit;font-size:13px!important;text-decoration:none!important;cursor:pointer}.sub-nav svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.sub-ribbon{position:relative;display:block;width:90%;max-width:390px;margin:0 auto!important;padding:9px 25px!important;border:1px solid #e4bb7988;border-radius:999px;background:linear-gradient(110deg,#651321,#8b2334,#651321);color:var(--gold);font-size:clamp(19px,5vw,26px)!important;font-weight:500;line-height:1.4;text-align:center;box-shadow:inset 0 1px 0 #fff0c51c,0 0 16px #e7ad5720;word-break:keep-all}.sub-ribbon:before,.sub-ribbon:after{content:'';position:absolute;top:50%;width:20px;height:20px;border-left:1px solid #e8c08088;border-bottom:1px solid #e8c08088;transform:translateY(-50%) rotate(45deg);left:12px}.sub-ribbon:after{left:auto;right:12px;transform:translateY(-50%) rotate(225deg)}.extra-page,.tj-page,.info-document{background:radial-gradient(ellipse at 50% 12%,#8a293333,transparent 65%),linear-gradient(#500d19cc,#380912cc),url(damask.png) center/280px repeat!important}.extra-page{padding:16px 18px calc(28px + env(safe-area-inset-bottom,0px));word-break:keep-all;overflow-wrap:break-word}.extra-page>p{font-size:15px;line-height:1.8;margin:18px 0}.extra-paper{padding:20px;line-height:1.85;font-size:15px}.extra-paper h3{font-weight:700;margin:18px 0 5px}.extra-paper h3:first-child{margin-top:0}.extra-paper p{margin-bottom:12px}.extra-page .z-grid{gap:10px;margin:24px 0}.extra-page .z-grid button{min-width:0;box-shadow:0 3px 12px #26050d44;background:linear-gradient(145deg,#79192a,#510c18)}.extra-page .extra-nav{margin-top:22px}.extra-page .extra-ad{padding-bottom:10px}.tj-page .sub-header{margin-bottom:0!important;gap:8px!important}.tj-page .sub-ribbon{padding:6px 24px!important}.tj-page .sub-nav a,.tj-page .sub-nav button{min-height:30px}.result-screen .sub-nav{width:100%;flex:none}.result-screen .sub-nav a,.result-screen .sub-nav button{min-height:29px;padding:3px 9px!important}.info-document{max-width:650px;min-height:100dvh;padding:18px 20px 38px;box-sizing:border-box;word-break:keep-all}.info-document article{padding:24px 18px;margin:20px 0;border:1px solid #d6ad6644;border-radius:16px;background:#4a0b16a6}.info-document article h2{font-size:20px;font-weight:600;margin:0 0 18px}.info-document article p{font-size:16px;line-height:1.9;margin:16px 0 0}.info-document .sub-nav{justify-content:flex-start}.info-document .doc-intro{margin:24px 0;font-size:15px;line-height:1.85}.info-document .sub-nav a{flex:none}@media(max-height:500px){.tj-page .sub-header{gap:4px!important}.tj-page .sub-ribbon{font-size:16px!important;padding:3px 22px!important}.tj-page .sub-nav a,.tj-page .sub-nav button{min-height:26px}} 

.z-date{text-align:center;color:#dfbc91;font-size:13px!important;margin:18px 0!important}.z-list{border:1px solid #d6ad6655;border-radius:15px;overflow:hidden;background:#4b0b17aa}.z-list .z-row{width:100%;display:flex;align-items:center;gap:10px;padding:15px 11px;border:0;border-bottom:1px solid #d6ad6633;border-radius:0;background:transparent;text-align:left;color:#f7dfb9;min-height:90px}.z-list .z-row:last-child{border-bottom:0}.z-animal{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid #d6ad6677;border-radius:50%;background:#8b2937;font-size:25px}.z-row-content{min-width:0;flex:1;display:block}.z-row-heading{display:flex;gap:5px;align-items:baseline;flex-wrap:wrap;margin-bottom:5px}.z-row-heading strong{font-size:16px;color:#ffdda2}.z-row-heading small{font-size:10px;color:#d4b493}.z-summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.65}.z-arrow{font-size:23px;color:#d6ad66}.z-detail-heading{display:flex;justify-content:center;align-items:center;gap:12px;margin:20px 0}.z-detail-heading p{margin:0;color:#e5c28e}.z-detail-paper h3{font-size:17px!important}.z-detail-paper>p{line-height:1.9;margin-bottom:20px}.z-year-row{display:flex;align-items:center;gap:13px;padding:17px 0;border-top:1px solid #8d4f3533}.z-year-badge{flex:none;display:flex;flex-direction:column;justify-content:center;align-items:center;width:52px;height:52px;border-radius:50%;background:#792536;color:#ffe5b8;font-size:14px;line-height:1.15}.z-year-badge small{font-size:10px;margin-top:3px}.z-year-row p{margin:0;font-size:14px;line-height:1.8}.z-lucky{border-top:1px solid #8d4f3533;padding-top:20px;text-align:center}.z-lucky p{margin:7px 0 0}.z-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.z-disclaimer{font-size:11px!important;line-height:1.6!important;opacity:.8;text-align:center}.extra-page:has(.z-list),.extra-page:has(.z-detail-paper){height:auto;min-height:100dvh;overflow:visible}

.info-list{margin:28px 8px;display:flex;flex-direction:column}.info-list a{display:flex;justify-content:space-between;align-items:center;padding:20px 8px;color:#f6d69a;font-size:17px;text-decoration:none;border-bottom:1px dashed #d6ad6677;background:none}.info-list a span{color:#d6ad66;font-size:23px}.info-list a:last-child{border-bottom:0}.inline-info{width:100%;text-align:left;line-height:1.8}.inline-info .doc-intro{font-size:14px;color:#e3bd91;margin:20px 0}.catalog-group{margin:26px 0}.catalog-group h2{font-size:18px;color:#ffdda2;margin:0 0 8px;font-weight:600}.catalog-group h2 small{font-size:12px;font-weight:400;opacity:.75}.catalog-entry{border-bottom:1px dashed #d6ad6655}.catalog-entry summary{cursor:pointer;list-style:none;padding:13px 6px;display:flex;justify-content:space-between;align-items:center;color:#f6d69a;font-size:15px}.catalog-entry summary::-webkit-details-marker{display:none}.catalog-entry summary:after{content:'+';color:#d6ad66;font-size:20px}.catalog-entry[open] summary:after{content:'−'}.catalog-content{padding:12px 8px 22px}.catalog-content img{display:block;width:min(65%,240px);height:auto;margin:0 auto 18px;border-radius:8px}.catalog-content p,.guide-content p{font-size:15px;line-height:1.9;margin:0;color:#f4ddba}.guide-content article{padding:18px 5px;border-bottom:1px dashed #d6ad6655}.guide-content h2{font-size:18px;font-weight:600;color:#ffdda2;margin:0 0 12px}.guide-content a{color:inherit}.extra-page:has(.inline-info){height:auto;min-height:100dvh;overflow:visible}

/* Compact fortune cookie screen only */
html:has(.cookie-slot),body:has(.cookie-slot){height:100%;overflow:hidden} main:has(.cookie-slot),#scene:has(.cookie-slot){height:100dvh;min-height:0;overflow:hidden} #scene:has(.cookie-slot){padding:0;justify-content:stretch}.extra-page:has(.cookie-slot){height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;gap:clamp(6px,1.5dvh,15px);padding:clamp(9px,2dvh,20px) 16px max(10px,env(safe-area-inset-bottom));overflow:hidden}.extra-page:has(.cookie-slot) .sub-header{margin:0!important;gap:7px!important}.extra-page:has(.cookie-slot) .sub-ribbon{padding:5px 24px!important;font-size:clamp(17px,4.8vw,24px)!important}.extra-page .cookie-instruction{margin:0!important;font-size:clamp(12px,3.6vw,15px);line-height:1.45;text-align:center;flex:none}.cookie-slot{position:relative;display:grid;place-items:center;width:100%;flex:1;min-height:0;max-height:280px;isolation:isolate}.cookie-slot .cookie-stage{margin:0;width:min(90%,320px,46dvh);max-height:100%}.cookie-stage.covered{visibility:hidden}.cookie-message{position:absolute;inset:0;display:grid;place-items:center;isolation:isolate}.cookie-message[hidden]{display:none}.cookie-message-paper{position:relative;z-index:2;width:90%;max-width:360px;border:1px solid #ffe0a0;background:linear-gradient(140deg,#fff0cc,#f1d39e);color:#681b28;border-radius:13px;padding:clamp(12px,3dvh,26px) 17px;box-shadow:0 0 18px #ffc05c88,0 0 42px #ffb34744;animation:cookieIn .35s both}.cookie-message-label{display:block;font-size:12px;color:#92572e;margin-bottom:8px}.cookie-message-paper p{margin:0;font-size:clamp(15px,4.5vw,21px);line-height:1.55;word-break:keep-all}.cookie-message-star{position:absolute;left:var(--sx);top:var(--sy);width:var(--ss);height:calc(var(--ss)*1.4);background:#ffe3a0;clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);filter:drop-shadow(0 0 5px #ffb347);animation:cookieTwinkle 2s var(--sd) infinite ease-in-out;pointer-events:none}.cookie-message-star:nth-of-type(odd){z-index:3}@keyframes cookieTwinkle{0%,100%{opacity:.15;transform:scale(.5)}50%{opacity:1;transform:scale(1.15)}}#cookie-result{width:100%;flex:none}#cookie-result:empty{display:none}.cookie-reveal{display:flex;flex-direction:column;align-items:center;gap:clamp(6px,1.5dvh,13px)}.cookie-lucky{width:100%;padding:5px 8px}.cookie-lucky h3{margin:0 0 5px;font-size:clamp(13px,3.7vw,16px);font-weight:500;color:#e4be87}.cookie-lucky p{margin:0;font-size:clamp(20px,6vw,29px);line-height:1.3;font-weight:700;color:#ffe6ac;text-shadow:0 0 10px #ffc66a55}.cookie-again{padding:7px 20px;font-size:14px;border-radius:999px}.cookie-reveal .extra-ad{margin:0;width:100%;padding:7px 0 0}.cookie-reveal .extra-ad small{margin-top:5px!important;font-size:10px;line-height:1.35}.cookie-reveal .extra-ad img{width:120px;height:60px;object-fit:contain}.cookie-opened .cookie-instruction{display:none}@media(max-height:530px){.extra-page:has(.cookie-slot){gap:4px;padding:6px 10px}.extra-page:has(.cookie-slot) .sub-header{gap:3px!important}.extra-page:has(.cookie-slot) .sub-nav button,.extra-page:has(.cookie-slot) .sub-nav a{min-height:25px;padding:2px 8px!important}.cookie-message-paper{padding:8px 12px}.cookie-message-label{margin-bottom:3px}.cookie-message-paper p{font-size:14px}.cookie-lucky{padding:0}.cookie-lucky h3{margin-bottom:2px}.cookie-again{padding:4px 16px}.cookie-reveal{gap:4px}.cookie-reveal .extra-ad{padding-top:4px}}@media(prefers-reduced-motion:reduce){.cookie-message-star,.cookie-message-paper{animation:none}}

/* Shared translucent damask: source PNG already has 0–21% black alpha. */
main:has(#scene){background:url(damask.png) center top/300px auto repeat,radial-gradient(ellipse at center,#801b28 0%,#4f0b16 52%,#350810 100%)}
.extra-page,.tj-page,.info-document{background:url(damask.png) center top/300px auto repeat,radial-gradient(ellipse at 50% 12%,#782031,#4d0c18 58%,#380912)!important}
.result-screen{background:transparent!important}
dialog#pop,dialog#tj-dialog{background:url(damask.png) center top/260px auto repeat,radial-gradient(ellipse at 50% 0%,#831e30,#590e1b 55%,#390913)!important}
.tj-foot{background:#480c17 url(damask.png) center/300px repeat}
/* Preserve a clear reading surface, with light confined to the perimeter. */
.cookie-opened .cookie-slot{flex:0 0 auto;max-height:none;min-height:0;padding:clamp(19px,4dvh,34px) 0;display:block}
.cookie-opened .cookie-stage{display:none}
.cookie-opened .cookie-message{position:relative;inset:auto;display:grid;place-items:center;padding:0;isolation:isolate}
.cookie-message .cookie-message-paper{z-index:2;isolation:isolate;overflow:visible;box-shadow:0 0 0 1px #ffe2a977,0 0 14px 3px #ffd47a99,0 0 36px 9px #ffb34c55,0 0 65px 10px #ff902d22;animation:cookieIn .35s both,cookiePaperGlow 3s .35s ease-in-out infinite}
.cookie-message .cookie-message-star,.cookie-message .cookie-message-star:nth-of-type(odd){z-index:0;pointer-events:none}
.cookie-opened #cookie-result{margin-top:0}
.cookie-opened .cookie-reveal{gap:clamp(8px,2dvh,18px)}
.cookie-opened .cookie-lucky{padding:0 8px}
.cookie-opened .cookie-lucky p{font-weight:700;font-size:clamp(23px,7vw,32px);text-shadow:0 0 14px #ffc66a66}
.cookie-opened .cookie-reveal .extra-ad{margin-top:clamp(4px,1dvh,10px)}
@keyframes cookiePaperGlow{0%,100%{box-shadow:0 0 0 1px #ffe2a977,0 0 14px 3px #ffd47a99,0 0 36px 9px #ffb34c55,0 0 65px 10px #ff902d22}50%{box-shadow:0 0 0 1px #fff0c9aa,0 0 20px 4px #ffd47abb,0 0 45px 12px #ffb34c66,0 0 72px 12px #ff902d33}}
@media(max-height:530px){.cookie-opened .cookie-slot{padding:12px 0}.cookie-opened .cookie-reveal{gap:5px}.cookie-opened .cookie-lucky p{font-size:20px}.cookie-opened .cookie-reveal .extra-ad{margin-top:0}.cookie-message .cookie-message-paper{padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.cookie-message .cookie-message-paper,.cookie-message .cookie-message-star{animation:none}}

/* Cookie layout and shared tarot particle effect. */
.extra-page:has(.cookie-slot):not(.cookie-opened) .cookie-slot{flex:0 1 auto;height:clamp(180px,43dvh,330px);max-height:330px;margin-top:clamp(22px,9dvh,86px)}
.extra-page:has(.cookie-slot):not(.cookie-opened) .cookie-instruction{margin-top:clamp(3px,1.4dvh,14px)!important}
.cookie-message .cookie-message-paper{isolation:isolate;overflow:visible;box-shadow:0 0 18px 3px #ffd47a99,0 0 42px 9px #ffb34c55;animation:cookieIn .35s both,cookiePaperGlow 3s .35s ease-in-out infinite}
.cookie-message-paper .cookie-particle-layer{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:visible}
/* Opaque paper surface above particles, below text. */
.cookie-message-paper::before{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(140deg,#fff0cc,#f1d39e);z-index:0;pointer-events:none}
.cookie-message-paper .cookie-message-label,.cookie-message-paper p{position:relative;z-index:1}
.cookie-particle-layer .result-dust{z-index:0}
@media(max-height:530px){.extra-page:has(.cookie-slot):not(.cookie-opened) .cookie-slot{margin-top:clamp(4px,3dvh,16px);height:clamp(100px,40dvh,220px)}}
@media(prefers-reduced-motion:reduce){.cookie-particle-layer .result-dust{animation:none;opacity:0}.cookie-message .cookie-message-paper{animation:none}}

/* Shared informational page typography */
.policy-content article{padding:22px 5px;border-bottom:1px dashed #d6ad6655}.policy-content article:last-child{border-bottom:0}.policy-content h2{font-size:18px;font-weight:700;margin:0 0 12px}.policy-content p{font-size:15px;line-height:1.9;margin:0 0 12px;color:#f4ddba}.policy-content p:last-child{margin-bottom:0}.policy-content a{color:inherit;overflow-wrap:anywhere}.info-document .policy-content article p{font-size:15px;line-height:1.9;margin:0 0 12px}.info-document .policy-content article h2{font-size:18px;font-weight:700;margin:0 0 12px}

/* Illustrated fortune cookie, isolated from other screens. */
.cookie-slot .cookie-stage{width:min(94%,350px,62dvh);aspect-ratio:1.35;overflow:visible;cursor:pointer;box-shadow:none!important;background:none!important;filter:none!important;touch-action:manipulation}.magic-cookie-art{display:block;position:relative;width:100%;height:100%;isolation:isolate;filter:drop-shadow(0 0 12px #ffb34c66)}.cookie-piece{position:absolute;top:18%;width:51%;height:65%;object-fit:contain;z-index:2;transition:transform .36s cubic-bezier(.15,.75,.25,1),opacity .36s;filter:drop-shadow(0 0 8px #ffca7580)}.cookie-left{left:4%;transform:translateX(8%) rotate(9deg)}.cookie-right{right:4%;transform:translateX(-8%) rotate(-9deg)}.cookie-beam{position:absolute;inset:-22% 5% 0;background:conic-gradient(from 150deg at 50% 0%,transparent 0deg,#ffd08b33 24deg,#fff1bd55 30deg,#ffd08b33 36deg,transparent 60deg);z-index:-1;filter:blur(8px)}.cookie-orbit{position:absolute;inset:22% 2% 12%;border:1px solid #ffc65eaa;border-radius:50%;transform:rotate(-14deg);box-shadow:0 0 12px #ffbc55aa,inset 0 0 8px #ffc65e55;animation:cookieOrbit 2.5s ease-in-out infinite}.cookie-flash{position:absolute;inset:0;z-index:3;background:radial-gradient(ellipse,#fff8d9 0%,#ffc46d99 18%,transparent 65%);opacity:0;pointer-events:none}.cookie-burst{position:absolute;inset:10%;z-index:1;pointer-events:none;opacity:.7}.cookie-stage.open .cookie-left{transform:translate(-38%,12%) rotate(-24deg);opacity:.55}.cookie-stage.open .cookie-right{transform:translate(38%,12%) rotate(24deg);opacity:.55}.cookie-stage.open .cookie-flash{animation:cookieFlash .39s both}.cookie-stage.open .cookie-burst{animation:cookieBurst .39s both}.cookie-message .cookie-message-paper{animation:cookieBounce .42s cubic-bezier(.2,.75,.3,1.2) both,cookiePaperGlow 3s .42s ease-in-out infinite}.cookie-message-paper .cookie-particle-layer{z-index:-1}.cookie-message-paper p,.cookie-message-label{z-index:2;position:relative}.cookie-message-paper{transform-origin:center}.cookie-stage:focus-visible{outline:1px solid #ffda9f;outline-offset:5px;border-radius:18px}@keyframes cookieOrbit{50%{opacity:.55;box-shadow:0 0 24px #ffbc55cc}}@keyframes cookieFlash{0%{opacity:0;transform:scale(.5)}35%{opacity:1}100%{opacity:0;transform:scale(1.5)}}@keyframes cookieBurst{0%{transform:scale(.7);opacity:.5}50%{opacity:1}100%{transform:scale(1.8);opacity:.2}}@keyframes cookieBounce{0%{opacity:0;transform:scale(.45) translateY(18px)}65%{opacity:1;transform:scale(1.07) translateY(-3px)}85%{transform:scale(.98)}100%{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.cookie-piece{transition:none}.cookie-orbit,.cookie-stage.open .cookie-flash,.cookie-stage.open .cookie-burst,.cookie-message .cookie-message-paper{animation:none}}

/* One common navigation origin across internal screens and standalone articles. */
#scene:has(>.extra-page),#scene:has(>.tj-page),#scene:has(>.result-screen){padding:0!important;justify-content:flex-start!important;align-items:center}
#scene>.extra-page,#scene>.tj-page,#scene>.result-screen,main.info-document{padding-top:12px!important;padding-left:16px!important;padding-right:16px!important;box-sizing:border-box}
#scene .sub-nav,main.info-document .sub-nav{height:34px;min-height:34px;gap:7px!important;flex:none;align-items:center;justify-content:flex-start}
#scene .sub-nav button,main.info-document .sub-nav a{height:34px!important;min-height:34px!important;padding:4px 11px!important;font-size:13px!important;margin:0!important}
#scene .sub-header,main.info-document .sub-header{gap:8px!important;margin:0 0 10px!important}
#scene .sub-ribbon,#scene .result-screen .fortune-ribbon,main.info-document .sub-ribbon{width:90%;max-width:390px;min-width:0;margin:0 auto!important;padding:6px 24px!important;font-size:clamp(18px,5vw,25px)!important}
#scene>.result-screen{justify-content:flex-start!important;gap:clamp(5px,1.1dvh,9px);min-height:100dvh;height:auto;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));--card-w:min(52vw,210px,25dvh)}
#scene .result-screen .result-top{gap:clamp(5px,1dvh,9px);flex:none}
#scene .result-screen .reading{width:100%;max-width:440px;max-height:none;height:auto;overflow:visible;line-height:1.65;font-size:clamp(13px,3.65vw,16px);padding:10px 13px;word-break:keep-all;overflow-wrap:break-word}
#scene .result-screen .actions{margin:0;gap:9px}
#scene .result-screen .actions button{width:min(22vw,76px,11dvh);height:min(22vw,76px,11dvh)}
#scene .result-screen .again{margin:0;min-height:34px}
@media(max-height:650px){#scene>.result-screen{--card-w:min(46vw,175px,21dvh);gap:5px}#scene .result-screen .reading{font-size:13px;line-height:1.5;padding:8px 11px}#scene .result-screen .actions button{width:56px;height:56px}}

/* Compact birth input: keep the primary action ahead of explanatory text. */
#scene .tj-entry-page .tj-scroll{padding-top:0}
#scene .tj-entry-page .tj-panel{padding:clamp(10px,2dvh,15px);line-height:1.5}
#scene .tj-entry-page .tj-panel h2{margin:0 0 5px;font-size:clamp(16px,4.5vw,19px)}
#scene .tj-entry-page .tj-panel>p{font-size:clamp(12px,3.5vw,14px);margin:0 0 8px;line-height:1.45}
#scene .tj-entry-page .tj-form{gap:clamp(5px,1.2dvh,10px)}
#scene .tj-entry-page .tj-form label{line-height:1.35;font-size:clamp(12px,3.7vw,14px)}
#scene .tj-entry-page .tj-form input:not([type=checkbox]),#scene .tj-entry-page .tj-form select{padding:6px 9px;min-height:36px;box-sizing:border-box}
#scene .tj-entry-page .tj-error:empty{display:none}
#scene .tj-entry-page .tj-form button{margin:2px 0 0;min-height:40px;padding:8px 10px}
#scene .tj-entry-page .tj-form .tj-meta{margin:7px 0 0;line-height:1.55}
/* Join the original two cookie illustrations at their inner edges until tapped. */
.cookie-slot .cookie-left{left:4%;transform-origin:90% 87%;transform:translateX(10%) rotate(30deg)}
.cookie-slot .cookie-right{right:4%;transform-origin:10% 87%;transform:translateX(-10%) rotate(-30deg)}
.cookie-slot .cookie-stage.open .cookie-left{transform:translate(-38%,12%) rotate(-24deg);opacity:.55}
.cookie-slot .cookie-stage.open .cookie-right{transform:translate(38%,12%) rotate(24deg);opacity:.55}
