:root{color-scheme:dark;--bg:#111014;--panel:#1c1a21;--border:#302c36;--ink:#f5eff5;--muted:#aba1b2;--accent:#d7bcf4;--pink:#eeb9cf;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,textarea{font:inherit}button,a,input,textarea{touch-action:manipulation}button{cursor:pointer;color:inherit;border:0;background:none}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}a{color:var(--accent)}.app{max-width:1100px;margin:auto;min-height:100dvh;padding-bottom:95px}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;padding:12px 38px;border-bottom:1px solid #ffffff09}.wordmark{font-family:Georgia,serif;font-size:32px;letter-spacing:-1.7px;padding:0}.moon{font-size:36px;color:var(--accent);margin-right:5px}.wordmark-dot{color:var(--pink)}.wallet{background:#25202d;border:1px solid #41344d;border-radius:24px;padding:9px 16px;font-size:13px;color:var(--accent)}main{padding:34px 38px}.eyebrow{font-size:10px;letter-spacing:2.5px;color:var(--accent);font-weight:700;text-transform:uppercase}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.intro h1{font-family:Georgia,serif;font-weight:400;font-size:44px;line-height:1.15;letter-spacing:-1.4px;margin:10px 0}.intro h1 em{color:var(--pink);font-weight:400}.intro p,.muted{color:var(--muted);line-height:1.6}.intro p{font-size:14px;margin:9px 0}.night-seal{border:1px solid #4c3d55;border-radius:100%;height:100px;width:100px;display:grid;place-items:center;transform:rotate(-12deg);color:var(--accent);font-size:33px;box-shadow:0 0 0 9px #211b28,0 0 0 10px #312739}.night-seal small{font:9px system-ui;letter-spacing:1px;text-align:center}.search{display:flex;align-items:center;gap:10px;background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:0 15px;color:var(--muted)}.search input{width:100%;background:none;border:0;color:var(--ink);padding:14px 0;outline:none}.filters{display:flex;gap:8px;overflow:auto;margin:18px 0 29px;padding:2px 0}.chip{white-space:nowrap;border:1px solid var(--border);padding:9px 15px;border-radius:22px;font-size:12px;color:var(--muted)}.chip.active{color:#211329;background:var(--accent);border-color:var(--accent)}.section-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-label h2{font-size:15px;font-weight:500;margin:0}.section-label span{font-size:11px;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 18px}.character-card{padding:0;text-align:left;min-width:0}.card-art{position:relative;border-radius:16px;overflow:hidden;aspect-ratio:4/4.6;background:#26212d;border:1px solid #ffffff0e}.card-art img{width:100%;height:100%;object-fit:cover;transition:transform .4s}.character-card:hover .card-art img{transform:scale(1.035)}.card-tag{position:absolute;top:12px;left:12px;padding:5px 9px;border-radius:5px;background:#2118279e;backdrop-filter:blur(8px);font-size:9px;letter-spacing:.5px;z-index:1}.card-name{position:absolute;bottom:16px;left:17px;z-index:1;font-family:Georgia,serif;font-size:28px}.card-name small{font:12px system-ui;color:#ded1df;margin-left:7px}.card-arrow{position:absolute;bottom:18px;right:15px;z-index:1;border:1px solid #ffffff60;border-radius:50%;height:27px;width:27px;display:grid;place-items:center}.character-card h3{font-size:14px;font-weight:550;margin:12px 0 5px}.character-card p{font-size:12px;color:var(--muted);line-height:1.5;margin:0}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(1100px,100%);background:#17141ded;backdrop-filter:blur(20px);border-top:1px solid var(--border);display:flex;justify-content:space-around;padding:12px 12px max(12px,env(safe-area-inset-bottom));z-index:4}.bottom-nav button{display:flex;flex-direction:column;align-items:center;gap:5px;color:#877d91;font-size:10px;padding:0 22px}.bottom-nav button span{font-size:22px}.bottom-nav button.active{color:var(--accent)}.footer-note{font-size:10px;color:#807487;margin:30px 0 0;text-align:center;line-height:1.6}.banner{border:1px solid #493754;background:#211a29;padding:13px 16px;border-radius:11px;margin-bottom:20px;color:#d6c2e5;font-size:12px;line-height:1.6}.primary{background:var(--accent);color:#25162e;border-radius:12px;font-weight:600;padding:14px 20px}.secondary{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:12px 18px}.full{width:100%}.page-title{font:36px Georgia,serif;margin:6px 0 14px}.empty{padding:65px 20px;text-align:center;border:1px dashed var(--border);border-radius:16px}.empty .symbol{font-size:40px;color:var(--accent)}.empty h2{font:25px Georgia,serif}.empty p{font-size:13px;color:var(--muted);line-height:1.7}.chat-row{display:flex;align-items:center;text-align:left;gap:14px;width:100%;padding:18px 0;border-bottom:1px solid var(--border)}.avatar{width:58px;height:58px;border-radius:15px;object-fit:cover}.chat-row .text{min-width:0;flex:1}.chat-row h3{font-size:14px;margin:0 0 6px}.chat-row p{font-size:12px;color:var(--muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0}.chat-row time{font-size:10px;color:var(--muted)}dialog{padding:0;max-width:450px;width:calc(100% - 26px);border:1px solid #4b3b55;border-radius:20px;background:var(--bg);color:var(--ink);max-height:90dvh;overscroll-behavior:contain}dialog::backdrop{background:#09060bbf;backdrop-filter:blur(8px)}.detail-art{width:100%;height:250px;object-fit:cover}.detail-body{padding:25px}.detail-body h2{font:34px Georgia,serif;margin:8px 0}.detail-body h3{font-size:15px;font-weight:500;margin:15px 0 10px}.detail-body p{color:var(--muted);font-size:13px;line-height:1.8}.close-dialog{position:absolute;right:12px;top:12px;border-radius:50%;background:#141019aa;width:32px;height:32px;font-size:20px}.illustration-note{font-size:9px!important;color:#82748e!important}.chat-header{display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--border);padding-bottom:16px;margin-bottom:16px}.chat-header .back{font-size:25px;padding:4px 10px 4px 0}.chat-header h1{font:22px Georgia,serif;margin:0}.chat-header p{font-size:10px;color:var(--muted);margin:5px 0 0}.chat-header .gift{margin-left:auto;font-size:22px}.scenario{background:#211b28;border:1px solid #392c42;border-radius:15px;padding:16px 20px;color:#c3b3cf;font-size:12px;line-height:1.9;margin:20px auto;max-width:540px}.messages{display:flex;flex-direction:column;gap:12px;min-height:35vh;padding-bottom:14px}.bubble{max-width:82%;align-self:flex-start;background:#27212f;border-radius:15px 15px 15px 3px;padding:12px 16px;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{align-self:flex-end;background:#504061;border-radius:15px 15px 3px 15px}.bubble small{display:block;font-size:9px;color:#b6a7c1;text-align:right;margin-top:6px}.chat-photo{max-width:240px;border-radius:14px;display:block}.media-wrap{align-self:flex-start;max-width:240px;position:relative;overflow:hidden;border-radius:14px}.media-wrap .secondary{font-size:12px}.spoiler img{filter:blur(16px)}.spoiler button{position:absolute;inset:0;width:100%;color:white;text-shadow:0 1px 3px black}.compose{position:sticky;bottom:77px;background:var(--bg);display:flex;gap:10px;align-items:center;padding:12px 0 0}.compose textarea{resize:none;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:13px;color:var(--ink);flex:1;width:100%;min-height:48px;max-height:130px}.compose button{height:46px;width:46px;border-radius:50%;background:var(--accent);color:#27172e;font-size:22px}.typing{color:var(--muted);font-size:12px;min-height:20px}.shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.shop-card{border:1px solid var(--border);background:var(--panel);border-radius:15px;padding:22px;text-align:left}.shop-card .shop-icon{font-size:32px;display:block;margin-bottom:16px}.shop-card h3{font-size:15px;margin:0 0 7px}.shop-card p{color:var(--muted);font-size:12px;line-height:1.6}.price{color:var(--accent);font-size:13px;font-weight:600}.premium{border:1px solid #5b436c;background:linear-gradient(115deg,#34233f,#241c30);border-radius:17px;padding:25px;margin:25px 0}.premium h2{font:29px Georgia,serif;margin:7px 0}.premium p{font-size:13px;color:#c2afd1;line-height:1.7}.plan{display:flex;justify-content:space-between;align-items:center;border:1px solid #594468;border-radius:12px;padding:15px;width:100%;margin-top:10px;font-size:13px}.settings-panel{border:1px solid var(--border);border-radius:16px;background:var(--panel);padding:5px 20px;margin:20px 0}.setting{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 0;border-bottom:1px solid var(--border);font-size:13px}.setting:last-child{border-bottom:0}.setting span:last-child{color:var(--muted);text-align:right}.loading{color:var(--muted);padding:50px;text-align:center}#notice{position:fixed;bottom:92px;left:50%;transform:translateX(-50%);padding:15px 22px;background:#3d2b49;border:1px solid #715286;border-radius:14px;max-width:calc(100% - 30px);width:480px;font-size:13px;line-height:1.6;z-index:20;box-shadow:0 8px 30px #0008}.age-gate{text-align:center;padding:35px 28px}.age-gate h2{font:33px Georgia,serif}.age-gate p{font-size:13px;line-height:1.8;color:var(--muted)}.age-gate .moon{font-size:60px}.age-gate .secondary{margin-top:10px}.section-heading{font-size:16px;font-weight:500;margin:28px 0 16px}@media(min-width:800px){.intro h1{font-size:52px}.card-art{aspect-ratio:4/4.1}.bottom-nav{padding-top:16px;padding-bottom:16px}.bottom-nav button{flex-direction:row;font-size:12px;gap:10px}}@media(max-width:600px){.topbar{height:74px;padding:12px 21px}.wordmark{font-size:28px}main{padding:27px 20px}.intro{margin-bottom:22px}.intro h1{font-size:36px}.intro p{font-size:12px;max-width:245px}.night-seal{width:62px;height:62px;font-size:24px;margin-right:6px;box-shadow:0 0 0 5px #211b28,0 0 0 6px #312739}.night-seal small{font-size:6px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}.card-art{aspect-ratio:3/4}.card-name{font-size:24px;left:12px;bottom:13px}.card-name small{font-size:10px;margin-left:4px}.card-arrow{right:9px;bottom:13px;width:23px;height:23px;font-size:12px}.card-tag{font-size:8px;top:9px;left:9px;padding:5px 7px}.character-card p{font-size:11px}.character-card h3{font-size:12px}.bottom-nav button{padding:0 14px}.bubble{max-width:88%}.shop-card{padding:18px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.gift-grid{margin-top:16px}select{font:inherit;color:var(--ink);background:var(--panel)}

/* Reference-inspired product shop: photographic cutouts, quiet cards, clear Gem buttons. */
.gift-shop-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}
.gift-shop-heading .page-title{margin-bottom:7px}.gift-shop-heading p{margin:0;font-size:13px}
.gift-wallet{display:flex;align-items:center;gap:7px;border:1px solid #63507d;border-radius:25px;background:linear-gradient(120deg,#27202f,#3e2c58);padding:8px 8px 8px 12px;white-space:nowrap;font-size:13px}
.gift-wallet .icon{width:18px;height:18px;color:var(--accent)}.gift-wallet>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#8262c9;font-size:23px;font-weight:300}
.gift-recipient{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;padding:12px;margin:0 0 18px;border:1px solid #4a3b5b;border-radius:13px;background:#211a29f5;backdrop-filter:blur(14px)}
.gift-recipient label{font-size:12px;color:var(--muted);white-space:nowrap}.gift-recipient select{flex:1;width:0;min-width:0;border:0;background:transparent;color:var(--ink);padding:5px 2px;font-size:14px}.gift-recipient option{background:var(--panel)}
.gift-grid{gap:14px}.gift-card{position:relative;min-width:0;border:1px solid #463b52;border-radius:19px;background:radial-gradient(ellipse at 50% 38%,#392a4a66,transparent 75%),linear-gradient(145deg,#24202b,#18151c);overflow:hidden;box-shadow:inset 0 1px 0 #ffffff06}
.gift-buy{display:flex;flex-direction:column;width:100%;height:100%;padding:16px 12px 12px;text-align:left}
.gift-buy h3{min-height:38px;margin:0;padding-right:23px;font-size:14px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.gift-info{position:absolute;right:8px;top:9px;display:grid;place-items:center;width:32px;height:32px;padding:5px;color:#b8a5ce;border-radius:50%}.gift-info .icon{width:19px;height:19px}.gift-info:hover{background:#ffffff0c;color:var(--ink)}
.gift-visual{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1;min-height:0;overflow:hidden}
.gift-visual img{display:block;width:100%;height:100%;max-height:220px;object-fit:contain;filter:drop-shadow(0 9px 10px #0005)}.gift-visual [hidden]{display:none!important}
.gift-emoji{display:flex;align-items:center;justify-content:center;font-size:64px;width:100%;height:100%}
.gift-buy .price{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;margin-top:10px;padding:12px 4px;border:1px solid #ad8de56e;border-radius:11px;background:linear-gradient(110deg,#8b6bd0,#7252b4);box-shadow:inset 0 1px 0 #ffffff20;color:white;font-size:17px;font-weight:650}.gift-buy .price .icon{width:19px;height:19px}.gift-buy .price>span{font-size:11px;font-weight:500;color:#f5e9ff}
.gift-buy:hover .price{background:linear-gradient(110deg,#9d7cde,#805dc3)}.gift-buy:focus-visible{outline-offset:-4px;border-radius:19px}
.gift-description{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.gift-information{text-align:center}.gift-dialog-art{width:140px;height:140px;aspect-ratio:auto;margin:0 auto 12px}.gift-information .secondary{margin-top:10px}.gift-information h2{font-size:29px}
.gem-packs{scroll-margin-top:80px;margin-top:36px;padding-top:10px;border-top:1px solid var(--border)}
@media(min-width:800px){.gift-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.gift-buy h3{font-size:15px}}
@media(max-width:400px){.gift-shop-heading .page-title{font-size:29px}.gift-shop-heading .eyebrow{font-size:8px;letter-spacing:1.6px}.gift-grid{gap:10px}.gift-buy{padding:13px 9px 9px}.gift-buy h3{font-size:13px}.gift-buy .price{font-size:16px;padding:11px 3px}}

.art-placeholder{display:flex;align-items:center;justify-content:center;color:#fff;font:600 1.6em Georgia,serif;text-transform:uppercase}
.card-art .art-placeholder{width:100%;height:100%}

/* Keep each screen inside the Mini App viewport; only its content scrolls. */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
.app{height:var(--app-height,100dvh);min-height:0;padding-bottom:0;display:flex;flex-direction:column;overflow:hidden}
.topbar{flex-shrink:0}
#main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.bottom-nav{position:static;left:auto;transform:none;width:100%;flex-shrink:0}

/* An open conversation uses the whole screen, like a native messenger. */
.chat-open .app{position:fixed;top:var(--app-top,0px);left:0;width:100%;max-width:none;margin:0}
.chat-open .topbar,.chat-open .bottom-nav{display:none}
.chat-open #main{display:flex;flex-direction:column;overflow:hidden;padding:0}
.chat-open .chat-header{flex-shrink:0;gap:12px;min-height:68px;margin:0;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top));background:var(--panel)}
.chat-identity{display:flex;align-items:center;gap:11px;flex:1;min-width:0;padding:0;text-align:left}
.chat-identity .avatar{width:44px;height:44px;flex-shrink:0;border-radius:50%}
.chat-identity h1{font:600 17px/1.3 Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-header .wallet{flex-shrink:0;padding:9px 12px;white-space:nowrap}
.chat-open .messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px max(16px,env(safe-area-inset-right)) 18px max(16px,env(safe-area-inset-left));gap:10px;scrollbar-width:thin}
.messages > *{flex-shrink:0}
.chat-open .scenario{max-width:min(100%,540px);margin:0 auto 14px;padding:12px 16px}
.chat-open .bubble{max-width:min(88%,620px);padding:10px 14px;line-height:1.6}
.chat-open .chat-photo{max-width:100%}
.chat-open .typing{flex-shrink:0;min-height:0;padding:6px 16px;font-size:12px}
.chat-open .typing:empty{display:none}
.chat-open .compose{position:static;flex-shrink:0;align-items:flex-end;gap:8px;margin:0;padding:10px max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));border-top:1px solid var(--border);background:var(--panel)}
.chat-open .compose textarea{min-width:0;min-height:46px;max-height:130px;padding:11px 14px;font-size:16px;line-height:22px;border-radius:23px;background:var(--bg)}
.chat-open .compose button{flex-shrink:0}
.chat-open .compose .compose-gift{width:36px;background:none;color:var(--accent);font-size:26px}
.chat-open #notice{bottom:max(80px,calc(env(safe-area-inset-bottom) + 70px))}
.detail-body > .full + .full{margin-top:12px}
.art-carousel{position:relative;width:100%;height:100%}
.carousel-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1.035);transition:opacity .72s cubic-bezier(.22,.61,.36,1),transform 1.25s cubic-bezier(.22,.61,.36,1);will-change:opacity,transform}
.carousel-frame.active{opacity:1;transform:scale(1);z-index:1}
.card-art .art-carousel{width:100%;height:100%}
.character-card:hover .card-art .carousel-frame{transform:scale(1.035)}
.character-card:hover .card-art .carousel-frame.active{transform:scale(1)}
/* Frame the whole portrait and reserve space for the short scene and start button. */
dialog[open]:has(.detail-art){display:flex;flex-direction:column;height:calc(var(--app-height,100dvh) - 16px);max-height:calc(var(--app-height,100dvh) - 16px);width:min(540px,calc(100% - 16px));max-width:540px;overflow:hidden}
.character-photo{display:flex;flex:1;min-height:0;margin:8px 8px 0;border-radius:14px;overflow:hidden;background:#110e16}
dialog:has(.detail-art) .detail-art{width:100%;min-height:0;height:100%;object-fit:cover;background:#110e16;border-radius:inherit}
.character-photo>img.detail-art{width:100%;height:100%;max-width:100%;max-height:100%;margin:0;align-self:stretch}
dialog:has(.detail-art) .detail-body{flex:none;min-width:0;padding:12px 20px 0}
dialog:has(.detail-art) .detail-body h2{font-size:30px;margin:5px 0 8px}
dialog:has(.detail-art) .scene-copy{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;white-space:pre-line;overflow-wrap:anywhere;line-height:1.5;margin:0;font-size:13px}
.character-cta{flex:none;padding:14px 20px max(16px,env(safe-area-inset-bottom))}
.character-cta .primary{min-height:46px}
@media(max-height:480px){dialog:has(.detail-art) .detail-body{padding-top:8px}dialog:has(.detail-art) .detail-body h2{font-size:24px;margin:3px 0 5px}.character-cta{padding-top:8px;padding-bottom:10px}.character-cta .primary{min-height:40px;padding:10px}}
dialog .close-dialog{z-index:5}
dialog:has(.detail-art) .close-dialog{top:16px;right:16px;width:44px;height:44px;background:#66666d;color:#fff;border:1px solid #ffffff66;box-shadow:0 2px 10px #0005}
.detail-carousel{position:relative;overflow:hidden;background:#211d27}
.detail-track{display:flex;width:100%;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x}
.detail-track::-webkit-scrollbar{display:none}
.detail-slide{display:flex;align-items:center;justify-content:center;flex:0 0 100%;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always}
.detail-slide img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:cover;border-radius:14px}
/* Short landscape frames keep the whole portrait rather than cropping it to a narrow strip. */
@media(max-height:480px){.character-photo>img.detail-art,.detail-slide img{width:auto;height:auto;object-fit:contain}.character-photo>img.detail-art{margin:auto;align-self:center}}
.carousel-dots{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);display:flex;gap:6px;z-index:2;padding:6px 8px;border-radius:20px;background:#110e16a8}
.carousel-dot{width:6px;height:6px;border-radius:50%;background:#ffffff66;transition:width .2s,background .2s}
.carousel-dot.active{width:16px;border-radius:5px;background:#fff}
@keyframes message-arrive{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* One small, shared vector set keeps controls consistent across devices. */
.icon{display:inline-block;width:20px;height:20px;flex-shrink:0;vertical-align:-.2em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.wordmark .moon{width:30px;height:30px;vertical-align:-5px;margin-right:4px}
.wallet{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.wallet .icon{width:16px;height:16px}
.bottom-nav .icon{width:22px;height:22px}
.search > .icon{width:18px;height:18px}
.night-seal > .icon{width:30px;height:30px}
.card-arrow .icon{width:14px;height:14px}
.close-dialog{display:grid;place-items:center;padding:0}
.close-dialog .icon{width:18px;height:18px}
.primary > .icon,.price > .icon,.plan .icon,.eyebrow > .icon,.media-wrap .secondary > .icon{width:15px;height:15px}
.shop-icon > .icon{width:34px;height:34px;color:var(--accent)}
.empty .symbol > .icon{width:56px;height:56px;stroke-width:1.5}
.chat-open .compose button{display:grid;place-items:center}
.chat-open .compose .icon{width:22px;height:22px}
.chat-open .messages{background-color:var(--bg);background-image:linear-gradient(#11101480,#11101480),url('/ui/chat-wallpaper.webp');background-size:auto,480px 480px}
@media(max-width:600px){.night-seal > .icon{width:23px;height:23px}}
.notice-card{align-self:stretch;border:1px solid #5b436c;background:#211a29;border-radius:14px;padding:12px 14px;font-size:13px;color:#d6c2e5}.notice-card p{margin:0 0 10px;line-height:1.6}.notice-card p:last-child{margin:0}.notice-actions{display:flex;flex-wrap:wrap;gap:8px}.notice-actions button{font-size:12px;padding:9px 12px}
.invite-card{margin:0 0 18px}.invite-card .muted{font-size:12px}

/* Quiet motion in chat; history and loaded media stay in place between replies. */
.chat-thread{position:relative;display:flex;flex:1;min-width:0;min-height:0;overflow:hidden}
.chat-open .messages{overflow-anchor:none;scroll-padding-block:18px}
.chat-open .chat-header{animation:chat-reveal .2s ease-out both}
.chat-open .messages > .loading{animation:chat-settle .2s ease-out both}
.message-enter{animation:message-arrive .24s cubic-bezier(.2,.7,.3,1) both}
@keyframes chat-settle{from{opacity:.6;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@keyframes chat-reveal{from{opacity:.7}to{opacity:1}}
.chat-open .typing{align-self:flex-start;padding:12px 16px;background:#27212f;border-radius:15px 15px 15px 3px}
.typing-dots{display:flex;align-items:center;gap:5px;height:14px}
.typing-dots i{width:5px;height:5px;border-radius:50%;background:var(--muted);animation:typing-pulse 1.2s ease-in-out infinite}
.typing-dots i:nth-child(2){animation-delay:.15s}
.typing-dots i:nth-child(3){animation-delay:.3s}
@keyframes typing-pulse{0%,60%,100%{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.chat-latest{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 14px;border:1px solid #554260;border-radius:24px;background:var(--panel);color:var(--accent);box-shadow:0 3px 12px #0004;font-size:12px;animation:chat-settle .16s ease-out both;z-index:2}
.chat-latest[hidden]{display:none}
.chat-latest .icon{width:16px;height:16px}
.chat-open .compose button,.chat-header .wallet,.chat-identity,.chat-latest{transition:transform .14s ease,background-color .16s ease,opacity .16s ease}
.chat-open .compose button:active:not(:disabled),.chat-header .wallet:active,.chat-latest:active{scale:.95}
.chat-open .compose textarea{transition:border-color .16s ease,box-shadow .16s ease}
.chat-open .compose textarea:focus{outline:none;border-color:#715486;box-shadow:0 0 0 2px #d7bcf40b}
.chat-open .media-wrap{width:min(240px,80vw)}
.media-wrap.is-loading{aspect-ratio:3/4;display:grid;place-items:center;background:var(--panel);border:1px solid var(--border)}
.media-placeholder{padding:18px;font-size:12px;line-height:1.7;text-align:center}
.chat-open .media-wrap .chat-photo{width:100%;height:auto;opacity:0;transition:opacity .24s ease}
.media-wrap.is-loading .chat-photo{position:absolute;inset:0;height:100%;object-fit:cover}
.chat-open .media-ready .chat-photo{opacity:1}
@media(prefers-reduced-motion:reduce){
  .chat-open .chat-header,.chat-open .messages > .loading,.message-enter,.typing-dots i,.chat-latest{animation:none}
  .chat-open .compose button:active:not(:disabled),.chat-header .wallet:active,.chat-latest:active{scale:1}
  .chat-open .compose button,.chat-header .wallet,.chat-identity,.chat-latest,.chat-open .compose textarea,.chat-open .media-wrap .chat-photo{transition:none}
}

/* Gift stickers and a quiet glass lantern while a photo is on its way. */
.chat-gift{align-self:flex-end;display:flex;flex-direction:column;align-items:center;gap:5px;width:150px;margin:2px 0 4px}
.chat-gift .gift-visual{width:140px;height:140px;margin:0;background:none;border:0;box-shadow:none}
.chat-gift .gift-visual img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 9px #0003)}
.chat-gift figcaption{max-width:100%;padding:4px 9px;border-radius:12px;background:#1c1721b3;color:var(--muted);font-size:11px;text-align:center}
.chat-gift small{display:block;font-size:9px;margin-top:3px;color:#b6a7c1}
.photo-magic{aspect-ratio:3/4;isolation:isolate;background:#211b2b;border:1px solid #bca5df30}
.photo-aura{position:absolute;inset:0;overflow:hidden;background:linear-gradient(145deg,#272037,#18161f);pointer-events:none}
.photo-aura:after{content:"";position:absolute;inset:0;background:linear-gradient(130deg,#ffffff0b,transparent 45%,#d7bcf40a);border-radius:inherit;border:1px solid #ffffff0b}
.photo-aura i{position:absolute;width:65%;height:47%;left:-5%;top:8%;border-radius:50%;background:#9577c16b;filter:blur(28px);animation:photo-drift 6s ease-in-out infinite alternate;will-change:transform}
.photo-aura i:nth-child(2){left:50%;top:40%;background:#d494b74d;animation-delay:-2s;animation-duration:7s}
.photo-aura i:nth-child(3){left:5%;top:72%;width:42%;height:27%;background:#b4a1df4d;animation-delay:-4s;animation-duration:5s}
@keyframes photo-drift{from{transform:translate(-10%,-12%) scale(.9)}to{transform:translate(24%,23%) scale(1.16)}}
.photo-development{position:absolute;inset:0;z-index:3;display:grid;place-items:center;overflow:hidden;border-radius:inherit;pointer-events:none;--photo-progress:inherit}
.photo-development .photo-aura{background:linear-gradient(150deg,#282334ed,#161722f5);backdrop-filter:blur(12px)}
.photo-development .photo-aura:after{background:linear-gradient(120deg,#ffffff10,transparent 34%,#b5cbf809 70%,#ffffff08);border-color:#ffffff12;box-shadow:inset 0 0 35px #eee0ff05}
.photo-develop-light{position:absolute;inset:0;background:linear-gradient(180deg,#dbb6ee23,#ae9be22d 36%,#84b6d41a 75%);border-top:1px solid #ebd4ff35;box-shadow:0 -12px 50px #dcc4f51a;transform:translateY(calc((1 - var(--photo-progress,.08)) * 100%));transition:transform .8s cubic-bezier(.22,.61,.36,1);border-radius:45% 55% 0 0 / 18px 14px 0 0}
.photo-glint{position:absolute;inset:-30%;background:linear-gradient(115deg,transparent 35%,#f7e5ff05 45%,#f7e5ff10 50%,#f7e5ff04 55%,transparent 65%);transform:translateX(-75%);animation:photo-glass-sweep 9s ease-in-out infinite}
@keyframes photo-glass-sweep{0%,12%{transform:translateX(-75%)}70%,100%{transform:translateX(75%)}}
.photo-development .photo-caption{gap:9px;padding:20px 22px 34px}
.photo-development .photo-caption strong{font-size:13px;line-height:1.55;max-width:180px;text-wrap:balance}
.photo-development .photo-caption small{font-size:10px;line-height:1.6;max-width:155px;color:#c5b9d4}
.photo-alchemy{position:relative;display:grid;place-items:center;width:74px;height:74px;margin-bottom:8px}
.photo-alchemy .icon{width:25px;height:25px;z-index:1;filter:drop-shadow(0 0 10px #edd6ff88);color:#f3e4ff}
.photo-core{position:absolute;inset:4px;border-radius:50%;background:radial-gradient(ellipse,#e7ccff6b, #b7a8e02b 35%,transparent 70%);animation:photo-breathe 3.6s ease-in-out infinite alternate}
@keyframes photo-breathe{from{opacity:.65;transform:scale(.85)}to{opacity:1;transform:scale(1.15)}}
.photo-orbit{position:absolute;inset:4px;border:1px solid #e7c9ff24;border-top-color:#eedbff66;border-radius:50%;animation:photo-orbit 8s linear infinite}
.photo-orbit:after{content:"";position:absolute;left:50%;top:-2px;transform:translateX(-50%);width:3px;height:3px;border-radius:50%;background:#fff0ffb3;box-shadow:0 0 7px 2px #d6b7ff55}
.photo-orbit:nth-of-type(3){inset:2px 7px;border-color:#9dc9ec18;border-bottom-color:#a8d4ed55;animation-duration:11s;animation-direction:reverse}
@keyframes photo-orbit{to{transform:rotate(360deg)}}
.photo-motes{position:absolute;inset:0}
.photo-motes i{position:absolute;width:2px;height:2px;left:15%;top:19%;border-radius:50%;background:#fff0ffb3;box-shadow:0 0 7px 2px #e0c5ff25;animation:photo-mote 5s ease-in-out infinite alternate}
.photo-motes i:nth-child(2){left:79%;top:29%;animation-delay:-2s;animation-duration:6s}
.photo-motes i:nth-child(3){left:28%;top:72%;animation-delay:-3s;animation-duration:7s}
.photo-motes i:nth-child(4){left:85%;top:78%;animation-delay:-1s}
.photo-motes i:nth-child(5){left:67%;top:12%;animation-delay:-4s;animation-duration:8s}
.photo-motes i:nth-child(6){left:10%;top:54%;animation-delay:-2.5s;animation-duration:6s}
@keyframes photo-mote{from{opacity:.15;transform:translateY(4px) scale(.7)}to{opacity:.75;transform:translateY(-5px) scale(1.1)}}
.photo-phase{position:absolute;bottom:35px;left:16px;right:16px;text-align:center;font-size:9px;letter-spacing:.08em;color:#d7c7e3b3}
.photo-progress-track{position:absolute;left:24px;right:24px;bottom:22px;height:2px;border-radius:3px;background:#efdcff0c}
.photo-progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#a89bd27a,#dbbfee,#f2ddf5);box-shadow:0 0 9px #dfc0ff4d;transform:scaleX(var(--photo-progress,.08));transform-origin:left center;transition:transform .8s cubic-bezier(.22,.61,.36,1)}
.photo-progress-track b{position:absolute;top:-1px;left:calc(var(--photo-progress,.08) * 100%);width:4px;height:4px;border-radius:50%;transform:translateX(-50%);background:#f8eaff;box-shadow:0 0 7px 2px #dfc0ff55;transition:left .8s cubic-bezier(.22,.61,.36,1);animation:photo-progress-glow 2s ease-in-out infinite alternate}
@keyframes photo-progress-glow{from{opacity:.55}to{opacity:1}}
.photo-motion-paused .photo-development *{animation-play-state:paused!important}
.photo-motion-paused .photo-develop-light,.photo-motion-paused .photo-progress-track i,.photo-motion-paused .photo-progress-track b{transition:none}
.photo-development.is-complete{animation:photo-developed .55s ease-out both}
@keyframes photo-developed{0%{opacity:1;transform:scale(1)}30%{opacity:.9}100%{opacity:0;transform:scale(1.035)}}
@media(prefers-reduced-motion:reduce){.photo-development *,.photo-development.is-complete{animation:none!important;transition:none!important}}
.photo-caption,.photo-offer{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;padding:24px 18px;text-align:center;color:var(--ink)}
.photo-caption .icon{width:26px;height:26px;color:#e9d4ff;filter:drop-shadow(0 0 9px #d7bcf44d)}
.photo-caption strong,.photo-offer strong{font-size:13px;font-weight:500;line-height:1.6}
.photo-caption small,.photo-offer small{font-size:11px;line-height:1.6;color:#c9bdd5}
.photo-offer{position:absolute;inset:0;justify-content:center;background:#211a2a60;backdrop-filter:blur(14px)}
.photo-offer[hidden]{display:none}
.photo-offer .primary{padding:11px 13px;font-size:12px;line-height:1.4}
.is-offer .photo-aura i{animation-play-state:paused}
.chat-open .photo-magic .chat-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:filter .65s ease,opacity .4s ease,transform .65s cubic-bezier(.2,.7,.3,1)}
.chat-open .photo-magic.is-veiled .chat-photo{filter:blur(18px);transform:scale(1.08);opacity:.5}
.photo-reveal{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;padding:20px;background:linear-gradient(145deg,#41324e66,#19132099);backdrop-filter:blur(8px);color:var(--ink);text-align:center}
.photo-reveal .icon{width:32px;height:32px;color:#f0ddff;filter:drop-shadow(0 0 12px #dfb9ff80)}
.photo-reveal strong{font-size:14px;font-weight:500}
.photo-reveal small{font-size:11px;color:#e1d5e9}
.media-wrap.is-loading .photo-reveal{visibility:hidden}
.photo-revealing:after{content:"";position:absolute;inset:-50%;pointer-events:none;background:radial-gradient(ellipse,#f7e8ffb3,transparent 55%);mix-blend-mode:screen;animation:photo-unveil .75s ease-out both}
@keyframes photo-unveil{from{opacity:.8;transform:scale(.3) rotate(-20deg)}to{opacity:0;transform:scale(1.2) rotate(20deg)}}
@media(prefers-reduced-motion:reduce){.photo-aura i{animation:none;will-change:auto}.photo-revealing:after{animation:none;display:none}.chat-open .photo-magic .chat-photo{transition:none}}

/* One bright Gem motif, and a visible path to the wallet and chat menu. */
.icon.icon--gem{width:22px;height:22px;filter:drop-shadow(0 1px 3px #2bcbff26)}
.wallet,.chat-header .wallet{padding:5px 6px 5px 10px;gap:7px}
.wallet-plus{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;border-radius:50%;background:#70549b;color:#fff;font-size:23px;font-weight:300;line-height:1}
.chat-open .chat-header{gap:8px}
.chat-identity h1{min-width:0}
.chat-more{display:grid;place-items:center;flex-shrink:0;width:36px;min-height:44px;padding:6px;border-radius:14px;color:var(--muted)}
.chat-more:active{background:#ffffff0b}
.chat-photo-open{position:absolute;inset:0;width:100%;height:100%;padding:0;border-radius:inherit;overflow:hidden;cursor:zoom-in}
.chat-photo-open:disabled{opacity:1;cursor:default}
.chat-photo-open:focus-visible{outline-offset:-4px}
.gem-pack-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.gem-pack{min-width:0;display:flex;flex-direction:column;align-items:center;padding:14px 0 0;border:1px solid #574267;border-radius:17px;background:radial-gradient(ellipse at 50% 38%,#40305288,transparent 65%),var(--panel);overflow:hidden;text-align:center;transition:border-color .15s ease,transform .15s ease}
.gem-pack:hover{border-color:#9a76bc}
.gem-pack:active{scale:.98}
.gem-pack-bonus{display:block;min-height:24px;padding:0 7px;color:#cbb4e1;font-size:10px;line-height:1.5}
.gem-pack>img{display:block;width:min(100%,160px);height:auto;aspect-ratio:1;object-fit:contain;padding:4px}
.gem-pack>strong{display:flex;align-items:center;justify-content:center;gap:4px;font-size:19px;line-height:1.5;padding:4px 5px 0}
.gem-pack>strong .icon--gem{width:19px;height:19px}
.gem-pack>strong{padding-bottom:14px}
.gem-pack-price{display:flex;justify-content:center;align-items:center;gap:6px;width:100%;margin-top:auto;padding:12px 5px;border-top:1px solid #51405d;background:#ffffff05;font-size:15px;font-weight:600}
.gem-pack-price .icon{width:18px;height:18px;fill:#ffd26a;stroke:#d7a747}
.gem-pack.best-value{border-color:#c9a560;background:radial-gradient(ellipse at 50% 35%,#80623b33,transparent 75%),var(--panel)}
.gem-pack-value{display:block;min-height:19px;padding:0 4px 8px;color:#cbb4e1;font-size:10px;line-height:1.2}.best-value .gem-pack-value{color:#f3d9a3;font-weight:600}
#gem-packs .gem-pack{padding-top:10px}#gem-packs .gem-pack-bonus{min-height:19px}#gem-packs .gem-pack>img{width:min(100%,96px)}#gem-packs .gem-pack>strong{font-size:17px;padding-bottom:5px}#gem-packs .gem-pack-price{padding:9px 4px;font-size:14px}
.gem-topup{width:100%;max-width:420px;align-self:flex-start;padding:12px;border-color:#655078;background:radial-gradient(ellipse at 0 0,#59406d24,transparent 70%),#211a29}
.gem-topup-heading{display:flex;align-items:center;gap:9px;margin-bottom:11px}.gem-topup-heading>div{min-width:0}.gem-topup-heading strong{font-size:13px;line-height:1.4;color:var(--ink)}.gem-topup .gem-topup-heading p{margin:3px 0 0;font-size:11px;line-height:1.4;color:var(--muted)}
.gem-topup-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:11px;background:#47c9ef0c;border:1px solid #56cfee1c}.gem-topup-icon .icon{width:22px;height:22px}
.gem-topup .gem-pack-grid{gap:7px}.gem-topup .gem-pack{padding-top:7px;border-radius:12px;background:#1c1922}.gem-topup .gem-pack.recommended{border-color:#bea0e5;background:radial-gradient(ellipse at 50% 40%,#8f65bf30,transparent 80%),#25202f}.gem-topup .recommended .gem-pack-bonus{color:#e4d2ff;font-weight:600}
.gem-topup .gem-pack-bonus{min-height:17px;font-size:9px;padding:0 3px}.gem-topup .gem-pack>img{width:64px;padding:2px}.gem-topup .gem-pack>strong{gap:3px;font-size:14px;padding:3px 3px 8px}.gem-topup .gem-pack>strong .icon--gem{width:15px;height:15px}.gem-topup .gem-pack-price{gap:4px;font-size:12px;padding:7px 3px}.gem-topup .gem-pack-price .icon{width:14px;height:14px}
.gem-pack-dialog{width:min(560px,calc(100% - 20px));max-width:560px}
.gem-pack-dialog .detail-body{padding:28px 18px 20px}
.gem-pack-dialog h2{font-size:29px;padding-right:18px}
.gem-pack-dialog .detail-body>p{line-height:1.6;font-size:12px;margin-bottom:22px}
.gem-pack-dialog .eyebrow{display:flex;align-items:center;gap:5px;letter-spacing:1.2px;font-size:9px}
.gem-pack-dialog .close-dialog{width:36px;height:36px;top:8px;right:8px}
@media(max-width:360px){.gem-pack-grid{gap:7px}.gem-pack>strong{font-size:16px}.gem-pack>strong .icon--gem{width:16px;height:16px}.gem-pack-bonus{font-size:9px}.gem-pack-dialog .detail-body{padding:28px 12px 16px}}

/* Full-screen viewer uses the existing authenticated image; it never fetches an exposed URL. */
dialog.photo-viewer[open]{position:fixed;inset:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:#0c0a0ff5;overflow:hidden;overscroll-behavior:none;color:var(--ink)}
.photo-viewer::backdrop{background:#0c0a0f}
.viewer-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:64px;padding:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left));z-index:1}
.viewer-header strong{font-size:14px;font-weight:500}
.viewer-header button{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#ffffff0b}
.viewer-stage{display:grid;place-items:center;position:relative;min-height:0;min-width:0;overflow:hidden;touch-action:none;user-select:none;cursor:zoom-in;outline-offset:-3px}
.viewer-stage.is-zoomed{cursor:grab}
.viewer-stage.is-zoomed:active{cursor:grabbing}
.viewer-stage img{display:block;max-width:none;max-height:none;object-fit:contain;transform-origin:center;pointer-events:none;will-change:transform;user-select:none}
.viewer-footer{min-width:0;padding:8px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));z-index:1;background:linear-gradient(0deg,#0c0a0f,transparent)}
.viewer-thumbnails{position:relative;display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding:5px 2px;min-width:0}
.viewer-thumbnails::-webkit-scrollbar{display:none}
.viewer-thumbnail,.viewer-earlier{position:relative;flex:0 0 48px;width:48px;height:64px;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#211b2b;color:var(--muted)}
.viewer-thumbnail{opacity:.6;transition:opacity .18s ease,border-color .18s ease}
.viewer-thumbnail:hover,.viewer-thumbnail.is-selected{opacity:1}
.viewer-thumbnail.is-selected{border-color:var(--accent);box-shadow:0 0 12px #d7bcf426}
.viewer-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.viewer-thumbnail.is-veiled img{filter:blur(6px);transform:scale(1.12);opacity:.65}
.viewer-thumbnail .icon{position:absolute;left:12px;top:20px;width:20px;height:20px;color:var(--accent)}
.viewer-earlier{display:grid;place-items:center;background:#ffffff08}
.viewer-earlier:disabled{opacity:.4}
.viewer-earlier[hidden],.viewer-thumbnail img[hidden],.viewer-stage img[hidden],.viewer-photo-status[hidden]{display:none}
.viewer-photo-status{position:absolute;inset:0;display:grid;place-items:center;background:#0c0a0f}
.viewer-photo-status button{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;border-radius:22px;background:#ffffff0b;color:var(--muted);font-size:13px}
.viewer-photo-loading{width:30px;height:30px;border:2px solid #d7bcf425;border-top-color:#d7bcf4b3;border-radius:50%;animation:viewer-loading 1s linear infinite}
@keyframes viewer-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.viewer-thumbnail{transition:none}.viewer-photo-loading{animation:none}}
/* Photo variations share one quiet, swipeable chat card. */
.photo-message{align-self:flex-start;width:min(240px,80vw);max-width:100%;min-width:0}
.photo-track{display:flex;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;border-radius:14px}
.photo-track::-webkit-scrollbar{display:none}
.photo-slide{flex:0 0 100%;min-width:0;scroll-snap-align:start;scroll-snap-stop:always}
.photo-slide .media-wrap,.chat-open .photo-slide .media-wrap{width:100%;max-width:none}
.photo-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;padding:2px 0}
.photo-regenerate{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:5px 3px;font-size:11px;color:var(--muted);border-radius:8px;margin-left:auto}
.photo-regenerate .icon{width:15px;height:15px}
.photo-regenerate:enabled:hover{color:var(--accent)}
.photo-regenerate:disabled{opacity:.45}
.photo-pagination{display:flex;align-items:center;gap:4px;color:var(--muted);font-variant-numeric:tabular-nums}
.photo-pagination button{display:grid;place-items:center;width:32px;height:32px;border-radius:50%}
.photo-pagination button .icon{width:16px;height:16px}
.photo-pagination small{min-width:30px;font-size:10px;text-align:center}
.photo-pagination button:disabled{opacity:.25}
.photo-controls[hidden],.photo-pagination[hidden],.photo-regenerate[hidden],.viewer-reveal[hidden]{display:none}
.viewer-stage img.is-veiled{filter:blur(22px);opacity:.45}
.viewer-reveal{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;background:#211a2a40;backdrop-filter:blur(8px);color:var(--ink)}
.viewer-reveal .icon{width:32px;height:32px;color:#f0ddff}
.viewer-reveal strong{font-size:14px;font-weight:500}
@media(prefers-reduced-motion:reduce){.gem-pack{transition:none}.gem-pack:active{scale:1}}

/* Discover goes straight from a compact welcome to the roster. */
.discover-intro{gap:16px;margin-bottom:22px}
.discover-intro>div{min-width:0}
.discover-intro h1{font-size:clamp(32px,4vw,44px);margin:8px 0 0}
.referral-promo{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;width:104px;padding:8px 8px 11px;border:1px solid #795795;border-radius:22px;background:radial-gradient(ellipse at 50% 20%,#61407c66,transparent 80%),#211a2b;box-shadow:0 3px 18px #09060c66;color:var(--ink);transition:transform .16s ease,border-color .16s ease}
.referral-promo:hover{border-color:#b391d4}
.referral-promo:active{scale:.97}
.referral-promo-art{display:block;position:relative;width:76px;height:66px}
.referral-promo-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 7px #45c7ff26)}
.referral-promo-art>.icon{position:absolute;top:1px;right:0;width:16px;height:16px;color:#efe0ff}
.referral-promo strong{font-size:13px;font-weight:600;line-height:1.7}
.referral-promo small{display:flex;align-items:center;gap:3px;font-size:9px;line-height:1.6;color:#d3b9ed}
.referral-promo small .icon{width:12px;height:12px}
.referral-details{text-align:center}
.referral-progress{display:flex;flex-direction:column;gap:9px;text-align:left}
.referral-progress progress{appearance:none;width:100%;height:8px;border:0;border-radius:8px;background:#302638;overflow:hidden}
.referral-progress progress::-webkit-progress-bar{background:#302638;border-radius:8px}
.referral-progress progress::-webkit-progress-value{background:linear-gradient(90deg,#ad86e5,#6de0fb);border-radius:8px}
.referral-progress progress::-moz-progress-bar{background:linear-gradient(90deg,#ad86e5,#6de0fb);border-radius:8px}
.referral-actions{display:flex;flex-direction:column;gap:9px}
.referral-banner{position:relative;isolation:isolate;display:flex;align-items:center;gap:12px;width:100%;min-height:92px;margin:0 0 14px;padding:8px 14px 8px 9px;overflow:hidden;text-align:left;border:1px solid #7d65a7;border-radius:18px;background:radial-gradient(ellipse at 10% 50%,#5268b957,transparent 65%),linear-gradient(115deg,#322242,#1c2839);box-shadow:inset 0 1px #e8ceff24,0 5px 22px #11102230}
.referral-banner[hidden]{display:none}
.referral-banner:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(120deg,transparent 35%,#d5bbff10 50%,transparent 65%)}
.referral-banner>img{width:76px;height:76px;object-fit:contain;flex:none;filter:drop-shadow(0 3px 10px #43c9ff30)}
.referral-banner>span:not(.referral-banner-arrow){min-width:0;flex:1}.referral-banner strong{display:block;color:#f3e7ff;font-size:14px;line-height:1.35;font-weight:600}.referral-banner strong b{color:#94eaff;font-weight:800;white-space:nowrap}.referral-banner small{display:block;margin-top:5px;color:#c1b3d3;font-size:11px;line-height:1.4}
.referral-banner-arrow{display:grid;place-items:center;flex:none;width:28px;height:28px;border:1px solid #b3a0e359;border-radius:50%;background:#a3b6ff10;color:#c5e6ff}.referral-banner-arrow .icon{width:16px;height:16px}
.referral-banner:hover{border-color:#b1ceff;box-shadow:inset 0 1px #e8ceff24,0 0 22px #67baff18}
.gem-topup .referral-banner{gap:8px;min-height:76px;margin-bottom:11px;padding:7px 9px 7px 5px;border-radius:13px}.gem-topup .referral-banner>img{width:54px;height:54px}.gem-topup .referral-banner strong{font-size:12px}.gem-topup .referral-banner small{font-size:10px}.gem-topup .referral-banner-arrow{width:24px;height:24px}
.referral-dialog{width:min(450px,calc(100% - 24px));border-color:#82639e;background:radial-gradient(ellipse at 50% 10%,#53397577,transparent 60%),#17131e;box-shadow:0 18px 90px #0009}.referral-dialog .close-dialog{top:14px;right:14px;width:36px;height:36px;z-index:1}
.referral-details{padding:24px}.referral-details h2{font:32px Georgia,serif;line-height:1.15;margin:10px 0}.referral-details h2 em{font-style:normal;color:#a2e9ff}.referral-details .eyebrow{font-size:10px;letter-spacing:2px;color:#dfc0ff}
.referral-hero{position:relative;display:flex;align-items:center;justify-content:center;height:166px;margin:-6px 0 8px;background:radial-gradient(ellipse,#5f7cdf40,transparent 68%)}.referral-hero>img{width:150px;height:150px;max-width:100%;object-fit:contain;filter:drop-shadow(0 8px 20px #41b9ff25);animation:referral-float 5s ease-in-out infinite}
.referral-glint{position:absolute;top:23%;left:18%;color:#f8d18b}.referral-glint .icon{width:16px;height:16px}.referral-glint:last-child{top:62%;left:auto;right:18%;color:#a6eaff;scale:.7}
.referral-reward{display:inline-flex;align-items:center;justify-content:center;color:#b4ecff;gap:7px;margin:6px 0;padding:8px 14px;border:1px solid #86d8ff40;border-radius:999px;background:#67caff0c;box-shadow:0 0 22px #4fcaff0a}.referral-reward .icon.icon--gem{width:25px;height:25px}.referral-reward strong{font-size:25px;line-height:1.3}.referral-reward>span{font-size:12px;color:#c9eaff;font-weight:600}
.referral-details>p{font-size:12px;color:#c5b7d1;line-height:1.7}.referral-progress{margin:18px 0;color:#bfb0ca;font-size:11px;line-height:1.5}.referral-progress strong{color:#e7d5fa}
.referral-stats{display:flex;justify-content:center;margin:0 0 20px;padding:12px 0;border-top:1px solid #d5aaff14;border-bottom:1px solid #d5aaff14}.referral-stats>span{flex:1;min-width:0;color:#b5a4c2;font-size:10px;line-height:1.6}.referral-stats>span+span{border-left:1px solid #d5aaff20}.referral-stats strong{display:block;font-size:18px;color:#e8d5ff}
.referral-actions .primary{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;color:#151a32;background:linear-gradient(105deg,#d9bcff,#a1e7ff);box-shadow:0 4px 22px #8fbfff24}.referral-actions .primary .icon{width:18px;height:18px}.referral-actions .secondary{font-size:12px;color:#cfbddb;background:#ffffff03}
.invite-card{padding:16px;border:1px solid #76598e;border-radius:20px;background:radial-gradient(ellipse at 10% 0,#573e7870,transparent 70%),#1b1623}
.invite-card-heading{display:flex;align-items:center;gap:12px;text-align:left}.invite-card-heading>img{flex:none;width:76px;height:76px;object-fit:contain;filter:drop-shadow(0 4px 12px #41b9ff20)}.invite-card-heading>div{min-width:0;flex:1}.invite-card-heading .eyebrow{font-size:9px;letter-spacing:1.5px;line-height:1.5}.invite-card-heading h2{font:25px Georgia,serif;line-height:1.2;color:#a2e9ff;margin:4px 0}.invite-card-heading p{font-size:11px;line-height:1.6;color:#c5b7d1;margin:0}.invite-card .referral-reward{margin:0;padding:0;border:0;box-shadow:none;background:none;gap:3px;vertical-align:middle}.invite-card .referral-reward strong{font-size:13px}.invite-card .referral-reward .icon--gem{width:15px;height:15px}
.invite-card .referral-progress{margin:12px 0 7px;gap:6px;font-size:10px}.invite-card .referral-progress progress{height:6px}.invite-card-totals{margin:0 0 12px;font-size:10px;line-height:1.5;color:#b5a4c2}.invite-card .referral-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.invite-card .referral-actions button{min-height:40px;padding:9px 12px;border-radius:11px;font-size:12px}.invite-card .referral-actions .icon{width:15px;height:15px}
@media(max-width:360px){.invite-card{padding:14px}.invite-card-heading{gap:10px}.invite-card-heading>img{width:64px;height:64px}.invite-card-heading h2{font-size:23px}.invite-card .referral-actions button{font-size:11px;padding-inline:10px}}
@keyframes referral-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media(max-width:360px){.referral-banner{gap:8px;padding-right:10px}.referral-banner>img{width:60px;height:60px}.referral-banner strong{font-size:12px}.referral-banner small{font-size:10px}.referral-details{padding:22px 18px}.referral-details h2{font-size:28px}}
@media(prefers-reduced-motion:reduce){.referral-hero>img{animation:none}}
@media(max-width:600px){.discover-intro{gap:12px;margin-bottom:20px}.discover-intro h1{font-size:clamp(26px,8.4vw,34px);letter-spacing:-1px}.discover-intro .eyebrow{font-size:8px;letter-spacing:1.4px;line-height:1.6;max-width:220px}.referral-promo{width:88px;padding:6px 6px 9px;border-radius:19px}.referral-promo-art{width:68px;height:59px}.referral-promo strong{font-size:12px}}
@media(prefers-reduced-motion:reduce){.referral-promo{transition:none}.referral-promo:active{scale:1}}
.gift-owned-badge{position:absolute;top:10px;left:10px;z-index:1;padding:3px 8px;border-radius:999px;background:#b996f0;color:#1d1426;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}.gift-card.owned .gift-buy h3{padding-top:18px}.character-picker{display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow:auto;margin:12px 0}.picker-row{display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:14px;background:var(--panel);text-align:left}.picker-row:hover,.picker-row:focus-visible{border-color:#b996f0}.picker-row .avatar,.picker-row img{width:44px;height:44px;border-radius:12px;object-fit:cover;flex:none}.picker-row span{display:flex;flex-direction:column;min-width:0;flex:1}.picker-row strong{font-size:14px}.picker-row small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.picker-row .icon{width:16px;height:16px;flex:none;opacity:.6}
/* Daily reward: quiet entry point, one focused dialog. */
.spin-shortcut{position:relative;display:flex;align-items:center;gap:5px;min-height:36px;flex:none;border:1px solid #8b6b56;background:radial-gradient(ellipse at 12% 40%,#40627d66,transparent 75%),#2c2135;color:#f3d6aa;border-radius:20px;padding:8px 10px 8px 46px;font-size:10px;white-space:nowrap;box-shadow:0 3px 12px #09060c55;transition:transform .16s ease,border-color .16s ease}
.spin-shortcut-art{position:absolute;left:-4px;top:50%;transform:translateY(-50%);display:block;width:44px;height:44px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 5px #0b071c88)}.spin-shortcut>span{font-weight:600;color:#f3dfc8}.spin-shortcut:hover{border-color:#d4ab7c}.spin-shortcut:active{scale:.97}.spin-shortcut i{width:5px;height:5px;background:#74e6f4;border-radius:50%;box-shadow:0 0 8px #74e6f4}
.section-label:has(.spin-shortcut) #count{display:none}.section-label:has(.spin-shortcut){gap:8px}.section-label:has(.spin-shortcut) h2{min-width:0;font-size:clamp(13px,3.8vw,16px);line-height:1.35}
.spin-dialog{width:min(420px,calc(100vw - 24px));max-height:calc(var(--app-height,100dvh) - 32px);padding:0;border:1px solid #5b4964;border-radius:32px;background:radial-gradient(ellipse at 50% 30%,#352439,#19151f 70%);color:#f8f3f9;overflow:auto}
.spin-dialog::backdrop{background:#09070dc4;backdrop-filter:blur(6px)}.spin-body{text-align:center;padding:30px 22px 22px}.spin-body h2{font-family:Georgia,serif;font-weight:400;font-size:clamp(24px,6.8vw,30px);margin:8px 18px 22px 0}
.spin-dialog .close-dialog{top:16px;right:16px;width:32px;height:32px}
.spin-wheel{position:relative;width:min(285px,100%);aspect-ratio:1;margin:8px auto 14px;isolation:isolate}.spin-rotor{position:absolute;inset:4%;transform-origin:50% 50%;transition:transform 4.2s cubic-bezier(.12,.7,.09,1)}.spin-rotor svg{width:100%;height:100%;display:block}.spin-rotor text{fill:#fff5e6;font-size:13px;font-weight:650;font-family:system-ui,sans-serif;paint-order:stroke;stroke:#302037;stroke-width:1px}
.spin-rim{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;object-fit:contain}.spin-hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:25.875%;height:25.875%;display:grid;place-items:center;overflow:hidden;border-radius:50%;pointer-events:none}.spin-hub-art{position:absolute;inset:0;display:block;width:100%;height:100%}.spin-hub .icon{position:relative;width:42%;height:42%;vertical-align:0;filter:drop-shadow(0 1px 2px #08040b)}.spin-rotor .spin-prize-unit{font-size:9px;font-weight:450;fill:#eadcd1;stroke-width:.4px}.spin-energy{color:#a5ebff;fill:none;stroke:currentColor;stroke-width:1.8;filter:drop-shadow(0 1px 3px #192438)}
.spin-pointer{position:absolute;z-index:3;left:calc(50% - 10px);top:0;width:20px;height:26px;clip-path:polygon(0 0,100% 0,50% 100%);background:linear-gradient(90deg,#c59d63,#fff0c4,#d4ae72);filter:drop-shadow(0 2px 4px #000)}
.spin-streak{margin:12px 0 18px}.spin-streak strong{font-size:12px}.spin-streak>div{display:flex;gap:5px;justify-content:center;margin:9px 0}.spin-streak span{width:28px;height:28px;border:1px solid #554362;border-radius:50%;display:grid;place-items:center;font-size:11px;color:#bdb0c7}.spin-streak span.done{background:#685078;color:#fff;border-color:#ad8bbd}.spin-streak .icon{width:16px;height:16px}
.spin-result:empty{display:none}.spin-result.is-won{display:flex;align-items:center;flex-direction:column;gap:6px;padding:10px 0;animation:spin-prize-in .4s ease-out}.spin-result>.icon{width:34px;height:34px}.spin-result strong{font-family:Georgia,serif;font-size:24px;color:#fbe1b4}.spin-result small{line-height:1.5;max-width:270px;color:#cdc0d3}.spin-result img{object-fit:contain}.spin-body .primary:disabled{opacity:.55}
.spin-result.is-error{margin:12px 0;padding:12px;border:1px solid #75627b;border-radius:12px;font-size:12px;line-height:1.6;color:#ebd8ef}
@keyframes spin-prize-in{from{opacity:0;transform:translateY(7px) scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.spin-rotor,.spin-shortcut{transition:none}.spin-result.is-won{animation:none}.spin-shortcut:active{scale:1}}

/* Store: illustrated passes, compact prices and a clear owned state. */
#gem-packs.gem-packs{margin-top:0;padding-top:0;border-top:0}
#gem-packs>.section-heading{margin-top:0}
.gift-shop>.section-heading{margin-top:18px}
.gift-shop-heading .page-title{margin:0;font-size:34px}
.premium{margin-top:22px;margin-bottom:18px;padding:14px 12px;border:1px solid #584366;border-radius:22px;background:radial-gradient(ellipse at 90% 0,#795b3a24,transparent 65%),var(--panel)}
.premium .eyebrow{display:flex;align-items:center;gap:6px;color:#e5c78d;letter-spacing:1.4px}
.premium h2{display:flex;align-items:center;gap:6px;margin:0;font:600 15px/1.4 system-ui,sans-serif;color:#e5c78d}
.premium h2 .icon{width:16px;height:16px}
.premium>p{font-size:12px;color:var(--muted);line-height:1.5;margin:6px 0 12px}
.premium-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(68px,1fr);gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;padding:2px 1px 4px}
.premium-card{display:flex;flex-direction:column;align-items:center;min-width:0;padding:5px 0 0;border:1px solid #5f4a64;border-radius:12px;scroll-snap-align:start;background:radial-gradient(ellipse at 50% 40%,#78613725,transparent 70%),#221c2a;overflow:hidden;transition:border-color .15s ease,transform .15s ease}
.premium-card:hover{border-color:#b69560}.premium-card:active{scale:.98}
.premium-card>img{display:block;width:min(100%,64px);height:auto;aspect-ratio:1;object-fit:contain}
.premium-card>strong{font-size:11px;line-height:1.4;padding:4px 2px 7px;font-weight:600}
.premium-gems{display:flex;align-items:center;justify-content:center;gap:3px;font-size:10px;line-height:1.4;color:#d4eaff;padding:0 3px 6px}.premium-gems .icon--gem{width:13px;height:13px}
.premium-price{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;padding:7px 3px;border-top:1px solid #ffffff0d;color:#f5dca7;background:#b48b4410;font-size:12px;font-weight:600}
.premium-price .icon{width:13px;height:13px;fill:#ffd26a;stroke:#d7a747}
.premium .illustration-note{margin:8px 0 0;font-size:10px}
.gift-shop>.muted{margin-top:-8px;margin-bottom:20px;font-size:13px}
.gift-buy .price{align-self:center;width:auto;min-width:82px;padding:9px 16px;font-size:15px;border-radius:999px}
.gift-buy .price .icon--gem{width:18px;height:18px}
.gift-card.owned{border-color:#6b9e96;background:radial-gradient(ellipse at 50% 55%,#4474692b,transparent 70%),linear-gradient(160deg,#233a38,#211b2c);box-shadow:inset 0 0 0 1px #b7f5df0c}
.gift-owned-badge{background:#c0eddd;color:#17392e;letter-spacing:.5px}
.gift-buy .price.give{flex-direction:row;gap:8px;min-width:104px;background:#c5e8dc0c;border:1px solid #80b8a2;color:#d8f5e9;padding:8px 14px;font-size:13px}
.price.give>.icon{width:15px;height:15px}

@media(max-width:360px){.premium{padding:12px 10px}.gift-shop-heading .page-title{font-size:29px}.gift-buy .price{min-width:72px;padding:8px 12px;font-size:14px}.gift-buy .price.give{min-width:94px}}
/* Only the roster scrolls; the action remains within the active Telegram viewport. */
dialog.gift-picker-dialog[open]{width:min(450px,calc(100% - 24px));height:min(660px,calc(var(--app-height,100dvh) - 24px));max-height:calc(var(--app-height,100dvh) - 24px);padding:0;overflow:hidden}
.gift-picker-body{display:flex;flex-direction:column;height:100%;min-height:0;padding:18px}
.gift-picker-heading{display:flex;align-items:center;gap:14px;flex:none;margin-bottom:16px;min-width:0}
.gift-picker-heading .gift-picker-art{width:64px;height:64px;flex:none;aspect-ratio:1}
.gift-picker-heading>div{min-width:0}
.gift-picker-heading h2{font-size:29px;line-height:1.15;margin:0 0 5px}
.gift-picker-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.gift-picker-body .character-picker{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:2px 2px 4px;scrollbar-width:thin}
.gift-picker-body .picker-row{flex:none;min-height:64px}
.gift-picker-footer{flex:none;padding-top:14px;background:var(--panel)}
.gift-picker-footer .secondary{margin:0;min-height:44px}
@media(max-height:430px){.gift-picker-body{padding:12px}.gift-picker-heading{margin-bottom:8px;gap:10px}.gift-picker-heading .gift-picker-art{width:44px;height:44px}.gift-picker-heading h2{font-size:24px}.gift-picker-footer{padding-top:8px}}
@media(prefers-reduced-motion:reduce){.premium-card{transition:none}}

.gift-picker-body .character-picker:focus-visible{outline:2px solid #b996f080;outline-offset:-2px;border-radius:14px}
/* Settings → Notifications switches */
.setting-label{display:flex;flex-direction:column;gap:3px;text-align:left}
.setting .setting-label{color:var(--ink);text-align:left}
.setting-label small{color:var(--muted);font-size:12px}
.switch{position:relative;flex:none;width:46px;height:28px;border-radius:999px;border:1px solid var(--border);background:var(--bg);padding:0;cursor:pointer;transition:background .2s,border-color .2s}
.switch span{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--muted);transition:transform .2s,background .2s}
.switch[aria-checked=true]{background:var(--accent);border-color:var(--accent)}
.switch[aria-checked=true] span{transform:translateX(18px);background:var(--bg)}
.switch:disabled{opacity:.6}
.switch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.switch,.switch span{transition:none}}

.spin-actions{display:flex;flex-direction:column;gap:8px}
.spin-again,.spin-later{align-self:center;min-height:36px;padding:6px 12px;border-radius:12px;font-size:12px;color:#dcc5ed;background:transparent}
.spin-again:hover,.spin-later:hover{background:#ffffff08}

/* A download retry never looks like another Gem purchase. */
.photo-retry{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px}
.photo-retry .icon{width:19px;height:19px}
.gift-request{display:flex;align-items:center;gap:14px;width:100%;max-width:420px;padding:14px}
.gift-request .gift-request-art{flex:none;width:84px;height:100px;aspect-ratio:auto;border-radius:16px;background:radial-gradient(ellipse,#a26cbd20,transparent 72%)}
.gift-request-art img{filter:drop-shadow(0 5px 8px #0004)}
.gift-request-content{min-width:0;flex:1}.gift-request-content p{color:var(--ink);font-size:13px;overflow-wrap:anywhere}
.gift-request-content .primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:9px 13px;font-size:12px}
.gift-request-content .icon--gem{width:19px;height:19px}
@media(max-width:360px){.gift-request{gap:10px;padding:12px}.gift-request .gift-request-art{width:64px;height:84px}}
.session-expired{width:min(420px,calc(100% - 24px));padding:0;border:1px solid var(--border);border-radius:24px;background:var(--panel);color:var(--ink)}
.session-expired::backdrop{background:#09070de0;backdrop-filter:blur(6px)}
.session-expired .detail-body h2{font-size:28px}

/* Replace the native WebView tap rectangle with quiet, rounded-button feedback. */
button,a,[role="button"]{-webkit-tap-highlight-color:transparent}
button:enabled{transition:scale .12s ease,opacity .12s ease,background-color .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease}
button:enabled:active{scale:.97;opacity:.88}
@media(prefers-reduced-motion:reduce){button:enabled{transition:none}button:enabled:active{scale:1}}
/* Age gate (dialog) and the Terms / Privacy pages */
.age-dialog .age-gate .primary{margin-top:14px}
.age-dialog .age-gate a{color:var(--accent)}
.legal{max-width:720px;margin:0 auto;padding:28px 20px 60px;line-height:1.65;font-size:14px}
.legal h2{font-size:16px;font-weight:600;margin:26px 0 8px}
.legal ul{padding-left:20px}.legal li{margin:6px 0}
.legal p,.legal li{color:var(--ink)}.legal .muted{color:var(--muted)}
/* Terms / Privacy are ordinary documents: undo the Mini App shell's scroll lock (html,body{overflow:hidden}). */
html.legal-page,html.legal-page body{height:auto;min-height:100%;overflow-y:auto;overscroll-behavior:auto;-webkit-overflow-scrolling:touch}

/* Compact rewards lead into a staggered grid of independently sized stories. */
.discover-intro #discover-reward:empty{display:none}
.story-grid{--story-gap:18px;grid-auto-rows:1px;grid-auto-flow:dense;gap:0 var(--story-gap);align-items:start}
.story-grid>.story-card{align-self:start}
.story-grid .story-reward-card{width:100%;min-height:146px;padding:12px;border-radius:18px}
.story-reward-card .referral-promo-art{width:76px;height:66px}
.story-reward-card strong{font-family:Georgia,serif;font-size:19px;font-weight:400}
.story-reward-card small{font-size:11px}
@media(max-width:600px){.story-grid{--story-gap:12px}.story-grid .story-reward-card{min-height:132px;border-radius:15px}.story-reward-card .referral-promo-art{width:64px;height:56px}.story-reward-card strong{font-size:18px}.story-reward-card small{font-size:10px}}
.section-label{gap:10px;flex-wrap:wrap}.section-label #count{margin-left:auto;white-space:nowrap}.section-label #daily-spin-entry:empty{display:none}
.story-card{display:flex;flex-direction:column;align-self:stretch;overflow:hidden;border:1px solid #44364e;border-radius:18px;background:linear-gradient(155deg,#28202f,#1b1721);box-shadow:0 5px 18px #0002;transition:border-color .2s,box-shadow .2s}
.story-card .card-art{flex:none;width:100%;aspect-ratio:4/5;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 35%,#5c436f,#282030)}
.story-card .card-art::after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#100b18b8);pointer-events:none}
.story-card .card-art img{display:block;object-position:center 30%}
.story-card .art-placeholder{background:transparent!important;color:#dcc4ed;font-size:64px}
.story-card-character{position:absolute;bottom:12px;left:12px;right:12px;z-index:1;width:fit-content;max-width:calc(100% - 24px);padding:6px 10px;border:1px solid #ffffff26;border-radius:999px;background:#1b132bcc;color:#e1d5e9;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.story-card-character strong{color:#fff;font-weight:600}
.story-card-body{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;padding:16px}
.story-card h3{min-height:2.6em;margin:0;font-family:Georgia,serif;font-size:21px;font-weight:400;line-height:1.3;letter-spacing:-.3px;overflow-wrap:anywhere;text-wrap:pretty}
.story-card p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:9px 0 18px;color:#bfb1c8;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.story-card-cta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px;border-top:1px solid #ffffff12;color:var(--accent);font-size:12px;font-weight:600}
.story-card-cta>span{display:grid;place-items:center;flex:none;width:26px;height:26px;border:1px solid #b996f038;border-radius:50%;background:#b996f010;transition:background .2s}
.story-card-cta .icon{width:14px;height:14px}
.story-card:focus-visible{outline-offset:3px;border-color:var(--accent)}
@media(hover:hover){.story-card:hover{border-color:#a17bbe;box-shadow:0 8px 24px #0004}.story-card:hover .story-card-cta>span{background:#b996f02b}}
@media(max-width:600px){.story-card{border-radius:15px}.story-card-body{padding:12px}.story-card h3{font-size:17px}.story-card p{font-size:12px;margin:8px 0 14px;line-height:1.5}.story-card-character{bottom:10px;left:10px;right:10px;max-width:calc(100% - 20px);padding:5px 8px;font-size:10px}.story-card-cta{padding-top:10px;font-size:11px}}
@media(max-width:360px){.story-card-body{padding:10px}.story-card h3{font-size:16px}.story-card-character{left:8px;right:8px;max-width:calc(100% - 16px)}}
@media(prefers-reduced-motion:reduce){.story-card,.story-card-cta>span{transition:none}}

/* Story narration at the top of a story chat (stories, 2026-10-24). */
.notice-card.story-intro { text-align: left; padding: 16px 18px; }
.notice-card.story-intro h2 { margin: 4px 0 8px; font-size: 1.05rem; }
.notice-card.story-intro p { margin: 0; font-style: italic; line-height: 1.5; opacity: .9; }
