:root{color-scheme:dark;--night:#071b2a;--deep:#0b2938;--water:#0f3949;--panel:#102d3b;--panel-soft:#143746;--line:#28505a;--cream:#f5efdf;--muted:#a7beb9;--gold:#f2cf7d;--gold-dark:#8e6a31;--mint:#8fd2bb;--teal:#45b9a9;--rose:#ef9e95;--serif:Georgia,'Times New Roman',serif;--sans:'IBM Plex Sans Thai','Noto Sans Thai',Tahoma,system-ui,sans-serif}*{box-sizing:border-box}html{min-width:320px;min-height:100%;background:var(--night)}body{margin:0;min-height:100vh;color:var(--cream);font:16px/1.55 var(--sans);background:radial-gradient(ellipse at 76% 0%,#18435266,transparent 38%),linear-gradient(180deg,#071b2a,#091e2b 70%,#0b2735)}button,input,textarea{font:inherit}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.topbar{height:78px;display:flex;align-items:center;gap:1.4rem;padding:0 clamp(1rem,5vw,5rem);border-bottom:1px solid #b5d6ce20;background:#071b2ad9;backdrop-filter:blur(14px);position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:.65rem;color:var(--cream);font-weight:650;font-size:1.05rem;letter-spacing:.04em;text-decoration:none}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border:1px solid #d1ad63;border-radius:50%;color:var(--gold);font-size:1.25rem}.wallet-bar{margin-left:auto;display:flex;gap:.6rem}.currency{display:flex;align-items:center;gap:.35rem;padding:.35rem .7rem;border:1px solid #ffffff1c;border-radius:99px;background:#ffffff08;font-size:.88rem}.currency.gold{color:var(--gold)}.currency.silver{color:#c6dce1}.currency span:first-child{font-size:.72rem}.icon-button{background:transparent;border:1px solid var(--line);width:38px;height:38px;border-radius:50%;cursor:pointer}.menu-button{display:none}main{width:min(1180px,100% - 3rem);margin:0 auto;padding:3rem 0 8rem}.screen{animation:rise .4s ease both}.hidden{display:none!important}@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}h1,h2,h3,p{margin-top:0}h1{font-family:var(--serif);font-size:clamp(2.35rem,5vw,4.35rem);font-weight:500;line-height:1.14;letter-spacing:-.025em;margin-bottom:.8rem}h1 em{color:var(--gold);font-weight:500}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.72rem;color:var(--mint);font-weight:600}.lead{font-size:1.08rem;color:#d2dfd7;max-width:38rem}.sublead{font-family:var(--serif);font-style:italic;color:var(--gold);font-size:1.1rem;margin-top:1.5rem}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#78dcb9;box-shadow:0 0 12px #78dcb980;margin-right:.4rem}.button{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:44px;padding:.65rem 1.1rem;border:1px solid transparent;border-radius:10px;font-weight:600;cursor:pointer;transition:transform .16s,background .16s,border-color .16s}.button:hover:not(:disabled){transform:translateY(-1px)}.button:disabled{opacity:.4;cursor:not-allowed}.button.primary{color:#15282b;background:linear-gradient(135deg,#f6d88c,#c9a75c);box-shadow:0 8px 24px #bd975022}.button.primary:hover:not(:disabled){background:linear-gradient(135deg,#ffe8a9,#daba6d)}.button.secondary{color:var(--cream);border-color:#71918a66;background:#183a45}.button.secondary:hover:not(:disabled){background:#204c56}.text-button{border:0;background:none;color:var(--mint);cursor:pointer;padding:.4rem 0}.text-button:hover{color:var(--cream)}
.welcome-screen{min-height:calc(100vh - 150px);display:grid;grid-template-columns:1fr .9fr;align-items:center;gap:1.5rem;overflow:hidden}.welcome-copy{position:relative;z-index:1;padding:3rem 0}.welcome-copy .eyebrow{margin-bottom:1.25rem}.welcome-copy .lead{max-width:33rem}.start-form{margin-top:2.5rem;max-width:530px}.start-form label,.field-label{display:block;margin-bottom:.55rem;font-weight:600;color:#dfebe2}.input-row{display:flex;gap:.65rem}.input-row input{flex:1;min-width:0}.input-row input,input,textarea{color:var(--cream);background:#102c38;border:1px solid #47706d;border-radius:9px;padding:.75rem .9rem}.input-row input::placeholder,textarea::placeholder{color:#839e99}.privacy-note,.helper-note{font-size:.84rem;color:var(--muted);margin-top:.8rem}.moon-art{height:min(70vh,570px);min-height:390px;position:relative;overflow:hidden;border-radius:45% 45% 6% 6% / 38% 38% 6% 6%;background:linear-gradient(180deg,#102f41 0%,#183d4c 57%,#0b2938 100%);isolation:isolate}.moon{position:absolute;width:140px;height:140px;border-radius:50%;top:13%;left:54%;background:radial-gradient(circle at 35% 35%,#fff5cf,#e7ca88 66%,#b3935d);box-shadow:0 0 75px #f2d58c55}.moon:after{content:'';position:absolute;inset:-35px;border-radius:50%;background:#edda9b12;filter:blur(8px)}.distant-temple{position:absolute;bottom:39%;left:15%;width:68%;height:100px;opacity:.72;background:linear-gradient(180deg,transparent 0 33%,#183342 33% 100%);clip-path:polygon(0 48%,12% 42%,20% 25%,28% 42%,38% 42%,47% 10%,56% 42%,67% 38%,76% 19%,84% 39%,100% 45%,100% 100%,0 100%)}.distant-temple span{position:absolute;bottom:0;width:1px;height:60%;background:#c4a76744;left:28%}.hero-water{position:absolute;left:-10%;right:-10%;height:49%;bottom:-4%;border-radius:50% 50% 0 0;background:repeating-linear-gradient(174deg,#1b5660 0 2px,transparent 2px 38px),linear-gradient(180deg,#10404b,#091d2b)}.hero-water:after{content:'';position:absolute;left:12%;right:7%;top:20%;height:2px;background:linear-gradient(90deg,transparent,#dfca8b66,transparent);box-shadow:30px 55px #dfca8b35,-110px 130px #dfca8b38,230px 100px #dfca8b28}.hero-krathong{position:absolute;left:48%;bottom:22%;width:175px;height:105px;transform:translateX(-50%);filter:drop-shadow(0 0 28px #e9bd5877);z-index:2}.hero-krathong:before,.hero-krathong:after{content:'';position:absolute;left:3%;right:3%;height:47px;border-radius:50%;background:linear-gradient(170deg,#c5a251,#82662d 62%,#594a2b);border:2px solid #e0c16c;bottom:7px}.hero-krathong:after{left:13%;right:13%;bottom:28px;height:48px;background:repeating-conic-gradient(from -8deg at 50% 100%,#d8bf70 0 5deg,#718956 5deg 10deg,#d8bf70 10deg 15deg);clip-path:polygon(0 50%,50% 0,100% 50%,50% 100%);border-radius:0}.hero-krathong i{position:absolute;left:36%;bottom:38px;width:28%;height:36px;background:#f3d781;clip-path:polygon(0 100%,50% 0,100% 100%);z-index:2}.hero-flame{position:absolute;left:47%;top:12px;width:14px;height:23px;border-radius:50% 0 50% 50%;transform:rotate(45deg);background:#ffdda0;box-shadow:0 0 20px 7px #f5b55e;z-index:3}.hero-glow{position:absolute;z-index:-1;left:19%;right:12%;bottom:11%;height:35px;border-radius:50%;background:#efc266;filter:blur(34px);opacity:.37}
.home-screen{padding-top:1.2rem}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:1rem 0 2.5rem}.section-heading h1{font-size:clamp(2rem,4vw,3.25rem);margin:.4rem 0}.section-heading .lead{margin-bottom:0}.moon-small{width:68px;height:68px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff5cf,#e7ca88 68%,#b3935d);box-shadow:0 0 48px #f2d58c38}.home-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.feature-card{min-height:275px;text-align:left;padding:1.5rem;border:1px solid #47706977;border-radius:18px;background:linear-gradient(145deg,#143442,#0c2735);display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;transition:transform .2s,border-color .2s}.feature-card:hover{transform:translateY(-4px);border-color:#d2b568}.feature-card .card-symbol{font-family:var(--serif);font-size:2.6rem;color:var(--gold);height:70px}.card-kicker{font-size:.74rem;text-transform:uppercase;letter-spacing:.12em;color:var(--mint)}.feature-card strong{font-family:var(--serif);font-size:1.7rem;font-weight:500;margin:.15rem 0}.feature-card>span:not(.card-symbol):not(.card-kicker):not(.card-arrow){color:var(--muted);font-size:.92rem}.card-arrow{margin-top:auto;padding-top:1.5rem;color:var(--gold);font-weight:600}.river-card{background:linear-gradient(145deg,#16434b,#0c2935)}.shop-card{background:linear-gradient(145deg,#373543,#172c36)}.home-foot{display:flex;justify-content:space-between;align-items:center;margin-top:1.3rem;color:var(--muted);font-size:.85rem}.status-pill{display:inline-flex;align-items:center;border:1px solid #6d9b8b55;border-radius:99px;padding:.2rem .6rem;color:var(--mint);font-size:.74rem}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.6rem}.page-heading h1{font-size:clamp(1.8rem,3.5vw,2.8rem);margin:.2rem 0 0}.page-heading>div{margin-right:auto}.builder-layout{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(340px,.88fr);gap:1.2rem;align-items:start}.preview-panel,.custom-panel,.collection-preview,.collection-info{border:1px solid #47706977;background:linear-gradient(145deg,#12313e,#0c2633);border-radius:18px;padding:1rem}.preview-label{display:flex;justify-content:space-between;align-items:center;color:#d9e7de;font-size:.85rem}.preview-stage{display:grid;place-items:center;min-height:330px;margin:.8rem 0;background:radial-gradient(ellipse at 50% 70%,#31717a4f,transparent 45%),linear-gradient(180deg,#173e4b,#0e303d);border-radius:13px;overflow:hidden;position:relative}.preview-stage:after{content:'';position:absolute;bottom:22%;width:72%;height:2px;background:#dbcb9055;box-shadow:0 20px #dbcb9029,0 50px #dbcb9020}.krathong-art{position:relative;width:min(250px,70%);height:190px;filter:drop-shadow(0 10px 23px #efcc6a55);z-index:1;transform:translateY(-5px)}.krathong-art .aura{position:absolute;left:20%;right:20%;top:25%;bottom:13%;border-radius:50%;border:1px solid #bdece1;box-shadow:0 0 30px #9ce0cc77, inset 0 0 20px #9ce0cc29}.k-base{position:absolute;left:6%;right:6%;bottom:19px;height:62px;border-radius:50%;background:linear-gradient(160deg,#ddbd68,#88622e 62%,#574427);border:2px solid #f2d789;box-shadow:inset 0 -8px #5d4929}.k-base:before{content:'';position:absolute;left:9%;right:9%;top:9px;height:15px;border-radius:50%;background:#e9d28b88}.k-middle{position:absolute;left:16%;right:16%;bottom:58px;height:72px;clip-path:polygon(0 58%,50% 0,100% 58%,50% 100%);background:repeating-conic-gradient(from -15deg at 50% 98%,#d8bd70 0 6deg,#668451 6deg 12deg,#e7cd80 12deg 18deg)}.k-top{position:absolute;left:34%;right:34%;bottom:92px;height:42px;clip-path:polygon(0 100%,50% 0,100% 100%);background:linear-gradient(90deg,#9a7230,#f2d779,#a17834)}.k-candle{position:absolute;left:calc(50% - 5px);bottom:115px;width:10px;height:29px;background:#fff0bb;border-radius:4px 4px 2px 2px;z-index:3;box-shadow:0 0 23px 5px #ffd77a}.k-flame{position:absolute;left:calc(50% - 5px);bottom:142px;width:10px;height:17px;background:linear-gradient(#fff7c9,#ffab46);border-radius:80% 10% 80% 20%;transform:rotate(45deg);z-index:3;box-shadow:0 0 18px 7px #ffc368}.k-flower{position:absolute;z-index:4;width:42px;height:42px;bottom:55px;left:calc(50% - 21px);filter:drop-shadow(0 2px 4px #522d4b77)}.k-flower:before,.k-flower:after{content:'✿';position:absolute;inset:0;display:grid;place-items:center;color:#f5b7b8;font-size:39px;text-shadow:0 0 6px #fff}.k-flower:after{content:'•';font-size:15px;color:#f4d87d;text-shadow:0 0 5px #fff}.k-flower.gold:before{color:#ffd769}.k-flower.moon:before{color:#b8baff}.preview-caption{display:flex;justify-content:space-between;gap:1rem;padding:.1rem .4rem .3rem;color:var(--muted);font-size:.82rem}.preview-caption strong{color:var(--cream)}.custom-panel{padding:1.2rem}.custom-panel textarea{display:block;width:100%;min-height:80px;resize:vertical}.field-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:.74rem;margin-top:.3rem}.part-controls{margin-top:1rem;display:grid;gap:.7rem}.part-group{border-top:1px solid #47706955;padding-top:.65rem}.part-title{display:flex;justify-content:space-between;margin-bottom:.4rem;font-size:.85rem;font-weight:600}.choice-row{display:flex;flex-wrap:wrap;gap:.4rem}.choice{border:1px solid #57807877;background:#0a2632;border-radius:8px;padding:.38rem .62rem;font-size:.78rem;cursor:pointer;color:#c2d1c8}.choice.selected{border-color:var(--gold);color:var(--gold);background:#d9b45a14}.choice.locked{opacity:.55}.custom-actions{display:flex;gap:.55rem;justify-content:space-between;margin-top:1rem}.custom-actions .button{font-size:.88rem}.custom-actions .primary{flex:1}.helper-note{min-height:1.4em;margin-bottom:0}
.river-screen{padding-top:.2rem}.river-heading{margin-bottom:1rem}.river-wrap{height:min(66vh,610px);min-height:430px;position:relative;overflow:hidden;border:1px solid #4b797978;border-radius:20px;background:#0b2635}.river-wrap canvas{display:block;width:100%;height:100%}.river-overlay{pointer-events:none;position:absolute;inset:1rem 1.1rem auto;display:flex;justify-content:space-between;align-items:flex-start}.night-label{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:#d8e8db;background:#071b2a99;border:1px solid #ffffff2c;padding:.4rem .65rem;border-radius:99px}.floating-wish{max-width:270px;padding:.65rem .8rem;border-radius:12px;background:#081c2ad9;border:1px solid #e9d18b77;color:#f5e6b4;font-family:var(--serif);font-style:italic;text-align:center;box-shadow:0 6px 20px #0003}.river-controls{position:absolute;left:1rem;right:1rem;bottom:1rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.1rem;border:1px solid #ffffff29;border-radius:14px;background:#071b2ad9;backdrop-filter:blur(8px)}.river-controls>div{display:grid}.river-controls>div span{color:var(--muted);font-size:.82rem}.river-bottom{display:flex;align-items:center;gap:.8rem;margin-top:1rem;padding:.8rem 0;color:var(--muted)}.river-bottom>div{display:grid;grid-template-columns:auto auto;column-gap:.55rem;align-items:center}.river-bottom .eyebrow{grid-column:1/-1}.river-bottom strong{color:var(--gold);font-size:1.4rem}.river-bottom p{margin:0;font-size:.84rem}.river-bottom .text-button{margin-left:auto}
.shop-notice{display:flex;align-items:center;gap:.9rem;padding:1rem 1.2rem;background:#182f38;border:1px solid #ac926047;border-radius:13px;margin-bottom:1.1rem}.shop-notice p{margin:0;color:var(--muted);font-size:.88rem}.shop-notice strong{color:var(--cream)}.notice-icon{font-size:1.6rem;color:var(--gold)}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9rem}.shop-item{padding:1.1rem;border:1px solid #47706977;border-radius:15px;background:linear-gradient(145deg,#143442,#0c2735);display:flex;flex-direction:column;min-height:230px}.item-art{height:74px;display:grid;place-items:center;font-size:2.7rem;color:var(--gold);text-shadow:0 0 22px #efce7755}.shop-item h3{font-family:var(--serif);font-size:1.18rem;font-weight:500;margin:.1rem 0}.item-detail{font-size:.78rem;color:var(--muted);margin:0 0 .8rem}.tier-tag{align-self:flex-start;border:1px solid #6d9b8b55;border-radius:99px;padding:.1rem .5rem;font-size:.68rem;color:var(--mint);margin-bottom:.45rem}.item-actions{display:flex;gap:.4rem;margin-top:auto}.item-actions .button{flex:1;padding:.45rem;font-size:.78rem;min-height:38px}.item-owned{margin-top:auto;color:var(--mint);font-size:.84rem}.subsection-title{font-family:var(--serif);font-weight:500;margin:2rem 0 .8rem}.coming-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.coming-grid article{display:grid;grid-template-columns:42px 1fr;align-items:center;border:1px dashed #47706977;border-radius:13px;padding:.9rem;color:var(--muted)}.coming-grid article>span{grid-row:span 2;font-size:1.5rem;color:#a79ac2}.coming-grid strong{color:#d4dfd6;font-size:.9rem}.coming-grid small{font-size:.75rem}.collection-layout{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}.collection-preview{min-height:345px;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 72%,#31717a4f,transparent 46%),linear-gradient(180deg,#173e4b,#0e303d)}.collection-preview .krathong-art{transform:scale(1.08)}.collection-info h2{font-family:var(--serif);font-weight:500;font-size:1.7rem;margin:.2rem 0}.collection-info p{color:var(--muted);min-height:3rem}.collection-stat{display:flex;justify-content:space-between;padding:.7rem 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted)}.collection-stat strong{color:var(--gold)}.owned-list{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1rem}.owned-chip{background:#1a4249;border:1px solid #477069;border-radius:99px;padding:.25rem .6rem;font-size:.75rem;color:#d2e5d5}.toast{position:fixed;z-index:20;bottom:5.6rem;left:50%;transform:translate(-50%,20px);padding:.65rem 1rem;border:1px solid #e1c77c77;border-radius:99px;background:#102e38;color:var(--cream);box-shadow:0 10px 30px #0005;opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}.bottom-nav{position:fixed;z-index:12;left:50%;bottom:1rem;transform:translateX(-50%);display:flex;gap:.25rem;padding:.4rem;border:1px solid #a7c8b632;border-radius:16px;background:#092432ed;backdrop-filter:blur(12px);box-shadow:0 10px 40px #0005}.bottom-nav button{min-width:72px;border:0;border-radius:11px;background:transparent;color:var(--muted);font-size:1.1rem;cursor:pointer}.bottom-nav button span{display:block;font-size:.65rem}.bottom-nav button:hover,.bottom-nav button.active{color:var(--gold);background:#d2b35b12}
@media(max-width:850px){main{width:min(100% - 2rem,700px);padding-top:1.8rem}.welcome-screen{grid-template-columns:1fr;min-height:0;padding-top:1rem}.welcome-copy{padding:1rem 0 0}.moon-art{height:350px;min-height:300px;width:min(100%,560px);margin:0 auto}.builder-layout{grid-template-columns:1fr}.preview-stage{min-height:290px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{height:66px;padding:0 1rem}.bottom-nav{bottom:.45rem}.bottom-nav button{min-width:65px}}
@media(max-width:560px){main{width:calc(100% - 1.2rem);padding-top:1.2rem}.topbar{gap:.6rem}.brand{font-size:.92rem}.currency{padding:.28rem .5rem;font-size:.76rem}.welcome-copy{padding-top:.6rem}.welcome-screen h1{font-size:2.45rem}.lead{font-size:.95rem}.moon-art{height:280px;min-height:260px}.moon{width:100px;height:100px}.hero-krathong{transform:translateX(-50%) scale(.78);transform-origin:bottom center}.input-row{align-items:stretch}.input-row input{width:50%}.input-row .button{padding:.6rem .75rem;white-space:nowrap}.section-heading{margin:.5rem 0 1.2rem}.section-heading .moon-small{width:48px;height:48px}.home-grid{grid-template-columns:1fr;gap:.65rem}.feature-card{min-height:170px;padding:1.1rem}.feature-card .card-symbol{height:42px;font-size:2rem}.card-arrow{padding-top:.8rem}.home-foot{align-items:flex-start;gap:.5rem;flex-direction:column}.page-heading{gap:.6rem;flex-wrap:wrap}.page-heading .text-button{width:100%;text-align:left}.page-heading>div{flex:1}.page-heading h1{font-size:1.8rem}.page-heading>.button{font-size:.78rem;padding:.5rem .7rem}.builder-layout{gap:.7rem}.preview-stage{min-height:250px}.custom-panel{padding:.9rem}.custom-actions{flex-direction:column}.custom-actions .button{width:100%}.river-wrap{height:60vh;min-height:390px}.river-controls{left:.55rem;right:.55rem;bottom:.55rem;padding:.75rem;align-items:flex-end}.river-controls>div{font-size:.88rem}.river-controls>div span{font-size:.72rem}.river-controls .button{padding:.55rem .65rem;font-size:.78rem}.river-bottom{align-items:flex-start;flex-wrap:wrap}.river-bottom .text-button{margin-left:0}.floating-wish{max-width:170px;font-size:.8rem}.shop-grid{grid-template-columns:1fr 1fr;gap:.55rem}.shop-item{min-height:215px;padding:.8rem}.item-art{height:52px;font-size:2.1rem}.shop-item h3{font-size:1rem}.item-actions{flex-direction:column}.item-actions .button{width:100%}.coming-grid{grid-template-columns:1fr}.collection-layout{grid-template-columns:1fr}.collection-preview{min-height:270px}.collection-preview .krathong-art{transform:scale(.85)}.bottom-nav{width:calc(100% - 1rem);justify-content:space-around}.bottom-nav button{min-width:0;flex:1}.toast{width:max-content;max-width:calc(100% - 2rem);text-align:center}}
.k-flower{font-size:0!important}.k-flower.flower-white:before{color:#fff0d8}.k-flower.flower-marigold:before{color:#f1ac52}.k-flower.flower-pink:before{color:#e999aa}.k-flower.flower-gold:before{color:#f3cc62}.k-flower.flower-moon:before{color:#b8b8ed}.item-art.gold-art{color:var(--gold);filter:drop-shadow(0 0 20px #e8c45b55)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.account-button{border:1px solid #71918a66;border-radius:999px;padding:.38rem .75rem;background:#183a45;color:var(--cream);font:inherit;font-size:.8rem;cursor:pointer}.account-button:hover{border-color:var(--gold);color:var(--gold)}.account-link{margin-top:1rem}.topup-panel{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.2rem 0;padding:1.2rem;border:1px solid #bd975044;border-radius:16px;background:linear-gradient(120deg,#3d33244a,#102d3b)}.topup-panel h2,.account-card h2{font:500 1.5rem var(--serif);margin:.25rem 0}.topup-panel p,.account-card p{color:var(--muted);margin:0 0 .55rem}.topup-actions{display:flex;flex-wrap:wrap;gap:.55rem}.topup-panel .helper-note{flex-basis:100%;margin:0}.account-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.account-card{padding:1.35rem;border:1px solid var(--line);border-radius:16px;background:#0d2937}.account-card code{display:block;overflow-wrap:anywhere;padding:.8rem;border:1px solid #71918a44;border-radius:9px;background:#071b2a;color:var(--gold);font-size:.83rem}.account-card small{display:block}.account-form{display:grid;gap:.55rem}.account-form label{font-weight:600;font-size:.9rem;margin-top:.2rem}.account-form input{width:100%;min-height:44px;padding:.65rem .8rem;border:1px solid #71918a66;border-radius:9px;background:#081e2a;color:var(--cream)}.account-form button{margin-top:.45rem}.account-card .helper-note{margin-top:.7rem;min-height:1.25rem}.account-card #line-link-button{margin-top:1rem}.account-screen .page-heading{margin-bottom:1rem}
@media(max-width:700px){.account-layout{grid-template-columns:1fr}.topup-panel{align-items:flex-start;flex-direction:column}.account-button{padding:.3rem .55rem;font-size:.72rem}}
.inventory-intro{max-width:48rem;color:var(--muted);margin:-.25rem 0 1.25rem}.inventory-layout{display:grid;grid-template-columns:minmax(290px,.78fr) minmax(0,1.22fr);gap:1rem;align-items:start}.equipment-panel,.inventory-items-panel{min-width:0;padding:1.2rem;border:1px solid var(--line);border-radius:17px;background:linear-gradient(150deg,#102f3c,#0a2330)}.inventory-section-heading{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-bottom:.9rem}.inventory-section-heading h2{font:500 1.55rem var(--serif);margin:.1rem 0 0}.equipment-slots{display:grid;gap:.5rem}.equipment-slot{display:flex;align-items:center;gap:.75rem;width:100%;min-height:68px;text-align:left;padding:.55rem .7rem;border:1px solid #47706977;border-radius:12px;background:#0b2532;cursor:pointer;transition:border-color .16s,background .16s}.equipment-slot:hover{border-color:var(--gold);background:#163844}.equipment-slot-icon{flex:none;display:grid;place-items:center;width:42px;height:42px;border:1px solid #c6aa5b88;border-radius:11px;background:linear-gradient(145deg,#253e45,#172d39);color:var(--gold);font-size:1.55rem}.equipment-slot-copy{display:grid;min-width:0}.equipment-slot-copy small{color:var(--muted);font-size:.72rem}.equipment-slot-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem}.equipped-check{margin-left:auto;color:var(--mint);font-size:1rem}.equipment-preview{display:grid;justify-items:center;gap:.2rem;margin-top:.8rem;padding:.75rem;border:1px solid #47706955;border-radius:13px;background:radial-gradient(ellipse at 50% 80%,#31717a3c,transparent 55%),#081e2a}.equipment-preview .preview-stage{width:100%;min-height:175px;border:0;background:transparent}.equipment-preview .krathong-art{transform:scale(.65)}.equipment-preview strong{font-family:var(--serif);font-weight:500}.equipment-preview>span{font-size:.74rem;color:var(--muted)}.inventory-filters{display:flex;gap:.4rem;overflow-x:auto;padding:.1rem .1rem .55rem;margin:0 0 .35rem;scrollbar-width:thin}.inventory-filter{flex:none;border:1px solid #47706977;border-radius:99px;padding:.4rem .7rem;background:#0b2532;color:var(--muted);font-size:.78rem;cursor:pointer}.inventory-filter:hover,.inventory-filter.active{border-color:#d4b65f;color:var(--gold);background:#d2b35b14}.inventory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.inventory-item{display:grid;grid-template-columns:55px minmax(0,1fr);gap:.55rem;padding:.7rem;border:1px solid #47706977;border-radius:13px;background:#0b2532}.inventory-item.is-equipped{border-color:#7fc7a780;box-shadow:inset 0 0 0 1px #7fc7a722}.inventory-item-art{grid-row:span 2;display:grid;place-items:center;align-self:start;width:55px;height:55px;border:1px solid #c6aa5b66;border-radius:12px;background:linear-gradient(145deg,#253e45,#172d39);color:var(--gold);font-size:1.8rem}.inventory-item-art.tier-gold{color:#ffe09a;text-shadow:0 0 15px #efce77aa}.inventory-item-copy{min-width:0}.inventory-item-copy .tier-tag{margin:0 0 .2rem;font-size:.61rem;padding:.05rem .4rem}.tier-tag.tier-3{border-color:#bd975077;color:var(--gold)}.tier-tag.tier-4{border-color:#a79ac288;color:#c9b8f2}.inventory-item h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 1rem var(--serif);margin:0}.inventory-item .item-detail{margin:.12rem 0 0;font-size:.7rem;line-height:1.4}.inventory-item-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.35rem}.inventory-item-actions .button{min-height:36px;padding:.35rem .55rem;font-size:.7rem}.inventory-item-actions .selected-equip{border-color:#78b99c88;color:var(--mint);background:#1a49444d}.inventory-empty{grid-column:1/-1;display:grid;justify-items:center;text-align:center;padding:2rem 1rem;border:1px dashed #47706988;border-radius:13px;color:var(--muted)}.inventory-empty>span{font-size:1.8rem;color:var(--gold)}.inventory-empty strong{color:var(--cream)}.inventory-empty p{margin:.3rem 0 0;font-size:.82rem}.inventory-future-note{display:flex;gap:.8rem;align-items:flex-start;margin-top:1rem;padding:1rem 1.2rem;border:1px dashed #8b7d5b70;border-radius:14px;background:#d2b35b09}.inventory-future-note>span{color:var(--gold);font-size:1.3rem}.inventory-future-note strong{color:#ead9a8}.inventory-future-note p{margin:.2rem 0 0;color:var(--muted);font-size:.82rem}.bottom-nav button{min-width:62px}
@media(max-width:850px){.inventory-layout{grid-template-columns:1fr}.equipment-slots{grid-template-columns:repeat(2,minmax(0,1fr))}.equipment-preview .preview-stage{min-height:150px}}
@media(max-width:560px){.equipment-panel,.inventory-items-panel{padding:.8rem}.inventory-section-heading h2{font-size:1.3rem}.equipment-slots{grid-template-columns:1fr 1fr;gap:.4rem}.equipment-slot{min-height:62px;padding:.45rem}.equipment-slot-icon{width:36px;height:36px;font-size:1.3rem}.equipment-slot-copy strong{font-size:.78rem}.equipment-slot-copy small{font-size:.65rem}.inventory-grid{grid-template-columns:1fr}.inventory-item{grid-template-columns:48px minmax(0,1fr);padding:.6rem}.inventory-item-art{width:48px;height:48px;font-size:1.5rem}.inventory-item-actions{gap:.25rem}.inventory-item-actions .button{flex:1;padding:.3rem .35rem;font-size:.66rem}.inventory-filter{font-size:.72rem;padding:.35rem .6rem}.bottom-nav button{min-width:0;padding:.25rem 0;font-size:1rem}.bottom-nav button span{font-size:.59rem}}
.private-room-panel{padding:0;overflow:hidden}.builder-tabs{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;padding:.4rem;border:1px solid #47706977;border-radius:12px;background:#081f2b;margin-bottom:1rem}.builder-tab{min-height:42px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-weight:600;cursor:pointer}.builder-tab:hover,.builder-tab.active{background:linear-gradient(135deg,#e8cb7b,#b59451);color:#15282b}.builder-tab-panel{padding:0 .2rem .2rem}.private-room-panel:has(.builder-tab-panel:not([hidden])){padding:1rem}.private-room-panel .equipment-slots{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}.private-room-panel .equipment-slot{min-height:60px;padding:.45rem}.private-room-panel .equipment-slot-icon{width:36px;height:36px;font-size:1.3rem}.private-room-panel .equipment-slot-copy strong{font-size:.8rem}.private-room-panel .equipment-slot-copy small{font-size:.66rem}.inventory-inline-heading{display:flex;align-items:center;justify-content:space-between;margin:.9rem 0 .3rem}.inventory-inline-heading h3{font:500 1.15rem var(--serif);margin:0}.private-room-panel .inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.private-room-panel .inventory-item{grid-template-columns:42px minmax(0,1fr);gap:.4rem;padding:.5rem}.private-room-panel .inventory-item-art{width:42px;height:42px;font-size:1.35rem}.private-room-panel .inventory-item h3{font-size:.88rem}.private-room-panel .inventory-item .item-detail{font-size:.64rem}.private-room-panel .inventory-item-actions .button{min-height:34px;padding:.3rem .38rem;font-size:.63rem}.private-room-panel .inventory-future-note{margin-top:.65rem;padding:.65rem .8rem}.private-room-panel .inventory-future-note p{font-size:.73rem}.builder-market-link{width:100%;margin-top:.65rem}.builder-wish-panel textarea{min-height:130px}.builder-tab-panel[hidden]{display:none!important}
@media(max-width:560px){.private-room-panel{padding:.75rem!important}.private-room-panel .equipment-slot{min-height:58px;padding:.35rem}.private-room-panel .inventory-grid{grid-template-columns:1fr}.private-room-panel .inventory-item{grid-template-columns:48px minmax(0,1fr);padding:.6rem}.private-room-panel .inventory-item-art{width:48px;height:48px;font-size:1.5rem}.private-room-panel .inventory-item h3{font-size:.95rem}.private-room-panel .inventory-item .item-detail{font-size:.7rem}.private-room-panel .inventory-item-actions .button{flex:1;font-size:.68rem}.builder-tab{font-size:.84rem}.builder-layout{gap:.7rem}}

/* Private room inventory: compact game-style loadout screen */
.topup-panel[hidden]{display:none!important}
body:has(#screen-builder:not(.hidden)) main{width:min(1620px,calc(100% - 3rem));padding:1rem 0 6.5rem}
body:has(#screen-builder:not(.hidden)) .topbar{height:68px}
.builder-screen .page-heading{margin-bottom:.85rem;gap:.8rem}
.builder-screen .page-heading h1{font-size:clamp(1.7rem,2.6vw,2.35rem)}
.builder-screen .page-heading .eyebrow{font-size:.65rem}
.builder-layout{grid-template-columns:minmax(360px,.82fr) minmax(600px,1.18fr);gap:.85rem;align-items:stretch}
.preview-panel,.private-room-panel{border-color:#997f4d66;box-shadow:0 14px 42px #0003,inset 0 1px #ffffff08}
.preview-panel{position:sticky;top:80px;padding:.85rem}
.preview-stage{min-height:clamp(290px,42vh,430px);margin:.55rem 0;background:radial-gradient(ellipse at 50% 72%,#e7c9722d,transparent 34%),radial-gradient(ellipse at 50% 100%,#22788866,transparent 63%),linear-gradient(180deg,#102f45,#123a48 60%,#092630)}
.preview-stage:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 90%,transparent 0 33%,#d8c2790c 34% 34.3%,transparent 35%),linear-gradient(90deg,transparent 49.8%,#d6c88912 50%,transparent 50.2%);pointer-events:none}
.preview-stage .krathong-art{transform:translateY(-8px) scale(1.12);filter:drop-shadow(0 12px 28px #efcc6a88)}
.preview-caption{font-size:.76rem;padding:.05rem .2rem}
.private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.75rem}
.private-room-panel .builder-tabs{margin-bottom:.7rem;padding:.3rem}
.private-room-panel .builder-tab{min-height:36px;font-size:.86rem}
.private-room-panel .builder-tab-panel{padding:0}
.private-room-panel .inventory-section-heading{margin-bottom:.55rem}
.private-room-panel .inventory-section-heading h2{font-size:1.35rem}
.private-room-panel .equipment-slots{grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem}
.private-room-panel .equipment-slot{min-height:55px;padding:.35rem .42rem;gap:.4rem;border-radius:10px}
.private-room-panel .equipment-slot-icon{width:31px;height:31px;border-radius:9px;font-size:1.12rem}
.private-room-panel .equipment-slot-copy small{font-size:.61rem;line-height:1.2}
.private-room-panel .equipment-slot-copy strong{font-size:.73rem;line-height:1.3}
.private-room-panel .equipment-slot.is-selected{border-color:var(--gold);background:#644f2738;box-shadow:inset 0 0 0 1px #e7c97235}
.private-room-panel .inventory-inline-heading{margin:.65rem 0 .25rem}
.private-room-panel .inventory-inline-heading h3{font-size:1.05rem}
.private-room-panel .inventory-filters{padding-bottom:.35rem;margin-bottom:.1rem}
.private-room-panel .inventory-filter{padding:.32rem .6rem;font-size:.71rem}
.inventory-control-hint{margin:.05rem 0 .38rem;color:#a9c5bc;font-size:.68rem}
.private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.42rem;max-height:clamp(220px,32vh,330px);overflow:auto;padding:.08rem .12rem .3rem .02rem;scrollbar-color:#607e74 #0b2532;scrollbar-width:thin}
.private-room-panel .inventory-item{position:relative;min-width:0;min-height:82px;grid-template-columns:36px minmax(0,1fr);align-content:start;gap:.38rem;padding:.48rem;text-align:left;color:var(--cream);cursor:pointer;user-select:none;transition:transform .15s,border-color .15s,background .15s,box-shadow .15s}
.private-room-panel .inventory-item:hover{transform:translateY(-2px);border-color:#ddc06d;background:#163a43;box-shadow:0 7px 15px #0003}
.private-room-panel .inventory-item:active{transform:scale(.98)}
.private-room-panel .inventory-item.is-equipped{border-color:#78c6a0;box-shadow:inset 0 0 0 1px #78c6a033}
.private-room-panel .inventory-item-art{grid-row:1 / span 2;width:36px;height:36px;margin-top:2px;border-color:#c6aa5b88;border-radius:9px;font-size:1.17rem}
.private-room-panel .inventory-item-copy .tier-tag{font-size:.55rem;line-height:1.3}
.private-room-panel .inventory-item h3{font-size:.78rem;line-height:1.35}
.private-room-panel .inventory-item .item-detail{font-size:.59rem;line-height:1.25}
.inventory-equip-hint{grid-column:1/-1;align-self:end;margin-top:.1rem;padding-top:.24rem;border-top:1px solid #ffffff12;color:var(--mint);font-size:.59rem;line-height:1.25}
.private-room-panel .helper-note{min-height:1rem;margin-top:.3rem;font-size:.7rem}
.private-room-panel .inventory-future-note{margin-top:.35rem;padding:.3rem .55rem;border-radius:8px;font-size:.69rem}
.inventory-future-note summary{cursor:pointer;color:#d8c992}
.inventory-future-note p{margin:.25rem 0 0}
.private-room-panel .builder-market-link{margin-top:.4rem;min-height:38px;padding:.42rem;font-size:.78rem}
@media(max-width:1000px){body:has(#screen-builder:not(.hidden)) main{width:min(100% - 2rem,850px)}.builder-layout{grid-template-columns:1fr}.preview-panel{position:relative;top:auto}.preview-stage{min-height:300px}.private-room-panel .inventory-grid{max-height:360px}}
@media(max-width:560px){body:has(#screen-builder:not(.hidden)) main{width:calc(100% - 1rem);padding-top:.65rem}.builder-screen .page-heading{display:grid;grid-template-columns:1fr auto;gap:.1rem .7rem;margin-bottom:.55rem}.builder-screen .page-heading>.text-button{grid-column:1/-1;width:auto}.builder-screen .page-heading>div{grid-column:1;grid-row:2}.builder-screen .page-heading>.button{grid-column:2;grid-row:2;align-self:center}.builder-screen .page-heading h1{font-size:1.55rem}.builder-layout{gap:.55rem}.preview-panel{padding:.55rem}.preview-stage{min-height:185px;margin:.4rem 0}.preview-stage .krathong-art{transform:translateY(-6px) scale(.78)}.preview-caption{font-size:.66rem}.private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.55rem!important}.private-room-panel .equipment-slots{grid-template-columns:repeat(2,minmax(0,1fr));gap:.3rem}.private-room-panel .equipment-slot{min-height:52px;padding:.28rem .38rem;gap:.35rem}.private-room-panel .equipment-slot-icon{width:30px;height:30px;font-size:1.1rem}.private-room-panel .equipment-slot-copy small{font-size:.59rem}.private-room-panel .equipment-slot-copy strong{font-size:.72rem}.private-room-panel .inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:330px}.private-room-panel .inventory-item{grid-template-columns:38px minmax(0,1fr);min-height:78px;padding:.42rem}.private-room-panel .inventory-item-art{width:36px;height:36px}.private-room-panel .inventory-item h3{font-size:.78rem}.inventory-control-hint{font-size:.62rem}.builder-layout .custom-actions{flex-direction:column}}
/* ห้องส่วนตัว: ช่องอุปกรณ์ล้อมรอบกระทงและกระเป๋าแบบช่องเกม */
.equipment-stage{position:relative}.equipment-stage .preview-stage{margin:0;min-height:330px}.equipment-stage .equipment-slots{position:absolute;inset:8px;display:grid;grid-template-columns:54px 1fr 54px;grid-template-rows:repeat(3,1fr);pointer-events:none;gap:.45rem}.equipment-stage .equipment-slot{pointer-events:auto;position:relative;align-self:center;justify-self:center;display:grid;place-items:center;width:54px;min-height:54px;padding:3px;border:1px solid #bca56088;border-radius:9px;background:#0a2231dd;cursor:pointer}.equipment-stage .equipment-slot:nth-child(2n){grid-column:3}.equipment-stage .equipment-slot:nth-child(2n+1){grid-column:1}.equipment-stage .equipment-slot-icon{width:44px;height:44px;font-size:1.5rem}.equipment-stage .equipment-slot-copy{position:absolute;bottom:-15px;max-width:70px;text-align:center}.equipment-stage .equipment-slot-copy small{font-size:.55rem;white-space:nowrap}.equipment-stage .equipment-slot-copy strong,.equipment-stage .equipped-check{display:none}.equipment-stage .equipment-slot.is-selected{border-color:var(--gold);box-shadow:0 0 10px #e8c96c88}.private-room-panel .inventory-grid{grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:5px;padding:10px;max-height:350px;border:1px solid #6d807459;border-radius:10px;background:#061a26}.private-room-panel .inventory-item{position:relative;display:grid;place-items:center;min-width:0;min-height:58px;aspect-ratio:1;padding:4px;border-radius:7px;background:#1b3742;cursor:pointer}.private-room-panel .inventory-item-art{grid-row:auto;width:100%;height:100%;border:0;background:none;font-size:1.7rem}.private-room-panel .inventory-item-copy,.private-room-panel .inventory-equip-hint{display:none}.private-room-panel .inventory-item.is-equipped{background:#28594e;border:2px solid #8ed8b3}.private-room-panel .inventory-item.is-equipped:after{content:'✓';position:absolute;right:2px;top:0;color:#b9ffe0;font-weight:bold;text-shadow:0 1px 3px #000}.private-room-panel .inventory-item:hover,.private-room-panel .inventory-item:focus-visible{outline:2px solid var(--gold);outline-offset:1px;z-index:1}@media(max-width:560px){.equipment-stage .preview-stage{min-height:240px}.equipment-stage .equipment-slots{grid-template-columns:46px 1fr 46px}.equipment-stage .equipment-slot{width:44px;min-height:44px}.equipment-stage .equipment-slot-icon{width:37px;height:37px;font-size:1.2rem}.private-room-panel .inventory-grid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr))}.private-room-panel .inventory-item{min-height:52px}}

/* คลังแบบตารางและหน้าต่างรายละเอียดไอเท็ม */
.private-room-panel .inventory-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;align-content:start}.private-room-panel .inventory-item{width:100%;min-height:44px;aspect-ratio:1}.private-room-panel .inventory-item-art{font-size:clamp(1.1rem,3vw,1.7rem)}

/* Optional per-item artwork. Catalog image assets take over only after loading; CSS/emoji art remains the fallback. */
.catalog-item-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}.item-art,.inventory-item-art,.equipment-slot-icon,#item-dialog-icon{position:relative;overflow:hidden}.item-art.has-item-image,.inventory-item-art.has-item-image,.equipment-slot-icon.has-item-image,#item-dialog-icon.has-item-image{display:grid;place-items:center}.item-art-fallback{display:block}.catalog-item-image[hidden],.item-art-fallback[hidden]{display:none}.krathong-art .krathong-item-image{display:none;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.krathong-art .asset-layer.has-item-image>.krathong-item-image{display:block}.krathong-art .k-base.has-item-image{background:none;border:0;box-shadow:none}.krathong-art .k-base.has-item-image:before{display:none}.krathong-art .k-middle.has-item-image{background:none;clip-path:none}.krathong-art .k-top.has-item-image{background:none;clip-path:none}.krathong-art.has-top-asset .k-candle,.krathong-art.has-top-asset .k-flame{display:none}.krathong-art .aura.has-item-image{inset:0;border:0;border-radius:0;box-shadow:none;background:none}.krathong-art .k-flower.has-item-image{color:transparent;font-size:0;filter:none}.krathong-art .k-flower.has-item-image:before,.krathong-art .k-flower.has-item-image:after{display:none}
.k-base.base-empty{background:linear-gradient(165deg,#9daaa0,#657770 70%,#50635c);border-color:#b1c3b5;box-shadow:inset 0 -8px #53645e}.k-base.base-empty:before{background:#c5d2c677}
.item-dialog{width:min(380px,calc(100vw - 2rem));max-width:none;max-height:calc(100dvh - 2rem);overflow:auto;margin:auto;padding:1rem;border:1px solid #d4b86b;border-radius:15px;color:var(--cream);background:linear-gradient(145deg,#123443,#091f30);box-shadow:0 20px 70px #000a}.item-dialog::backdrop{background:#04141db8}.item-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.item-dialog-eyebrow{color:#a7c8bd;font-size:.75rem;letter-spacing:.04em}.item-dialog-close{display:grid;place-items:center;width:44px;height:44px;border:1px solid #76938b;border-radius:9px;background:#0a2431;color:var(--cream);font-size:1.55rem;cursor:pointer}.item-dialog-body{display:grid;grid-template-columns:88px minmax(0,1fr);gap:.85rem;align-items:center;margin:.5rem 0 1rem}.item-dialog-icon{display:grid;place-items:center;aspect-ratio:1;border:1px solid #bba15d;border-radius:10px;background:#1a3a45;color:#f4d582;font-size:2.8rem}.item-dialog-info h3{margin:0 0 .25rem;font-size:1.2rem}.item-dialog-info p{margin:.25rem 0;color:var(--muted);font-size:.82rem}.item-dialog-tier{display:inline-block;padding:.12rem .5rem;border:1px solid #beaa6c;border-radius:5px;color:#f2d27b;font-size:.75rem}.item-dialog-actions{display:flex;flex-wrap:wrap;gap:.5rem;border-top:1px solid #75938a55;padding-top:.8rem}.item-dialog-action{flex:1;min-height:44px}.item-dialog button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(max-width:560px){.private-room-panel .inventory-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:8px}.private-room-panel .inventory-item{min-height:44px}.item-dialog{width:min(360px,calc(100vw - 2rem))}}
/* Clear, optional account path: play first as Guest, protect progress when ready. */
.welcome-signin{display:block;margin-top:.75rem;color:#b7d6cc;font-size:.88rem}
.privacy-note{display:flex;align-items:center;gap:.45rem}.privacy-note span{color:var(--mint);font-weight:800}
.home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-account-prompt{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:.85rem;align-items:center;margin-top:1rem;padding:1rem 1.15rem;border:1px solid #70a99655;border-radius:16px;background:linear-gradient(110deg,#123640,#0c2936)}
.home-account-icon{display:grid;place-items:center;width:44px;height:44px;border:1px solid #e1c56e88;border-radius:13px;background:#e6c65c14;color:var(--gold);font-size:1.55rem}
.home-account-prompt strong{display:block;color:var(--cream);font-size:.98rem}
.home-account-prompt p{margin:.18rem 0 0;color:var(--muted);font-size:.82rem;line-height:1.5}
.home-account-prompt .button{min-height:42px;white-space:nowrap}
.home-foot{margin-top:.8rem}
.account-layout{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.account-status-card{grid-column:1/-1;padding:1rem 1.2rem}
.account-status-card h2,.account-protect-card h2,.account-return-card h2{font-size:1.25rem}
.account-status-card p,.account-protect-card p,.account-return-card p{font-size:.87rem;line-height:1.55}
.guest-id-row{display:flex;gap:.5rem;align-items:stretch;margin:.65rem 0}
.guest-id-row code{flex:1;min-width:0;align-content:center}
.copy-guest-id{flex:0 0 44px;min-height:44px}
.guest-id-details{margin-top:.45rem;color:#c4d9d7;font-size:.8rem}.guest-id-details summary{width:max-content;max-width:100%;cursor:pointer}.retry-cloud-button{margin:.15rem 0 .4rem}
.account-protect-card{border-color:#78c6a066;background:linear-gradient(145deg,#123a3c,#0c2937)}
.account-layout-simple .account-card{min-width:0}
.account-protect-card .google-button{margin:.35rem 0 .15rem}
.account-protect-card .account-alternative{margin-top:.7rem}
.welcome-login-status{max-width:420px;margin:.55rem 0 0;line-height:1.5}
.google-button{display:flex;justify-content:center;align-items:center;gap:.7rem;width:100%;min-height:48px;margin-top:.55rem;padding:.65rem 1rem;border:1px solid #747775;border-radius:9px;background:#f2f2f2;color:#1f1f1f;font:500 .96rem Arial,sans-serif;cursor:pointer;transition:background .15s,box-shadow .15s}
.google-button svg{width:21px;height:21px;flex:none}
.google-button:hover{background:#fff;box-shadow:0 2px 8px #0003}
.google-button:focus-visible{outline:3px solid #80b8ff;outline-offset:2px}
.google-button:disabled{opacity:.68;cursor:wait}
.account-alternative{margin-top:.9rem;border-top:1px solid #71918a44;padding-top:.7rem}
.account-alternative summary{cursor:pointer;color:#bdd5cc;font-size:.84rem}
.account-alternative[open] summary{margin-bottom:.75rem}
.account-warning{padding:.65rem .75rem;border-left:3px solid #e2bc66;background:#e2bc6611;color:#d5c7a0!important}
.account-return-card .account-alternative{margin-top:1rem}
.account-card .helper-note:empty{display:none}
#google-setup-note[hidden],#line-setup-note[hidden]{display:none!important}
@media(max-width:700px){.account-layout{grid-template-columns:1fr}.account-status-card{grid-column:auto}}
@media(max-width:560px){.home-grid{grid-template-columns:1fr}.home-account-prompt{grid-template-columns:40px minmax(0,1fr);gap:.65rem;padding:.8rem}.home-account-icon{width:38px;height:38px}.home-account-prompt .button{grid-column:1/-1;width:100%}.home-account-prompt p{font-size:.78rem}.welcome-signin{font-size:.81rem}}
#google-setup-note[hidden],#line-setup-note[hidden]{display:none!important}
*[hidden]{display:none!important}

/* Entry screen: keep guest access and account choices together. */
.welcome-login{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem;margin-top:1rem;max-width:420px}.welcome-login .button{min-height:48px;margin-top:0}.welcome-login .button:disabled{opacity:.55;cursor:not-allowed}.welcome-back{margin-bottom:1rem;color:var(--mint)}.start-form label small{font-weight:400;color:var(--muted)}
.welcome-back{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;padding:.5rem .85rem;border:1px solid #71918a88;border-radius:12px;background:#123544;color:var(--cream);font:inherit;font-size:.85rem;font-weight:600;cursor:pointer}.welcome-back svg{width:21px;height:21px}.welcome-back:hover,.welcome-back:focus-visible{border-color:var(--gold);color:var(--gold)}
.currency.token{color:#b9a4ff}.token-topup-panel{align-items:flex-start;flex-wrap:wrap;border-color:#a48cff55;background:linear-gradient(120deg,#392c554a,#102d3b)}.token-topup-panel .topup-actions{justify-content:flex-end;max-width:620px}.token-topup-panel .button{border-color:#a48cff55}.token-topup-panel .helper-note{color:var(--mint)}
@media(max-width:560px){.welcome-login{grid-template-columns:1fr}.welcome-login .button{width:100%}}
/* Full-artboard item sprites share one transparent canvas and are layered by markup order. */
.krathong-art>.asset-layer.has-item-image{position:absolute;inset:0;width:100%;height:100%;z-index:auto}
.krathong-art>.k-base.asset-layer:not(.has-item-image),.krathong-art>.k-middle.asset-layer:not(.has-item-image),.krathong-art>.k-top.asset-layer:not(.has-item-image),.krathong-art>.aura.asset-layer:not(.has-item-image){visibility:hidden}
.krathong-art .krathong-item-image{object-fit:fill}

/* Daily Gold wheel: keep the hero clean and give the control a dimensional game-wheel treatment. */
.home-right-rail{display:flex;flex:0 0 230px;flex-direction:column;align-items:center;gap:1.35rem;margin:0 1rem 6rem 0}
.daily-wheel-card{display:grid;place-items:center;margin:0;padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none}
.daily-wheel-spin{position:relative;display:grid;place-items:center;width:218px;min-width:0;aspect-ratio:1;padding:12px;border:0;border-radius:50%;background:radial-gradient(circle,#ffe5a633 0 48%,transparent 71%);color:#503e78;box-shadow:0 15px 35px #0b123e70;cursor:pointer;transition:filter .2s,transform .2s}
.daily-wheel-spin:not(:disabled):hover{transform:translateY(-3px) scale(1.025);filter:brightness(1.08)}
.daily-wheel-spin:focus-visible{outline:3px solid #fff3b1;outline-offset:5px}
.daily-wheel-bezel{position:relative;display:grid;place-items:center;width:100%;height:100%;border:8px solid #edcf86;border-radius:50%;background:linear-gradient(145deg,#fff1ba,#9873a9 45%,#f4d279 68%,#946da7);box-shadow:inset 0 0 0 3px #fff6d7,0 0 0 5px #694e90,0 8px 16px #131541aa,0 0 28px #ffda7852}
.daily-wheel-bezel:before{position:absolute;inset:-10px;border-radius:50%;background:repeating-conic-gradient(#fff5c8 0deg 2deg,transparent 2deg 18deg);content:"";mask:radial-gradient(transparent 73%,#000 75% 82%,transparent 84%);filter:drop-shadow(0 0 3px #ffe8a5)}
.daily-wheel-disc{position:relative;display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border:3px solid #fdf1c0;border-radius:50%;background:repeating-conic-gradient(from -22.5deg,#fff2c2b0 0deg 1.5deg,transparent 1.5deg 45deg),conic-gradient(from -22.5deg,#e2799f 0deg 45deg,#f2cb70 45deg 90deg,#68b8b0 90deg 135deg,#837ac2 135deg 180deg,#df7399 180deg 225deg,#f0c66a 225deg 270deg,#61b2aa 270deg 315deg,#8c7cc4 315deg 360deg);box-shadow:inset 0 0 0 5px #fff5cc99,inset 0 0 20px #382a6a66}
.daily-wheel-disc:before{position:absolute;inset:10%;border:1px solid #fff4d7a6;border-radius:50%;content:"";box-shadow:inset 0 0 10px #fff6}
.daily-wheel-core{position:relative;z-index:1;display:grid;place-items:center;width:37%;aspect-ratio:1;border:4px solid #ffe9a4;border-radius:50%;background:radial-gradient(circle at 34% 26%,#ffe7a0,#df94bd 38%,#7e65ba 76%);box-shadow:0 0 0 4px #704d91,0 5px 12px #271a5899,inset 0 2px 5px #fff8;color:#fff1b5;font:900 1.65rem 'Mitr','Anuphan',var(--sans);text-shadow:0 2px 4px #48306f}
.daily-wheel-pointer{position:absolute;top:1px;left:50%;z-index:3;color:#fff0b1;font-size:1.45rem;line-height:1;text-shadow:0 2px 4px #1c174c,0 0 8px #ffdc82;transform:translateX(-50%)}
.daily-wheel-spin:disabled{filter:saturate(.72) brightness(.94);cursor:not-allowed}
.daily-wheel-spin.is-spinning .daily-wheel-disc{animation:daily-wheel-spin 1.3s cubic-bezier(.14,.78,.22,1) both}
.daily-wheel-spin.is-spinning .daily-wheel-core{animation:daily-wheel-counterspin 1.3s cubic-bezier(.14,.78,.22,1) both}
@keyframes daily-wheel-spin{to{transform:rotate(1440deg)}}
@keyframes daily-wheel-counterspin{to{transform:rotate(-1440deg)}}
.daily-wheel-result{width:min(390px,calc(100vw - 2rem));padding:1.1rem 1.25rem 1.4rem;border-color:#ffe09b;background:radial-gradient(ellipse at 50% 110%,#e3ad6533,transparent 58%),linear-gradient(145deg,#3e477d,#302f65 68%,#45366f);text-align:center}
.daily-wheel-result .game-modal-header{text-align:left}
.daily-wheel-result .modal-emblem{border-color:#fff0b9;background:linear-gradient(145deg,#fff0a6,#ffb7aa);box-shadow:0 0 20px #ffdc8659}
.daily-wheel-reward{display:flex;align-items:baseline;justify-content:center;gap:.35rem;margin:.55rem 0 .1rem;color:#ffe08b;text-shadow:0 3px 18px #ffcb5466}
.daily-wheel-reward>span{font-size:1.7rem;font-weight:800}
.daily-wheel-reward strong{font:900 clamp(3.4rem,15vw,5.5rem)/1 'Mitr','Anuphan',var(--sans);letter-spacing:-.04em}
.daily-wheel-reward small{font-size:1.35rem;font-weight:850}
@media(max-width:850px){.home-right-rail{position:absolute;top:50%;right:1.5rem;flex:none;gap:.85rem;width:190px;margin:0;transform:translateY(-50%)}.home-copy-block{max-width:calc(100% - 210px)}.daily-wheel-spin{width:178px}.home-moon-caption{margin:0}}
@media(max-width:560px){body.home-fullscreen .home-hero-content{display:grid;grid-template-columns:minmax(0,1fr) 112px;align-content:center;align-items:center;justify-content:stretch;gap:.55rem;padding:58px .8rem 6rem}.home-copy-block{width:auto;max-width:none;margin:0}.home-festival-label{font-size:.62rem;letter-spacing:.015em;gap:.4rem}.home-copy-block h1{font-size:clamp(2rem,8.5vw,2.65rem)!important;line-height:1.14}.home-copy-block .lead{font-size:.78rem;line-height:1.55}.home-copy-block .lead br{display:none}.home-actions{width:100%;max-width:none;gap:.45rem}.home-name-field{font-size:.72rem}.home-name-field>span{display:block}.home-name-field small{display:none}.home-name-field input{height:52px;min-height:52px;padding:.5rem .65rem;border-radius:14px;font-size:.8rem}.home-action-build{flex-basis:auto;min-height:52px;padding:.35rem .55rem;border-radius:14px}.home-action-icon{display:none}.home-action strong{font-size:.78rem;white-space:normal}.home-right-rail{position:static;top:auto;right:auto;align-self:center;justify-self:center;width:auto;margin:0;transform:none}.daily-wheel-spin{width:108px;padding:6px}.daily-wheel-bezel{border-width:5px}.daily-wheel-bezel:before{inset:-7px}.daily-wheel-pointer{top:-1px;font-size:1.1rem}.daily-wheel-core{border-width:3px;font-size:1rem}.home-moon-caption{display:none}.home-foot{bottom:5.5rem}.daily-wheel-result{padding:.9rem 1rem 1.15rem}}
@media(prefers-reduced-motion:reduce){.daily-wheel-spin,.daily-wheel-spin.is-spinning .daily-wheel-disc,.daily-wheel-spin.is-spinning .daily-wheel-core{transition:none;animation:none!important}}

.daily-wheel-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:520px;margin-top:1.25rem;padding:1rem 1.1rem;border:1px solid #ffe08a99;border-radius:20px;background:linear-gradient(125deg,#293b6beF,#40598eeF);box-shadow:0 12px 30px #0b173840;backdrop-filter:blur(8px)}
.daily-wheel-copy h2{margin:.15rem 0;font-size:1.3rem;color:#ffe28a}.daily-wheel-copy p{margin:.3rem 0 0;color:#f4f0e8;font-size:.86rem}
.daily-wheel-spin{position:relative;display:grid;justify-items:center;gap:.2rem;min-width:132px;padding:.25rem .6rem .5rem;border:0;background:transparent;color:#ffe28a;font:inherit;font-weight:800;cursor:pointer}
.daily-wheel-disc{display:grid;place-items:center;width:70px;height:70px;border:4px solid #fff0b5;border-radius:50%;background:conic-gradient(#ed758f 0 45deg,#ffd267 45deg 90deg,#79cbb1 90deg 135deg,#8c86d9 135deg 180deg,#ed758f 180deg 225deg,#ffd267 225deg 270deg,#79cbb1 270deg 315deg,#8c86d9 315deg);box-shadow:0 0 0 3px #7255a6,0 5px 15px #111b40aa;color:#40366c;text-shadow:0 1px #fff9;font-size:1.25rem}
.daily-wheel-pointer{position:absolute;top:-.3rem;z-index:1;color:#fff2bd;font-size:1rem;text-shadow:0 2px 5px #1b234b}
.daily-wheel-button-label{font-size:.75rem}.daily-wheel-copy small{display:block;margin-top:.4rem;color:#dce5ff;font-size:.68rem}.daily-wheel-spin:disabled{opacity:.58;cursor:default}
.daily-wheel-spin.is-spinning .daily-wheel-disc{animation:daily-wheel-spin .95s cubic-bezier(.17,.72,.26,1) infinite}
@keyframes daily-wheel-spin{to{transform:rotate(1080deg)}}
@media(max-width:560px){.daily-wheel-card{align-items:flex-start;margin-top:.85rem;padding:.8rem;border-radius:16px}.daily-wheel-copy p{max-width:230px;font-size:.77rem}.daily-wheel-spin{min-width:100px;padding-inline:.2rem}.daily-wheel-disc{width:58px;height:58px}}
.krathong-art .aura:not(.aura-visible):not(.has-item-image){opacity:0}
.krathong-art .aura-procedural{inset:0;z-index:0;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none;isolation:isolate}
.krathong-art .aura-live-canvas{position:absolute;left:-32.5%;top:-47%;display:block;width:165%;height:180%;max-width:none;pointer-events:none;mix-blend-mode:screen}
.krathong-art .k-base,.krathong-art .k-middle,.krathong-art .k-top{z-index:1}
.krathong-art>.k-top.has-item-image{z-index:3}
.krathong-art .k-mascot{position:absolute;z-index:5;left:calc(50% - 74px);bottom:36px;width:72px;height:52px;display:grid;place-items:center;font-size:2.2rem;filter:drop-shadow(0 2px 4px #17271c99)}
.krathong-art .k-mascot.mascot-large{z-index:2;transform:translateX(52px) scale(.75);transform-origin:50% 82%}
.krathong-art .k-mascot.has-item-image{color:transparent;font-size:0;filter:none}

/* Account, Token packages, and the five main destinations. */
.bottom-nav{width:min(520px,calc(100% - 1rem));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.2rem;padding:.35rem;bottom:max(.5rem,env(safe-area-inset-bottom));border-radius:20px}
.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.16rem;min-width:0;min-height:56px;padding:.35rem .1rem;line-height:1.1}
.bottom-nav button svg{width:22px;height:22px;flex:none}.bottom-nav button span{font-size:.68rem;white-space:nowrap}
.shop-credit-link{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:1rem 0;padding:1rem 1.2rem;border:1px solid #a48cff55;border-radius:15px;background:#a48cff0d}
.shop-credit-link strong{color:var(--cream)}.shop-credit-link p{margin:.15rem 0 0;color:var(--muted);font-size:.85rem}
.token-topup-panel{display:block;padding:clamp(1.1rem,2.5vw,1.6rem);margin:0 0 1rem}.token-topup-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}.token-topup-heading h2{font-size:1.75rem}.token-balance-card{min-width:180px;padding:.8rem 1rem;border:1px solid #ae9be555;border-radius:13px;background:#081e2b88}.token-balance-card>span{display:block;color:var(--muted);font-size:.75rem}.token-balance-card strong{display:block;color:#d8ccff;font-size:1.5rem;line-height:1.3}.token-balance-card strong span:first-child{font-size:1rem}
.token-topup-panel .topup-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:none;gap:.55rem}.token-topup-panel .topup-actions .button{min-width:0;min-height:108px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:.25rem;padding:.8rem;text-align:left;background:#112e3e}.token-pack-name{font-size:.72rem;color:var(--mint)}.token-topup-panel .topup-actions strong{font-size:.95rem;color:var(--cream)}.token-pack-price{font-size:.85rem;color:#d8ccff}.token-topup-panel .helper-note{margin-top:.9rem}
@media(max-width:850px){.token-topup-panel .topup-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.bottom-nav button{min-height:55px}.bottom-nav button span{font-size:.62rem}.shop-credit-link{align-items:flex-start;flex-direction:column}.shop-credit-link .button{width:100%}.token-topup-heading{align-items:stretch;flex-direction:column}.token-balance-card{min-width:0}.token-topup-panel .topup-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.token-topup-panel .topup-actions .button{min-height:96px}}
.token-topup-panel .topup-actions .button:disabled{opacity:.7;cursor:not-allowed}
.token-checkout-dialog{width:min(760px,calc(100% - 24px));max-width:760px;height:auto;max-height:90dvh;box-sizing:border-box;padding:0;border:1px solid #496873;border-radius:18px;background:#fff;color:#182f3a;box-shadow:0 24px 80px #0009;overflow:auto}
.token-checkout-dialog--checkout{height:min(720px,90dvh)}
.token-checkout-dialog--qr{width:min(380px,calc(100% - 24px));max-width:380px;height:fit-content;min-height:0;max-height:90dvh}
.token-checkout-dialog--qr .token-checkout-header{padding:.8rem 1rem}
.token-checkout-dialog--qr .token-checkout-summary{margin:.7rem 1rem 0;padding:.65rem .8rem}
.token-checkout-dialog--qr .token-checkout-content{min-height:0;padding:.25rem .75rem .5rem}
.token-checkout-dialog--method-picker{width:min(520px,calc(100% - 24px));max-width:520px;min-height:0}
.token-checkout-dialog--method-picker .token-checkout-content{min-height:0;padding:.5rem 1.25rem 1.1rem}
.token-checkout-dialog::backdrop{background:#00121ddd}
.token-checkout-header{display:flex;justify-content:space-between;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid #e4e8eb;background:#f8fafb}
.token-checkout-header strong{display:block;font-size:1.1rem}.token-checkout-eyebrow{display:block;margin-bottom:.2rem;color:#58746f;font-size:.72rem;font-weight:700;letter-spacing:.04em}.token-checkout-header p{max-width:560px;margin:.25rem 0 0;font-size:.85rem;color:#536b74}.token-checkout-header button{flex:none;width:42px;height:42px;border:1px solid #d4e0e3;border-radius:50%;background:#fff;color:#304b57;font-size:1.7rem;line-height:1;cursor:pointer}.token-checkout-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1rem 1.25rem 0;padding:.8rem 1rem;border:1px solid #dce6e8;border-radius:12px;background:#f5f8fa}.token-checkout-package{color:#304b57;font-weight:700}.token-checkout-amount{color:#5946d8;font-size:1.2rem}.token-checkout-content{min-height:280px;padding:.75rem 1rem 1rem}.token-checkout-loading{display:flex;min-height:250px;align-items:center;justify-content:center;gap:.75rem;color:#536b74}.token-checkout-spinner{width:20px;height:20px;border:2px solid #d8dfe5;border-top-color:#5946d8;border-radius:50%;animation:token-checkout-spin .8s linear infinite}@keyframes token-checkout-spin{to{transform:rotate(360deg)}}.token-checkout-error{display:grid;min-height:0;place-items:center;padding:1rem;color:#9a3d3d;text-align:center}
@media(max-width:600px){.token-checkout-dialog{max-height:94dvh;border-radius:16px}.token-checkout-header{padding:.9rem}.token-checkout-header p{font-size:.8rem}.token-checkout-summary{margin:.75rem .9rem 0;padding:.7rem .8rem}.token-checkout-content{padding:.5rem}}
.token-checkout-actions{display:grid;gap:.65rem;max-width:520px;margin:1rem auto}.token-checkout-actions button{min-height:58px;padding:.8rem 1rem;border:1px solid #ded9ff;border-radius:12px;background:#5b43df;color:#fff;font:inherit;font-weight:700;cursor:pointer}.token-checkout-actions button:hover{background:#4a34c7}.token-checkout-actions .token-checkout-card{min-height:50px;border-color:#dce2e7;background:#fff;color:#243746}.token-checkout-actions .token-checkout-card:hover{background:#f4f6f8}.token-checkout-actions button:disabled{opacity:.6;cursor:wait}.token-checkout-footnote{margin:.85rem 0 0;color:#637680;font-size:.8rem;text-align:center}.token-checkout-content [hidden]{display:none!important}
.gacha-panel{margin:2rem 0 1.4rem;padding:1.2rem;border:1px solid #d7b96855;border-radius:18px;background:radial-gradient(ellipse at 80% 0%,#75498a55,transparent 42%),linear-gradient(145deg,#123440,#0a2431)}.gacha-heading{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.gacha-heading h2{font:500 1.8rem var(--serif);margin:.2rem 0}.gacha-heading p{color:var(--muted);margin:0;font-size:.86rem}.gacha-balance{display:grid;gap:.1rem;min-width:118px;padding:.7rem .9rem;border:1px solid #b79ad455;border-radius:12px;color:var(--muted);font-size:.75rem}.gacha-balance strong{font-size:1.4rem;color:#d6c4ff}.gacha-balance b{color:var(--cream)}.gacha-actions{display:flex;gap:.7rem;margin:1rem 0}.gacha-actions .button{flex:1}.gacha-panel>.helper-note{min-height:1.4em}.shard-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.shard-item{min-height:170px}.shard-item .item-art{height:52px}.shard-item .button{margin-top:auto}.shop-credit-link{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.2rem;margin:1rem 0;border:1px solid #47706977;border-radius:14px;background:#102d39}.shop-credit-link p{margin:.2rem 0 0;color:var(--muted);font-size:.82rem}
.play-reward-panel{margin:1.2rem 0;padding:1.1rem 1.2rem;border:1px solid #77bfa055;border-radius:16px;background:linear-gradient(130deg,#123a3c,#102e3b)}.play-reward-heading{display:flex;align-items:center;justify-content:space-between}.play-reward-heading h2{font:500 1.45rem var(--serif);margin:.15rem 0}.play-reward-heading p{margin:.2rem 0;color:var(--muted);font-size:.84rem}.play-reward-mark{color:var(--gold);font-size:1.8rem}.play-reward-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;margin:.8rem 0}.play-reward-row{display:grid;gap:.45rem;padding:.7rem;border:1px solid #47706977;border-radius:12px;background:#0d2835}.play-reward-row>span{font-size:.78rem;color:var(--cream)}.play-reward-row .button{min-height:36px;padding:.35rem;font-size:.75rem}.play-reward-panel>.helper-note{margin:.35rem 0 0;color:var(--muted);font-size:.76rem}
@media(max-width:800px){.shard-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.gacha-panel{padding:.85rem}.gacha-heading{display:block}.gacha-balance{display:flex;align-items:center;justify-content:space-between;margin-top:.8rem}.gacha-actions{flex-direction:column}.shard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-credit-link{align-items:flex-start;flex-direction:column}.play-reward-panel{padding:.85rem}.play-reward-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.token-checkout-qr{display:flex;flex-direction:column;align-items:center;gap:.6rem;text-align:center;color:#243746;padding:.5rem .25rem}.token-checkout-qr strong{font-size:1.1rem}.token-checkout-qr img{display:block;width:min(128px,38vw);height:auto;border:1px solid #dce2e7;border-radius:12px;background:#fff;padding:8px;box-sizing:border-box;image-rendering:pixelated}.token-checkout-qr p{margin:0;color:#536b74}.token-checkout-success{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;padding:1.5rem;text-align:center;color:#243746}.token-checkout-success-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#e8f7ef;color:#16834a;font-size:2rem;font-weight:800}.token-checkout-success>strong{font-size:1.3rem}.token-checkout-success p{margin:0;color:#536b74}.token-checkout-success .token-checkout-success-balance{color:#5b43df;font-weight:700}.token-checkout-success .token-checkout-promptpay{margin-top:.6rem;min-height:52px;padding:.7rem 1.2rem;border:0;border-radius:12px;background:#5b43df;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.krathong-art .item-motion.motion-petal-breath{animation:item-petal-breath 3.8s ease-in-out infinite;transform-origin:50% 76%}
.krathong-art .item-motion.motion-naga-wave{animation:item-naga-wave 4.4s ease-in-out infinite;transform-origin:50% 78%}
.krathong-art .item-motion.motion-moonflame{animation:item-moonflame 2.2s ease-in-out infinite;transform-origin:50% 88%}
.krathong-art .item-motion.motion-petal-twinkle{animation:item-petal-twinkle 2.8s ease-in-out infinite;transform-origin:50% 80%}
.krathong-art .item-motion.motion-mascot-breathe{animation:item-mascot-breathe 3.4s ease-in-out infinite;transform-origin:50% 88%}
.krathong-art .item-motion.motion-sparkle-lower{animation:item-base-sway 3.8s ease-in-out infinite;transform-origin:50% 86%}
.krathong-art .item-motion.motion-sparkle-ring{animation:item-ring-rock 3.3s ease-in-out infinite;transform-origin:50% 76%}
@keyframes item-petal-breath{0%,100%{filter:drop-shadow(0 0 2px #aee6ff55);transform:rotate(-3deg) translateY(1px)}50%{filter:drop-shadow(0 0 9px #b9dfffaa);transform:rotate(3deg) translateY(-2px)}}
@keyframes item-naga-wave{0%,100%{filter:drop-shadow(0 0 2px #ffc24455);transform:translateY(0) rotate(-6deg)}25%{transform:translateY(-2px) rotate(-1deg)}50%{filter:drop-shadow(0 0 10px #ff963b99);transform:translateY(0) rotate(6deg)}75%{transform:translateY(-2px) rotate(1deg)}}
@keyframes item-moonflame{0%,100%{filter:brightness(1) drop-shadow(0 0 2px #ffe6a255);transform:rotate(-2deg) translateY(1px)}50%{filter:brightness(1.12) drop-shadow(0 0 9px #ffe6a2aa);transform:rotate(2deg) translateY(-3px)}}
@keyframes item-petal-twinkle{0%,100%{filter:drop-shadow(0 0 1px #ff8fbd55);transform:rotate(-4deg) translateY(1px)}50%{filter:drop-shadow(0 0 9px #ff9bcfaa);transform:rotate(4deg) translateY(-2px)}}
@keyframes item-mascot-breathe{0%,100%{filter:drop-shadow(0 2px 4px #17271c99);transform:translateY(0) rotate(-1.8deg)}50%{filter:drop-shadow(0 2px 8px #9fe9ffaa);transform:translateY(-6px) rotate(2deg)}}
@keyframes item-base-sway{0%,100%{filter:drop-shadow(0 2px 4px #24345b55);transform:translateY(0) rotate(-1.6deg)}50%{filter:drop-shadow(0 3px 9px #ffdf9d88);transform:translateY(-3px) rotate(1.8deg)}}
@keyframes item-ring-rock{0%,100%{filter:drop-shadow(0 2px 4px #24345b55);transform:translateY(0) rotate(-3.5deg)}50%{filter:drop-shadow(0 3px 9px #ffdf9d88);transform:translateY(-2px) rotate(3.5deg)}}
@media(prefers-reduced-motion:reduce){.krathong-art .item-motion{animation:none!important}}
.gacha-rules{margin:1rem 0;padding:.7rem .9rem;border:1px solid #47706977;border-radius:12px;background:#0b2532;color:var(--muted)}
.gacha-rules summary{color:var(--mint);font-weight:600;cursor:pointer}
.gacha-rules-content{padding:.7rem 0 .1rem;font-size:.82rem}
.gacha-rules-content>p{margin:0 0 .65rem}
.gacha-rate-table-wrap{overflow-x:auto}
.gacha-rate-table{width:100%;min-width:610px;border-collapse:collapse;font-size:.76rem}
.gacha-rate-table th,.gacha-rate-table td{padding:.5rem .6rem;border-bottom:1px solid #47706955;text-align:left;white-space:nowrap}
.gacha-rate-table thead th{color:var(--mint);font-weight:600}
.gacha-rate-table tbody th{color:var(--gold)}
.gacha-rules-content ul{margin:.7rem 0 0;padding-left:1.2rem}
.gacha-rules-content li{margin:.28rem 0}

/* River scene layers: fixed viewport, horizontally pannable two-panel world. */
.river-wrap{isolation:isolate}
.river-viewport{position:absolute;inset:0;z-index:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#cda95b88 #08243555}
.river-world{position:relative;height:100%;flex:none;overflow:hidden}
.river-world canvas{position:absolute;inset:0;width:100%;height:100%;max-width:none}
#river-background{z-index:0;pointer-events:none}
#river-water{z-index:1;pointer-events:none}
#river-foreground{z-index:2;pointer-events:none}
#river-canvas{z-index:3;pointer-events:auto;touch-action:pan-x}
.river-overlay,.river-controls{z-index:4}
.river-viewport::-webkit-scrollbar{height:7px}
.river-viewport::-webkit-scrollbar-track{background:#08243555;border-radius:99px}
.river-viewport::-webkit-scrollbar-thumb{background:#cda95b88;border:2px solid #08243555;border-radius:99px}
.river-overview-panel{position:absolute;z-index:4;left:1rem;top:3.8rem;width:min(210px,38vw);padding:.45rem .5rem .5rem;display:grid;grid-template-columns:1fr auto;align-items:center;gap:.35rem .55rem;border:1px solid #8ab5a477;border-radius:12px;background:#082532db;box-shadow:0 8px 22px #03121d66;backdrop-filter:blur(8px)}
.river-overview-panel canvas{grid-column:1/-1;width:100%;height:auto;aspect-ratio:2.4;border-radius:7px;cursor:pointer}
.river-overview-panel span{color:#c2d5ca;font-size:.67rem}
.river-overview-panel button{border:0;border-radius:99px;padding:.28rem .5rem;background:#21464a;color:#f2d990;font:inherit;font-size:.67rem;cursor:pointer}
@media(max-width:560px){.river-overview-panel{left:.6rem;top:3.6rem;width:min(168px,42vw);padding:.32rem}.river-overview-panel span,.river-overview-panel button{font-size:.58rem}}

/* Market redesign: a framed item mall with a persistent krathong preview. */
.shop-layout{display:grid;grid-template-columns:minmax(250px,.34fr) minmax(0,1fr);gap:1rem;align-items:start}
.shop-sidebar{position:sticky;top:92px;display:grid;gap:.8rem;min-width:0}
.shop-showcase,.shop-main-panel{position:relative;overflow:hidden;border:1px solid #c5a45e88;border-radius:16px;background:linear-gradient(145deg,#122f3e,#0a2230 60%,#172b33);box-shadow:inset 0 0 0 3px #d4b25a12,0 14px 36px #0003}
.shop-showcase{padding:1rem}
.shop-showcase:before,.shop-main-panel:before{position:absolute;inset:6px;border:1px solid #dfc27335;border-radius:11px;content:"";pointer-events:none}
.shop-panel-heading,.shop-window-heading{position:relative;display:flex;align-items:center;gap:.7rem}
.shop-panel-heading h2,.shop-window-heading h2{margin:.1rem 0 0;font:500 1.35rem var(--serif);color:var(--cream)}
.shop-ornament,.shop-window-mark{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid #d7b66099;border-radius:50%;background:radial-gradient(circle,#725d2c,#192f38 70%);color:var(--gold);font-size:1.25rem}
.shop-preview-stage{position:relative;display:grid;place-items:center;min-height:270px;margin:.8rem 0 .7rem;overflow:hidden;border:1px solid #bd9c5a66;border-radius:12px;background:radial-gradient(ellipse at 50% 78%,#b89b4a3b,transparent 44%),linear-gradient(180deg,#153e50,#0b2533 72%,#102d35)}
.shop-preview-stage:after{position:absolute;bottom:17%;width:76%;height:1px;background:#e8d28b66;box-shadow:0 12px #e8d28b24,0 28px #e8d28b18;content:""}
.shop-preview-stage .krathong-art{width:min(235px,84%);height:185px;transform:translateY(-3px) scale(.9);filter:drop-shadow(0 8px 22px #efcc6a77)}
.shop-preview-caption{display:grid;gap:.1rem;padding:.1rem .2rem .6rem;font-size:.8rem;color:var(--muted)}
.shop-preview-caption strong{color:var(--cream);font-size:.92rem}
.shop-preview-action{width:100%;min-height:44px;border-color:#c9a55388;background:linear-gradient(145deg,#233b40,#102a36)}
.shop-credit-link{display:grid;gap:.7rem;margin:0;padding:1rem;border:1px solid #9b85e866;border-radius:14px;background:linear-gradient(140deg,#382f5044,#122b3a)}
.shop-credit-link>div{display:grid;gap:.2rem}
.shop-credit-link strong{font-family:var(--serif);font-size:1.1rem;color:#e6dcff}
.shop-credit-link p{margin:0;color:var(--muted);font-size:.8rem}
.shop-credit-link .button{width:100%;border-color:#a48cff55}
.shop-main-panel{min-width:0;padding:1rem}
.shop-window-heading{justify-content:space-between;padding:.15rem .25rem .85rem;border-bottom:1px solid #d3b66642;margin-bottom:.8rem}
.shop-window-mark{width:42px;height:42px;font-size:1.5rem}
.shop-notice{position:relative;margin:0 0 .7rem;padding:.8rem 1rem;border-color:#b3914c66;background:linear-gradient(100deg,#2a281f,#172f39 65%);color:#d8d0ba}
.shop-notice p{font-size:.84rem;line-height:1.5}
.shop-section-nav{position:sticky;top:78px;z-index:4;display:flex;gap:.35rem;margin:0 0 .9rem;padding:.35rem;border:1px solid #c7a45555;border-radius:12px;background:#092432ed;backdrop-filter:blur(12px)}
.shop-section-nav button{flex:1;min-height:42px;padding:.45rem .6rem;border:1px solid transparent;border-radius:8px;background:transparent;color:#b9c8bd;font:600 .8rem var(--sans);cursor:pointer;transition:color .15s,border-color .15s,background .15s}
.shop-section-nav button:hover,.shop-section-nav button.active{border-color:#e4c76b66;background:linear-gradient(135deg,#e7c773,#ab8640);color:#1a2b30}
.shop-screen #shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;scroll-margin-top:90px}
.shop-screen .shop-item{position:relative;min-width:0;min-height:245px;overflow:hidden;padding:.7rem;border:1px solid #b9984f99;border-radius:11px;background:linear-gradient(150deg,#40331e,#201f20 58%,#182c36);box-shadow:inset 0 0 0 2px #e3c36d18,0 5px 15px #0003}
.shop-screen .shop-item:before{position:absolute;inset:4px;border:1px solid #e5cb7d38;border-radius:7px;content:"";pointer-events:none}
.shop-screen .shop-item:after{position:absolute;top:5px;right:10px;color:#f4d98988;font-size:.8rem;content:"✦"}
.shop-screen .shop-item.tier-3{border-color:#d6b95bd1;background:linear-gradient(150deg,#59431e,#292522 58%,#172e38)}
.shop-screen .shop-item.tier-4{border-color:#b497d4;background:linear-gradient(150deg,#43315b,#242334 58%,#182d3a)}
.shop-screen .shop-item .item-art{position:relative;height:104px;margin:0 0 .55rem;border:1px solid #c4a65e66;border-radius:8px;background:radial-gradient(ellipse at 50% 70%,#d9b45738,transparent 65%),linear-gradient(145deg,#182d36,#0c222e)}
.shop-screen .shop-item .item-art img{padding:7px}
.shop-screen .shop-item .tier-tag{position:relative;margin:0 0 .25rem;border-color:#c7a85c77;color:#f1d684;background:#281f164f}
.shop-screen .shop-item h3{position:relative;min-height:1.4em;margin:.05rem 0;font:500 1.05rem var(--serif);color:#fff4d4}
.shop-screen .shop-item .item-detail{position:relative;min-height:2.2em;margin:0 0 .5rem;color:#c6c5b7;font-size:.72rem}
.shop-screen .shop-item .item-owned{position:relative;padding:.35rem 0;color:#9fe0c4;font-size:.78rem}
.shop-screen .shop-item .item-actions{position:relative;gap:.3rem}
.shop-screen .shop-item .item-actions .button{min-height:37px;padding:.35rem .4rem;border-color:#cfad5d99;background:linear-gradient(145deg,#33302a,#202a30);font-size:.72rem;color:#f4e8c7}
.shop-screen .shop-item .item-actions .button:hover:not(:disabled){border-color:#f0d37b;background:linear-gradient(145deg,#7d6331,#423722);color:#fff5d6}
.shop-screen .shop-item .item-actions .button:disabled{opacity:.52}
.shop-screen .gacha-panel{scroll-margin-top:90px;border-color:#c6a4598c;background:radial-gradient(ellipse at 84% 0%,#78572b44,transparent 43%),linear-gradient(145deg,#142f3c,#0a2230);box-shadow:inset 0 0 0 2px #d4b25a10,0 10px 28px #0002}
.shop-screen #shard-grid{scroll-margin-top:90px}
.shop-screen .gacha-actions .button.primary{background:linear-gradient(135deg,#f2d27d,#b88d3d)}
.shop-screen .subsection-title{color:#f0d88f}
.account-screen .token-topup-panel{position:relative;overflow:hidden;margin-top:1rem;border:1px solid #c2a45f99;border-radius:18px;background:radial-gradient(ellipse at 100% 0%,#7359ad35,transparent 42%),linear-gradient(145deg,#172f3b,#0a2230);box-shadow:inset 0 0 0 3px #d3b56612,0 12px 32px #0002}
.account-screen .token-topup-panel:before{position:absolute;inset:6px;border:1px solid #d9c17736;border-radius:12px;content:"";pointer-events:none}
.account-screen .token-topup-heading,.account-screen .token-topup-panel .topup-actions,.account-screen .token-topup-panel>.helper-note{position:relative}
.account-screen .token-balance-card{border-color:#c0a25777;background:#071e2b}
.account-screen .token-topup-panel .topup-actions .button{border-color:#c1a35c88;background:linear-gradient(145deg,#1c3742,#102b38);box-shadow:inset 0 0 0 1px #e2c36912}
.account-screen .token-topup-panel .topup-actions .button:not(:disabled):hover{border-color:#f0d17a;background:linear-gradient(145deg,#40391f,#233640)}
.account-screen .token-topup-panel .topup-actions .button:disabled{opacity:.66;color:#d3d0c4}
.shop-screen .page-heading h1,.account-screen .page-heading h1{letter-spacing:-.02em}
.topbar .brand{white-space:nowrap}
@media(max-width:1000px){.shop-layout{grid-template-columns:1fr}.shop-sidebar{position:static;grid-template-columns:minmax(0,1fr) minmax(240px,.75fr);align-items:stretch}.shop-preview-stage{min-height:230px}.shop-preview-stage .krathong-art{transform:translateY(-3px) scale(.78)}}
@media(max-width:700px){.shop-sidebar{grid-template-columns:1fr}.shop-showcase{display:grid;grid-template-columns:minmax(0,1fr) minmax(115px,.55fr);column-gap:.7rem;align-items:center}.shop-panel-heading{grid-column:1/-1}.shop-preview-stage{grid-column:2;grid-row:2/4;min-height:175px;margin:.45rem 0}.shop-preview-stage .krathong-art{transform:translateY(-3px) scale(.62)}.shop-preview-caption{grid-column:1;grid-row:2}.shop-preview-action{grid-column:1;grid-row:3;align-self:start}.shop-credit-link{grid-template-columns:1fr auto;align-items:center}.shop-credit-link .button{width:auto;white-space:nowrap}.shop-main-panel{padding:.75rem}.shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.shop-screen .shop-item{min-height:228px;padding:.55rem}.shop-screen .shop-item .item-art{height:88px}.shop-screen .shop-item h3{font-size:.92rem}.shop-screen .shop-item .item-detail{font-size:.68rem}.shop-screen .shop-item .item-actions .button{font-size:.67rem}.shop-section-nav{top:66px}}
@media(max-width:420px){.shop-showcase{grid-template-columns:minmax(0,1fr) minmax(100px,.48fr);padding:.75rem}.shop-preview-stage{min-height:155px}.shop-preview-stage .krathong-art{transform:translateY(-3px) scale(.54)}.shop-preview-caption span{font-size:.72rem}.shop-credit-link{grid-template-columns:1fr}.shop-credit-link .button{width:100%}.shop-section-nav button{font-size:.7rem;padding:.35rem .25rem}.shop-screen .shop-item .item-actions{flex-direction:column}.shop-screen .shop-item .item-actions .button{width:100%}.shop-screen .shop-item .item-art{height:74px}}
@media(prefers-reduced-motion:reduce){.shop-section-nav button{transition:none}}

/* The playable river is the game view; the province-room prototype is not a second player page. */
body.river-fullscreen{height:100vh;height:100dvh;min-height:0;overflow:hidden;background:#071b2a}
body.river-fullscreen>.topbar{display:none}
body.river-fullscreen>main{width:100%;height:100vh;height:100dvh;margin:0;padding:0;overflow:hidden}
body.river-fullscreen #screen-river{height:100%;min-height:0;padding:0;display:flex;flex-direction:column;animation:none}
body.river-fullscreen .river-heading,body.river-fullscreen .river-bottom{display:none}
body.river-fullscreen .river-wrap{flex:1;width:100%;height:100%;min-height:0;border:0;border-radius:0}
body.river-fullscreen #bottom-nav{display:none!important}
.river-fullscreen-topbar{position:absolute;z-index:5;top:max(.75rem,env(safe-area-inset-top));left:max(1rem,env(safe-area-inset-left));right:max(1rem,env(safe-area-inset-right));display:flex;align-items:stretch;gap:.65rem}
.river-top-action{min-height:52px;padding:.55rem .95rem;border:1px solid #a6c1b58a;border-radius:14px;background:#102c43d9;color:#f6eedb;font-weight:650;white-space:nowrap;backdrop-filter:blur(10px);cursor:pointer}
.river-place-chip{min-width:0;flex:1;display:flex;align-items:center;gap:.75rem;padding:.45rem 1rem;border:1px solid #a6c1b58a;border-radius:14px;background:#102c43d9;backdrop-filter:blur(10px)}
.river-place-chip>span:first-child{color:var(--gold);font-size:1.35rem}
.river-place-chip>div{min-width:0;display:grid;line-height:1.25}
.river-place-chip small{color:#c2d6cd;font-size:.72rem}
.river-place-chip strong{overflow:hidden;color:var(--cream);text-overflow:ellipsis;white-space:nowrap}
.river-place-count{margin-left:auto;color:#c2d6cd;font-size:.78rem;white-space:nowrap}
body.river-fullscreen .river-overlay{inset:5.4rem 1rem auto;justify-content:flex-end}
body.river-fullscreen .river-overlay .night-label{display:none}
body.river-fullscreen .river-overview-panel{top:4.8rem;left:1rem}
body.river-fullscreen .river-controls{left:1rem;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));min-height:76px}
@media(max-width:560px){.river-fullscreen-topbar{left:.55rem;right:.55rem;top:max(.55rem,env(safe-area-inset-top));gap:.35rem}.river-top-action{min-height:44px;padding:.4rem .55rem;border-radius:11px;font-size:.78rem}.river-place-chip{gap:.4rem;padding:.35rem .55rem}.river-place-chip>span:first-child{font-size:1rem}.river-place-chip small{font-size:.58rem}.river-place-chip strong{font-size:.72rem}.river-place-count{display:none}body.river-fullscreen .river-overview-panel{top:4.5rem;left:.55rem}body.river-fullscreen .river-overlay{inset:4.5rem .55rem auto}body.river-fullscreen .river-controls{left:.55rem;right:.55rem;bottom:max(.55rem,env(safe-area-inset-bottom));padding:.65rem;align-items:flex-end}}
.gacha-history{display:grid;gap:.35rem;margin:0;padding-left:1.5rem;color:var(--muted);font-size:.78rem}
.gacha-history li{padding:.4rem .55rem;border-bottom:1px solid #47706944}

.seo-intro{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:2rem;align-items:center;margin:1rem 0 3rem;padding:1.5rem clamp(1rem,4vw,2.5rem);border:1px solid #47706955;border-radius:18px;background:linear-gradient(130deg,#102c38dd,#0a202ddd);box-shadow:0 18px 50px #03121c44}
.seo-intro-copy{max-width:52rem}.seo-intro .eyebrow{margin-bottom:.55rem}.seo-intro h2{margin:.2rem 0 .7rem;font-family:var(--serif,Georgia,serif);font-size:clamp(1.35rem,2.5vw,2rem);line-height:1.35;color:var(--cream)}.seo-intro p{max-width:52rem;margin:0;color:var(--muted);line-height:1.8}
.seo-steps{display:grid;gap:.7rem;margin:0;padding:0;list-style:none;counter-reset:seo-step}.seo-steps li{counter-increment:seo-step;display:grid;grid-template-columns:2rem 1fr;column-gap:.65rem;align-items:center}.seo-steps li:before{content:counter(seo-step);grid-row:span 2;display:grid;place-items:center;width:2rem;height:2rem;border:1px solid #ba9d5f88;border-radius:50%;color:#e0c77f}.seo-steps strong{font-size:.9rem;color:#e9e3d2}.seo-steps span{font-size:.8rem;color:var(--muted)}
@media(max-width:850px){.seo-intro{grid-template-columns:1fr;gap:1.1rem}}
@media(max-width:560px){.seo-intro{margin:0 0 2rem;padding:1.1rem;border-radius:13px}.seo-steps{gap:.6rem}}

/* Unified, softer game chrome for the live systems. */
.brand{font-family:var(--sans);font-size:1.02rem;font-weight:800;letter-spacing:0;color:#fff2d5}
.brand-mark{width:42px;height:42px;border:1px solid #fff7e0;background:linear-gradient(145deg,#ffe6a5,#ffb9ca);color:#5a4a84;box-shadow:0 5px 20px #e6a9b044}
.brand-mark svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.settings-button{display:grid;place-items:center;flex:none;border-color:#ffffff36;background:#ffffff10;color:#ffe39c;transition:background .18s,transform .18s,box-shadow .18s}
.settings-button:hover{background:#ffffff1b;transform:translateY(-1px);box-shadow:0 5px 18px #e6c77c26}
.settings-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision}
.sound-toggle{display:grid;place-items:center;flex:none;border-color:#ffffff36;background:#ffffff10;color:#ffe39c;transition:background .18s,transform .18s,box-shadow .18s}
.sound-toggle:hover{background:#ffffff1b;transform:translateY(-1px);box-shadow:0 5px 18px #e6c77c26}
.sound-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sound-toggle[aria-pressed="false"] .sound-waves,.sound-toggle[aria-pressed="true"] .sound-muted{display:none}
.home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem}
.feature-card{position:relative;isolation:isolate;min-height:230px;padding:1.35rem 1.5rem;border-color:#f9e6c24d;border-radius:22px;box-shadow:0 13px 34px #070f252f,inset 0 1px #ffffff24;overflow:hidden}
.feature-card:before{content:"";position:absolute;z-index:-1;inset:-40% -25% auto auto;width:68%;height:125%;border-radius:50%;background:radial-gradient(circle,#ffe9ba2e,transparent 70%);pointer-events:none}
.build-card{background:linear-gradient(135deg,#695f9f 0%,#776aaf 50%,#966b99 125%)}
.river-card{background:linear-gradient(135deg,#397db4 0%,#368fab 55%,#41aaa1 120%)}
.feature-card .card-symbol{display:grid;place-items:center;width:54px;height:54px;margin-bottom:.8rem;border:1px solid #ffffff88;border-radius:17px;background:#fff2dd3a;font-size:0;color:#fff0b6}
.feature-card .card-symbol svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.feature-card strong{font-family:var(--sans);font-weight:800;font-size:1.5rem;text-shadow:0 2px 10px #17245538}
.feature-card>span:not(.card-symbol):not(.card-kicker):not(.card-arrow){color:#fff7eb}
.card-arrow{border:1px solid #ffffff38;border-radius:99px;background:#202d5938;padding:.55rem .95rem;margin-top:1rem;color:#fff2c7}
.feature-card:hover{border-color:#fff2c7;box-shadow:0 17px 38px #070f2544,inset 0 1px #ffffff35}
.river-page-hero+.page-wrap .river-flow{background:#fff1d90d}
.river-place-chip{border:1px solid #ffe9bb88;color:var(--cream);text-align:left;cursor:pointer}
.river-place-chip:hover{border-color:#fff0c9;background:#183b4ddf}
.river-place-copy{min-width:0;flex:1;display:grid;line-height:1.3}
.river-place-copy small{color:#bfe9d8;font-size:.68rem}
.river-place-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff2d5;font-size:.87rem}
.river-place-change{display:inline-flex;align-items:center;gap:.45rem;margin-left:auto;color:#ffe39c;font-size:.74rem;white-space:nowrap}
.river-place-change b{font-size:1.15rem;font-weight:500}
.game-modal{width:min(720px,calc(100vw - 2rem));max-height:min(88vh,780px);margin:auto;padding:1.25rem;border:1px solid #e4ca8777;border-radius:24px;background:linear-gradient(145deg,#334072,#283565 70%,#263b68);color:var(--cream);box-shadow:0 25px 90px #061020aa;overflow:hidden}
.guest-name-dialog{width:min(470px,calc(100vw - 2rem));padding:1.2rem}.guest-name-intro{margin:.8rem 0 1rem;color:#d6e3e2}.guest-name-form{display:grid;gap:.55rem}.guest-name-form label{font-weight:750}.guest-name-form input{width:100%;min-height:48px;padding:.7rem .85rem;border:1px solid #8ed8b377;border-radius:13px;background:#0b2637;color:var(--cream);font:inherit}.guest-name-form input:focus-visible{outline:3px solid #8ed8b3;outline-offset:2px}.guest-name-actions{display:flex;gap:.6rem;margin-top:.35rem}.guest-name-actions .button{min-height:46px;padding:.65rem 1rem}.guest-name-actions .button.primary{flex:1}
.token-shortage-dialog{width:min(460px,calc(100vw - 2rem))}.token-shortage-copy{margin:1rem 0;color:#d6e3e2;line-height:1.6}.token-shortage-actions{display:flex;gap:.6rem}.token-shortage-actions .button:first-child{flex:1;min-height:46px}
.game-modal::backdrop{background:#081426bb;backdrop-filter:blur(8px)}
.game-modal[open]{animation:modal-enter .2s ease both}
@keyframes modal-enter{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.game-modal-header{display:flex;align-items:center;gap:.8rem;padding-right:.2rem}
.game-modal-header>div{min-width:0;flex:1}.game-modal-header .eyebrow{font-size:.68rem}
.game-modal-header h2{margin:.1rem 0 0;font-family:var(--sans);font-size:clamp(1.25rem,3vw,1.8rem);font-weight:800;line-height:1.3}
.modal-emblem{display:grid;place-items:center;width:46px;height:46px;flex:none;border:1px solid #ffdf9b77;border-radius:16px;background:linear-gradient(145deg,#ffe5a7,#ffb8c7);color:#534a82;font-size:1.35rem}
.modal-close{width:38px;height:38px;flex:none;background:#ffffff0b;color:#fff2d5;font-size:1.35rem;line-height:1}
.settings-intro,.province-intro{margin:.8rem 0 1rem;color:#d4d8ec;font-size:.9rem;line-height:1.65}
.settings-options{display:grid;gap:.6rem}
.setting-option{display:flex;align-items:center;gap:.75rem;min-height:67px;padding:.65rem .8rem;border:1px solid #ffffff21;border-radius:15px;background:#202d5c77}
.setting-icon{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:13px;background:#ffffff16;color:#ffdda0;font-size:1.25rem}
.setting-option>span:nth-child(2){min-width:0;flex:1;display:grid}.setting-option strong{font-size:.9rem}.setting-option small{color:#bec7e1;font-size:.75rem;line-height:1.45}
.setting-option input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.setting-switch{position:relative;width:47px;height:27px;flex:none;border-radius:99px;background:#6e7eaf;transition:background .18s}
.setting-switch:after{content:"";position:absolute;left:4px;top:4px;width:19px;height:19px;border-radius:50%;background:#fff5d5;box-shadow:0 1px 4px #16214855;transition:transform .18s}
.setting-option input:checked+.setting-switch{background:#58c4b0}.setting-option input:checked+.setting-switch:after{transform:translateX(20px)}
.setting-option input:focus-visible+.setting-switch{outline:2px solid #fff1bd;outline-offset:3px}
.setting-disabled{opacity:.74}.setting-soon{flex:none;padding:.28rem .5rem;border:1px solid #ffffff24;border-radius:99px;color:#d5c9ef;font-size:.67rem;white-space:nowrap}
.settings-done{width:100%;margin-top:1rem;border-radius:14px}
.effects-off .krathong-art .item-motion{animation:none!important}
.province-intro{display:flex;align-items:flex-start;gap:.45rem;margin-bottom:.75rem}
.province-search{display:flex;align-items:center;gap:.65rem;min-height:48px;padding:0 .9rem;border:1px solid #a8d8d055;border-radius:14px;background:#111d45a3;color:#ffdf9c}
.province-search>span{font-size:1.3rem}.province-search input{width:100%;min-width:0;padding:.45rem 0;border:0;border-radius:0;background:transparent;outline:none!important;color:#fff7e8}
.province-picker{display:grid;grid-template-columns:175px minmax(0,1fr);gap:.8rem;margin-top:.8rem;max-height:48vh;min-height:270px}
.province-regions{display:grid;align-content:start;gap:.3rem;overflow:auto;padding-right:.15rem;scrollbar-width:thin}
.province-region{display:flex;justify-content:space-between;align-items:center;gap:.5rem;min-height:41px;padding:.4rem .55rem;border:1px solid transparent;border-radius:12px;background:transparent;color:#d7dced;text-align:left;cursor:pointer}
.province-region small{color:#bac6dc;font-size:.72rem}.province-region:hover,.province-region.active{border-color:#c1d9b866;background:#459c8f2d;color:#ffe6a6}
.province-results{min-width:0;display:flex;flex-direction:column;overflow:hidden}
.province-results-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.15rem .1rem .45rem;border-bottom:1px solid #ffffff24}
.province-results-heading h3{margin:0;color:#ffe3a1;font-size:.95rem}.province-results-heading span{color:#c1c9df;font-size:.75rem}
.province-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:.45rem;overflow:auto;padding:.55rem .15rem .2rem 0;scrollbar-color:#8ba78d77 #202d5a}
.province-choice{display:flex;align-items:center;gap:.55rem;min-height:60px;min-width:0;padding:.45rem .55rem;border:1px solid #ffffff24;border-radius:13px;background:#16284e6e;color:var(--cream);text-align:left}
.province-choice.available{cursor:pointer}.province-choice.available:hover,.province-choice.available.selected{border-color:#f3d17e;background:linear-gradient(130deg,#376b65,#425b74);box-shadow:inset 0 0 0 1px #f3d17e37}
.province-choice.coming{opacity:.58;cursor:not-allowed}
.province-choice-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:10px;background:#8fd2bb1f;color:#f3d17e}
.province-choice-copy{min-width:0;flex:1;display:grid}.province-choice-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem}.province-choice-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#b6c6c8;font-size:.66rem}
.province-choice-arrow{flex:none;color:#ffe19a;font-size:.75rem}.province-choice.coming .province-choice-arrow{color:#bbc1d5;font-size:.58rem}
.province-empty{margin:auto;color:#d4d8ec;font-size:.88rem}.province-footnote{margin:.7rem 0 0;color:#c1c9df;font-size:.73rem;line-height:1.5}
@media(max-width:760px){.province-picker{grid-template-columns:1fr;max-height:56vh;gap:.45rem}.province-regions{display:flex;gap:.35rem;overflow-x:auto;padding:0 0 .25rem}.province-region{flex:none;min-height:36px}.province-region small{margin-left:.25rem}.province-results{max-height:44vh}.province-grid{max-height:38vh}}
@media(max-width:560px){.topbar{gap:.4rem;padding-inline:.55rem}.brand{gap:.34rem;font-size:.72rem;letter-spacing:-.02em}.brand>span:last-child{max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand-mark{width:32px;height:32px}.brand-mark svg{width:20px;height:20px}.wallet-bar{gap:.2rem}.wallet-bar .currency.gold{display:none}.currency{font-size:.65rem;padding:.23rem .36rem;gap:.18rem}.account-button{max-width:67px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.65rem;padding:.34rem .42rem}.settings-button{width:32px;height:32px}.menu-button{width:32px;height:32px}.home-grid{grid-template-columns:1fr}.feature-card{min-height:175px;padding:1rem 1.1rem;border-radius:19px}.feature-card .card-symbol{width:44px;height:44px;margin-bottom:.55rem;border-radius:14px}.feature-card .card-symbol svg{width:24px;height:24px}.feature-card strong{font-size:1.23rem}.game-modal{width:calc(100vw - 1rem);max-height:calc(100dvh - 1.5rem);padding:.85rem;border-radius:19px}.game-modal-header{gap:.55rem}.modal-emblem{width:38px;height:38px;border-radius:13px}.game-modal-header h2{font-size:1.23rem}.settings-intro,.province-intro{font-size:.78rem}.setting-option{min-height:59px;padding:.55rem .6rem;gap:.55rem}.setting-option strong{font-size:.79rem}.setting-option small{font-size:.66rem}.setting-icon{width:33px;height:33px}.province-grid{grid-template-columns:1fr;gap:.35rem}.province-choice{min-height:53px}.river-place-change{font-size:0}.river-place-change b{font-size:1.05rem}.river-place-copy strong{font-size:.75rem}.river-place-copy small{font-size:.58rem}}

/* Bring the prototype's riverside game mood into the real screens while
   leaving the existing account, inventory, shop and river interactions intact. */
:root{--night:#111d43;--deep:#17284f;--water:#27758a;--panel:#34477f;--panel-soft:#40548f;--line:#6075b2;--cream:#fff5df;--muted:#cfdaea;--gold:#ffd774;--gold-dark:#bf8545;--mint:#98e3ce;--rose:#ffb8c7}
body{background:radial-gradient(ellipse at 52% -10%,#7568aa55,transparent 47%),linear-gradient(180deg,#172448,#101c3c 72%,#10243c)}
.topbar{background:linear-gradient(100deg,#111b3beb,#1a2850e8);border-bottom:1px solid #c5d5ff20;box-shadow:0 8px 28px #0c173044}
main{width:min(1320px,100% - 3rem);padding-top:2rem}
.welcome-screen{position:relative;isolation:isolate;width:100vw;min-height:calc(100dvh - 78px);margin-left:calc(50% - 50vw);padding:clamp(2rem,7vh,5rem) max(1.5rem,calc((100vw - 1320px)/2));grid-template-columns:minmax(0,.9fr) minmax(260px,.7fr);gap:2rem;background:linear-gradient(90deg,#121c43df 0%,#1927509c 42%,#17244b14 100%),linear-gradient(0deg,#15234580,transparent 55%),url('./river/assets/bangkok-chao-phraya-panorama.png') center 58%/cover no-repeat;overflow:hidden}
.welcome-screen:before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(circle at 80% 28%,#ffe5a044,transparent 17%),linear-gradient(180deg,#101a3a22 35%,#10213e88);pointer-events:none}
.welcome-copy{padding:1rem 0 2rem;max-width:650px}
.welcome-copy .eyebrow{display:inline-flex;align-items:center;gap:.5rem;padding:.48rem .85rem;border:1px solid #ffdfa755;border-radius:99px;background:#252f5b94;color:#c6f1df;backdrop-filter:blur(8px);letter-spacing:.04em}
.welcome-copy h1{font-family:var(--sans);font-size:clamp(2.8rem,6vw,5rem);font-weight:850;letter-spacing:-.045em;line-height:1.12;text-shadow:0 4px 26px #121a3e9c}
.welcome-copy h1 em{color:#ffdb78;text-shadow:0 3px 22px #ffcb5377}
.welcome-copy .lead{font-size:clamp(1rem,1.4vw,1.2rem);color:#fff6e7;text-shadow:0 2px 12px #121a3e}
.welcome-copy .sublead{display:none}
.start-form{margin-top:1.6rem;padding:.95rem;border:1px solid #fff0c466;border-radius:20px;background:linear-gradient(130deg,#253666c9,#384982b5);box-shadow:0 14px 35px #0c173e50;backdrop-filter:blur(12px)}
.start-form label{color:#fff1ce;font-size:.9rem}.start-form label small{color:#d5e2ec}
.start-form .input-row input{border-color:#d4e5ed61;background:#172746a8;border-radius:13px}
.start-form .button.primary{min-height:48px;border-radius:14px;background:linear-gradient(135deg,#fff0a7,#ffbd58);color:#524275;box-shadow:0 5px 0 #81569b66,0 10px 25px #f2bc5b33}
.privacy-note,.welcome-signin{color:#f2ead7;text-shadow:0 2px 8px #111a3e}
.moon-art{height:min(57vh,500px);min-height:330px;align-self:center;border:1px solid #fff0bc7a;border-radius:48% 48% 24px 24px / 36% 36% 24px 24px;background:linear-gradient(180deg,#52549455,#365f8275 61%,#10647799);box-shadow:0 20px 65px #0b183c80,inset 0 0 70px #ffd77a14;transform:translateY(1rem)}
.moon-art:after{content:"✦  ·  ✧     ·      ✦";position:absolute;top:17%;left:10%;right:10%;color:#fff1bd8a;letter-spacing:2.4rem;font-size:1rem;animation:star-drift 8s ease-in-out infinite}
.moon{width:clamp(82px,10vw,132px);height:clamp(82px,10vw,132px);background:radial-gradient(circle at 36% 31%,#fff8cf,#ffe18f 67%,#e5ac57);box-shadow:0 0 35px #ffe29b9c,0 0 100px #ffcf6c55;animation:moon-breathe 5s ease-in-out infinite}
.hero-water{background:repeating-linear-gradient(174deg,#b9f3e533 0 2px,transparent 2px 31px),linear-gradient(180deg,#39a3b5b5,#15345e)}
.hero-krathong{transform:translateX(-50%);animation:krathong-float 4.6s ease-in-out infinite}
.hero-glow{background:#ffd477;filter:blur(38px);opacity:.53}
.seo-intro{background:#17284fc9;border-color:#ffe6b136;backdrop-filter:blur(10px)}
.home-screen{position:relative;isolation:isolate}
.home-screen:before{content:"";position:absolute;z-index:-1;left:50%;top:-2rem;transform:translateX(-50%);width:100vw;height:min(56vh,510px);background:linear-gradient(90deg,#17254be9,#17254b88 58%,#17254b45),linear-gradient(0deg,#17254bf2,transparent 58%),url('./assets/home-background.png') center 58%/cover no-repeat;pointer-events:none}
.home-screen .section-heading{min-height:210px;align-items:center;margin:0 0 1.1rem}
.home-screen .section-heading h1{font-family:var(--sans);font-weight:850;font-size:clamp(2rem,4.5vw,3.4rem);letter-spacing:-.04em}
.home-screen .section-heading .lead{color:#fff0d8}
.moon-small{width:clamp(64px,8vw,100px);height:clamp(64px,8vw,100px);background:radial-gradient(circle at 35% 30%,#fff9cf,#ffdc83 65%,#d99653);box-shadow:0 0 45px #ffdd8770,0 0 100px #ffcb4e30;animation:moon-breathe 5s ease-in-out infinite}
.home-grid{gap:1.15rem}
.feature-card{min-height:205px;padding:1.2rem 1.45rem;border-radius:25px;backdrop-filter:blur(9px)}
.feature-card .card-symbol{border-radius:50%;width:50px;height:50px;background:linear-gradient(145deg,#fff3c7,#ffbccc);color:#78547e;box-shadow:0 5px 20px #141a4d42}
.river-card .card-symbol{background:linear-gradient(145deg,#c9ffff,#71d7ee);color:#2977ac}
.feature-card strong{font-size:1.55rem}
.play-reward-panel,.home-account-prompt{border:1px solid #fff1c84a;border-radius:21px;background:linear-gradient(115deg,#354980e6,#35477bdf);box-shadow:0 12px 30px #0b173835;backdrop-filter:blur(8px)}
.home-account-prompt{margin-top:.9rem}
.status-pill{border-color:#9ef0d855;background:#162c5366}
.page-heading h1,.section-heading h1,.inventory-section-heading h2{font-family:var(--sans);font-weight:800;letter-spacing:-.035em}
.builder-screen,.shop-screen,.collection-screen{position:relative}
.builder-layout{grid-template-columns:minmax(0,1.06fr) minmax(350px,.94fr);gap:1.15rem}
.preview-panel,.custom-panel,.collection-preview,.collection-info{border:1px solid #d7e3ff30;border-radius:24px;background:linear-gradient(145deg,#364980ed,#2c3c72ee);box-shadow:0 14px 38px #0b17383a}
.preview-panel{padding:1.1rem}
.preview-label{font-size:.93rem;color:#fff1cf}
.equipment-stage .preview-stage{min-height:390px;border:1px solid #ffdf9144;border-radius:21px;background:radial-gradient(ellipse at 50% 67%,#ffe28d3b,transparent 32%),linear-gradient(180deg,#927fbd 0%,#555b9c 43%,#25819a 72%,#155068 100%);box-shadow:inset 0 0 50px #e2cbff24}
.equipment-stage .preview-stage:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 15% 25%,#fff1a8 0 2px,transparent 3px),radial-gradient(circle at 75% 33%,#fff1a8 0 2px,transparent 3px),radial-gradient(circle at 25% 70%,#8ef1df 0 2px,transparent 3px);background-size:180px 140px,220px 170px,260px 200px;opacity:.58;animation:star-drift 13s linear infinite;pointer-events:none}
.equipment-stage .preview-stage:after{bottom:21%;width:78%;height:2px;background:#ffe2a35c;box-shadow:0 18px #ffe2a333,0 43px #a5fff02a,0 76px #a5fff01a}
.equipment-stage .krathong-art{transform:translateY(-4px) scale(1.15);filter:drop-shadow(0 15px 28px #ffd87a80)}
.equipment-stage .equipment-slots{inset:13px;grid-template-columns:66px 1fr 66px;gap:.6rem}
.equipment-stage .equipment-slot{width:62px;min-height:62px;border:1px solid #fff0bbad;border-radius:18px;background:linear-gradient(150deg,#425c9be8,#263a71ed);box-shadow:0 5px 16px #101b4b55}
.equipment-stage .equipment-slot.is-selected{border-color:#ffdc72;box-shadow:0 0 0 2px #ffdc7240,0 0 20px #ffe38e70}
.custom-panel{padding:1.1rem}
.builder-tabs{padding:.35rem;border:1px solid #ffffff24;border-radius:16px;background:#19284b88}
.builder-tab{border-radius:12px;font-weight:700}
.builder-tab.active{background:linear-gradient(135deg,#ffe99e,#ffc967);color:#514172;box-shadow:0 3px 0 #82609a66}
.inventory-filters .filter-chip,.choice{border-color:#d7e2ff35;background:#263969;color:#e4e9fa;border-radius:99px}
.inventory-filters .filter-chip.active,.choice.selected{border-color:#ffe08a;background:linear-gradient(135deg,#ffe89b,#ffc561);color:#584373;box-shadow:0 3px 0 #77589b44}
.private-room-panel .inventory-grid{border-color:#ffffff30;border-radius:17px;background:linear-gradient(145deg,#192d54,#223668)}
.private-room-panel .inventory-item{border:1px solid #ffffff26;border-radius:14px;background:linear-gradient(145deg,#5066a0,#344879);box-shadow:0 4px 10px #131e4933}
.private-room-panel .inventory-item:hover,.private-room-panel .inventory-item:focus-visible{outline:2px solid #ffe08a;border-radius:14px}
.private-room-panel .inventory-item.is-equipped{background:linear-gradient(145deg,#52aa9d,#317e83);border:2px solid #a5f0cd;box-shadow:0 0 16px #84e9c05c}
.builder-market-link{border-radius:13px}
.river-screen{padding-top:.2rem}
.river-screen .page-heading{padding:.5rem .3rem}
.river-wrap{border:1px solid #e5d09470;border-radius:27px;box-shadow:0 18px 50px #0915366b,0 0 0 5px #ffffff08;background:#183956}
.river-controls{border:1px solid #ffe5a55c;border-radius:19px;background:linear-gradient(120deg,#243667e8,#384783dc);box-shadow:0 10px 28px #10183955}
.river-controls .button.primary{border-radius:14px;background:linear-gradient(135deg,#fff0a5,#ffc75d);color:#594777;box-shadow:0 4px 0 #805b9366}
.river-place-chip{border-radius:18px;background:linear-gradient(130deg,#283968e8,#53649ad9);backdrop-filter:blur(9px);box-shadow:0 8px 22px #0e193f55}
.river-top-action{border-radius:14px;background:#25345fbd}
.river-overview-panel{border:1px solid #fff0b64a;border-radius:18px;background:#283968e8;box-shadow:0 8px 24px #10183955}
.shop-main-panel,.shop-showcase,.shop-credit-link{border-color:#ffffff2c;border-radius:23px;background:linear-gradient(145deg,#364980ed,#293b70ee);box-shadow:0 14px 38px #0b17383a}
.shop-window-heading h2,.gacha-heading h2{font-family:var(--sans);font-weight:800}
.shop-notice{border-color:#ffdf9254;border-radius:16px;background:linear-gradient(115deg,#88644b9c,#43558c9c)}
.shop-section-nav button{border-radius:99px}
.shop-item{border-color:#ffffff30;border-radius:19px;background:linear-gradient(160deg,#5269a3,#35487e);box-shadow:0 7px 20px #151e4b42}
.shop-art{border-radius:16px;background:radial-gradient(ellipse at 50% 58%,#ffefbaaa,transparent 45%),linear-gradient(145deg,#a596d0,#538cb5 75%,#48a69e)}
.shop-item .button{border-radius:12px}
.shop-credit-link{background:linear-gradient(135deg,#40538b,#304275)}
.token-topup-panel{border:1px solid #ffe09a55;border-radius:23px;background:linear-gradient(130deg,#554b87,#364a83);box-shadow:0 12px 32px #151c4a44}
.token-balance-card{border-color:#ffdf9266;background:linear-gradient(145deg,#242f61,#514d8b)}
.account-screen .account-status,.account-screen .account-panel{border-color:#ffffff30;border-radius:22px;background:linear-gradient(145deg,#364980ed,#293b70ee);box-shadow:0 12px 34px #0b173838}
.bottom-nav{border:1px solid #c9d9ff48;background:linear-gradient(120deg,#18274beF,#283b6deF);box-shadow:0 13px 36px #08143088,0 0 0 5px #ffffff08;backdrop-filter:blur(20px)}
.bottom-nav button.active{border-radius:15px;background:linear-gradient(145deg,#fff0a8,#ffbf60);color:#574477;box-shadow:0 4px 0 #805b9366}
.bottom-nav button.active svg{color:#594777}
@keyframes moon-breathe{0%,100%{filter:brightness(1);transform:scale(1)}50%{filter:brightness(1.1);transform:scale(1.035)}}
@keyframes krathong-float{0%,100%{translate:0 0}50%{translate:0 -9px}}
@keyframes star-drift{0%,100%{transform:translateY(0);opacity:.75}50%{transform:translateY(-7px);opacity:1}}
@media(max-width:850px){main{width:min(100% - 1.5rem,720px);padding-top:1rem}.welcome-screen{width:100vw;margin-left:calc(50% - 50vw);padding:2rem 1.25rem;grid-template-columns:1fr;min-height:auto;background-position:56% center}.welcome-copy{padding:2rem 0}.moon-art{position:absolute;right:-12%;bottom:2rem;width:44%;height:28vh;min-height:180px;opacity:.74;pointer-events:none}.welcome-screen .seo-intro{margin-top:0}.home-screen .section-heading{min-height:165px}.home-screen:before{height:420px}.builder-layout{grid-template-columns:1fr}.equipment-stage .preview-stage{min-height:330px}.custom-panel{order:2}}
@media(max-width:560px){main{width:calc(100% - 1rem);padding-top:.6rem}.welcome-screen{padding:1rem .9rem 1.5rem;min-height:calc(100dvh - 60px);background-position:58% center}.welcome-copy{padding:.8rem 0 1rem}.welcome-copy h1{font-size:clamp(2.35rem,11vw,3.4rem)}.welcome-copy .lead{max-width:88%;font-size:.93rem}.start-form{max-width:100%;margin-top:1rem;padding:.7rem;border-radius:16px}.input-row{flex-wrap:wrap}.input-row input,.input-row .button{width:100%}.moon-art{right:-20%;bottom:4.2rem;width:58%;height:190px;min-height:0;opacity:.58}.home-screen .section-heading{min-height:145px}.home-screen .section-heading h1{font-size:1.9rem}.home-grid{gap:.7rem}.feature-card{min-height:164px;padding:.9rem 1rem}.feature-card strong{font-size:1.27rem}.play-reward-panel,.home-account-prompt{border-radius:17px}.equipment-stage .preview-stage{min-height:275px}.equipment-stage .equipment-slots{grid-template-columns:48px 1fr 48px;inset:7px}.equipment-stage .equipment-slot{width:44px;min-height:44px;border-radius:13px}.equipment-stage .equipment-slot-icon{width:35px;height:35px}.river-wrap{min-height:340px;border-radius:19px}.river-controls{padding:.65rem;border-radius:15px}.river-controls .button{min-height:42px;padding:.55rem .75rem;font-size:.76rem}.bottom-nav{width:calc(100% - 1rem);border-radius:17px}.seo-intro{margin-bottom:1.5rem}}
@media(prefers-reduced-motion:reduce){.moon,.moon-small,.hero-krathong,.moon-art:after,.equipment-stage .preview-stage:before{animation:none!important}}

/* Account page: keep identity, recovery choices, and wallet visually distinct. */
.account-screen .page-heading{align-items:flex-end;margin-bottom:1.1rem}
.account-screen .page-heading h1{font-size:clamp(2rem,4vw,3rem);margin:.2rem 0}
.account-layout-simple{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:stretch}
.account-layout-simple .account-card{min-width:0;padding:clamp(1rem,2vw,1.4rem);border:1px solid #c8d9ff55;border-radius:20px;background:linear-gradient(145deg,#536aa4f5,#40568eef);box-shadow:0 12px 30px #16254932}
.account-status-card{grid-column:1/-1;padding:1.25rem clamp(1.1rem,2.2vw,1.6rem)!important}
.account-status-heading,.account-card-heading{display:flex;align-items:center;gap:.85rem;min-width:0}
.account-status-heading>div,.account-card-heading>div{min-width:0;flex:1}
.account-card-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border:1px solid #f2d17b82;border-radius:15px;background:linear-gradient(145deg,#40568b,#314876);color:#ffe08a}
.account-card-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.account-status-card h2,.account-protect-card h2,.account-return-card h2{font:700 1.2rem/1.35 var(--sans);margin:.12rem 0 0;color:#fff4dc}
.account-status-card .eyebrow,.account-protect-card .eyebrow,.account-return-card .eyebrow{font-size:.69rem;letter-spacing:.07em}
.account-state-chip{display:inline-flex;align-items:center;gap:.4rem;flex:0 0 auto;padding:.38rem .72rem;border:1px solid #a4ebd05a;border-radius:99px;background:#263f6b80;color:#b8f0d8;font-size:.78rem;font-weight:650}
.account-state-chip i{width:8px;height:8px;border-radius:50%;background:#8de2bd;box-shadow:0 0 10px #8de2bd80}
.account-state-chip[data-state="offline"]{border-color:#ffd28a80;color:#ffe3ad}.account-state-chip[data-state="offline"] i{background:#ffc96b;box-shadow:0 0 10px #ffc96b80}
.account-state-chip[data-state="pending"]{border-color:#a9dfff80;color:#d7f1ff}.account-state-chip[data-state="pending"] i{background:#83d7ff;box-shadow:0 0 10px #83d7ff80}
.account-state-chip[data-state="connecting"]{border-color:#d2c2ff72;color:#e1d7ff}.account-state-chip[data-state="connecting"] i{background:#c6adff;box-shadow:0 0 10px #c6adff80}
.account-status-card>p{margin:.75rem 0 0;color:#f0f3fa;font-size:.93rem}
.account-status-meta{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-top:.8rem;padding-top:.75rem;border-top:1px solid #d7e3ff28}
.account-status-meta .helper-note{margin:0;color:#d1ddf0;font-size:.8rem}
.account-screen .guest-id-details{margin:0;color:#e1e9f6;font-size:.8rem}
.account-screen .guest-id-details summary{cursor:pointer;color:#dce8fa}
.account-screen .guest-id-details summary span{margin-left:.3rem;color:#b5c8e6;font-size:.74rem}
.account-screen .guest-id-row{display:flex;align-items:center;gap:.5rem;margin-top:.55rem}
.account-screen .guest-id-row code{flex:1;min-width:0;padding:.55rem .7rem;border-color:#c8d9ff30;background:#293e70;color:#ffe08a}
.account-screen .copy-guest-id{flex:0 0 38px;border-color:#c8d9ff55;border-radius:12px;background:#354d80}
.account-provider-note{margin:.55rem 0 0!important;color:#ffe5a4!important}
.account-screen .account-card>p{margin:.7rem 0;color:#e0e7f4;font-size:.88rem;line-height:1.6}
.account-screen .account-protect-card,.account-screen .account-return-card{display:flex;flex-direction:column}
.account-screen .account-protect-card>p,.account-screen .account-return-card>p{min-height:3.2em}
.account-screen .account-protect-card .google-button{display:flex;align-items:center;justify-content:center;gap:.65rem;width:100%;min-height:46px;margin:.15rem 0 .1rem;border:1px solid #d9e3f3;border-radius:13px;background:linear-gradient(135deg,#fff,#f1f5fb);color:#374563;font-weight:700}
.account-screen .account-protect-card .google-button:hover{background:#fff;box-shadow:0 5px 16px #111d3d35}
.account-screen .account-google-return{margin-top:.85rem;padding-top:.8rem;border-top:1px solid #e0e8ff42}
.account-screen .account-alternative{margin-top:auto;border-top:1px solid #d8e2f42e;padding-top:.75rem}
.account-screen .account-alternative summary{cursor:pointer;color:#fff0bd;font-size:.84rem;font-weight:650}
.account-screen .account-alternative[open] summary{margin-bottom:.8rem}
.account-screen .account-form{gap:.5rem}
.account-screen .account-form label{color:#e5edfa;font-size:.82rem}
.account-screen .account-form input{border-color:#b8cdf15e;border-radius:11px;background:#293e70;color:#fff8e8}
.account-screen .account-form button{width:100%}
.account-screen .account-card .helper-note{color:#dce8f5;font-size:.8rem}
.account-screen .token-topup-panel{margin-top:1rem;border:1px solid #d6c06c99;border-radius:20px;background:radial-gradient(ellipse at 100% 0%,#8774c83d,transparent 43%),linear-gradient(145deg,#243a64,#293d71);box-shadow:0 12px 30px #16254932}
.account-screen .token-topup-panel:before{border-color:#f2d88736}
.account-screen .token-topup-heading h2{font:700 1.5rem/1.35 var(--sans);color:#fff1d1}
.account-screen .token-topup-heading p{color:#d4def1}
.account-screen .token-balance-card{border:1px solid #f2d17b70;border-radius:15px;background:#1f3159;color:#fff1d1}
.account-screen .token-balance-card strong{color:#ddc9ff}
.account-screen .token-topup-panel .topup-actions .button{border-color:#c8d9ff4a;border-radius:14px;background:linear-gradient(145deg,#3c5385,#2e426f);box-shadow:none}
.account-screen .token-topup-panel .topup-actions .button:hover:not(:disabled){border-color:#ffe08a;background:linear-gradient(145deg,#5a5386,#3f527e)}
@media(max-width:700px){.account-layout-simple{grid-template-columns:1fr}.account-status-card{grid-column:auto}.account-screen .page-heading{align-items:flex-start}.account-status-heading{flex-wrap:wrap}.account-state-chip{margin-left:56px}.account-screen .account-protect-card>p,.account-screen .account-return-card>p{min-height:0}}
@media(max-width:440px){.account-screen .account-status-meta{align-items:flex-start;flex-direction:column}.account-screen .account-status-meta .guest-id-details{width:100%}.account-screen .account-card-icon{flex-basis:42px;width:42px;height:42px}.account-screen .account-state-chip{margin-left:50px}}

/* The playable water takes the prototype's full scene layout, with the live
   prayer and release controls, province picker, wallet and account controls. */
body.river-fullscreen{background:#172448}
body.river-fullscreen>.topbar{display:flex}
body.river-fullscreen>main{width:100%;height:calc(100dvh - 78px);min-height:0;margin:0;padding:0;overflow:hidden}
body.river-fullscreen #screen-river{height:100%;min-height:0;padding:0;display:flex;flex-direction:column;animation:none}
body.river-fullscreen .river-heading,body.river-fullscreen .river-bottom{display:none}
body.river-fullscreen .river-wrap{position:relative;flex:1;width:100%;height:100%;min-height:0;overflow:hidden;border:0;border-radius:0;background:#102945}
body.river-fullscreen #bottom-nav{display:grid!important}
.river-fullscreen-topbar{top:max(.8rem,env(safe-area-inset-top));left:max(1rem,env(safe-area-inset-left));right:max(1rem,env(safe-area-inset-right));align-items:center}
.river-fullscreen-topbar .river-top-action{min-height:48px;padding:.5rem .9rem;border:1px solid #fff0bd66;border-radius:15px;background:linear-gradient(135deg,#334780df,#28355fdc);color:#fff4d8;font-weight:700;box-shadow:0 8px 24px #121c3c62;backdrop-filter:blur(10px)}
.river-place-chip{min-height:54px;padding:.5rem .85rem;border-radius:17px;background:linear-gradient(135deg,#40558de8,#334478e8);border-color:#ffebc278}
.river-place-chip>span:first-child{display:grid;place-items:center;width:36px;height:36px;border-radius:13px;background:#ffffff20;color:#ffe090}
.river-place-change{padding:.35rem .65rem;border:1px solid #ffe09a44;border-radius:99px;background:#1b2c55a3}
body.river-fullscreen .river-overlay{inset:auto auto 1.1rem 1.1rem;justify-content:flex-start;z-index:4}
body.river-fullscreen .river-overlay .night-label{display:inline-flex;padding:.55rem .8rem;border:1px solid #ffe9bb77;border-radius:99px;background:#243663dc;font-size:.72rem;letter-spacing:.02em;box-shadow:0 7px 22px #101b3e55;backdrop-filter:blur(10px)}
body.river-fullscreen .river-overview-panel{top:4.7rem;left:1rem;width:min(215px,24vw);border-color:#fff0b577;border-radius:17px;background:linear-gradient(145deg,#334779e8,#22365ee8);box-shadow:0 10px 28px #121c3c66}
body.river-fullscreen .river-overview-panel canvas{border-radius:11px}
body.river-fullscreen .river-overview-panel button{background:#fff0a3;color:#554477;font-weight:700}
.river-prayer-panel{position:absolute;z-index:5;right:max(1.1rem,env(safe-area-inset-right));bottom:max(1.1rem,env(safe-area-inset-bottom));width:min(370px,34vw);display:grid;gap:.65rem;padding:1.15rem;border:1px solid #ffebbc66;border-radius:24px;background:linear-gradient(145deg,#5a66a1f2,#46568feF 56%,#405181f2);box-shadow:0 20px 55px #0d173b77,inset 0 1px #ffffff38;backdrop-filter:blur(16px)}
.river-prayer-heading{display:grid;gap:.25rem;margin-bottom:.25rem}
.river-prayer-heading .eyebrow{font-size:.7rem;letter-spacing:.08em;color:#b5f2da}
.river-prayer-heading strong{font-size:1.35rem;line-height:1.35;color:#fff4dc}
.river-prayer-heading>span:last-child{color:#e1e4f0;font-size:.8rem}
.river-wish-label{display:flex;align-items:center;justify-content:space-between;color:#fff2d5;font-size:.8rem;font-weight:700}
.river-wish-label small{color:#c8d0e2;font-size:.7rem;font-weight:500}
.river-prayer-panel textarea{width:100%;min-height:88px;resize:vertical;padding:.75rem .85rem;border:1px solid #ffffff29;border-radius:15px;background:#293b75b8;color:#fff7e4;font-size:.88rem;line-height:1.55}
.river-prayer-panel textarea::placeholder{color:#bdc8e2}
.river-wish-meta{display:flex;align-items:center;justify-content:space-between;gap:.5rem;color:#d4d9ec;font-size:.68rem}
.river-wish-toggle{display:inline-flex;align-items:center;gap:.42rem;color:#fff1c7;font-weight:700;cursor:pointer}
.river-wish-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.river-wish-toggle i{position:relative;width:38px;height:21px;flex:none;border-radius:99px;background:#7484b2;transition:background .18s}
.river-wish-toggle i:after{content:"";position:absolute;left:3px;top:3px;width:15px;height:15px;border-radius:50%;background:#fff2ca;transition:transform .18s}
.river-wish-toggle input:checked+i{background:#59c8ae}.river-wish-toggle input:checked+i:after{transform:translateX(17px)}
.river-wish-toggle input:focus-visible+i{outline:2px solid #fff0ab;outline-offset:3px}
.river-release-button{width:100%;min-height:48px;border-radius:14px;background:linear-gradient(135deg,#fff0a6,#ffc357)!important;color:#584577!important;font-size:.95rem;box-shadow:0 4px 0 #765a9366,0 10px 22px #e9b85d2b!important}
.river-release-button:disabled{opacity:.78!important}
.river-release-note{text-align:center;color:#e1e4f0;font-size:.68rem}
body.river-fullscreen .river-controls{left:1.1rem;right:auto;bottom:4.8rem;width:min(390px,34vw);min-height:0;padding:.75rem .95rem;border:1px solid #fff0bd55;border-radius:17px;background:linear-gradient(120deg,#253660e8,#2d4775d9);box-shadow:0 10px 28px #101b3e66}
.river-controls>div{gap:.12rem}.river-controls>div strong{font-size:.88rem}.river-controls>div span{color:#e2e7ed;font-size:.73rem}
.floating-wish{position:absolute;left:50%;top:22%;transform:translateX(-50%);max-width:min(420px,50vw);padding:.75rem 1.1rem;border:1px solid #fff0bd;border-radius:20px 20px 20px 4px;background:linear-gradient(135deg,#fff2ca,#ffdda0);color:#584676;font-family:var(--sans);font-style:normal;font-weight:800;box-shadow:0 10px 30px #101b3e66;animation:wish-float 4s ease-in-out infinite}
@keyframes wish-float{0%,100%{translate:0 0}50%{translate:0 -6px}}
.effects-off .moon,.effects-off .moon-small,.effects-off .hero-krathong,.effects-off .moon-art:after,.effects-off .equipment-stage .preview-stage:before,.effects-off .floating-wish{animation:none!important}
@media(max-width:850px){.river-prayer-panel{width:min(370px,44vw);padding:.9rem}.river-prayer-heading strong{font-size:1.16rem}body.river-fullscreen .river-controls{width:min(340px,40vw)}}
@media(max-width:560px){body.river-fullscreen>.topbar{height:58px;min-height:58px;padding-inline:.55rem}body.river-fullscreen>main{height:calc(100dvh - 58px)}.river-fullscreen-topbar{top:.5rem;left:.5rem;right:.5rem;gap:.35rem}.river-fullscreen-topbar .river-top-action{min-height:42px;padding:.35rem .55rem;border-radius:12px;font-size:.71rem}.river-place-chip{min-height:44px;padding:.3rem .45rem;gap:.35rem;border-radius:13px}.river-place-chip>span:first-child{width:28px;height:28px}.river-place-copy small{font-size:.54rem}.river-place-copy strong{font-size:.67rem}.river-place-change{font-size:0;padding:.25rem .42rem}.river-place-change b{font-size:1rem}body.river-fullscreen .river-overview-panel{top:3.9rem;left:.5rem;width:min(155px,40vw)}body.river-fullscreen .river-overlay{left:.5rem;bottom:calc(230px + env(safe-area-inset-bottom));inset-inline:auto}body.river-fullscreen .river-overlay .night-label{font-size:.6rem;padding:.38rem .58rem}.river-prayer-panel{right:.5rem;left:.5rem;bottom:calc(72px + env(safe-area-inset-bottom));width:auto;gap:.45rem;padding:.72rem;border-radius:19px}.river-prayer-heading{gap:.08rem}.river-prayer-heading .eyebrow{font-size:.57rem}.river-prayer-heading strong{font-size:1.03rem}.river-prayer-heading>span:last-child{font-size:.65rem}.river-prayer-panel textarea{min-height:58px;max-height:75px;padding:.5rem .65rem;font-size:.75rem}.river-wish-label{font-size:.7rem}.river-wish-meta{font-size:.58rem}.river-wish-toggle{font-size:.62rem}.river-release-button{min-height:41px;font-size:.82rem}.river-release-note{display:none}body.river-fullscreen .river-controls{left:.5rem;right:auto;bottom:calc(75px + env(safe-area-inset-bottom));width:auto;max-width:calc(100% - 1rem);padding:.4rem .6rem;border-radius:13px;transform:translateY(-210px);background:#263b71cf}body.river-fullscreen .river-controls>div span{font-size:.58rem}.floating-wish{top:28%;max-width:78vw;padding:.55rem .8rem;font-size:.8rem}.bottom-nav{bottom:max(.3rem,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.floating-wish{animation:none!important}}

/* River flow: keep the scene open and attach the released wish/name to the boat. */
.river-overview-panel[hidden],.river-prayer-panel[hidden],.river-collect-panel[hidden]{display:none!important}
.river-overview-panel{display:none!important}
.river-overlay{z-index:4;inset:0;display:block}
.river-overlay .night-label{position:absolute;top:5.8rem;left:1rem;pointer-events:none}
.floating-wish,.floating-krathong-name{position:absolute;left:0;top:0;transform:translate(-50%,-100%);width:max-content;max-width:min(340px,72vw);text-align:center;pointer-events:none;white-space:normal}
.floating-wish{padding:.55rem .8rem;border:1px solid #fff0bd;border-radius:16px;background:linear-gradient(135deg,#fff2ca,#ffdda0);color:#584676;font-family:var(--sans);font-style:normal;font-size:.88rem;font-weight:750;line-height:1.4;box-shadow:0 8px 22px #101b3e66}
.floating-krathong-name{transform:translate(-50%,0);padding:.2rem .65rem;border:1px solid #fff0bd66;border-radius:99px;background:#243663dc;color:#fff4d8;font-size:.75rem;font-weight:750;line-height:1.35;box-shadow:0 4px 14px #101b3e55}
.river-prayer-panel,.river-collect-panel{right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));width:min(350px,31vw);gap:.55rem;padding:1rem;border:1px solid #ffebbc66;border-radius:20px;background:linear-gradient(145deg,#485a91f2,#344879f2);box-shadow:0 14px 36px #0d173b66,inset 0 1px #ffffff38;backdrop-filter:blur(14px)}
.river-prayer-heading{gap:.15rem;margin:0}
.river-prayer-heading strong{font-size:1.15rem}
.river-prayer-heading>span:last-child{font-size:.76rem}
.river-prayer-panel textarea{min-height:72px;max-height:110px;resize:vertical}
.river-wish-meta{align-items:flex-start;flex-wrap:wrap}
.river-wish-toggle{font-size:.72rem}
.river-release-button{min-height:46px}
.river-collect-panel{position:absolute;z-index:5;display:grid}
.river-collect-panel p{margin:0;color:#e1e4f0;font-size:.78rem}
.river-collect-panel .button{min-height:44px}
.river-controls{left:max(1rem,env(safe-area-inset-left));right:auto;bottom:max(1rem,env(safe-area-inset-bottom));width:min(300px,26vw);min-height:0;padding:.7rem .85rem;border-radius:15px;background:#243663df;box-shadow:0 8px 22px #101b3e55}
.river-controls>div{gap:.12rem}
.river-controls>div strong{font-size:.85rem}
.river-controls>div span{font-size:.7rem}
.province-dialog{position:fixed;inset:0 0 0 auto;width:min(440px,100vw);height:100dvh;max-height:100dvh;margin:0;padding:1.25rem;border-radius:22px 0 0 22px;overflow-y:auto;box-shadow:-18px 0 50px #08142666}
.province-dialog::backdrop{background:#08142699;backdrop-filter:blur(5px)}
@media(max-width:850px){.river-prayer-panel,.river-collect-panel{width:min(350px,38vw)}.river-controls{width:min(270px,30vw)}}
@media(max-width:560px){
  .river-overlay .night-label{top:4.8rem;left:.55rem;font-size:.58rem;padding:.35rem .55rem}
  .river-prayer-panel{right:auto;left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(92vw,460px);max-height:calc(100dvh - 140px - env(safe-area-inset-top));overflow-y:auto;gap:.48rem;padding:.78rem .82rem;border-radius:19px}
  .river-collect-panel{right:auto;left:50%;bottom:calc(82px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 2rem);gap:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;transform:translateX(-50%)}
  .river-collect-panel>*:not(.button){display:none}
  .river-collect-panel .button{min-width:120px;min-height:44px;width:auto;padding:.35rem .9rem;border:1px solid #fff0bd99;border-radius:999px;background:linear-gradient(135deg,#394f83f2,#263c70f2);color:#fff4d8;font-size:.78rem;font-weight:800;box-shadow:0 6px 18px #101b3e66}
  .river-prayer-heading strong{font-size:.96rem}
  .river-prayer-heading>span:last-child{font-size:.63rem}
  .river-wish-label{font-size:.68rem}
  .river-prayer-panel textarea{min-height:132px;max-height:34dvh;padding:.58rem .68rem;font-size:.78rem;resize:vertical}
  .river-wish-meta{font-size:.58rem}
  .river-wish-toggle{font-size:.6rem}
  .river-release-button{min-height:48px;font-size:.84rem}
  .river-release-note{display:block;text-align:center;color:#e7ebfb;font-size:.7rem;font-weight:650}
  .river-controls{display:none}
  .floating-wish{max-width:72vw;padding:.42rem .65rem;font-size:.72rem}
  .floating-krathong-name{font-size:.64rem}
  .province-dialog{inset:auto 0 0;width:100vw;height:min(82dvh,740px);max-height:82dvh;padding:.9rem .8rem calc(.9rem + env(safe-area-inset-bottom));border-radius:22px 22px 0 0}
  .province-dialog .province-picker{max-height:60vh;min-height:0}
}
/* Keep the speech bubbles in the same coordinate space as the river scene. */
body.river-fullscreen .river-overlay{inset:0!important;width:100%;height:100%}
.river-controls{display:none!important}
.floating-wish{max-width:min(310px,calc(100vw - 2rem));padding:.68rem .9rem;border-radius:18px 18px 18px 5px;background:linear-gradient(145deg,#fff7dc,#ffe2a8);color:#4b456e;font-size:.9rem;font-weight:750;line-height:1.5;box-shadow:0 8px 24px #101b3e77}
.floating-wish::after{position:absolute;left:calc(50% - 8px);bottom:-8px;border:8px solid transparent;border-bottom:0;border-top-color:#ffe2a8;content:""}
.floating-krathong-name{max-width:min(220px,60vw);padding:.25rem .72rem;border:1px solid #fff0bd88;border-radius:999px;background:#263866ed;color:#fff7df;font-size:.78rem;font-weight:800;line-height:1.4;letter-spacing:.01em;box-shadow:0 5px 16px #101b3e66}
@media(max-width:560px){.floating-wish{max-width:70vw;padding:.5rem .7rem;font-size:.74rem}.floating-krathong-name{max-width:54vw;padding:.2rem .55rem;font-size:.66rem}}

/* Center the write-and-release step on larger screens; keep the river clear after release. */
@media(min-width:561px){
  .river-prayer-panel{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(520px,calc(100vw - 2rem));max-height:calc(100dvh - 8rem);overflow-y:auto}
  .river-prayer-panel textarea{min-height:180px;max-height:38dvh}
}
.river-collect-panel{display:flex;width:max-content;max-width:calc(100vw - 2rem);gap:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
.river-collect-panel>*:not(.button){display:none}
.river-collect-panel .button{min-width:124px;min-height:44px;width:auto;padding:.35rem .9rem;border:1px solid #fff0bd99;border-radius:999px;background:linear-gradient(135deg,#394f83f2,#263c70f2);color:#fff4d8;font-size:.8rem;font-weight:800;box-shadow:0 6px 18px #101b3e66}
@media(max-width:560px){.river-collect-panel{right:auto;left:50%;bottom:calc(82px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 2rem);transform:translateX(-50%)}}
@media(min-width:900px){.river-collect-panel{right:auto;left:calc(50% + 280px);bottom:calc(20px + env(safe-area-inset-bottom));transform:none}}
@media(min-width:561px) and (max-width:899px){.river-collect-panel{right:auto;left:50%;bottom:calc(112px + env(safe-area-inset-bottom));transform:translateX(-50%)}}

/* Compact location controls and keep the province picker centered. */
.river-fullscreen-topbar{left:50%;right:auto;width:min(1000px,calc(100% - 2rem));transform:translateX(-50%);justify-content:space-between;gap:.55rem}
.river-place-chip{position:relative;flex:0 1 470px;max-width:min(470px,48vw)}
.province-dialog#province-dialog[open]{display:flex;flex-direction:column;gap:.65rem;position:fixed;inset:0;width:min(860px,calc(100vw - 2rem));height:min(900px,calc(100dvh - 2rem));max-height:calc(100dvh - 2rem);margin:auto;padding:1.1rem 1.2rem;border-radius:22px;overflow:hidden;transform:none;box-shadow:0 24px 80px #08142688}
#province-dialog .province-search{min-height:46px;flex:none;margin:0}
#province-dialog .province-picker{grid-template-columns:165px minmax(0,1fr);grid-template-rows:minmax(0,1fr);flex:1;min-height:0;max-height:none;gap:.75rem;margin:0}
#province-dialog .province-region{min-height:36px;padding:.3rem .5rem;font-size:.82rem}
#province-dialog .province-results{min-height:0}
#province-dialog .province-results-heading{flex:none}
#province-dialog .province-grid{flex:1;min-height:0;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(54px,auto);align-content:start;gap:.5rem;overflow:auto}
#province-dialog .province-choice{min-height:54px;padding:.4rem .5rem}
#province-dialog .province-choice-mark{width:27px;height:27px}
@media(max-width:760px){
  .river-fullscreen-topbar{width:calc(100% - 1rem)}
  #province-dialog[open]{width:min(700px,calc(100vw - 1rem));height:min(900px,calc(100dvh - 1rem));max-height:calc(100dvh - 1rem);padding:.9rem .8rem calc(.9rem + env(safe-area-inset-bottom))}
  #province-dialog .province-picker{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:.5rem}
  #province-dialog .province-regions{display:flex;gap:.3rem;overflow-x:auto;white-space:nowrap;max-height:46px;padding:0 0 .2rem}
  #province-dialog .province-region{flex:none}
}
@media(max-width:560px){
  .river-fullscreen-topbar{left:50%;right:auto;transform:translateX(-50%);gap:.3rem}
  .river-place-chip{position:static;flex:1;max-width:none;min-width:0}
  #province-dialog[open]{width:calc(100vw - .5rem);height:calc(100dvh - .5rem);max-height:calc(100dvh - .5rem);padding:.8rem .65rem calc(.8rem + env(safe-area-inset-bottom));border-radius:18px}
  #province-dialog .province-grid{grid-template-columns:1fr;grid-auto-rows:minmax(50px,auto)}
}

/* Softer game UI: keep the live Supabase flows and item assets, brighten only
   the surfaces and interactive states to match the approved redesign mood. */
:root{--night:#273865;--deep:#334779;--water:#287e91;--panel:#5368a4;--panel-soft:#6075b1;--line:#8194c6;--cream:#fff6e5;--muted:#d1dcef;--gold:#ffda78;--gold-dark:#be8246;--mint:#a1ead3;--teal:#55c4b3;--rose:#ffb9c9}
body:not(.home-fullscreen):not(.river-fullscreen){background:radial-gradient(ellipse at 50% -10%,#9a8bd14a,transparent 48%),linear-gradient(180deg,#304477,#283968 76%,#23365e)}
.topbar{background:linear-gradient(100deg,#293865ef,#364a7eee);border-bottom-color:#d8e2ff35;box-shadow:0 8px 28px #15244835}
.brand{letter-spacing:0}
.brand-mark{width:42px;height:42px;border:0;background:linear-gradient(145deg,#ffe49a,#ffb8c7);color:#644780;box-shadow:0 5px 18px #141b4d55}
.currency,.account-button{border-color:#d7e3ff49;background:linear-gradient(135deg,#3c5088e8,#4c6099e8);box-shadow:0 4px 13px #1624492d}
.button.primary{background:linear-gradient(135deg,#fff0a6,#ffc85e);color:#594779;box-shadow:0 4px 0 #8b60996b,0 9px 20px #171e4b30}
.button.secondary{border-color:#a9c7e080;background:linear-gradient(135deg,#536aa5,#43598f);color:#fff6e5}
.button.secondary:hover:not(:disabled){background:linear-gradient(135deg,#637cb8,#4d659f)}
.page-heading .eyebrow,.account-screen .eyebrow,.shop-screen .eyebrow{color:#b1f0da}
.preview-panel,.custom-panel,.collection-preview,.collection-info,.account-screen .account-card{border-color:#c8d9ff40;background:linear-gradient(145deg,#5c70adf2,#4a609beF);box-shadow:0 12px 30px #16254932}
.equipment-stage .preview-stage{border-color:#b4eafa88;background:radial-gradient(ellipse at 50% 64%,#ffdc8b4d,transparent 34%),linear-gradient(180deg,#9183bd 0%,#696eab 43%,#3394a1 75%,#236579 100%)}
.equipment-stage .equipment-slot{border:2px solid #76dcf5;background:linear-gradient(150deg,#5476bbf0,#3c5b9cef);box-shadow:0 5px 15px #1826504a}
.equipment-stage .equipment-slot.is-selected{border-color:#ffe082;box-shadow:0 0 0 2px #fff0a65c,0 0 17px #ffe28a70}
.private-room-panel .inventory-grid{border-color:#a9cafa7a;background:linear-gradient(145deg,#354b82,#40588f)}
.private-room-panel .inventory-item{border-color:#b5d5ff70;background:linear-gradient(145deg,#627ab4,#4e669f);box-shadow:0 4px 12px #1b2a5438}
.private-room-panel .inventory-item:hover,.private-room-panel .inventory-item:focus-visible{outline:2px solid #8de8fa;outline-offset:1px}
.private-room-panel .inventory-item.is-equipped{border:2px solid #9df0cf;background:linear-gradient(145deg,#55b6ad,#388d91);box-shadow:0 0 16px #8deac454}
.private-room-panel .inventory-item-art{border-color:#b6d6f980;background:linear-gradient(145deg,#7e96cf,#5976b5)}
.equipment-stage .equipment-slot-icon{border-radius:14px;background:linear-gradient(145deg,#7c96d0,#5978b8)}
.shop-main-panel,.shop-showcase,.shop-credit-link,.token-topup-panel,.gacha-panel{border-color:#c8d9ff42;border-radius:23px;background:linear-gradient(145deg,#5a70adf2,#465d97ef);box-shadow:0 12px 30px #18264c38}
.shop-item{border-color:#d3e4ff78;background:linear-gradient(160deg,#6983bb,#536ba4);box-shadow:0 7px 18px #1a2b573f}
.shop-art{background:radial-gradient(ellipse at 50% 58%,#fff1c3b8,transparent 46%),linear-gradient(145deg,#ab9bd4,#69a8cb 75%,#58b9ab)}
.shop-item .button,.account-screen .button{border-radius:14px}
.bottom-nav{border-color:#d4e1ff70;background:linear-gradient(120deg,#2b3d6bec,#3b5288ed);box-shadow:0 13px 36px #101d3e82,0 0 0 4px #ffffff0b}
.bottom-nav button.active{background:linear-gradient(145deg,#fff0a6,#ffc862);color:#594779;box-shadow:0 4px 0 #8b60996b}
.bottom-nav button.active svg{color:#594779}
.account-google-return{margin-top:.85rem;padding-top:.8rem;border-top:1px solid #e0e8ff42}
.account-google-return p{margin:0 0 .5rem;font-weight:700;color:#fff1cf}
.account-google-return .button{width:100%}
.account-google-return small{display:block;margin-top:.45rem;color:#d2deef;font-size:.76rem;line-height:1.5}
.account-protect-card .google-button{border:1px solid #d9e3f3;background:linear-gradient(135deg,#fff,#f1f5fb);color:#374563}
.account-protect-card .google-button:hover{background:#fff;box-shadow:0 5px 16px #111d3d35}
.account-protect-card .google-button svg{width:20px;height:20px}
@media(max-width:560px){.brand-mark{width:35px;height:35px}.account-google-return{padding-top:.65rem}}

/* Homepage: one scenic, no-scroll starting point that routes into existing flows. */
body.home-fullscreen{height:100dvh;min-height:0;overflow:hidden;background:#172448}
body.home-fullscreen main{width:100%;height:calc(100dvh - 78px);min-height:0;margin:0;padding:0;max-width:none}
body.home-fullscreen .home-screen{position:relative;width:100%;height:100%;min-height:0;margin:0;padding:0;overflow:hidden;isolation:isolate;animation:none}
body.home-fullscreen .home-screen:before{inset:0;z-index:-2;width:100%;height:100%;transform:none;background:linear-gradient(90deg,#151d47d8 0%,#18264e80 39%,#1c2d5a22 74%),linear-gradient(0deg,#151e486e 0%,transparent 34%,#111b435c 100%),url('./assets/home-background.png') center 58%/cover no-repeat}
.home-hero-content{position:relative;display:flex;align-items:center;justify-content:space-between;width:min(100%,1600px);height:100%;margin:auto;padding:clamp(1.5rem,5vw,5rem) clamp(1.2rem,5.2vw,6rem) 7.5rem}
.home-copy-block{max-width:min(780px,65vw);margin-top:1rem;text-shadow:0 3px 16px #10183d9c}
.home-festival-label{display:flex;align-items:center;gap:.7rem;margin:0 0 .8rem;color:#ffe091;font-size:clamp(.8rem,1.2vw,1.05rem);font-weight:800;letter-spacing:.06em}
.home-festival-label>span{width:30px;height:3px;border-radius:4px;background:#ff8bb0;box-shadow:0 0 12px #ff8bb078}
.home-screen .section-heading h1,.home-copy-block h1{margin:0 0 1rem;font-family:var(--sans);font-size:clamp(2.55rem,5.25vw,5.6rem);font-weight:900;line-height:1.08;letter-spacing:-.045em;color:#fff8e8;text-shadow:0 5px 22px #11173bb3}
.home-copy-block h1 em{color:#ffd86e;font-style:normal}
.home-copy-block .lead{margin:0;color:#fff2e4;font-size:clamp(1rem,1.45vw,1.28rem);font-weight:600;line-height:1.8;text-shadow:0 2px 12px #121a3dcc}
.home-welcome-name{margin:.65rem 0 1.05rem;color:#d9deef;font-size:.9rem}.home-welcome-name strong{color:#ffe099}
.home-actions{display:flex;align-items:center;gap:.75rem;max-width:690px}
.home-action{display:flex;align-items:center;gap:.75rem;min-width:0;min-height:76px;padding:.7rem 1.1rem;border:2px solid #fff4d8;border-radius:25px;color:#4c3e6b;box-shadow:0 7px 0 #161e4c65,0 13px 28px #10173950;cursor:pointer;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}
.home-action:hover{transform:translateY(-3px);filter:brightness(1.05);box-shadow:0 10px 0 #161e4c65,0 18px 30px #10173966}
.home-action:active{transform:translateY(2px);box-shadow:0 3px 0 #161e4c65}
.home-action-build{width:315px;background:linear-gradient(135deg,#fff1b1,#ffd36f)}
.home-action-river{width:270px;border-color:#bceeff;background:linear-gradient(135deg,#79e4f1,#51aaff);color:#fff}
.home-action-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:15px;background:#fff8d8a8;color:#eb829c}
.home-action-river .home-action-icon{background:#e2fbff9c;color:#248cc9}
.home-action-icon svg{width:27px;height:27px;fill:currentColor;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.home-action strong{flex:1;text-align:left;font-size:clamp(.95rem,1.25vw,1.12rem);font-weight:900;white-space:nowrap}
.home-action-arrow{margin-left:auto;font-size:1.6rem;line-height:1}
.home-moon-caption{display:flex;align-items:center;gap:.75rem;margin:0 1rem 8rem 0;color:#fff5d8;text-shadow:0 2px 9px #141b45}
.home-moon-caption>span:last-child{display:grid;gap:.06rem}.home-moon-caption strong{font-size:.92rem}.home-moon-caption small{color:#f0e1c9;font-size:.79rem}
.home-moon-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid #ffebaa77;border-radius:50%;background:#fff0b52c;color:#ffe390;font-size:1.7rem;box-shadow:0 0 32px #ffd97955}
.home-foot{position:absolute;left:clamp(1.2rem,5.2vw,6rem);right:clamp(1.2rem,5.2vw,6rem);bottom:6rem;z-index:1;display:flex;justify-content:flex-start;pointer-events:none}
.home-location{display:flex;align-items:center;gap:.55rem;color:#fff0d4;font-size:.8rem;text-shadow:0 2px 8px #121b3b}.home-location i{font-style:normal;color:#ffd268}.home-location .live-dot{background:#ffd268;box-shadow:0 0 10px #ffd268}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.home-lantern{position:absolute;z-index:-1;width:17px;height:34px;border-radius:8px 8px 6px 6px;background:linear-gradient(90deg,#ffa84a,#ffe19a 45%,#ffad50);box-shadow:0 0 12px #ffd578,0 0 30px #ffcc6d88;animation:lantern-drift 7s ease-in-out infinite;pointer-events:none}
.home-lantern:before,.home-lantern:after{content:"";position:absolute;left:50%;transform:translateX(-50%);background:#ffe5a2}.home-lantern:before{top:-4px;width:9px;height:3px;border-radius:50%}.home-lantern:after{bottom:-6px;width:2px;height:6px}
.home-lantern-one{top:21%;left:41%;transform:scale(.78);animation-delay:-2s}.home-lantern-two{top:27%;right:22%;transform:scale(.95);animation-delay:-4s}.home-lantern-three{top:43%;left:62%;transform:scale(.6);animation-delay:-1s}
@keyframes lantern-drift{0%,100%{translate:0 0;filter:brightness(.94)}50%{translate:8px -15px;filter:brightness(1.16)}}
.account-reward-panel{margin-top:1.25rem}

/* Keep Account focused on the two things players need at a glance. */
.account-screen .account-layout-simple{grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.account-screen .account-status-card{padding:1rem 1.2rem!important}
.account-screen .account-status-heading{margin:0;align-items:center}
.account-screen .account-status-card>p[hidden]{display:none}
.account-screen .account-status-meta{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:.55rem}
.account-screen #account-email-status{margin:0;color:#e4eafa;font-size:.86rem}
.account-screen .guest-id-details{margin:0 0 0 auto;font-size:.78rem}
.account-screen .account-protect-card,.account-screen .account-token-card{min-height:110px;justify-content:center}
.account-screen .account-protect-card>p,.account-screen .account-return-card>p{display:none}
.account-screen .account-connect-details{margin-top:.6rem}
.account-screen .account-connect-details>summary,.account-screen .account-return-card .account-alternative>summary,.account-screen .account-play-rewards>summary{display:flex;align-items:center;justify-content:space-between;min-height:42px;padding:.55rem .85rem;border:1px solid #ffe08a88;border-radius:13px;background:linear-gradient(135deg,#ffe58f,#ffc957);color:#493b73;font-weight:750;cursor:pointer;list-style:none}
.account-screen .account-connect-details>summary::-webkit-details-marker,.account-screen .account-alternative>summary::-webkit-details-marker,.account-screen .account-play-rewards>summary::-webkit-details-marker{display:none}
.account-screen .account-connect-details>summary:after,.account-screen .account-return-card .account-alternative>summary:after,.account-screen .account-play-rewards>summary:after{content:'+';font-size:1.1rem}
.account-screen .account-connect-details[open]>summary:after,.account-screen .account-return-card .account-alternative[open]>summary:after,.account-screen .account-play-rewards[open]>summary:after{content:'−'}
.account-screen .account-connect-details .google-button{margin-top:.7rem}
.account-screen .account-connect-details .account-alternative{margin-top:.55rem}
.account-screen .account-connect-details .account-alternative>summary,.account-screen .account-return-card .account-alternative>summary,.account-screen .account-play-rewards>summary{min-height:38px;background:#334b7c;color:#f5f2e9;border-color:#d8e1ff55}
.account-screen .account-token-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-color:#d7c87888;background:linear-gradient(135deg,#344c7d,#4a5f9a)}
.account-screen .account-token-card h2{margin:.25rem 0 0;color:#e7d6ff;font-size:1.45rem}
.account-screen .account-token-card h2>span:first-child{color:#cfadff}
.account-screen .account-token-card .button{min-height:42px;padding:.55rem .85rem;white-space:nowrap}
.account-screen .account-return-card{grid-column:1/-1;padding:.7rem .9rem!important}
.account-screen .account-return-card[hidden]{display:none}
.account-screen .account-play-rewards{margin-top:.75rem}
.account-screen .account-play-rewards .play-reward-panel{margin-top:.5rem}
.shop-token-topup{scroll-margin-top:1rem;margin:1rem 0}
.shop-token-topup .token-topup-heading{margin-bottom:.65rem}
.shop-token-topup .token-topup-heading h2{font-size:1.35rem}
.shop-credit-link{align-items:center}
.shop-credit-link strong{color:#f9e5a6;font-size:1.1rem}

/* Keep the camera on the released krathong by default; unlock to pan the river manually. */
.river-viewport.camera-locked{overflow-x:hidden;touch-action:none;scrollbar-width:none}
.river-viewport.camera-locked #river-canvas{touch-action:none}
.river-viewport.camera-locked::-webkit-scrollbar{display:none}
.river-camera-lock{position:absolute;z-index:6;top:calc(max(.75rem,env(safe-area-inset-top)) + 3.65rem);right:max(1rem,env(safe-area-inset-right));display:inline-flex;align-items:center;justify-content:center;gap:.42rem;min-height:38px;padding:.42rem .72rem;border:1px solid #ffe6a499;border-radius:999px;background:linear-gradient(135deg,#263766ed,#4c4b82e8);color:#fff3ce;font:750 .76rem/1.1 var(--sans);box-shadow:0 5px 16px #07152c66,inset 0 1px #fff6;backdrop-filter:blur(10px);cursor:pointer}
.river-camera-lock>span:first-child{font-size:.9rem;line-height:1}
.river-camera-lock:hover{border-color:#fff0bd;background:linear-gradient(135deg,#35477c,#625995)}
.river-camera-lock:focus-visible{outline:2px solid #fff0bd;outline-offset:3px}
@media(max-width:560px){.river-camera-lock{top:calc(max(.55rem,env(safe-area-inset-top)) + 3.05rem);right:.65rem;min-height:34px;padding:.36rem .58rem;font-size:.67rem}}
.floating-wish{max-width:min(210px,calc(100vw - 2rem));padding:.42rem .6rem;border-radius:14px;font-size:.78rem;line-height:1.35;pointer-events:none}
.floating-wish::after{left:calc(50% - 6px);bottom:-6px;border-width:6px}
.floating-krathong-name{pointer-events:none}
@media(max-width:560px){.floating-wish{max-width:min(145px,calc(100vw - 2rem));padding:.32rem .48rem;font-size:.68rem}}
@media(max-width:700px){.account-screen .account-layout-simple{grid-template-columns:1fr}.account-screen .account-status-card,.account-screen .account-return-card{grid-column:auto}.account-screen .account-token-card{align-items:flex-start}.account-screen .guest-id-details{margin-left:0}}
@media(max-width:850px){body.home-fullscreen main{height:calc(100dvh - 70px)}.home-hero-content{padding-inline:1.6rem;padding-bottom:7rem}.home-copy-block{max-width:75vw}.home-moon-caption{margin-right:.2rem}.home-screen .section-heading h1,.home-copy-block h1{font-size:clamp(2.65rem,7.5vw,4.4rem)}.home-foot{left:1.6rem;right:1.6rem}}
@media(max-width:560px){body.home-fullscreen>.topbar{height:58px;min-height:58px;padding-inline:.55rem}body.home-fullscreen main{height:calc(100dvh - 58px)}.home-screen:before{background-position:61% center!important;background-image:linear-gradient(90deg,#141d47e8,#1725509c 62%,#1c2d5a66),linear-gradient(0deg,#151e48db 0%,transparent 50%,#111b4388 100%),url('./assets/home-background.png')!important}.home-hero-content{display:flex;align-items:center;justify-content:center;padding:1rem 1.15rem 6rem}.home-copy-block{width:100%;max-width:100%;margin-top:-1.5rem}.home-festival-label{font-size:.68rem;margin-bottom:.65rem}.home-festival-label>span{width:22px}.home-screen .section-heading h1,.home-copy-block h1{font-size:clamp(2.4rem,10vw,3.3rem);line-height:1.12;margin-bottom:.75rem}.home-copy-block .lead{font-size:.87rem;line-height:1.65}.home-welcome-name{font-size:.78rem;margin:.5rem 0 .8rem}.home-actions{gap:.55rem;flex-direction:column;align-items:stretch;max-width:350px}.home-action{width:100%;min-height:59px;padding:.45rem .7rem;border-radius:18px;gap:.6rem}.home-action-icon{flex-basis:36px;width:36px;height:36px;border-radius:12px}.home-action-icon svg{width:23px;height:23px}.home-action strong{font-size:.95rem}.home-action-arrow{font-size:1.3rem}.home-moon-caption{position:absolute;top:1rem;right:1rem;margin:0;gap:.45rem}.home-moon-icon{width:35px;height:35px;font-size:1.25rem}.home-moon-caption strong{font-size:.68rem}.home-moon-caption small{font-size:.6rem}.home-lantern-one{top:24%;left:76%}.home-lantern-two{top:39%;right:9%}.home-lantern-three{top:18%;left:48%}.home-foot{left:1.15rem;right:auto;bottom:5.9rem}.home-location{font-size:.7rem}body.home-fullscreen .bottom-nav{width:calc(100% - 1rem)} }
@media(prefers-reduced-motion:reduce){.home-lantern{animation:none!important}.home-action{transition:none!important}}

/* Refined top navigation marks: clearer silhouettes, softer color, consistent controls. */
.topbar{gap:clamp(.45rem,1vw,1rem)}
.brand{gap:.65rem;font-weight:800;letter-spacing:0}
.brand-mark{width:48px;height:48px;border:0;background:linear-gradient(145deg,#ffd48e,#ff9fb3);color:#493878;box-shadow:0 5px 18px #ec9bb25c,inset 0 1px #fff8d9}
.brand-mark svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.wallet-bar{gap:.45rem}
.currency{min-height:42px;padding:.38rem .8rem;background:#273762bb;border-color:#d2deff30;box-shadow:inset 0 1px #ffffff12;backdrop-filter:blur(12px);font-weight:700}
.currency-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.currency.gold .currency-icon{filter:drop-shadow(0 0 4px #ffd97666)}
.currency.token .currency-icon{fill:currentColor;stroke:#e7dcff;stroke-width:.45;filter:drop-shadow(0 0 5px #c1a2ff99)}
.account-button{display:inline-flex;align-items:center;gap:.48rem;min-height:44px;max-width:220px;padding:.28rem .72rem .28rem .34rem;border:1px solid #d2deff39;border-radius:999px;background:#273762c9;color:#fff5dd;box-shadow:inset 0 1px #ffffff12;backdrop-filter:blur(12px);font-size:.82rem;font-weight:750;white-space:nowrap}
.account-button:hover{border-color:#ffe09a;color:#fff8e8;background:#3b4a78e8}
.account-avatar{display:grid;place-items:center;width:33px;height:33px;flex:none;border-radius:50%;background:linear-gradient(145deg,#ffdc82,#ff9ba9);color:#493878;box-shadow:0 2px 8px #111b3b44}
.account-avatar svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.account-chevron{width:15px;height:15px;flex:none;fill:none;stroke:#d9d7e8;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-button{display:grid;place-items:center;width:44px;height:44px;flex:none;border:1px solid #d2deff4a;border-radius:15px;background:#273762c9;color:#fff0c5;box-shadow:0 6px 18px #0d173c55,inset 0 1px #ffffff18;backdrop-filter:blur(12px);transition:transform .18s ease,border-color .18s ease,background .18s ease}
.settings-button:hover{transform:rotate(18deg);border-color:#ffe09a;background:#45558a;color:#ffe69a}
.settings-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision}
@media(max-width:560px){.topbar{gap:.38rem;padding-inline:.55rem}.brand{gap:.38rem;font-size:.77rem}.brand>span:last-child{max-width:108px}.brand-mark{width:36px;height:36px}.brand-mark svg{width:22px;height:22px}.wallet-bar{gap:.24rem}.currency{min-height:35px;padding:.25rem .46rem;gap:.25rem;font-size:.66rem}.currency-icon{width:14px;height:14px}.account-button{min-height:35px;max-width:102px;padding:.2rem .42rem .2rem .24rem;gap:.3rem;font-size:.67rem}.account-avatar{width:27px;height:27px}.account-avatar svg{width:16px;height:16px}.account-label{overflow:hidden;text-overflow:ellipsis}.account-chevron{width:12px;height:12px}.settings-button{width:36px;height:36px;border-radius:12px}.settings-button svg{width:22px;height:22px}}
@media(max-width:380px){.brand>span:last-child{max-width:82px}.account-button{max-width:35px;padding:.2rem}.account-label,.account-chevron{display:none}}

/* Match the approved home prototype while keeping the real app controls. */
body.home-fullscreen>.topbar{position:absolute;inset:0 0 auto;z-index:10;border:0;background:linear-gradient(180deg,#272c6075,transparent);box-shadow:none;backdrop-filter:none}
body.home-fullscreen main{height:100dvh}
body.home-fullscreen .home-screen:before{background:linear-gradient(90deg,#27265964,#25306005 70%),linear-gradient(0deg,#1a1d4b85,transparent 60%),url('./assets/home-background.png') center 57%/cover no-repeat}
body.home-fullscreen .home-hero-content{padding-top:78px}
body.home-fullscreen .home-welcome-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
body.home-fullscreen .home-actions{margin-top:1.6rem}
body.home-fullscreen .bottom-nav{background:#3a4589d6;border-color:#ffffff3d;box-shadow:0 12px 32px #10153c55}
body.home-fullscreen .bottom-nav button.active{background:#8580ad77;color:#ffe28d;box-shadow:none}
body.home-fullscreen .bottom-nav button.active svg{color:#ffe28d}
@media(max-width:850px){body.home-fullscreen main{height:100dvh}}
@media(max-width:560px){body.home-fullscreen main{height:100dvh}body.home-fullscreen .home-hero-content{padding-top:58px}body.home-fullscreen .home-screen:before{background-image:linear-gradient(90deg,#272659a0,#25306035 75%),linear-gradient(0deg,#1a1d4ba8,transparent 65%),url('./assets/home-background.png')!important}}

/* Home entry flow: name the krathong, then enter the existing Guest builder. */
.home-screen{font-family:'Anuphan',var(--sans)}
.home-copy-block h1{font-family:'Mitr','Anuphan',var(--sans);font-weight:600;letter-spacing:-.035em}
.home-actions{width:min(100%,720px);max-width:720px;gap:.65rem;align-items:flex-end}
.home-name-field{display:grid;flex:1;min-width:0;gap:.35rem;color:#fff4df;font-size:.9rem;font-weight:700}
.home-name-field>span{display:flex;align-items:baseline;gap:.55rem}
.home-name-field small{color:#cbd9e5;font-size:.76rem;font-weight:500}
.home-name-field input{width:100%;min-width:0;height:76px;padding:.75rem 1rem;border:2px solid #bdebe4a8;border-radius:20px;background:#09283b9c;color:#fff7e8;font:600 1rem 'Anuphan',var(--sans);box-shadow:0 7px 0 #161e4c45,0 13px 28px #10173935;backdrop-filter:blur(8px)}
.home-name-field input::placeholder{color:#d3dfdf9c}
.home-name-field input:focus-visible{outline:3px solid #ffe28d;outline-offset:2px}
.home-action-build{flex:0 0 315px;width:auto;font-family:'Mitr','Anuphan',var(--sans)}
@media(max-width:850px){.home-actions{max-width:680px}.home-name-field input{height:68px}.home-action-build{flex-basis:270px;min-height:68px}}
@media(max-width:560px){.home-actions{width:100%;max-width:380px;flex-direction:column;align-items:stretch;gap:.6rem}.home-name-field{width:100%;font-size:.82rem}.home-name-field input{height:54px;border-radius:15px;padding:.55rem .8rem}.home-action-build{width:100%;flex:0 0 auto;min-height:59px;border-radius:17px}.home-action strong{font-family:'Mitr','Anuphan',var(--sans);font-size:.93rem}}

/* Bring the live builder closer to the approved periwinkle game mockup.
   These are presentation-only overrides; inventory and equip actions remain unchanged. */
.builder-screen .preview-panel,
.builder-screen .private-room-panel{border-color:#bdceff70;border-radius:24px;background:linear-gradient(145deg,#5b6fa9,#4e639e);box-shadow:0 12px 30px #17234c35,inset 0 1px #ffffff18}
.builder-screen .preview-panel{padding:1rem}
.builder-screen .preview-stage{border:1px solid #c0ccf477;border-radius:22px;background:radial-gradient(ellipse at 50% 58%,#fff0bd4d,transparent 35%),linear-gradient(180deg,#9680ba 0%,#6c78b4 42%,#39a0a7 77%,#287888 100%)}
.builder-screen .preview-stage:before{background:radial-gradient(circle at 15% 18%,#f8f1c9 0 2px,transparent 3px),radial-gradient(circle at 31% 28%,#9debd7 0 2px,transparent 3px),radial-gradient(circle at 76% 17%,#ffe28e 0 2px,transparent 3px),radial-gradient(circle at 88% 45%,#a0ecd5 0 2px,transparent 3px),linear-gradient(90deg,transparent 49.8%,#f2dfbb20 50%,transparent 50.2%)}
.builder-screen .equipment-stage .equipment-slot{width:64px;min-height:62px;padding:5px;border:2px solid #72ddf6;border-radius:16px;background:linear-gradient(145deg,#5b83c4,#4164a9);box-shadow:0 5px 13px #17244b66,inset 0 1px #ffffff50}
.builder-screen .equipment-stage .equipment-slot.is-selected{border-color:#ffe08a;background:linear-gradient(145deg,#ffe398,#ffc962);box-shadow:0 0 0 3px #fff1b45c,0 4px 12px #22204e66}
.builder-screen .equipment-stage .equipment-slot-icon{width:44px;height:44px;border:1px solid #ffffff28;border-radius:13px;background:linear-gradient(145deg,#7895d3,#5878bb);color:#fff0b7}
.builder-screen .equipment-stage .equipment-slot.is-selected .equipment-slot-icon{background:#fff0be;color:#725184}
.builder-screen .equipment-stage .equipment-slot-copy{bottom:-20px;max-width:94px;padding:.04rem .28rem;border-radius:6px;background:#344779b8;text-shadow:0 1px 3px #18234e}
.builder-screen .equipment-stage .equipment-slot-copy small{color:#e6f5e5;font-size:.59rem}
.builder-screen .equipment-stage .equipment-slot-copy strong{display:block;max-width:90px;overflow:hidden;color:#fff5de;font-size:.66rem;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}
.builder-screen .private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.95rem}
.builder-screen .builder-tabs{border-color:#c7d8ff66;border-radius:17px;background:#314878}
.builder-screen .builder-tab{min-height:42px;border-radius:13px;color:#e4eaf8}
.builder-screen .builder-tab.active{background:linear-gradient(135deg,#fff0a6,#ffc965);color:#574679;box-shadow:0 3px 0 #8b60996b}
.builder-screen .inventory-section-heading h2,.builder-screen .inventory-inline-heading h3{font-family:var(--sans);font-weight:800;color:#fff4df}
.builder-screen .inventory-filter{border-color:#6179b3;border-radius:99px;background:#354c81;color:#e1e9f8}
.builder-screen .inventory-filter:hover,.builder-screen .inventory-filter.active{border-color:#ffe193;background:linear-gradient(135deg,#fff0aa,#ffd071);color:#594878}
.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;padding:.65rem;border:1px solid #b9cdf277;border-radius:19px;background:linear-gradient(145deg,#354b81,#435a91)}
.builder-screen .private-room-panel .inventory-item{position:relative;display:flex;flex-direction:column;align-items:stretch;min-height:142px;aspect-ratio:auto;padding:.42rem;border:1px solid #9bb4e099;border-radius:15px;background:linear-gradient(160deg,#586fa8,#4b6198);box-shadow:0 4px 11px #25376455;color:#fff3df;text-align:left;transition:transform .16s,border-color .16s,box-shadow .16s}
.builder-screen .private-room-panel .inventory-item:hover{transform:translateY(-2px);border-color:#9be9f7;box-shadow:0 7px 15px #25376466}
.builder-screen .private-room-panel .inventory-item-art{display:grid;place-items:center;flex:none;width:100%;height:76px;margin:0 0 .4rem;border:1px solid #b9d2f044;border-radius:11px;background:radial-gradient(ellipse at center,#fef1c546,transparent 61%),linear-gradient(145deg,#7186bd,#5873ac);font-size:2.15rem}
.builder-screen .private-room-panel .inventory-item-copy{display:block;min-width:0}
.builder-screen .private-room-panel .inventory-item-copy .tier-tag{display:none}
.builder-screen .private-room-panel .inventory-item h3{display:block;max-width:100%;font-family:var(--sans);font-size:.8rem;font-weight:800;line-height:1.35;color:#fff7e9}
.builder-screen .private-room-panel .inventory-item .item-detail{display:block;margin:.08rem 0 0;overflow:hidden;color:#d9e3f4;font-size:.64rem;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.builder-screen .private-room-panel .inventory-item.is-equipped{border:2px solid #91ebc8;background:linear-gradient(160deg,#5bbaa9,#398b91);box-shadow:0 0 0 2px #a5f0cd24,0 0 15px #8deac454}
.builder-screen .private-room-panel .inventory-item.is-equipped:after{top:.28rem;right:.32rem;display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#9aecd0;color:#205d65;font-size:.76rem;text-shadow:none}
.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{border-color:#c7f4e966;background:radial-gradient(ellipse at center,#fff4cb69,transparent 62%),linear-gradient(145deg,#6f9fb5,#4b86a2)}
.builder-screen .inventory-empty{border-color:#afc4e477;color:#e0e8f5}
.builder-screen .inventory-future-note{border-color:#c1b9ef77;border-radius:14px;background:#364a7e;color:#e5e9f6}
.builder-screen .inventory-future-note strong{color:#ffe29a}
.builder-screen .builder-market-link{border-radius:14px;background:linear-gradient(135deg,#1e6f7b,#165765);color:#fff5df}
@media(max-width:1150px){.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){.builder-screen .equipment-stage .equipment-slots{grid-template-columns:54px 1fr 54px}.builder-screen .equipment-stage .equipment-slot{width:56px;min-height:55px}.builder-screen .equipment-stage .equipment-slot-icon{width:39px;height:39px}.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){.builder-screen .preview-panel{padding:.55rem}.builder-screen .equipment-stage .equipment-slots{grid-template-columns:44px 1fr 44px;inset:7px}.builder-screen .equipment-stage .equipment-slot{width:43px;min-height:43px;padding:3px;border-radius:12px}.builder-screen .equipment-stage .equipment-slot-icon{width:34px;height:34px;border-radius:10px}.builder-screen .equipment-stage .equipment-slot-copy{bottom:-17px;max-width:74px}.builder-screen .equipment-stage .equipment-slot-copy small{font-size:.52rem}.builder-screen .equipment-stage .equipment-slot-copy strong{max-width:70px;font-size:.57rem}.builder-screen .private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.58rem!important}.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.38rem;padding:.45rem}.builder-screen .private-room-panel .inventory-item{min-height:118px;padding:.34rem;border-radius:12px}.builder-screen .private-room-panel .inventory-item-art{height:60px;margin-bottom:.3rem;border-radius:9px;font-size:1.8rem}.builder-screen .private-room-panel .inventory-item h3{font-size:.7rem}.builder-screen .private-room-panel .inventory-item .item-detail{font-size:.58rem}}

/* Compact builder hierarchy: let the krathong preview and item grid lead. */
body:has(#screen-builder:not(.hidden)) main{width:min(1360px,calc(100% - 2rem));padding-top:.8rem}
.builder-layout{grid-template-columns:minmax(0,.74fr) minmax(0,1fr);gap:.75rem}
.builder-screen .page-heading{margin-bottom:.55rem}
.builder-screen .page-heading h1{font-size:clamp(1.55rem,2.15vw,1.95rem)}
.builder-screen .page-heading>.button{min-height:42px;padding:.5rem .85rem;font-size:.82rem}
.builder-screen .preview-panel{padding:.75rem}
.builder-screen .preview-label{font-size:.78rem}
.builder-screen .preview-stage{min-height:clamp(250px,34vh,360px);margin:.42rem 0}
.builder-screen .preview-stage .krathong-art{transform:translateY(-5px) scale(1.02)}
.builder-screen .preview-caption{font-size:.7rem}
.builder-screen .preview-caption>span{font-size:.65rem}
.builder-screen .private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.7rem}
.builder-screen .private-room-panel .builder-tab-panel{padding:0}
.builder-screen .inventory-filters{gap:.32rem;margin:0 0 .45rem;padding-bottom:.35rem}
.builder-screen .inventory-filter{padding:.34rem .62rem;font-size:.72rem}
.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.42rem;padding:.5rem}
.builder-screen .private-room-panel .inventory-item{min-height:132px;padding:.36rem;border-radius:13px}
.builder-screen .private-room-panel .inventory-item-art{height:67px;margin-bottom:.3rem;border-radius:10px;font-size:1.9rem}
.builder-screen .private-room-panel .inventory-item h3{font-size:.74rem}
.builder-screen .private-room-panel .inventory-item .item-detail{font-size:.6rem}
.inventory-footer{display:flex;justify-content:space-between;align-items:center;gap:.8rem;margin-top:.48rem}
.inventory-footer .inventory-control-hint{margin:0;color:#dfe7f6;font-size:.65rem}
.inventory-footer .builder-market-link{width:auto;margin:0;padding:.2rem .1rem;color:#a9f0d7;font-size:.7rem;font-weight:700}
@media(max-width:1050px){body:has(#screen-builder:not(.hidden)) main{width:calc(100% - 1.5rem)}.builder-layout{grid-template-columns:minmax(0,.8fr) minmax(0,1fr)}.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){.builder-layout{grid-template-columns:1fr}.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){body:has(#screen-builder:not(.hidden)) main{width:calc(100% - .75rem);padding-top:.45rem}.builder-screen .page-heading h1{font-size:1.4rem}.builder-screen .page-heading>.button{min-height:38px;padding:.4rem .6rem;font-size:.7rem}.builder-layout{gap:.45rem}.builder-screen .preview-panel{padding:.5rem}.builder-screen .preview-stage{min-height:220px}.builder-screen .preview-stage .krathong-art{transform:translateY(-4px) scale(.86)}.builder-screen .private-room-panel:has(.builder-tab-panel:not([hidden])){padding:.48rem!important}.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.32rem;padding:.38rem}.builder-screen .private-room-panel .inventory-item{min-height:108px;padding:.3rem;border-radius:11px}.builder-screen .private-room-panel .inventory-item-art{height:54px;font-size:1.65rem}.builder-screen .private-room-panel .inventory-item h3{font-size:.66rem}.builder-screen .private-room-panel .inventory-item .item-detail{font-size:.55rem}.inventory-footer{align-items:flex-start;flex-direction:column;gap:.18rem;margin-top:.35rem}}

/* Compact game-shop tiles: artwork previews stay small; full details remain in the item dialog. */
.builder-screen .inventory-filters{gap:.38rem;margin-bottom:.5rem}
.builder-screen .inventory-filter{min-height:34px;padding:.3rem .66rem;border-radius:10px;background:linear-gradient(145deg,#3c5287,#33487b);font-weight:700;box-shadow:inset 0 1px #ffffff14}
.builder-screen .inventory-filter.active{border-color:#ffe292;background:linear-gradient(145deg,#fff0a8,#ffd071);color:#594878;box-shadow:0 2px 0 #a4758a55}
.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:.42rem;padding:.45rem;border-color:#a8c2ed77;border-radius:15px;background:linear-gradient(145deg,#3a5188,#465e96)}
.builder-screen .private-room-panel .inventory-item{min-height:108px;padding:.34rem;border:1px solid #9db7e299;border-radius:11px;background:linear-gradient(155deg,#657fb5,#536b9f);box-shadow:0 4px 9px #26386742}
.builder-screen .private-room-panel .inventory-item-art{height:48px;margin-bottom:.26rem;border:1px solid #c1d5ef44;border-radius:8px;background:radial-gradient(ellipse at 50% 55%,#fff4d268,transparent 58%),linear-gradient(145deg,#8098c7,#6682b5);font-size:1.45rem}
.builder-screen .private-room-panel .inventory-item-art img{padding:4px}
.builder-screen .private-room-panel .inventory-item h3{font-size:.7rem;line-height:1.25}
.builder-screen .private-room-panel .inventory-item .item-detail{font-size:.56rem}
.builder-screen .private-room-panel .inventory-item.is-equipped{border:2px solid #8de8f5;background:linear-gradient(155deg,#58b7ad,#428d92);box-shadow:0 0 0 2px #9bf0d126,0 4px 12px #243e6d4a}
.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{height:44px;margin:2px 2px .28rem;border-color:#c3f2e384;background:radial-gradient(ellipse at 50% 55%,#fff7d975,transparent 62%),linear-gradient(145deg,#72a6ba,#588da9)}
.builder-screen .private-room-panel .inventory-item.is-equipped:after{top:.22rem;right:.24rem;width:18px;height:18px;font-size:.66rem}
.builder-screen .inventory-footer{padding:.05rem .1rem}
@media(max-width:1150px){.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:850px){.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:600px){.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.32rem;padding:.35rem}.builder-screen .private-room-panel .inventory-item{min-height:98px;padding:.28rem}.builder-screen .private-room-panel .inventory-item-art{height:42px;font-size:1.25rem}.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{height:39px}.builder-screen .private-room-panel .inventory-item h3{font-size:.65rem}.builder-screen .private-room-panel .inventory-item .item-detail{font-size:.52rem}}
@media(max-width:380px){.builder-screen .private-room-panel .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Shared icon language: rounded, fine-line SVGs in warm, low-contrast badges. */
:root{--ui-icon-ink:#ffe28d;--ui-icon-wash:#fff0b51c;--ui-icon-edge:#ffd77463}
.ui-icon{display:block;width:1.25rem;height:1.25rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.brand-mark svg,.account-avatar svg,.account-chevron,.bottom-nav button svg,.home-action-icon svg,.feature-card .card-symbol svg,.modal-emblem .ui-icon,.setting-icon .ui-icon,.province-search .ui-icon,.province-choice-mark .ui-icon,.notice-icon .ui-icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-button,.menu-button{color:var(--ui-icon-ink)}
.home-action-icon,.home-action-river .home-action-icon{background:var(--ui-icon-wash);color:var(--ui-icon-ink)}
.home-action-icon svg{fill:none;stroke:currentColor;stroke-width:1.8}
.feature-card .card-symbol,.river-card .card-symbol{background:var(--ui-icon-wash);border-color:var(--ui-icon-edge);color:var(--ui-icon-ink);box-shadow:inset 0 1px #ffffff18}
.modal-emblem{border-color:var(--ui-icon-edge);border-radius:15px;background:linear-gradient(145deg,#fff0b51c,#fff0b50b);color:var(--ui-icon-ink)}
.modal-emblem .ui-icon{width:25px;height:25px}
.setting-icon{border:1px solid var(--ui-icon-edge);background:var(--ui-icon-wash);color:var(--ui-icon-ink)}
.setting-icon .ui-icon{width:20px;height:20px}
.province-search .ui-icon{width:18px;height:18px;color:var(--ui-icon-ink)}
.province-choice-mark{background:var(--ui-icon-wash);border:1px solid var(--ui-icon-edge);color:var(--ui-icon-ink)}
.notice-icon{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid var(--ui-icon-edge);border-radius:12px;background:var(--ui-icon-wash);color:var(--ui-icon-ink);font-size:1rem}
.notice-icon .ui-icon{width:20px;height:20px}

/* Keep the builder frame aligned with the preview; scroll only the item list. */
.builder-screen .builder-layout{height:clamp(470px,58vh,650px);align-items:stretch}
.builder-screen .preview-panel,.builder-screen .private-room-panel{height:100%;min-height:0}
.builder-screen .private-room-panel{display:flex;flex-direction:column;overflow:hidden}
.builder-screen .private-room-panel .builder-tab-panel{display:flex;flex:1;flex-direction:column;min-height:0}
.builder-screen .private-room-panel .inventory-filters{flex:none}
.builder-screen .private-room-panel .inventory-grid{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;grid-auto-rows:166px}
.builder-screen .private-room-panel .inventory-footer{flex:none}
.topbar{height:78px;min-height:78px;padding-block:0}
.brand-mark{flex:none;width:48px;height:48px;align-self:center}
@media(max-width:850px){.builder-screen .builder-layout{height:auto;min-height:0}.builder-screen .preview-panel{height:auto;min-height:420px}.builder-screen .private-room-panel{height:clamp(470px,65vh,620px)}}
@media(max-width:560px){.topbar{height:58px;min-height:58px}.brand-mark{width:36px;height:36px}.builder-screen .preview-panel{min-height:300px}.builder-screen .private-room-panel{height:clamp(430px,62vh,560px)}.builder-screen .private-room-panel .inventory-grid{grid-auto-rows:148px}}
.item-dialog-actions{justify-content:center;gap:.4rem;padding-top:.65rem}
.item-dialog-action{flex:0 0 33.333%;min-height:38px;padding:.48rem .9rem;font-size:.92rem;border-radius:11px}

/* Stable, tier-framed inventory cards. Selection changes color/glow only, never geometry. */
.builder-screen .private-room-panel .inventory-grid{grid-auto-rows:166px;align-content:start}
.builder-screen .private-room-panel .inventory-item{height:166px;min-height:166px;box-sizing:border-box;padding:.42rem;border:2px solid var(--item-tier-frame,#f2f3f7);gap:.34rem;transform:none;transition:box-shadow .16s,filter .16s;background:linear-gradient(160deg,#596fa7,#4b6196);box-shadow:0 4px 11px #25376455}
.builder-screen .private-room-panel .inventory-item[data-tier="1"]{--item-tier-frame:#f4f2e9}
.builder-screen .private-room-panel .inventory-item[data-tier="2"]{--item-tier-frame:#69c9ff}
.builder-screen .private-room-panel .inventory-item[data-tier="3"]{--item-tier-frame:#c49aff}
.builder-screen .private-room-panel .inventory-item[data-tier="4"]{--item-tier-frame:#ffd36b}
.builder-screen .private-room-panel .inventory-item:hover{transform:none;border-color:var(--item-tier-frame);filter:brightness(1.06);box-shadow:0 0 0 2px color-mix(in srgb,var(--item-tier-frame) 28%,transparent),0 6px 14px #25376466}
.builder-screen .private-room-panel .inventory-item.is-equipped{border:2px solid var(--item-tier-frame);padding:.42rem;background:linear-gradient(160deg,#55709e,#465d8e);box-shadow:inset 0 0 0 2px #a4f0d144,0 0 0 2px #9de8d34a,0 5px 13px #25376466}
.builder-screen .private-room-panel .inventory-item-art{height:112px;min-height:112px;margin:0;border:1px solid #ffffff40;border-radius:11px;background:radial-gradient(ellipse at center,#fff4d26b,transparent 64%),linear-gradient(145deg,#7891c1,#607bad);font-size:2.4rem}
.builder-screen .private-room-panel .inventory-item-art img{width:100%;height:100%;padding:3px;object-fit:contain}
.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{height:112px;min-height:112px;margin:0;border-color:#ffffff55;background:radial-gradient(ellipse at center,#fff4d26b,transparent 64%),linear-gradient(145deg,#7891c1,#607bad)}
.builder-screen .private-room-panel .inventory-item-copy{display:flex;min-height:0;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px}
.builder-screen .private-room-panel .inventory-item-copy .tier-tag{display:inline-flex;align-items:center;margin:0;padding:.02rem .38rem;border:1px solid var(--item-tier-frame,#f4f2e9);border-radius:99px;background:#354a79;color:var(--item-tier-frame,#f4f2e9);font-size:.52rem;font-weight:800;line-height:1.25;white-space:nowrap}
.builder-screen .private-room-panel .inventory-item h3{width:100%;font-size:.78rem;line-height:1.2;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.builder-screen .private-room-panel .inventory-item .item-detail{display:none}
.builder-screen .private-room-panel .inventory-item.is-equipped:after{top:.28rem;right:.3rem;width:20px;height:20px;font-size:.72rem}
@media(max-width:600px){.builder-screen .private-room-panel .inventory-grid{grid-auto-rows:148px}.builder-screen .private-room-panel .inventory-item{height:148px;min-height:148px;padding:.34rem}.builder-screen .private-room-panel .inventory-item.is-equipped{padding:.34rem}.builder-screen .private-room-panel .inventory-item-art,.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{height:96px;min-height:96px;font-size:2rem}.builder-screen .private-room-panel .inventory-item h3{font-size:.68rem}}

/* Account visual refresh: typography, icon treatment and color only. */
.account-screen{font-family:'Anuphan',var(--sans)}
.account-screen .page-heading{align-items:flex-end;gap:1rem;margin-bottom:1.25rem}
.account-screen .page-heading h1{font-family:'Mitr','Anuphan',var(--sans);font-size:clamp(2rem,4vw,3rem);font-weight:600;letter-spacing:-.025em;line-height:1.2;color:#fff8e9}
.account-screen .page-heading .eyebrow,
.account-screen .account-card .eyebrow{color:#a9f0d8;font-family:'Anuphan',var(--sans);font-size:.76rem;font-weight:800;letter-spacing:.045em}
.account-screen .account-layout-simple{gap:.85rem}
.account-screen .account-layout-simple .account-card{
  border:1px solid #d8e2ff48;
  border-radius:22px;
  background:linear-gradient(145deg,#6378b8f5,#5068a8f2 76%,#4c64a1f2);
  box-shadow:0 12px 30px #1724482b,inset 0 1px #ffffff16;
}
.account-screen .account-status-card{padding:1.1rem 1.25rem!important}
.account-screen .account-status-heading,.account-screen .account-card-heading{gap:.8rem}
.account-screen .account-card-icon{
  flex-basis:48px;width:48px;height:48px;border:1px solid #ffe0a077;border-radius:17px;
  background:linear-gradient(145deg,#ffdfaa,#ffaebc);color:#5a4a86;
  box-shadow:0 5px 15px #252b5a33,inset 0 1px #fff8df;
}
.account-screen .account-card-icon svg{width:24px;height:24px;stroke-width:1.9}
.account-screen .account-status-card h2,.account-screen .account-protect-card h2,.account-screen .account-return-card h2{
  font-family:'Mitr','Anuphan',var(--sans);font-size:1.35rem;font-weight:600;line-height:1.3;letter-spacing:-.018em;color:#fff8e9
}
.account-screen #account-email-status,.account-screen .guest-id-details,.account-screen .guest-id-details summary{color:#e6edff}
.account-screen .account-state-chip{border-color:#9be8cd64;background:#355981a8;color:#b8f3dc;font-weight:700}
.account-screen .account-state-chip[data-state="offline"]{background:#665987a8;color:#ffe5b5}
.account-screen .account-state-chip[data-state="pending"]{background:#3b6885a8;color:#d9f4ff}
.account-screen .account-status-meta{border-top-color:#e5eaff36}
.account-screen .account-protect-card,.account-screen .account-token-card{min-height:126px}
.account-screen .account-connect-details>summary,
.account-screen .account-return-card .account-alternative>summary,
.account-screen .account-play-rewards>summary{
  min-height:46px;border-color:#ffe0929c;border-radius:14px;
  background:linear-gradient(135deg,#fff0a9,#ffc85f);color:#55467c;
  font-family:'Anuphan',var(--sans);font-size:.96rem;font-weight:800;
  box-shadow:0 4px 0 #71598b38;transition:filter .16s,transform .16s
}
.account-screen .account-connect-details>summary:hover,
.account-screen .account-return-card .account-alternative>summary:hover,
.account-screen .account-play-rewards>summary:hover{filter:brightness(1.05);transform:translateY(-1px)}
.account-screen .account-connect-details .account-alternative>summary,
.account-screen .account-return-card .account-alternative>summary,
.account-screen .account-play-rewards>summary{background:#405991;color:#f6f3ff;border-color:#d5e1ff52;box-shadow:none}
.account-screen .account-protect-card .google-button{
  min-height:48px;border-color:#fff4da;border-radius:14px;background:linear-gradient(135deg,#fffdf5,#fff4df);
  color:#354673;font-family:'Anuphan',var(--sans);font-weight:800;box-shadow:0 5px 15px #1a28503a
}
.account-screen .account-protect-card .google-button:hover{filter:brightness(1.03);box-shadow:0 7px 19px #1a285044}
.account-screen .account-token-card{
  border-color:#c9c5ff72;
  background:linear-gradient(135deg,#596da9,#536aa8 54%,#625c9e);
}
.account-screen .account-token-card h2{font-family:'Mitr','Anuphan',var(--sans);font-size:1.55rem;font-weight:600;color:#fff5e5}
.account-screen .account-token-card h2>span:first-child{color:#ecc8ff;font-size:1.05rem;text-shadow:0 0 14px #f1c9ff9c}
.account-screen .account-token-card .button.primary{
  min-height:44px;padding:.55rem 1rem;border:1px solid #a9efff9c;border-radius:14px;
  background:linear-gradient(120deg,#75deed,#61a9fb);color:#fff;
  box-shadow:0 4px 0 #425f9a65,0 8px 16px #253e7240;font-family:'Anuphan',var(--sans);font-weight:800
}
.account-screen .account-token-card .button.primary:hover:not(:disabled){filter:brightness(1.07)}
.account-screen .account-return-card{border-color:#d8e2ff48}
.account-screen .account-form input{border-color:#d6e1ff66;border-radius:12px;background:#344c83;color:#fff9ed}
.account-screen .account-form input::placeholder{color:#cbd8f0}
.account-screen .account-form label{color:#fff4df;font-weight:700}
.account-screen .account-token-card{flex-wrap:wrap}
.account-screen .redeem-token-code-form{flex:1 0 100%;margin-top:.35rem}
.account-screen .redeem-token-code-row{display:flex;gap:.6rem;align-items:center}
.account-screen .redeem-token-code-row input{flex:1;min-width:0}
.account-screen .redeem-token-code-row button{width:auto;white-space:nowrap}
.account-screen .redeem-token-code-form .helper-note{margin:.35rem 0 0}
.account-screen .account-card .helper-note,.account-screen .account-google-return small{color:#e3eaff}
.account-screen .copy-guest-id{color:#ffe08a}
.account-screen :where(button,summary,input):focus-visible{outline-color:#fff0a6;outline-offset:3px}
@media(max-width:700px){
  .account-screen .page-heading h1{font-size:clamp(1.8rem,8vw,2.35rem)}
  .account-screen .account-status-heading{flex-wrap:wrap}
  .account-screen .account-state-chip{margin-left:56px}
  .account-screen .account-protect-card,.account-screen .account-token-card{min-height:112px}
}
@media(max-width:440px){
  .account-screen .account-card-icon{flex-basis:42px;width:42px;height:42px;border-radius:15px}
  .account-screen .account-status-card h2,.account-screen .account-protect-card h2{font-size:1.2rem}
  .account-screen .account-state-chip{margin-left:50px}
  .account-screen .account-token-card{gap:.55rem;padding:.9rem!important}
  .account-screen .account-token-card h2{font-size:1.35rem}
  .account-screen .account-token-card .button.primary{padding:.5rem .65rem;font-size:.83rem}
}

/* Account: distinguish saving a Guest from opening an existing Gmail account. */
.account-screen .account-protect-card>#account-protect-copy{display:block;min-height:0;margin:.35rem 0 .65rem;color:#e7edfb;font-size:.84rem;line-height:1.5}
.account-screen .account-connect-details[hidden]{display:none!important}
.account-screen .account-google-return{margin-top:.7rem;padding:.7rem .8rem .15rem;border-top:1px solid #e0e8ff42;border-radius:0 0 12px 12px;background:#354b7b33}
.account-screen .account-google-return>p:first-child{margin:0 0 .45rem;color:#fff0bd;font-size:.83rem;font-weight:750}
.account-screen .account-google-return small{display:block;margin-top:.4rem;color:#e3eaff;font-size:.76rem;line-height:1.45}
.account-screen .account-google-return .button.secondary{width:100%;min-height:43px;border-color:#d6e1ff59;border-radius:12px;background:#354b7b;color:#fff8e9;font-weight:750}
.account-screen .account-sign-out{align-self:flex-start;margin-top:.7rem;border-color:#d6e1ff59;border-radius:12px;background:#354b7b;color:#fff8e9;font-weight:700}
.account-screen .account-sign-out[hidden]{display:none!important}
.account-screen #sign-out-message{margin:.35rem 0 0;min-height:0}
@media(max-height:760px){.account-screen .page-heading{margin-bottom:.6rem}.account-screen .account-layout-simple{gap:.6rem}.account-screen .account-layout-simple .account-card{padding:.8rem!important}.account-screen .account-status-card{padding:.8rem 1rem!important}.account-screen .account-protect-card,.account-screen .account-token-card{min-height:100px}}

/* Market: match the prototype's clear decoration / Token split and colorful item mall. */
.shop-screen [hidden]{display:none!important}
.shop-screen .shop-layout{grid-template-columns:minmax(0,1fr);gap:.8rem}
.shop-screen .shop-sidebar{position:static;display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:.7rem}
.shop-screen .shop-showcase{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;align-items:center;gap:.3rem .8rem;padding:.7rem 1rem;border-color:#8db5f077;border-radius:20px;background:linear-gradient(120deg,#596eae,#465b9b 58%,#5a61a2);box-shadow:0 9px 22px #1728583b}
.shop-screen .shop-showcase:before,.shop-screen .shop-main-panel:before{display:none}
.shop-screen .shop-panel-heading{grid-column:1;grid-row:1;gap:.6rem}
.shop-screen .shop-panel-heading h2{font:600 1.1rem 'Mitr','Anuphan',var(--sans)}
.shop-screen .shop-panel-heading .eyebrow{font-size:.68rem}
.shop-screen .shop-ornament{width:34px;height:34px;border:0;background:#ffd982;color:#68539a}
.shop-screen .shop-preview-stage{grid-column:2;grid-row:1/3;min-height:88px;margin:0;border:1px solid #b8c9ff66;border-radius:14px;background:radial-gradient(ellipse at 50% 80%,#7ce1e855,transparent 55%),linear-gradient(145deg,#a08fca,#5489b2)}
.shop-screen .shop-preview-stage .krathong-art{width:100px;height:75px;transform:scale(.52);filter:drop-shadow(0 7px 12px #18275d88)}
.shop-screen .shop-preview-caption{grid-column:1;grid-row:2;gap:0;padding:0 .2rem;font-size:.75rem}
.shop-screen .shop-preview-caption strong{font-size:.85rem}
.shop-screen .shop-preview-action{grid-column:3;grid-row:1/3;width:auto;min-height:42px;white-space:nowrap;border:1px solid #c6d5ff66;border-radius:13px;background:#344a83;color:#fff4dc}
.shop-screen .shop-credit-link{display:flex;align-items:center;justify-content:center;gap:.7rem;min-width:220px;margin:0;padding:.7rem .9rem;border:1px solid #92a9ec66;border-radius:18px;background:linear-gradient(145deg,#665b9b,#505c9c);box-shadow:0 9px 22px #1728583b}
.shop-screen .shop-credit-link>div{gap:0}
.shop-screen .shop-credit-link .eyebrow{font-size:.68rem}
.shop-screen .shop-credit-link strong{font:600 1.05rem 'Mitr','Anuphan',var(--sans);color:#f4d77b;white-space:nowrap}
.shop-screen .shop-credit-link .button{width:auto;min-height:38px;padding:.4rem .65rem;border:1px solid #ffdc88;border-radius:12px;background:linear-gradient(130deg,#fff0ab,#ffc75f);color:#59488b;font-weight:800;white-space:nowrap}
.shop-screen .shop-main-panel{padding:0;border:0;overflow:visible;background:transparent;box-shadow:none}
.shop-screen .shop-section-nav{position:relative;top:auto;display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin:0 0 .85rem;padding:0;border:0;background:transparent;backdrop-filter:none}
.shop-screen .shop-section-nav button{display:flex;align-items:center;justify-content:center;gap:.6rem;min-height:50px;border:1px solid #a8b9f366;border-radius:15px;background:linear-gradient(140deg,#354c86,#2b4077);box-shadow:0 4px 0 #202e5b88;color:#e6e9ff;font:700 1rem 'Mitr','Anuphan',var(--sans)}
.shop-screen .shop-section-nav button .ui-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.shop-screen .shop-section-nav button:first-child>span{font-size:1.25rem;color:#ffd36e}
.shop-screen .shop-section-nav button.active{border-color:#fff0a6;background:linear-gradient(130deg,#fff0a4,#ffc65e);box-shadow:0 4px 0 #886cb4;color:#54447f}
.shop-screen .shop-window-heading{display:none}
.shop-screen .shop-notice{margin:0 0 .7rem;padding:.6rem .9rem;border:0;border-radius:14px;background:linear-gradient(100deg,#2e457e,#394d89);color:#f6edda}
.shop-screen .shop-notice p{font-size:.8rem}
.shop-screen .shop-notice .notice-icon{color:#ffd671}
.shop-screen .shop-category-row{display:flex;align-items:center;gap:.75rem;margin:0 0 .65rem}
.shop-screen .shop-category-row>span{color:#e5e9ff;font-size:.78rem;font-weight:800;white-space:nowrap}
.shop-screen .shop-category-filters{display:flex;flex-wrap:wrap;gap:.4rem;min-width:0}
.shop-screen .shop-category-filters button{min-height:34px;padding:.35rem .75rem;border:1px solid #8fa5ed50;border-radius:99px;background:#33487f;color:#e2e7ff;font:600 .78rem 'Anuphan',var(--sans);cursor:pointer;transition:background .16s,color .16s,transform .16s}
.shop-screen .shop-category-filters button:hover{transform:translateY(-1px)}
.shop-screen .shop-category-filters button.active{border-color:#ffe5a0;background:linear-gradient(130deg,#fff0a4,#ffd071);color:#5c4c83}
.shop-screen #shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;scroll-margin-top:1rem}
.shop-screen .shop-grid-empty{grid-column:1/-1;margin:.4rem 0;padding:1.1rem;border:1px dashed #a6b9ef66;border-radius:14px;color:#e0e6f5;text-align:center;background:#263b7133}
.shop-screen .shop-item{min-height:0;padding:.6rem;border:1px solid #a6b9ef77;border-radius:17px;background:linear-gradient(150deg,#7887c2,#5369a5 56%,#416e9f);box-shadow:0 7px 16px #1828583b;transition:transform .18s,border-color .18s,box-shadow .18s}
.shop-screen .shop-item:before{inset:4px;border-color:#e3eaff3b;border-radius:12px}
.shop-screen .shop-item:after{top:12px;right:13px;color:#ffe28b;font-size:.9rem}
.shop-screen .shop-item:hover{transform:translateY(-3px);border-color:#ffe28d;box-shadow:0 12px 22px #18285855}
.shop-screen .shop-item.tier-3{border-color:#f3d08b;background:linear-gradient(150deg,#8d83bd,#6273ad 58%,#4b739d)}
.shop-screen .shop-item.tier-4{border-color:#d6b6f4;background:linear-gradient(150deg,#7666a8,#5c69a4 58%,#436b95)}
.shop-screen .shop-item .item-art{height:142px;margin:0 0 .5rem;border:0;border-radius:13px;background:radial-gradient(ellipse at 50% 70%,#fff4c466,transparent 60%),linear-gradient(145deg,#9686c1,#5089ad)}
.shop-screen .shop-item .item-art img{max-height:130px;padding:4px;filter:drop-shadow(0 5px 8px #26356b66)}
.shop-screen .shop-item .tier-tag{margin:0 0 .2rem;border-color:#ffffff48;border-radius:99px;background:#344a83;color:#fff0be;font-size:.65rem}
.shop-screen .shop-item h3{min-height:0;margin:.05rem 0 .25rem;color:#fff8e8;font:600 1.08rem 'Mitr','Anuphan',var(--sans)}
.shop-screen .shop-item .item-detail{min-height:2em;margin:0 0 .5rem;color:#e5eaff;font-size:.76rem}
.shop-screen .shop-item .item-owned{color:#9cffe0}
.shop-screen .shop-item .item-actions{display:flex;gap:.35rem}
.shop-screen .shop-item .item-actions .button{min-height:37px;padding:.35rem .5rem;border:1px solid #fff3b5;border-radius:11px;background:linear-gradient(130deg,#fff0a4,#ffc75f);box-shadow:0 3px 0 #806ba5;color:#594a7f;font:700 .76rem 'Anuphan',var(--sans)}
.shop-screen .shop-item .item-actions .button:disabled{border-color:#a9b1d1;background:#54648e;box-shadow:none;color:#d1d6e8;opacity:.75}
.shop-screen .shop-token-panel .token-topup-panel{margin:0;border-color:#b7c7f366;border-radius:20px;background:linear-gradient(145deg,#566ca7,#394f89);box-shadow:0 12px 28px #1e2e5d44}
.shop-screen .shop-token-panel .token-topup-panel:before{border-color:#e1e8ff33}
.shop-screen .shop-token-panel .token-topup-heading h2{font:600 1.45rem 'Mitr','Anuphan',var(--sans);color:#fff7e8}
.shop-screen .shop-token-panel .token-balance-card{border-color:#c9b2f177;border-radius:14px;background:#2f4075}
.shop-screen .shop-token-panel .topup-actions .button{border-color:#91b9ff66;border-radius:14px;background:linear-gradient(145deg,#465f9c,#354a82);color:#fff2d8}
.shop-screen .shop-token-panel .topup-actions .button:not(:disabled):hover{border-color:#ffdf8b;background:linear-gradient(130deg,#fff0a4,#ffc75f);color:#594a7f}
.shop-screen .gacha-panel{margin-top:1rem;border-color:#9db1e766;border-radius:18px;background:linear-gradient(145deg,#4c629d,#2e457b);box-shadow:0 10px 26px #19285544}
.shop-screen .gacha-panel .subsection-title{color:#ffe19a}
@media(max-width:1050px){.shop-screen #shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
  .shop-screen .shop-sidebar{grid-template-columns:1fr}
  .shop-screen .shop-showcase{grid-template-columns:minmax(0,1fr) 96px auto}
  .shop-screen .shop-preview-stage{grid-column:2;grid-row:1/3;min-height:76px;margin:0}
  .shop-screen .shop-preview-stage .krathong-art{transform:scale(.42)}
  .shop-screen .shop-preview-caption{grid-column:1;grid-row:2}
  .shop-screen .shop-preview-action{grid-column:3;grid-row:1/3;padding:.45rem .55rem;font-size:.72rem}
  .shop-screen .shop-credit-link{justify-content:space-between;min-width:0}
  .shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
  .shop-screen .shop-item{padding:.5rem}
  .shop-screen .shop-item .item-art{height:116px}
  .shop-screen .shop-category-row{align-items:flex-start;flex-direction:column;gap:.35rem}
}
@media(max-width:420px){
  .shop-screen .shop-showcase{grid-template-columns:minmax(0,1fr) 72px auto;padding:.55rem}
  .shop-screen .shop-preview-stage{min-height:68px}
  .shop-screen .shop-preview-action{font-size:.65rem}
  .shop-screen .shop-credit-link{padding:.55rem .7rem}
  .shop-screen .shop-credit-link .button{font-size:.73rem}
  .shop-screen .shop-section-nav button{font-size:.82rem}
  .shop-screen .shop-item .item-art{height:94px}
  .shop-screen .shop-item h3{font-size:.92rem}
  .shop-screen .shop-item .item-detail{font-size:.67rem}
  .shop-screen .shop-item .item-actions{flex-direction:column}
}

/* Market compact catalogue: art, name and Tier stay in the grid; purchase
   choices live in the item's detail dialog so the existing shop flow remains. */
.shop-screen .shop-layout{grid-template-columns:minmax(0,1fr);gap:0}
.shop-screen .shop-main-panel{width:100%;min-width:0}
.shop-screen .shop-category-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.55rem;margin:.15rem 0 .75rem}
.shop-screen .shop-category-filters{flex-wrap:wrap}
.shop-screen .shop-tier-label{margin-left:.25rem;color:#e5e9ff;font-size:.78rem;font-weight:800}
.shop-screen .shop-tier-filters{display:flex;align-items:center;gap:.35rem}
.shop-screen .shop-tier-filters button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #c8d7ff88;border-radius:50%;background:#33487f;color:#f4f5ff;font:700 .78rem 'Anuphan',var(--sans);cursor:pointer;transition:transform .15s,background .15s,color .15s,border-color .15s}
.shop-screen .shop-tier-filters button:first-child{width:auto;min-width:54px;padding:0 .55rem;border-radius:99px;font-size:.7rem}
.shop-screen .shop-tier-filters button:hover{transform:translateY(-1px);border-color:#fff0a4}
.shop-screen .shop-tier-filters button.active{border-color:#fff0a4;background:linear-gradient(130deg,#fff0a4,#ffd071);color:#5c4c83}
.shop-screen #shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.6rem;align-items:stretch}
.shop-screen #shop-grid .shop-item{display:grid;grid-template-rows:106px auto auto;align-content:start;gap:.4rem;min-width:0;min-height:0;padding:.55rem;border:2px solid var(--shop-tier-border,#fff);border-radius:16px;background:linear-gradient(150deg,#7182bd,#5269a4 58%,#47759e);box-shadow:0 5px 14px #18285836;cursor:pointer;transition:transform .16s,box-shadow .16s,border-color .16s}
.shop-screen #shop-grid .shop-item:before{inset:3px;border-color:#ffffff2b;border-radius:11px;pointer-events:none}
.shop-screen #shop-grid .shop-item:after{top:10px;right:12px;color:#ffe28b;font-size:.72rem;pointer-events:none}
.shop-screen #shop-grid .shop-item:hover{transform:translateY(-2px);border-color:var(--shop-tier-border,#fff);box-shadow:0 9px 18px #1828584e}
.shop-screen #shop-grid .shop-item:focus-visible{outline:3px solid #fff0a4;outline-offset:2px}
.shop-screen #shop-grid .shop-item.tier-1{--shop-tier-border:#f7f8ff}
.shop-screen #shop-grid .shop-item.tier-2{--shop-tier-border:#69c8ff}
.shop-screen #shop-grid .shop-item.tier-3{--shop-tier-border:#ce8bff;background:linear-gradient(150deg,#786eb2,#586ba7 58%,#486f9d)}
.shop-screen #shop-grid .shop-item.tier-4{--shop-tier-border:#ffd267;background:linear-gradient(150deg,#8d7ba9,#6573a7 58%,#52749b)}
.shop-screen #shop-grid .shop-item .item-art{height:106px;margin:0;border:1px solid #ffffff34;border-radius:11px;background:radial-gradient(ellipse at 50% 70%,#fff4c466,transparent 60%),linear-gradient(145deg,#9686c1,#5089ad)}
.shop-screen #shop-grid .shop-item .item-art img{max-height:100%;padding:5px;filter:drop-shadow(0 4px 7px #26356b66)}
.shop-screen #shop-grid .shop-item h3{min-width:0;min-height:0;margin:0;overflow:hidden;color:#fff8e8;font:600 .98rem 'Mitr','Anuphan',var(--sans);line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.shop-screen #shop-grid .shop-item .tier-tag{justify-self:start;margin:0;padding:.12rem .48rem;border:1px solid var(--shop-tier-border,#fff);border-radius:99px;background:#344a83;color:#fff;font-size:.68rem;line-height:1.3}
.shop-item-dialog{border-color:#c8d9ff99;background:linear-gradient(145deg,#576da8,#344a80);color:#fff8e8}
.shop-item-dialog .item-dialog-eyebrow,.shop-item-dialog .item-dialog-info p{color:#d7e4ff}
.shop-item-dialog .item-dialog-icon{border-color:#ffd267;background:linear-gradient(145deg,#8492ca,#4d7da7)}
.shop-item-dialog .item-dialog-tier{border-color:#ffd267;color:#fff0b5}
.shop-item-dialog .item-dialog-actions{justify-content:center}
.shop-item-dialog .item-dialog-action{flex:1 1 42%;min-height:42px}

/* UI item art uses alpha bounds from the icon/preview image so assets with a
   shared 512px preview artboard still read clearly in compact square frames. */
.catalog-item-image.is-trimmed{position:relative;inset:auto;width:100%;height:100%;max-width:100%;max-height:100%;padding:0!important;object-fit:contain}
.item-art-fallback{position:relative;z-index:1}
.shop-screen #shop-grid .shop-item .item-art{isolation:isolate;background:radial-gradient(ellipse at 50% 58%,#fff7d888,transparent 54%),linear-gradient(145deg,#a394cb,#548db3)}
.shop-screen #shop-grid .shop-item .item-art:after{content:"";position:absolute;z-index:0;left:18%;right:18%;bottom:13%;height:12%;border-radius:50%;background:#18285828;filter:blur(7px)}
.shop-screen #shop-grid .shop-item .item-art img{z-index:1;filter:drop-shadow(0 7px 9px #1d2c5e70)}
.shop-item-dialog .item-dialog-icon{isolation:isolate;background:radial-gradient(ellipse at 50% 60%,#fff6d788,transparent 57%),linear-gradient(145deg,#8492ca,#4d7da7)}
.shop-item-dialog .item-dialog-icon .catalog-item-image{z-index:1;filter:drop-shadow(0 5px 7px #20345f66)}
.shop-screen #shop-grid .shop-item{grid-template-rows:112px auto auto}
.shop-screen #shop-grid .shop-item .item-art{height:112px}
.shop-item-dialog{width:min(520px,calc(100vw - 2rem))}
.shop-item-dialog .item-dialog-body{grid-template-columns:160px minmax(0,1fr);gap:1rem}
.shop-item-dialog .item-dialog-icon{position:relative;width:160px;height:160px;aspect-ratio:auto;overflow:hidden;box-sizing:border-box;border-radius:16px}
.shop-item-dialog .item-dialog-icon .catalog-item-image.is-preview-art{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);max-width:none;max-height:none;box-sizing:border-box;object-fit:contain}
.shop-item-dialog .shop-item-preview-art{position:absolute;inset:0;width:100%;height:100%;max-width:none;transform:none;filter:none;z-index:1}
.shop-item-dialog .shop-item-preview-art>.shop-item-preview-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}
.shop-item-dialog .shop-item-preview-art .krathong-item-image{position:absolute;inset:0;width:100%;height:100%;padding:0;object-fit:contain;filter:drop-shadow(0 5px 7px #20345f66)}
.shop-item-dialog .shop-item-preview-art .motion-part{z-index:2}
.shop-item-dialog .shop-item-preview-art .item-art-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:3rem}
@media(max-width:900px){.shop-screen #shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
  .shop-screen .shop-category-row{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.45rem .55rem}
  .shop-screen .shop-category-row>span{padding-top:.4rem}
  .shop-screen .shop-tier-label{grid-column:1;padding-top:.45rem;margin:0}
  .shop-screen .shop-tier-filters{grid-column:2}
  .shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
  .shop-screen #shop-grid .shop-item{grid-template-rows:96px auto auto;padding:.45rem}
  .shop-screen #shop-grid .shop-item .item-art{height:96px}
  .shop-screen #shop-grid .shop-item h3{font-size:.9rem}
}
@media(max-width:560px){.shop-item-dialog .item-dialog-body{grid-template-columns:128px minmax(0,1fr);gap:.8rem}.shop-item-dialog .item-dialog-icon{width:128px;height:128px;border-radius:13px}}

/* Moonlight gacha gets its own roomy draw screen inside the market. */
.shop-screen>.page-heading{gap:.75rem;margin-bottom:1rem}
.shop-screen>.page-heading .eyebrow{font-size:.68rem;letter-spacing:.09em}
.shop-screen>.page-heading h1{font-size:clamp(1.55rem,2.6vw,2.15rem);line-height:1.2;margin:.08rem 0 0}
.shop-screen>.page-heading>.button{min-height:40px;padding:.5rem .85rem}
#shop-gacha-tab[hidden],#global-chat-toggle[hidden],.account-play-rewards[hidden]{display:none!important}
.shop-screen .shop-section-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
.shop-screen .shop-section-nav button:nth-child(2)>span{font-size:1.35rem;color:#d6c4ff}
.shop-screen .gacha-panel{display:grid;gap:1.1rem;margin:0;padding:1.15rem;border:1px solid #c6d4ff66;border-radius:24px;background:linear-gradient(145deg,#566da9,#394f88 62%,#354780);box-shadow:0 14px 32px #1c2d5c44;color:#fff8e8}
.shop-screen .gacha-hero{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(280px,1.15fr) minmax(270px,.95fr);align-items:stretch;gap:1rem}
.shop-screen .gacha-hero-copy{align-self:center;padding:.5rem .25rem}
.shop-screen .gacha-hero-copy h2{margin:.2rem 0 .35rem;color:#fff8e8;font:700 clamp(1.5rem,2vw,2.15rem) 'Mitr','Anuphan',var(--sans)}
.shop-screen .gacha-hero-copy>p{margin:0;color:#e2e9ff;font-size:.94rem}
.shop-screen .gacha-tier-rates{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1rem}
.shop-screen .gacha-tier-rates span{padding:.3rem .55rem;border:1px solid #ffffff30;border-radius:99px;background:#263b71aa;color:#e9eaff;font-size:.72rem}
.shop-screen .gacha-tier-rates b{color:#ffe08b}
.shop-screen .gacha-stage{position:relative;display:grid;place-items:center;min-height:310px;overflow:hidden;border:1px solid #c8d7ff6b;border-radius:22px;background:radial-gradient(ellipse at 50% 74%,#54d5d883,transparent 42%),radial-gradient(ellipse at 50% 35%,#ffe99c55,transparent 45%),linear-gradient(160deg,#8581bd,#526f9f 58%,#247e94);isolation:isolate}
.shop-screen .gacha-stage:before{position:absolute;right:-10%;bottom:-35%;left:-10%;height:62%;border:1px solid #c5f3ef42;border-radius:50%;background:linear-gradient(180deg,#38b4c22b,#1b7c9b70);box-shadow:0 -18px 34px #fff2a52a;content:"";transform:rotate(-4deg)}
.shop-screen .gacha-stage-orbit{position:absolute;width:72%;height:62%;border:1px solid #fff1b65c;border-radius:50%;transform:rotate(-12deg)}
.shop-screen .gacha-stage-orbit.orbit-two{width:56%;height:75%;border-color:#b8efff50;transform:rotate(28deg)}
.shop-screen .gacha-stage-star{position:absolute;color:#fff1a4;text-shadow:0 0 14px #fff1a4;font-size:1.3rem;animation:gacha-twinkle 2.4s ease-in-out infinite alternate}
.shop-screen .gacha-stage-star.star-one{top:18%;left:19%}.shop-screen .gacha-stage-star.star-two{top:27%;right:18%;animation-delay:.8s}
.shop-screen .gacha-chest{position:relative;z-index:1;width:min(64%,245px);filter:drop-shadow(0 16px 16px #17285b88);animation:gacha-float 3.2s ease-in-out infinite}
.shop-screen .gacha-chest svg{display:block;width:100%;overflow:visible}
.shop-screen .gacha-chest .chest-glow{fill:#fff39b;opacity:.19;filter:blur(14px)}
.shop-screen .gacha-chest .chest-lid{fill:#e4b94e;stroke:#fff0a4;stroke-width:5;stroke-linejoin:round}
.shop-screen .gacha-chest .chest-body{fill:#98602e;stroke:#ffe58c;stroke-width:5}
.shop-screen .gacha-chest .chest-band{fill:#ffd873;stroke:#fff1ad;stroke-width:3}
.shop-screen .gacha-chest .chest-trim{fill:none;stroke:#fff1ad;stroke-width:5;stroke-linecap:round}
.shop-screen .gacha-chest .chest-lock{fill:#8b5ba6;stroke:#fff0a4;stroke-width:3}
.shop-screen .gacha-chest .chest-lock-top{fill:none;stroke:#fff0a4;stroke-width:5}
.shop-screen .gacha-chest .chest-lock-dot{fill:#fff0a4}
.shop-screen .gacha-stage-label{position:absolute;z-index:1;bottom:.8rem;left:50%;padding:.3rem .75rem;border:1px solid #fff2b553;border-radius:99px;background:#273b77c7;color:#fff1b5;font-size:.75rem;font-weight:700;transform:translateX(-50%);white-space:nowrap}
.shop-screen .gacha-pull-card{display:flex;flex-direction:column;justify-content:center;gap:.55rem;padding:1rem;border:1px solid #ffffff48;border-radius:20px;background:linear-gradient(155deg,#334a83,#293d73);box-shadow:inset 0 0 0 2px #ffffff0b}
.shop-screen .gacha-pull-balances{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.shop-screen .gacha-pull-card .gacha-balance{min-width:0;padding:.65rem .7rem;border-color:#cad7ff42;border-radius:13px;background:#25396aaa;color:#cbd6f6}
.shop-screen .gacha-pull-card .gacha-balance strong{color:#fff0a4;font-size:1.2rem}
.shop-screen .gacha-guarantee{margin:0;color:#dce5ff;font-size:.76rem;text-align:center}
.shop-screen .gacha-actions{display:grid;gap:.55rem;margin:.25rem 0 0}
.shop-screen .gacha-actions .button{display:flex;justify-content:space-between;align-items:center;gap:.6rem;min-height:50px;padding:.65rem .8rem;border:1px solid #ffedab;border-radius:13px;background:linear-gradient(130deg,#fff0a4,#ffc65e);box-shadow:0 4px 0 #7766a3;color:#594a7f;font:700 .95rem 'Mitr','Anuphan',var(--sans)}
.shop-screen .gacha-actions .button span{font:700 .78rem 'Anuphan',var(--sans);white-space:nowrap}
.shop-screen .gacha-actions .button.secondary{border-color:#a9c2ff88;background:linear-gradient(145deg,#526ca9,#3b548f);box-shadow:0 4px 0 #283768;color:#fff2c2}
.shop-screen .gacha-actions .button:disabled{opacity:.55}
.shop-screen .gacha-pull-card #gacha-result{min-height:1.25em;margin:.15rem 0 0;color:#b9f2d8;font-size:.76rem;text-align:center}
.shop-screen .gacha-rules{padding:.75rem .9rem;border:1px solid #cbd8ff40;border-radius:14px;background:#2b4079a8;color:#e5eaff}
.shop-screen .gacha-rules summary{cursor:pointer;font-weight:700;color:#fff0a4}
.shop-screen .gacha-rules-content{padding:.5rem .1rem 0;font-size:.8rem}
.shop-screen .gacha-rules-content p{margin:.25rem 0 .6rem}
.shop-screen .gacha-exchange,.shop-screen .gacha-history-wrap{padding:1rem;border:1px solid #d1dcff3f;border-radius:18px;background:#344a83a8}
.shop-screen .gacha-subheading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.65rem}
.shop-screen .gacha-subheading .subsection-title,.shop-screen .gacha-history-wrap .subsection-title{margin:0;color:#fff0a4;font:700 1.2rem 'Mitr','Anuphan',var(--sans)}
.shop-screen .gacha-subheading p{margin:0;color:#d8e1ff;font-size:.77rem;text-align:right}
.shop-screen #shard-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}
.shop-screen #shard-grid .shard-item{min-height:160px;padding:.65rem;border:1px solid #d2ddff55;border-radius:16px;background:linear-gradient(145deg,#5b70a8,#3c548a)}
.shop-screen #shard-grid .shard-item .item-art{height:68px;margin:0 0 .45rem;border-radius:11px;background:radial-gradient(ellipse,#ffe8a75c,transparent 68%),linear-gradient(145deg,#7887bd,#50799d)}
.shop-screen #shard-grid .shard-item .tier-tag{margin:0;border-color:#fff0a466;color:#fff0b1}
.shop-screen #shard-grid .shard-item h3{margin:.25rem 0;color:#fff8e8;font:600 .91rem 'Mitr','Anuphan',var(--sans)}
.shop-screen #shard-grid .shard-item .button{margin-top:auto;min-height:36px;border-radius:10px}
.shop-screen .gacha-history{margin:.5rem 0 0;padding-left:1.3rem;color:#e5eaff;font-size:.8rem}
.shop-screen .gacha-history li{padding:.3rem 0;border-bottom:1px solid #ffffff18}

/* Token packs echo the old purchase flow while fitting the moonlit market UI. */
.shop-token-topup .token-topup-heading{align-items:flex-start;margin-bottom:1rem}
.shop-token-topup .token-topup-intro{max-width:600px;margin:.35rem 0 0;color:#e1e9ff;font-size:.82rem}
.shop-token-topup .topup-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.7rem;max-width:none}
.shop-token-topup .token-pack-card{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:.3rem;min-width:0;min-height:228px;padding:.65rem;border:1px solid #f3d88b99;border-radius:18px;background:radial-gradient(ellipse at 50% 31%,#fff0a52c,transparent 52%),linear-gradient(155deg,#536ba5,#354a82 72%,#2d4278);box-shadow:0 7px 16px #1b2c5c3f,inset 0 1px #ffffff31;color:#fff7e4;text-align:center;overflow:hidden;transition:transform .16s,box-shadow .16s,border-color .16s}
.shop-token-topup .token-pack-card:before{position:absolute;z-index:-1;inset:5px;border:1px solid #fff2c22b;border-radius:13px;content:"";pointer-events:none}
.shop-token-topup .token-pack-card:not(.token-pack-loading):hover{transform:translateY(-3px);border-color:#fff0a4;box-shadow:0 12px 24px #1b2c5c60,inset 0 1px #ffffff50}
.shop-token-topup .token-pack-buy:focus-visible{outline:3px solid #fff0a4;outline-offset:3px}
.shop-token-topup .token-pack-loading{cursor:wait;opacity:.62;pointer-events:none}
.shop-token-topup .token-pack-name{align-self:flex-start;max-width:100%;padding:.2rem .55rem;border:1px solid #d4dfff60;border-radius:99px;background:#263c76;color:#e9edff;font:700 .68rem 'Anuphan',var(--sans);line-height:1.3;white-space:nowrap}
.shop-token-topup .token-pack-card[data-has-bonus="true"] .token-pack-name{border-color:#ffe59a;background:linear-gradient(110deg,#fff0a4,#ffd06c);color:#5b477b}
.shop-token-topup .token-pack-art{display:grid;place-items:center;height:96px;margin:.05rem 0 .1rem;flex:none}
.shop-token-topup .token-pack-art svg{display:block;width:min(100%,190px);height:100%;overflow:visible;filter:drop-shadow(0 5px 6px #1a2b5e55)}
.shop-token-topup .token-pack-art:not(.token-pack-art-bonus) .token-bonus-chest{opacity:0}
.shop-token-topup .token-pack-art-bonus .token-bonus-chest{filter:drop-shadow(0 2px 2px #2a376055)}
.shop-token-topup .token-pack-card>strong{display:block;color:#fff8e7;font:800 1.05rem 'Mitr','Anuphan',var(--sans);line-height:1.2}
.shop-token-topup .token-pack-price{display:grid;place-items:center;min-height:38px;margin-top:auto;border:1px solid #ffe9a3;border-radius:11px;background:linear-gradient(130deg,#fff0a4,#ffc75f);box-shadow:0 3px 0 #8267a4;color:#57477e;font:800 .88rem 'Anuphan',var(--sans)}
@media(max-width:1050px){.shop-token-topup .topup-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.shop-token-topup .topup-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.shop-token-topup .token-pack-card{min-height:210px;padding:.55rem}.shop-token-topup .token-pack-art{height:84px}.shop-token-topup .token-pack-card>strong{font-size:.98rem}}
@media(max-width:420px){.shop-token-topup .token-topup-heading{gap:.65rem}.shop-token-topup .token-topup-intro{font-size:.75rem}.shop-token-topup .token-balance-card{min-width:0}.shop-token-topup .token-pack-art{height:75px}.shop-token-topup .token-pack-name{font-size:.62rem}.shop-token-topup .token-pack-card>strong{font-size:.88rem}.shop-token-topup .token-pack-price{font-size:.8rem}}

/* Use one title scale and type treatment across all destination screens. */
.screen .page-heading h1{font-family:var(--sans);font-size:clamp(1.55rem,2.3vw,2rem);font-weight:800;letter-spacing:-.035em;line-height:1.2;margin:.2rem 0 0}
@media(max-width:560px){
  .screen .page-heading h1{font-size:1.55rem}
  .builder-screen .page-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.5rem;margin-bottom:.55rem}
  .builder-screen .page-heading>div{grid-column:1;grid-row:1}
  .builder-screen .page-heading>.button{grid-column:2;grid-row:1;align-self:center}
}
@keyframes gacha-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
@keyframes gacha-twinkle{from{opacity:.45;transform:scale(.8) rotate(-12deg)}to{opacity:1;transform:scale(1.12) rotate(12deg)}}
@media(max-width:1050px){.shop-screen .gacha-hero{grid-template-columns:minmax(0,.8fr) minmax(260px,1fr)}.shop-screen .gacha-pull-card{grid-column:1/-1}.shop-screen .gacha-actions{grid-template-columns:1fr 1fr}.shop-screen .gacha-pull-balances{max-width:460px;width:100%;margin:0 auto}}
@media(max-width:700px){.shop-screen .gacha-panel{padding:.75rem;gap:.75rem}.shop-screen .gacha-hero{grid-template-columns:1fr;gap:.7rem}.shop-screen .gacha-hero-copy{padding:.35rem}.shop-screen .gacha-stage{grid-row:1;min-height:250px}.shop-screen .gacha-pull-card{grid-column:auto;padding:.75rem}.shop-screen .gacha-exchange,.shop-screen .gacha-history-wrap{padding:.75rem}.shop-screen .gacha-subheading{align-items:flex-start;flex-direction:column;gap:.25rem}.shop-screen .gacha-subheading p{text-align:left}.shop-screen #shard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.shop-screen .gacha-chest,.shop-screen .gacha-stage-star{animation:none}}

/* Global live chat, kept compact beside the river scene. */
.global-chat-toggle{position:absolute;z-index:6;left:max(1rem,env(safe-area-inset-left));bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex;align-items:center;gap:.55rem;min-height:46px;padding:.55rem .9rem;border:1px solid #fff0bd70;border-radius:999px;background:linear-gradient(135deg,#30477beF,#273a68ed);color:#fff5df;font:700 .85rem var(--sans);box-shadow:0 8px 24px #101b3e66;backdrop-filter:blur(12px);cursor:pointer}
.global-chat-toggle:hover,.global-chat-toggle[aria-expanded="true"]{border-color:#ffe394;background:linear-gradient(135deg,#3e568a,#314778)}
.global-chat-icon{font-size:1.15rem;color:#ffe08c;line-height:1}
.global-chat-unread{display:grid;place-items:center;min-width:20px;height:20px;padding:0 .3rem;border-radius:99px;background:#f08d83;color:#432f53;font-size:.68rem;font-weight:800}
.global-chat-panel{position:absolute;z-index:6;left:max(1rem,env(safe-area-inset-left));bottom:calc(4.8rem + env(safe-area-inset-bottom));display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;width:min(360px,calc(100vw - 2rem));height:min(440px,56dvh);padding:.8rem;border:1px solid #fff0bd66;border-radius:19px;background:linear-gradient(145deg,#344980f5,#263966f5);box-shadow:0 18px 46px #0d173b88,inset 0 1px #ffffff30;backdrop-filter:blur(16px)}
.global-chat-panel[hidden]{display:none!important}
.global-chat-header{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:0 0 .55rem;border-bottom:1px solid #ffffff26}
.global-chat-header>div{display:grid;gap:.05rem}.global-chat-header .eyebrow{font-size:.62rem}.global-chat-header strong{font-size:1rem;color:#fff4dc}
.global-chat-header .icon-button{width:34px;height:34px;border-color:#ffffff40;background:#ffffff10;font-size:1.15rem}
.global-chat-status{min-height:1.25rem;margin:.4rem 0;color:#d2e2df;font-size:.68rem}
.global-chat-messages{display:flex;flex-direction:column;gap:.55rem;min-height:0;margin:0;padding:.25rem .15rem .6rem 0;overflow:auto;list-style:none;scrollbar-color:#9aaed177 #243664}
.global-chat-empty{margin:auto;padding:1rem;color:#d1dced;font-size:.78rem;text-align:center}
.global-chat-message{display:grid;gap:.12rem;max-width:94%;padding:.48rem .6rem;border:1px solid #ffffff24;border-radius:12px;background:#172c55a8;overflow-wrap:anywhere}
.global-chat-message.mine{align-self:flex-end;border-color:#ffe19a64;background:#3b4d78c9}
.global-chat-message-meta{display:flex;align-items:baseline;gap:.45rem;min-width:0}
.global-chat-sender{overflow:hidden;color:#ffe19a;font-size:.72rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}
.global-chat-sender.name-color{color:var(--chat-name-color)}
.global-chat-sender.name-frame{padding:0 .28rem;border:1px solid #ffe19a88;border-radius:6px}
.global-chat-time{flex:none;color:#bac9de;font-size:.58rem}
.global-chat-body{color:#fff8e8;font-size:.78rem;line-height:1.45;white-space:pre-wrap}
.global-chat-form{display:flex;gap:.4rem;padding-top:.55rem;border-top:1px solid #ffffff26}
.global-chat-form input{flex:1;min-width:0;min-height:40px;padding:.45rem .6rem;border:1px solid #ffffff32;border-radius:10px;background:#182d57;color:#fff8e8;font-size:.76rem}
.global-chat-form input::placeholder{color:#bdc9dc}
.global-chat-form .button{min-height:40px;padding:.4rem .75rem;border-radius:10px;font-size:.76rem}
.global-chat-form .button:disabled{opacity:.52}
@media(max-width:560px){
  .global-chat-toggle{left:.6rem;bottom:calc(.55rem + env(safe-area-inset-bottom));min-height:42px;padding:.45rem .75rem;font-size:.78rem}
  .global-chat-panel{left:.55rem;bottom:calc(4.1rem + env(safe-area-inset-bottom));width:min(340px,calc(100vw - 1.1rem));height:min(390px,48dvh);padding:.65rem;border-radius:16px}
  .global-chat-message{padding:.42rem .52rem}
}

/* Shared 512px artboard for the reset krathong item set. */
.krathong-art{height:220px}
.krathong-art>.asset-layer{position:absolute;inset:0;width:100%;height:100%;z-index:auto}
.krathong-art>.aura{z-index:0}
.krathong-art>.k-base{z-index:1}
.krathong-art>.k-middle{z-index:2}
.krathong-art>.k-top{z-index:3}
.krathong-art>.k-top.rear-layer{z-index:0}
.krathong-art>.k-decoration{z-index:4}
.krathong-art>.k-mascot{z-index:5}
.krathong-art>.k-decoration,.krathong-art>.k-mascot{position:absolute;inset:0;width:100%;height:100%}
.krathong-art .krathong-item-image{object-fit:fill}

/* Daily Gold wheel overrides: keep the new right-side wheel above legacy card rules. */
.home-right-rail{display:flex;flex:0 0 230px;flex-direction:column;align-items:center;gap:1.35rem;margin:0 1rem 6rem 0}
.daily-wheel-card{display:grid;place-items:center;width:auto;max-width:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
.daily-wheel-copy{display:none}
.daily-wheel-spin{position:relative;display:grid;place-items:center;gap:0;width:218px;min-width:0;aspect-ratio:1;padding:12px;border:0;border-radius:50%;background:radial-gradient(circle,#ffe5a633 0 48%,transparent 71%);color:#503e78;box-shadow:0 15px 35px #0b123e70;cursor:pointer;transition:filter .2s,transform .2s}
.daily-wheel-spin:not(:disabled):hover{transform:translateY(-3px) scale(1.025);filter:brightness(1.08)}
.daily-wheel-spin:focus-visible{outline:3px solid #fff3b1;outline-offset:5px}
.daily-wheel-bezel{position:relative;display:grid;place-items:center;width:100%;height:100%;border:8px solid #edcf86;border-radius:50%;background:linear-gradient(145deg,#fff1ba,#9873a9 45%,#f4d279 68%,#946da7);box-shadow:inset 0 0 0 3px #fff6d7,0 0 0 5px #694e90,0 8px 16px #131541aa,0 0 28px #ffda7852}
.daily-wheel-bezel:before{position:absolute;inset:-10px;border-radius:50%;background:repeating-conic-gradient(#fff5c8 0deg 2deg,transparent 2deg 18deg);content:"";mask:radial-gradient(transparent 73%,#000 75% 82%,transparent 84%);filter:drop-shadow(0 0 3px #ffe8a5)}
.daily-wheel-disc{position:relative;display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border:3px solid #fdf1c0;border-radius:50%;background:repeating-conic-gradient(from -22.5deg,#fff2c2b0 0deg 1.5deg,transparent 1.5deg 45deg),conic-gradient(from -22.5deg,#e2799f 0deg 45deg,#f2cb70 45deg 90deg,#68b8b0 90deg 135deg,#837ac2 135deg 180deg,#df7399 180deg 225deg,#f0c66a 225deg 270deg,#61b2aa 270deg 315deg,#8c7cc4 315deg 360deg);box-shadow:inset 0 0 0 5px #fff5cc99,inset 0 0 20px #382a6a66}
.daily-wheel-disc:before{position:absolute;inset:10%;border:1px solid #fff4d7a6;border-radius:50%;content:"";box-shadow:inset 0 0 10px #fff6}
.daily-wheel-core{position:relative;z-index:1;display:grid;place-items:center;width:37%;aspect-ratio:1;border:4px solid #ffe9a4;border-radius:50%;background:radial-gradient(circle at 34% 26%,#ffe7a0,#df94bd 38%,#7e65ba 76%);box-shadow:0 0 0 4px #704d91,0 5px 12px #271a5899,inset 0 2px 5px #fff8;color:#fff1b5;font:900 1.65rem 'Mitr','Anuphan',var(--sans);text-shadow:0 2px 4px #48306f}
.daily-wheel-pointer{position:absolute;top:1px;left:50%;z-index:3;color:#fff0b1;font-size:1.45rem;line-height:1;text-shadow:0 2px 4px #1c174c,0 0 8px #ffdc82;transform:translateX(-50%)}
.daily-wheel-spin:disabled{filter:saturate(.72) brightness(.94);cursor:not-allowed;opacity:1}
.daily-wheel-spin.is-spinning .daily-wheel-disc{animation:daily-wheel-spin 1.3s cubic-bezier(.14,.78,.22,1) both}
.daily-wheel-spin.is-spinning .daily-wheel-core{animation:daily-wheel-counterspin 1.3s cubic-bezier(.14,.78,.22,1) both}
@keyframes daily-wheel-spin{to{transform:rotate(1440deg)}}
@keyframes daily-wheel-counterspin{to{transform:rotate(-1440deg)}}
@media(max-width:850px){.home-right-rail{position:absolute;top:50%;right:1.5rem;flex:none;gap:.85rem;width:190px;margin:0;transform:translateY(-50%)}.home-copy-block{max-width:calc(100% - 210px)}.daily-wheel-spin{width:178px}.home-moon-caption{margin:0}}
@media(max-width:560px){.home-right-rail{position:static;top:auto;right:auto;align-self:center;justify-self:center;width:auto;margin:0;transform:none}.daily-wheel-spin{width:108px;min-width:0;padding:6px}.daily-wheel-bezel{border-width:5px}.daily-wheel-bezel:before{inset:-7px}.daily-wheel-pointer{top:-1px;font-size:1.1rem}.daily-wheel-core{border-width:3px;font-size:1rem}.daily-wheel-result{padding:.9rem 1rem 1.15rem}}
@media(prefers-reduced-motion:reduce){.daily-wheel-spin,.daily-wheel-spin.is-spinning .daily-wheel-disc,.daily-wheel-spin.is-spinning .daily-wheel-core{transition:none;animation:none!important}}

/* Daily Gold wheel popup: spin in the dialog and reveal the server-awarded amount. */
.daily-wheel-result [hidden]{display:none!important}
.daily-wheel-dialog-wheel{width:min(230px,62vw);margin:1rem auto 1.2rem;cursor:default}
.daily-wheel-dialog-wheel .daily-wheel-core{font-size:2rem}
.daily-wheel-result-message{margin:.4rem 0 1rem;color:#fff0d4;text-align:center}
.daily-wheel-result .daily-wheel-reward{margin:.35rem 0 .25rem}
.daily-wheel-result .daily-wheel-reward strong{font-size:clamp(4rem,18vw,6rem)}
@media(max-width:560px){.daily-wheel-dialog-wheel{width:min(200px,58vw)}.daily-wheel-dialog-wheel .daily-wheel-core{font-size:1.7rem}}

/* Weighted prize labels keep the artwork aligned with the configured draw rates. */
.daily-wheel-disc{position:relative}
.daily-wheel-values{position:absolute;inset:0;z-index:1;pointer-events:none}
.daily-wheel-value{position:absolute;display:grid;place-items:center;min-width:31px;padding:.12rem .24rem;border:1px solid #fff1c5d9;border-radius:999px;background:#302752d9;color:#fff7de;font:800 .55rem/1.1 'Mitr','Anuphan',var(--sans);white-space:nowrap;text-shadow:0 1px 2px #21153c;box-shadow:0 2px 5px #1a143c88;transform:translate(-50%,-50%)}
.daily-wheel-value-common{min-width:35px;background:#5a3d70e8;color:#ffe08b;font-size:.62rem}
.daily-wheel-value-bonus{z-index:2}
.daily-wheel-core{z-index:3}
.daily-wheel-spin.is-waiting .daily-wheel-disc{animation:daily-wheel-wait-spin .8s linear infinite}
.daily-wheel-spin.is-waiting .daily-wheel-core{animation:daily-wheel-wait-counter .8s linear infinite}
.daily-wheel-spin.is-spinning .daily-wheel-disc{animation:daily-wheel-spin 1.8s cubic-bezier(.12,.72,.2,1) both}
.daily-wheel-spin.is-spinning .daily-wheel-core{animation:daily-wheel-counterspin 1.8s cubic-bezier(.12,.72,.2,1) both}
@keyframes daily-wheel-spin{to{transform:rotate(var(--wheel-rotation,1440deg))}}
@keyframes daily-wheel-counterspin{to{transform:rotate(calc(-1 * var(--wheel-rotation,1440deg)))}}
@keyframes daily-wheel-wait-spin{to{transform:rotate(360deg)}}
@keyframes daily-wheel-wait-counter{to{transform:rotate(-360deg)}}
.daily-wheel-result{width:min(430px,calc(100vw - 2rem))}
.daily-wheel-dialog-wheel{width:min(280px,68vw)}
@media(max-width:560px){.daily-wheel-dialog-wheel{width:min(250px,70vw)}.daily-wheel-value{min-width:26px;padding:.1rem .17rem;font-size:.48rem}.daily-wheel-value-common{min-width:30px;font-size:.55rem}}
@media(prefers-reduced-motion:reduce){.daily-wheel-spin.is-waiting .daily-wheel-disc,.daily-wheel-spin.is-waiting .daily-wheel-core{animation:none!important}.daily-wheel-spin.is-spinning .daily-wheel-disc,.daily-wheel-spin.is-spinning .daily-wheel-core{animation:none!important}}
@media(max-width:560px){.home-right-rail .daily-wheel-values{display:none}}

/* Moonlight wheel: restore clean wedges, add a themed title and the next-spin timer. */
.daily-wheel-card{gap:.7rem}
.daily-wheel-heading{display:flex;align-items:center;justify-content:center;gap:.48rem;margin:0 0 .05rem;color:#ffe39b;font:800 clamp(.82rem,1.15vw,1rem)/1.25 'Mitr','Anuphan',var(--sans);letter-spacing:.035em;text-shadow:0 2px 10px #ffda7850}
.daily-wheel-heading span{color:#ffc8e0;font-size:1.12em;text-shadow:0 0 10px #ffb5d680}
.daily-wheel-disc{background:repeating-conic-gradient(from -22.5deg,#fff2c2b0 0deg 1.5deg,transparent 1.5deg 45deg),conic-gradient(from -22.5deg,#e2799f 0deg 45deg,#f2cb70 45deg 90deg,#68b8b0 90deg 135deg,#837ac2 135deg 180deg,#df7399 180deg 225deg,#f0c66a 225deg 270deg,#61b2aa 270deg 315deg,#8c7cc4 315deg 360deg)}
.daily-wheel-values,.daily-wheel-value{display:none!important}
.daily-wheel-cooldown{max-width:220px;margin:0;padding:.42rem .72rem;border:1px solid #ffe19a88;border-radius:999px;background:linear-gradient(120deg,#1a2d58d9,#44386bbf);color:#f2e6ce;font-size:.7rem;line-height:1.4;text-align:center;box-shadow:0 4px 14px #10173e5c}
.daily-wheel-cooldown strong{display:block;margin-top:.08rem;color:#ffe39b;font-size:.76rem;font-weight:850}
.daily-wheel-result .eyebrow{color:#a9e5d1}
.daily-wheel-spin.is-waiting .daily-wheel-disc{animation:daily-wheel-wait-spin .8s linear infinite}
.daily-wheel-spin.is-waiting .daily-wheel-core{animation:daily-wheel-wait-counter .8s linear infinite}
.daily-wheel-spin.is-spinning .daily-wheel-disc{animation:daily-wheel-spin 1.3s cubic-bezier(.14,.78,.22,1) both}
.daily-wheel-spin.is-spinning .daily-wheel-core{animation:daily-wheel-counterspin 1.3s cubic-bezier(.14,.78,.22,1) both}
@keyframes daily-wheel-spin{to{transform:rotate(1440deg)}}
@keyframes daily-wheel-counterspin{to{transform:rotate(-1440deg)}}
@keyframes daily-wheel-wait-spin{to{transform:rotate(360deg)}}
@keyframes daily-wheel-wait-counter{to{transform:rotate(-360deg)}}
@media(max-width:850px){.daily-wheel-heading{font-size:.82rem}.daily-wheel-cooldown{max-width:190px;font-size:.66rem}}
@media(max-width:560px){.daily-wheel-card{gap:.4rem}.daily-wheel-heading{font-size:.7rem}.daily-wheel-cooldown{max-width:112px;padding:.32rem .4rem;font-size:.58rem}.daily-wheel-cooldown strong{font-size:.62rem}}
@media(prefers-reduced-motion:reduce){.daily-wheel-spin.is-waiting .daily-wheel-disc,.daily-wheel-spin.is-waiting .daily-wheel-core{animation:none!important}.daily-wheel-spin.is-spinning .daily-wheel-disc,.daily-wheel-spin.is-spinning .daily-wheel-core{animation:none!important}}

/* Home screen mobile repair: clear the tablet wheel reservation and keep copy readable. */
@media(max-width:560px){
  body.home-fullscreen>.topbar{gap:.35rem;padding-inline:.6rem}
  body.home-fullscreen .wallet-bar{display:none}
  body.home-fullscreen .brand{flex:1;min-width:0;gap:.38rem}
  body.home-fullscreen .brand>span:last-child{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.home-fullscreen .account-button{flex:0 1 auto;max-width:96px}
  body.home-fullscreen .home-hero-content{display:flex;align-items:flex-start;justify-content:flex-start;padding:calc(76px + env(safe-area-inset-top)) 1rem calc(7rem + env(safe-area-inset-bottom))}
  body.home-fullscreen .home-copy-block{flex:0 1 auto;width:calc(100% - 108px);max-width:calc(100% - 108px);margin:0}
  body.home-fullscreen .home-festival-label{font-size:.62rem;letter-spacing:0;gap:.4rem;margin-bottom:.55rem}
  body.home-fullscreen .home-festival-label>span{width:20px;flex:none}
  body.home-fullscreen .home-copy-block h1{font-size:clamp(1.9rem,8vw,2.25rem)!important;line-height:1.12;letter-spacing:-.035em;margin-bottom:.65rem}
  body.home-fullscreen .home-copy-block .lead{font-size:.78rem;line-height:1.5}
  body.home-fullscreen .home-copy-block .lead br{display:none}
  body.home-fullscreen .home-actions{width:100%;max-width:none;margin-top:.9rem;gap:.48rem}
  body.home-fullscreen .home-name-field{width:100%;font-size:.74rem}
  body.home-fullscreen .home-name-field input{height:48px;min-height:48px;padding:.45rem .65rem;border-radius:13px;font-size:.78rem}
  body.home-fullscreen .home-action-build{min-height:50px;padding:.35rem .6rem;border-radius:14px}
  body.home-fullscreen .home-action strong{font-size:.82rem}
  body.home-fullscreen .home-right-rail{position:absolute;top:43%;right:.55rem;align-self:auto;justify-self:auto;width:100px;margin:0;gap:.35rem;transform:translateY(-50%)}
  body.home-fullscreen .daily-wheel-heading{gap:.22rem;font-size:.62rem;white-space:nowrap}
  body.home-fullscreen .daily-wheel-spin{width:94px;min-width:0;padding:5px}
  body.home-fullscreen .daily-wheel-bezel{border-width:5px}
  body.home-fullscreen .daily-wheel-bezel:before{inset:-7px}
  body.home-fullscreen .daily-wheel-pointer{font-size:1rem}
  body.home-fullscreen .daily-wheel-core{border-width:3px;font-size:.9rem}
  body.home-fullscreen .daily-wheel-cooldown{max-width:100px;padding:.28rem .36rem;font-size:.55rem}
  body.home-fullscreen .daily-wheel-cooldown strong{font-size:.58rem}
  body.home-fullscreen .home-moon-caption{display:none}
  body.home-fullscreen .home-foot{left:1rem;right:1rem;bottom:calc(5.6rem + env(safe-area-inset-bottom))}
}
@media(max-width:380px){
  body.home-fullscreen .brand>span:last-child{max-width:104px}
  body.home-fullscreen .home-copy-block{width:calc(100% - 96px);max-width:calc(100% - 96px)}
  body.home-fullscreen .home-copy-block h1{font-size:1.8rem!important}
  body.home-fullscreen .home-right-rail{right:.4rem;width:88px}
  body.home-fullscreen .daily-wheel-heading{font-size:.56rem}
  body.home-fullscreen .daily-wheel-spin{width:82px}
}

.river-online-count{display:inline-flex;margin-left:.35rem;padding:.08rem .4rem;border-radius:99px;background:#8fd2bb22;border:1px solid #8fd2bb55;color:#a9ecd1;font-size:.68rem;letter-spacing:0;text-transform:none}
.global-chat-report{justify-self:end;border:0;background:transparent;color:#c3cbe0;font-size:.65rem;text-decoration:underline;cursor:pointer}
.river-channel-options{grid-template-columns:1fr;margin:.8rem 0}

/* Dense purchase catalogue: show more complete item silhouettes per row. */
.shop-screen #shop-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:.55rem}
.shop-screen #shop-grid .shop-item{grid-template-rows:78px minmax(2.35em,auto) auto;gap:.25rem;padding:.38rem;border-width:1px;border-radius:13px}
.shop-screen #shop-grid .shop-item:before{inset:2px;border-radius:9px}
.shop-screen #shop-grid .shop-item:after{top:6px;right:8px;font-size:.62rem}
.shop-screen #shop-grid .shop-item .item-art{height:78px;border-radius:9px}
.shop-screen #shop-grid .shop-item .item-art img{max-width:96%;max-height:72px;padding:2px;filter:drop-shadow(0 3px 5px #1d2c5e66)}
.shop-screen #shop-grid .shop-item h3{display:-webkit-box;min-height:2.35em;overflow:hidden;font-size:.82rem;line-height:1.2;text-align:center;white-space:normal;text-overflow:clip;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.shop-screen #shop-grid .shop-item .tier-tag{font-size:.61rem;padding:.08rem .38rem}
@media(min-width:1600px){.shop-screen #shop-grid{grid-template-columns:repeat(10,minmax(0,1fr));gap:.48rem}}
@media(max-width:1250px){.shop-screen #shop-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:900px){.shop-screen #shop-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:700px){.shop-screen #shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.42rem}.shop-screen #shop-grid .shop-item{grid-template-rows:68px minmax(2.3em,auto) auto;padding:.3rem}.shop-screen #shop-grid .shop-item .item-art{height:68px}.shop-screen #shop-grid .shop-item .item-art img{max-height:62px}.shop-screen #shop-grid .shop-item h3{font-size:.74rem}}
@media(max-width:520px){.shop-screen #shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:380px){.shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Token identity and pack art: moonlit turquoise tokens, growing coin piles, and chests for large packs. */
.currency.token .currency-icon{fill:#53c6c2;stroke:#ffedab;stroke-width:1.35;filter:drop-shadow(0 0 5px #74dfd899)}
.currency.token .currency-icon path{fill:none;stroke:#fff5c8;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round}
.shop-token-topup .token-topup-heading h2{margin:.12rem 0;color:#fff4d2;font:800 clamp(1.2rem,2vw,1.55rem) 'Mitr','Anuphan',var(--sans);letter-spacing:.01em;text-shadow:0 2px 0 #314577,0 0 18px #ffe68c32}
.shop-token-topup .token-balance-card strong{display:flex;align-items:center;gap:.35rem}
.token-balance-icon{width:1.2em;height:1.2em;vertical-align:-.2em;flex:none;fill:#53c6c2;stroke:#ffe9a2;stroke-width:1.3;filter:drop-shadow(0 0 5px #6be0d599)}
.token-balance-icon path{fill:none;stroke:#fff6cc;stroke-width:1.05;stroke-linecap:round;stroke-linejoin:round}
.shop-token-topup .token-pack-art-treasure{filter:drop-shadow(0 0 9px #fff0a255)}
.shop-token-topup .token-pack-art-chest svg{filter:drop-shadow(0 6px 7px #17275270)}
.shop-token-topup .token-pack-amount{display:flex!important;justify-content:center;align-items:baseline;gap:.3rem}
.shop-token-topup .token-pack-quantity{font-size:1.22em;letter-spacing:.005em;text-shadow:0 2px 0 #344879,0 0 12px #fff0a244}
.shop-token-topup .token-pack-unit{color:#c9fff0;font-size:.76em;font-weight:700;letter-spacing:.04em}

/* Token pack cards: balanced type, centered artwork and a moonlit gold frame. */
.shop-token-topup .token-pack-card{min-height:252px;align-items:stretch;padding:.75rem;border:1px solid #ffe5a2;border-radius:20px;background:radial-gradient(ellipse at 50% 38%,#ffeeb92e,transparent 48%),linear-gradient(155deg,#596fa8,#3d568f 58%,#30477f);box-shadow:0 8px 18px #1b2c5c4d,inset 0 0 0 1px #fff4d5a1,inset 0 0 24px #ffeab311}
.shop-token-topup .token-pack-card:before{inset:5px;border:1px solid #fff0c25c;border-radius:15px;box-shadow:inset 0 0 0 3px #e9d28c16}
.shop-token-topup .token-pack-card:after{position:absolute;z-index:0;inset:0;border-radius:20px;background:radial-gradient(circle at 12px 12px,#fff1bd 0 1.5px,transparent 2px),radial-gradient(circle at calc(100% - 12px) 12px,#fff1bd 0 1.5px,transparent 2px),radial-gradient(circle at 12px calc(100% - 12px),#fff1bd 0 1.5px,transparent 2px),radial-gradient(circle at calc(100% - 12px) calc(100% - 12px),#fff1bd 0 1.5px,transparent 2px);content:"";opacity:.8;pointer-events:none}
.shop-token-topup .token-pack-name{align-self:center;min-width:min(100%,7.25rem);margin:0 auto;text-align:center;box-shadow:0 2px 6px #17295738}
.shop-token-topup .token-pack-art{width:100%;height:124px;margin:.1rem 0 .2rem}
.shop-token-topup .token-pack-art-image{height:120px;max-height:120px;max-width:min(100%,210px)}
.shop-token-topup .token-pack-card>strong{width:100%;text-align:center}
.shop-token-topup .token-pack-price{align-self:center;width:min(100%,8rem);margin-top:.15rem}
@media(max-width:700px){.shop-token-topup .token-pack-card{min-height:238px}.shop-token-topup .token-pack-art{height:108px}.shop-token-topup .token-pack-art-image{height:104px;max-height:104px}}
@media(max-width:420px){.shop-token-topup .token-pack-card{min-height:222px;padding:.58rem}.shop-token-topup .token-pack-art{height:96px}.shop-token-topup .token-pack-art-image{height:92px;max-height:92px}}

/* Select a Token pack first; choose the payment method in the following dialog. */
.shop-token-topup .token-pack-actions{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);width:100%;margin-top:auto}
.shop-token-topup .token-pack-buy{display:flex;width:100%;min-width:0;min-height:42px;align-items:center;justify-content:center;padding:.3rem;border:1px solid #ffe9a3;border-radius:11px;font:800 .85rem 'Anuphan',var(--sans);cursor:pointer;transition:filter .15s,transform .15s}
.shop-token-topup .token-pack-buy:hover:not(:disabled){filter:brightness(1.06);transform:translateY(-1px)}
.shop-token-topup .token-pack-buy:disabled{cursor:not-allowed;opacity:.62}
.shop-token-topup .token-pack-buy-primary{background:linear-gradient(130deg,#fff0a4,#ffc75f);box-shadow:0 3px 0 #8267a4;color:#57477e}
@media(max-width:420px){.shop-token-topup .token-pack-buy{min-height:38px;padding:.25rem;font-size:.78rem}}

/* Token artwork only: warm gold showcase glow and brighter pack illustrations. */
.shop-token-topup .token-pack-art{position:relative;isolation:isolate;border:1px solid #ffe8a56b;border-radius:16px;background:radial-gradient(ellipse at 50% 55%,#ffe7a6d9 0,#e6af527d 35%,#b7793b45 62%,transparent 78%),linear-gradient(145deg,#fff0b82b,#f0b84026 50%,#fff0ae38);box-shadow:inset 0 1px 0 #fff7d88c,inset 0 -8px 18px #8a5b2726,0 0 18px #f8c95d20}
.shop-token-topup .token-pack-art-image{filter:brightness(1.12) saturate(1.24) contrast(1.04) drop-shadow(0 8px 10px #15234c8a) drop-shadow(0 0 8px #ffd978a8)!important}

/* Home build button: a custom lotus mark, while keeping the existing action and button behavior. */
.home-action-build .home-action-icon{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;border-radius:0;background:transparent}
.home-action-build .home-action-icon svg{display:none}
.home-action-build .home-action-icon:after{content:"";display:block;width:50px;height:50px;background:url("./assets/icons/lotus-start.svg") center/contain no-repeat;filter:drop-shadow(0 3px 4px #8e245b55)}
.home-action-build strong{text-align:center}
@media(max-width:560px){.home-action-build .home-action-icon{flex-basis:42px;width:42px;height:42px}.home-action-build .home-action-icon:after{width:41px;height:41px}}


/* Tier filters and a clear route from the builder into the market. */
.builder-screen .inventory-tier-row{display:flex;align-items:center;gap:.55rem;margin:0 0 .4rem;min-width:0}
.builder-screen .inventory-tier-label{flex:none;color:#fff0bd;font-size:.76rem;font-weight:800;letter-spacing:.02em}
.builder-screen .inventory-tier-filters{display:flex;align-items:center;gap:.4rem;min-width:0;overflow-x:auto;padding:.1rem .15rem .38rem;scrollbar-width:thin}
.builder-screen .inventory-tier-filter{flex:none;min-width:36px;min-height:34px;padding:.28rem .62rem;border:1px solid #c3d3f1a6;border-radius:999px;background:linear-gradient(145deg,#3d548a,#33487a);color:#f8f5ff;font-size:.78rem;font-weight:800;cursor:pointer;box-shadow:inset 0 1px #ffffff18;transition:transform .16s,border-color .16s,box-shadow .16s}
.builder-screen .inventory-tier-filter[data-inventory-tier-filter="all"]{min-width:74px}
.builder-screen .inventory-tier-filter:hover{border-color:#ffe59a;transform:translateY(-1px)}
.builder-screen .inventory-tier-filter.active{border-color:#fff0a5;background:linear-gradient(135deg,#fff0a7,#ffc765);color:#59477b;box-shadow:0 3px 0 #88619972,0 0 15px #ffd87750}
.builder-screen .inventory-footer .builder-market-link{display:inline-flex;align-items:center;justify-content:center;gap:.42rem;min-height:42px;margin:0;padding:.5rem .8rem;border:1px solid #ffe7a3;border-radius:13px;background:linear-gradient(135deg,#fff0a8,#ffc45f);color:#554477;font-size:.76rem;font-weight:900;white-space:nowrap;box-shadow:0 3px 0 #87619a7a,0 0 16px #ffdb7950;text-shadow:0 1px #fff9d5;transition:transform .16s,filter .16s,box-shadow .16s}
.builder-screen .inventory-footer .builder-market-link:hover{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 4px 0 #87619a7a,0 0 21px #ffdb7980}
.builder-market-link .ui-icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bottom-nav button[data-go="shop"]:not(.active){color:#ffebaf}
.bottom-nav button[data-go="shop"]:not(.active) svg{color:#ffe08a;stroke-width:2;filter:drop-shadow(0 0 5px #ffd36a88)}
.bottom-nav button[data-go="shop"]:not(.active) span{font-weight:800;text-shadow:0 0 10px #ffd36a35}
@media(max-width:560px){.builder-screen .inventory-tier-row{gap:.35rem;margin-bottom:.3rem}.builder-screen .inventory-tier-label{font-size:.7rem}.builder-screen .inventory-tier-filters{gap:.32rem}.builder-screen .inventory-tier-filter{min-width:34px;min-height:32px;padding:.24rem .52rem;font-size:.72rem}.builder-screen .inventory-tier-filter[data-inventory-tier-filter="all"]{min-width:66px}.builder-screen .inventory-footer .builder-market-link{width:100%;min-height:40px}.bottom-nav button[data-go="shop"]:not(.active) svg{filter:drop-shadow(0 0 3px #ffd36a75)}}

/* Moonlight wheel artwork: keep the new illustrated wheel on the existing reward animation. */
.daily-wheel-spin{background:radial-gradient(circle,#ffd76c3d 0 48%,transparent 73%);box-shadow:0 14px 34px #08133175,0 0 28px #ffc95a28}
.daily-wheel-bezel{border:0;background:transparent;box-shadow:none}
.daily-wheel-bezel:before{display:none}
.daily-wheel-disc{overflow:visible;border:0;background:transparent;box-shadow:none}
.daily-wheel-disc:before{display:none}
.daily-wheel-art{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 10px #050b1f80)}
.daily-wheel-spin.is-waiting .daily-wheel-art{filter:drop-shadow(0 5px 10px #050b1f80) drop-shadow(0 0 10px #7ee7d4aa)}
.daily-wheel-spin.is-spinning .daily-wheel-art{filter:drop-shadow(0 5px 10px #050b1f80) drop-shadow(0 0 12px #ffd879aa)}
.daily-wheel-result .daily-wheel-dialog-wheel{background:radial-gradient(circle,#ffd76c30 0 48%,transparent 73%)}

/* Moonlight wheel glints: soft twinkles on the resting wheel, brighter as it spins. */
.daily-wheel-sparkles{position:absolute;inset:0;z-index:2;overflow:visible;pointer-events:none}
.daily-wheel-sparkles i{position:absolute;display:block;width:clamp(7px,1vw,13px);aspect-ratio:1;background:linear-gradient(145deg,#fffde0,#ffe17c 70%);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:.16;filter:drop-shadow(0 0 4px #fff1a8) drop-shadow(0 0 9px #ffd66f);animation:moon-wheel-twinkle 2.8s ease-in-out infinite}
.daily-wheel-sparkles i:nth-child(1){top:7%;left:50%;animation-delay:-.4s}
.daily-wheel-sparkles i:nth-child(2){top:19%;left:12%;animation-delay:-1.1s}
.daily-wheel-sparkles i:nth-child(3){top:19%;right:12%;animation-delay:-2s}
.daily-wheel-sparkles i:nth-child(4){top:49%;left:3%;animation-delay:-1.6s}
.daily-wheel-sparkles i:nth-child(5){top:49%;right:3%;animation-delay:-.8s}
.daily-wheel-sparkles i:nth-child(6){bottom:18%;left:12%;animation-delay:-2.3s}
.daily-wheel-sparkles i:nth-child(7){right:12%;bottom:18%;animation-delay:-.2s}
.daily-wheel-sparkles i:nth-child(8){bottom:7%;left:50%;animation-delay:-1.4s}
@keyframes moon-wheel-twinkle{0%,100%{opacity:.14;transform:translate(-50%,-50%) scale(.55) rotate(0)}42%{opacity:1;transform:translate(-50%,-50%) scale(1.25) rotate(45deg)}68%{opacity:.38;transform:translate(-50%,-50%) scale(.78) rotate(75deg)}}
.daily-wheel-spin.is-spinning .daily-wheel-sparkles i{animation-duration:1.05s;filter:drop-shadow(0 0 5px #fff7be) drop-shadow(0 0 13px #ffd04e)}
.daily-wheel-spin.is-waiting .daily-wheel-sparkles i{animation-duration:1.65s}
@media(prefers-reduced-motion:reduce){.daily-wheel-sparkles i{opacity:.68;animation:none!important;transform:translate(-50%,-50%) scale(.8)}}

/* Tier 3 shop artwork: animate only the authored moving pieces and preserve still assets. */
.krathong-art .motion-part{z-index:2}
.krathong-art .motion-pinwheel .krathong-item-image:not(.motion-part){transform:translateX(5.5%)}
.krathong-art .motion-part-pinwheel-spin{transform-origin:26.4% 59%;animation:t3-pinwheel-spin 3.6s linear infinite}
.krathong-art .motion-part-maneki-wave{transform-origin:60.5% 50%;animation:t3-maneki-wave 1.35s ease-in-out infinite}
.krathong-art .k-top.item-render-offset{transform:translateY(var(--item-render-offset-y))}
.krathong-art .k-middle.seat-low .krathong-item-image{transform:translateY(14px)}
.krathong-art>.item-sparkle-canvas{position:absolute;inset:0;z-index:2;width:100%;height:100%;pointer-events:none}
.krathong-art>.item-sparkle-canvas.middle-sparkles{transform:translateY(5px)}
.krathong-art .tier3-flame-canvas{position:absolute;inset:0;z-index:4;width:100%;height:100%;pointer-events:none}
body:not(.effects-off) .krathong-art .flame-static-base{-webkit-mask-image:linear-gradient(to bottom,transparent 0 var(--flame-mask-start),#000 calc(var(--flame-mask-start) + 1.2%));mask-image:linear-gradient(to bottom,transparent 0 var(--flame-mask-start),#000 calc(var(--flame-mask-start) + 1.2%))}
.krathong-art .motion-flame-overlay{z-index:4;transform-origin:50% 0;transform:translateY(var(--flame-motion-offset-y,0px)) scaleY(var(--flame-motion-scale-y,1))}
.item-art-crop-left{clip-path:inset(0 0 0 var(--item-art-clip-left,0%))}
.effects-off .krathong-art .motion-asset-overlay,.effects-off .krathong-art .motion-flame-overlay{display:none}
@keyframes t3-pinwheel-spin{to{transform:rotate(1turn)}}
@keyframes t3-maneki-wave{0%,100%{transform:rotate(-10deg) scale(1,.99)}25%{transform:rotate(0deg) scale(1.015,1)}50%{transform:rotate(10deg) scale(1,.99)}75%{transform:rotate(0deg) scale(1.015,1)}}
@media(prefers-reduced-motion:reduce){.krathong-art .motion-part{animation:none!important}}
.effects-off .krathong-art .motion-part{animation:none!important}
.account-screen .account-token-history-card{grid-column:1/-1;display:block}
.account-token-history-card .account-card-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.65rem}
.account-token-history-card .account-card-heading h2{margin:.2rem 0 0;color:#fff5e5;font-family:'Mitr','Anuphan',var(--sans);font-size:1.2rem}
.account-history-refresh{min-height:38px;padding:.4rem .75rem}
.token-history-list{display:grid;gap:.55rem;margin:.65rem 0 0;padding:0;list-style:none}
.token-history-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border:1px solid #ffffff24;border-radius:13px;background:#293e704a}
.token-history-details,.token-history-outcome{display:grid;gap:.12rem;min-width:0}
.token-history-details strong{color:#fff5e5;font-size:.92rem}
.token-history-details time,.token-history-details small{color:#dce8f5;font-size:.75rem}
.token-history-outcome{justify-items:end;flex:none}
.token-history-outcome>strong{color:#fff1d1;font-size:.88rem}
.token-history-status{display:inline-flex;align-items:center;min-height:24px;padding:.1rem .5rem;border:1px solid;border-radius:999px;font-size:.72rem;font-weight:750}
.token-history-status.is-paid{border-color:#77dfb588;background:#7ae3b31c;color:#a8f0d2}
.token-history-status.is-pending{border-color:#ffe08a88;background:#ffe08a17;color:#ffe6a2}
.token-history-status.is-failed{border-color:#ffaaa588;background:#ffaaa51c;color:#ffd0cb}
@media(max-width:700px){.account-screen .account-token-history-card{grid-column:auto}.token-history-row{padding:.65rem}}
.effects-off .krathong-art .item-sparkle-canvas,.effects-off .krathong-art .tier3-flame-canvas{display:none}

/* Tier 3 previews move in the market as well as on the assembled krathong. */
.shop-screen #shop-grid .shop-item .item-art.tier3-card-art{position:relative;display:block;overflow:hidden;container-type:size}
.shop-screen #shop-grid .shop-item .tier3-card-art>.shop-item-preview-art{position:absolute;inset:0;width:100%;height:100%;max-width:none;transform:none;filter:none;z-index:1}
.shop-screen #shop-grid .shop-item .tier3-card-art>.shop-item-preview-art>.shop-item-preview-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}
.shop-screen #shop-grid .shop-item .tier3-card-art .krathong-item-image{position:absolute;inset:0;width:100%;height:100%;max-height:none;padding:4px;object-fit:contain;filter:drop-shadow(0 4px 7px #26356b66)}
.shop-screen #shop-grid .shop-item .tier3-card-art .motion-part{z-index:2}
.shop-screen #shop-grid .shop-item .tier3-card-art .motion-pinwheel{inset:auto;top:-97%;left:calc(50% + 67cqh);right:auto;bottom:auto;width:257cqh;height:257cqh;transform:translateX(-50%);transform-origin:top left}
.krathong-art .item-motion.motion-tier3-idle{transform-origin:50% 80%;animation:t3-item-idle 3s ease-in-out infinite}
@keyframes t3-item-idle{0%,100%{filter:drop-shadow(0 2px 4px #24345b55);transform:translateY(0) scale(1)}50%{filter:drop-shadow(0 3px 10px #ffdf9d99);transform:translateY(-2px) scale(1.018)}}
/* The in-app effects switch is the explicit choice for Tier 3 motion. */
@media(prefers-reduced-motion:reduce){
  body:not(.effects-off) .krathong-art .motion-part-pinwheel-spin{animation:t3-pinwheel-spin 3.6s linear infinite!important}
  body:not(.effects-off) .krathong-art .motion-part-maneki-wave{animation:t3-maneki-wave 1.35s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-mascot-breathe{animation:item-mascot-breathe 3.4s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-tier3-idle{animation:t3-item-idle 3s ease-in-out infinite!important}
}

@media(prefers-reduced-motion:reduce){
  body:not(.effects-off) .krathong-art .motion-part-pinwheel-spin{animation:t3-pinwheel-spin 3.6s linear infinite!important}
  body:not(.effects-off) .krathong-art .motion-part-maneki-wave{animation:t3-maneki-wave 1.35s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-petal-breath{animation:item-petal-breath 3.8s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-naga-wave{animation:item-naga-wave 4.4s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-moonflame{animation:item-moonflame 2.2s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-petal-twinkle{animation:item-petal-twinkle 2.8s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-mascot-breathe{animation:item-mascot-breathe 3.4s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-sparkle-lower{animation:item-base-sway 3.8s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-sparkle-ring{animation:item-ring-rock 3.3s ease-in-out infinite!important}
  body:not(.effects-off) .krathong-art .item-motion.motion-tier3-idle{animation:t3-item-idle 3s ease-in-out infinite!important}
}

/* Keep catalogue controls inside the viewport and give animated previews room. */
.shop-screen .shop-category-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.45rem .65rem}
.shop-screen .shop-category-row>span{white-space:nowrap;padding-top:.4rem}
.shop-screen .shop-category-filters{grid-column:2;min-width:0;display:flex;flex-wrap:wrap;gap:.4rem}
.shop-screen .shop-tier-label{grid-column:1;margin:0;padding-top:.4rem;white-space:nowrap}
.shop-screen .shop-tier-filters{grid-column:2;display:flex;flex-wrap:wrap;min-width:0}
.shop-screen #shop-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:.7rem}
.shop-screen #shop-grid .shop-item{grid-template-rows:104px minmax(2.35em,auto) auto;gap:.35rem;padding:.48rem}
.shop-screen #shop-grid .shop-item .item-art{height:104px}
@media(max-width:1250px){.shop-screen #shop-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:900px){.shop-screen #shop-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.shop-screen #shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.shop-screen #shop-grid .shop-item{grid-template-rows:82px minmax(2.3em,auto) auto;padding:.38rem}.shop-screen #shop-grid .shop-item .item-art{height:82px}}
@media(max-width:520px){.shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-screen #shop-grid .shop-item{grid-template-rows:72px minmax(2.3em,auto) auto}.shop-screen #shop-grid .shop-item .item-art{height:72px}}

/* Focused mobile controls for the builder, river and shop. */
.builder-mobile-views,.river-prayer-toggle,.river-prayer-close,.global-chat-expand,.shop-mobile-tier-toggle{display:none}
.river-prayer-toggle[hidden],.river-prayer-panel[hidden]{display:none!important}
.river-prayer-header{display:contents}
.global-chat-expand{flex:none}
@media(max-width:600px){
  .topbar{height:58px;min-height:58px;padding-inline:.45rem;gap:.3rem}
  .topbar .brand{flex:1;min-width:0;gap:.4rem}
  .topbar .brand>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.84rem}
  .topbar .wallet-bar{display:none}
  .topbar .account-button{max-width:100px}
  .topbar .account-chevron{display:none}
  .bottom-nav{width:calc(100% - 1rem);gap:0;padding:.22rem;border-radius:17px}
  .bottom-nav button{min-height:50px;padding:.25rem .05rem}
  .bottom-nav button svg{width:19px;height:19px}
  .bottom-nav button span{font-size:.61rem}

  .builder-screen .page-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.45rem;margin-bottom:.6rem}
  .builder-screen .page-heading>div{grid-column:1;grid-row:1;min-width:0}
  .builder-screen .page-heading h1{font-size:clamp(1.08rem,4.8vw,1.3rem);line-height:1.2;white-space:nowrap}
  .builder-screen .page-heading>.button{grid-column:2;grid-row:1;min-height:38px;padding:.38rem .55rem;font-size:.7rem;white-space:nowrap}
  .builder-mobile-views{display:grid;grid-template-columns:1fr 1fr;gap:.3rem;margin:0 0 .55rem;padding:.25rem;border:1px solid var(--line);border-radius:15px;background:#263b6199}
  .builder-mobile-views button{min-height:42px;border:0;border-radius:11px;background:transparent;color:#dbe5f2;font:700 .78rem var(--sans);cursor:pointer}
  .builder-mobile-views button.active{background:#f4dda6;color:#574c76;box-shadow:0 3px 10px #0b19362e}
  .builder-screen .builder-layout{display:block;height:auto;min-height:0}
  .builder-screen .preview-panel,.builder-screen .private-room-panel{height:auto;min-height:0}
  .builder-screen[data-mobile-view="preview"] .private-room-panel,.builder-screen[data-mobile-view="items"] .preview-panel{display:none}
  .builder-screen .preview-stage{min-height:clamp(235px,37dvh,340px)}
  .builder-screen .private-room-panel .inventory-grid{flex:none;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:154px;min-height:250px;max-height:min(56dvh,520px);overflow-y:auto}
  .builder-screen .private-room-panel .inventory-item{height:154px;min-height:154px}
  .builder-screen .private-room-panel .inventory-item-art,.builder-screen .private-room-panel .inventory-item.is-equipped .inventory-item-art{height:100px;min-height:100px}
  .builder-screen .inventory-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .builder-screen .inventory-filters::-webkit-scrollbar,.shop-category-filters::-webkit-scrollbar{display:none}
  .builder-screen .inventory-filter{flex:none;min-height:38px}

  .shop-screen .shop-notice{display:none}
  .shop-screen .shop-section-nav{gap:.35rem;margin-bottom:.6rem}
  .shop-screen .shop-section-nav button{min-height:42px;padding:.4rem .35rem;font-size:.82rem;box-shadow:none}
  .shop-screen .shop-category-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.35rem;margin:0 0 .55rem}
  .shop-screen .shop-category-row>span:first-child,.shop-screen .shop-tier-label{display:none}
  .shop-screen .shop-category-filters{grid-column:1;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .shop-screen .shop-category-filters button{flex:none;min-height:38px;padding:.35rem .65rem}
  .shop-mobile-tier-toggle{display:flex;grid-column:2;align-items:center;gap:.35rem;min-height:38px;padding:.3rem .6rem;border:1px solid var(--line);border-radius:999px;background:#263b6199;color:#fff3d8;font:700 .72rem var(--sans);white-space:nowrap}
  .shop-mobile-tier-toggle[aria-expanded="true"]{border-color:#ffe5a080;background:#56698f}
  .shop-screen .shop-category-row .shop-tier-filters{display:none;grid-column:1/-1;gap:.4rem;padding:.2rem 0;overflow-x:auto;scrollbar-width:none}
  .shop-screen .shop-category-row.tier-open .shop-tier-filters{display:flex}
  .shop-screen .shop-tier-filters button{flex:none;min-width:38px;height:38px}
  .shop-screen #shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
  .shop-screen #shop-grid .shop-item{grid-template-rows:94px minmax(2.3em,auto) auto;gap:.3rem;padding:.45rem}
  .shop-screen #shop-grid .shop-item .item-art{height:94px}
  .shop-screen #shop-grid .shop-item .item-art img{max-height:88px}
  .shop-screen #shop-grid .shop-item h3{font-size:.78rem}

  body.river-fullscreen .river-fullscreen-topbar{top:.45rem;width:calc(100% - .8rem)}
  body.river-fullscreen .river-place-chip{min-width:0;max-width:100%}
  body.river-fullscreen .river-place-copy strong{font-size:.72rem}
  body.river-fullscreen .global-chat-toggle{top:3.95rem;left:.5rem;min-height:42px;padding:.35rem .65rem}
  body.river-fullscreen .river-camera-lock{top:3.95rem;right:.5rem;min-width:42px;min-height:42px}
  body.river-fullscreen .river-prayer-toggle{position:absolute;z-index:7;left:50%;bottom:calc(5.25rem + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center;min-height:44px;padding:.45rem .9rem;border:1px solid #f6e9c65c;border-radius:999px;background:#465b82d9;color:#fff2d9;font:700 .78rem var(--sans);white-space:nowrap;box-shadow:0 7px 18px #07152e55;backdrop-filter:blur(12px);transform:translateX(-50%)}
  body.river-fullscreen .river-prayer-toggle[aria-expanded="true"]{display:none}
  body.river-fullscreen #river-prayer-panel:not(.mobile-open){display:none!important}
  body.river-fullscreen #river-prayer-panel.mobile-open{top:auto;left:.45rem;right:.45rem;bottom:calc(4.8rem + env(safe-area-inset-bottom));display:grid;width:auto;max-height:min(63dvh,520px);gap:.5rem;padding:.8rem;border-radius:19px;overflow-y:auto;transform:none}
  #river-prayer-panel .river-prayer-header{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
  #river-prayer-panel .river-prayer-close{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid var(--line);border-radius:11px;background:#ffffff13;color:#fff2d9;font-size:1.25rem}
  body.river-fullscreen #river-prayer-panel textarea{min-height:96px;max-height:23dvh}
  body.river-fullscreen .global-chat-panel{left:.45rem;right:.45rem;bottom:calc(4.8rem + env(safe-area-inset-bottom));width:auto;height:min(54dvh,460px);max-height:calc(100dvh - 9rem);border-radius:19px;padding:.7rem}
  body.river-fullscreen .global-chat-panel.mobile-expanded{height:calc(100dvh - 9rem);max-height:none}
  .global-chat-expand{display:grid;place-items:center;width:38px;height:38px;margin-left:auto;border:1px solid var(--line);border-radius:11px;background:#ffffff13;color:#fff2d9;font-size:1.05rem}
  .global-chat-header .icon-button{flex:none;width:38px;height:38px}

  #province-dialog,#river-channel-dialog{inset:auto 0 0;width:100%;max-width:none;height:min(88dvh,760px);max-height:88dvh;margin:0;padding:.8rem .7rem calc(.8rem + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;overflow:hidden}
  #province-dialog[open],#river-channel-dialog[open]{display:flex;flex-direction:column}
  #province-dialog .game-modal-header,#province-dialog .province-search{flex:none}
  #province-dialog .province-picker{display:flex;flex:1;flex-direction:column;min-height:0;max-height:none;overflow:hidden}
  #province-dialog .province-regions{flex:none;max-height:48px}
  #province-dialog .province-results{flex:1;min-height:0;max-height:none}
  #province-dialog .province-grid{flex:1;grid-template-columns:1fr;min-height:0;max-height:none;overflow-y:auto}
  #river-channel-dialog .river-channel-options{flex:1;min-height:0;max-height:none;overflow-y:auto}
}
@media(max-width:390px){.topbar .brand>span:last-child{max-width:110px}.topbar .account-label{max-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bottom-nav button span{font-size:.56rem}}

/* Province picker: names only, with a simple location pin and quiet state icons. */
#province-dialog .province-grid{grid-auto-rows:max-content}
#province-dialog .province-choice-simple{min-height:64px;gap:.65rem;padding:.7rem .85rem;box-shadow:none}
#province-dialog .province-choice-simple .province-choice-copy{display:block;min-width:0}
#province-dialog .province-choice-simple .province-choice-copy strong{display:block;line-height:1.5;overflow-wrap:anywhere}
#province-dialog .province-choice-simple .province-choice-mark{flex:none;width:30px;height:30px;border:0;border-radius:0;background:transparent;color:var(--ui-icon-ink);box-shadow:none}
#province-dialog .province-choice-simple .province-choice-mark .ui-icon{width:23px;height:23px;stroke-width:1.8}
#province-dialog .province-choice-simple .province-choice-arrow{display:grid;place-items:center;flex:none;width:24px;height:24px;margin-left:auto;padding:0;border:0;background:transparent;color:#c4d0e6}
#province-dialog .province-choice-simple .province-choice-arrow .ui-icon{width:18px;height:18px}
#province-dialog .province-choice-simple.selected .province-choice-mark{border:0;border-radius:0;background:transparent;color:#b2f2dd;box-shadow:none}
#province-dialog .province-choice-simple.selected .province-choice-arrow{border:0;border-radius:50%;background:#a6edda1f;color:#b2f2dd}
#province-dialog .province-choice-simple:focus-visible{outline:2px solid var(--ui-icon-ink);outline-offset:2px}
@media(max-width:600px){
  #province-dialog .province-choice-simple{min-height:58px;padding:.65rem .7rem;gap:.55rem}
  #province-dialog .province-choice-simple .province-choice-mark{width:26px;height:26px}
  #province-dialog .province-choice-simple .province-choice-mark .ui-icon{width:21px;height:21px}
}


/* Light shared header: one wallet group and compact location control. */
.topbar,
body.river-fullscreen>.topbar,
body.home-fullscreen>.topbar,
body:has(#screen-builder:not(.hidden))>.topbar{
  height:60px;min-height:60px;gap:.6rem;padding-inline:clamp(.75rem,2.4vw,2rem);
  border-bottom:1px solid #e5eaff12;background:#182744b8;box-shadow:none;backdrop-filter:blur(16px);
}
.topbar .brand{font-size:.87rem;font-weight:650;gap:.5rem;letter-spacing:0}
.topbar .brand-mark{width:34px;height:34px;border:0;box-shadow:none}
.topbar .brand-mark svg{width:22px;height:22px}
.topbar .wallet-bar{align-items:center;gap:0;min-height:40px;padding:0 .3rem;border:1px solid #e5eaff12;border-radius:12px;background:#ffffff06}
.topbar .wallet-bar .currency{min-height:32px;padding:.2rem .6rem;border:0;background:transparent;box-shadow:none;backdrop-filter:none;font-size:.78rem;font-weight:550;white-space:nowrap}
.topbar .currency+.currency{border-left:1px solid #e5eaff1a;border-radius:0}
.topbar .currency .currency-unit{font-size:.68rem;font-weight:400;opacity:.8}
.topbar .currency-icon{width:15px;height:15px;filter:none}
.topbar .account-button{min-height:44px;max-width:180px;border:0;background:transparent;box-shadow:none;backdrop-filter:none;padding:.25rem .45rem;font-weight:500}
.topbar .account-avatar{width:29px;height:29px}
.topbar .sound-toggle,
.topbar .settings-button{width:44px;height:44px;min-height:44px;flex:none;border:0;background:transparent;box-shadow:none;backdrop-filter:none;border-radius:12px;color:#e5dfd0}
.topbar :is(.account-button,.sound-toggle,.settings-button):hover{background:#ffffff0d;box-shadow:none;transform:none}
body.home-fullscreen .home-hero-content{padding-top:60px}
body.river-fullscreen>main{height:calc(100dvh - 60px)}
.shop-section-nav{top:60px}
body.river-fullscreen .river-fullscreen-topbar{top:.65rem;left:max(1rem,env(safe-area-inset-left));right:auto;width:auto;max-width:calc(100% - 12rem);transform:none;justify-content:flex-start}
body.river-fullscreen .river-place-chip{flex:none;min-width:0;min-height:44px;gap:.5rem;padding:.45rem .75rem;border:1px solid #e5eaff20;border-radius:12px;background:#182744ad;box-shadow:none;backdrop-filter:blur(14px)}
body.river-fullscreen .river-place-icon{width:19px;height:19px;color:#f2d89d}
body.river-fullscreen .river-place-copy{display:block;min-width:0}
body.river-fullscreen .river-place-copy strong{display:block;max-width:32ch;font-size:.83rem;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.river-fullscreen .river-place-chevron{width:16px;height:16px;color:#c5cfdf}
body.river-fullscreen .river-camera-lock{top:.65rem;min-height:44px;border:1px solid #e5eaff20;background:#182744ad;box-shadow:none;backdrop-filter:blur(14px);font-size:.75rem}
body.river-fullscreen .river-overlay .night-label{top:3.8rem;padding:.25rem .45rem;border:0;background:#18274480;box-shadow:none}
@media(max-width:760px){
  .topbar .brand>span:last-child{display:none}
  .topbar .account-label,.topbar .account-chevron{display:none}
  .topbar .account-button{width:44px;max-width:44px;justify-content:center;padding:0}
}
@media(max-width:600px){
  .topbar,
  body.river-fullscreen>.topbar,
  body.home-fullscreen>.topbar,
  body:has(#screen-builder:not(.hidden))>.topbar{height:52px;min-height:52px;gap:.2rem;padding-inline:.45rem}
  .topbar .brand-mark{width:30px;height:30px}
  .topbar .brand-mark svg{width:20px;height:20px}
  .topbar .wallet-bar{display:flex;min-height:36px;padding:0 .15rem;margin-left:auto}
  .topbar .wallet-bar .currency{display:flex;min-height:30px;padding:.15rem .38rem;gap:.25rem;font-size:.7rem}
  .topbar .currency .currency-unit{display:none}
  .topbar .sound-toggle{display:none}
  body.home-fullscreen .home-hero-content{padding-top:52px}
  body.river-fullscreen>main{height:calc(100dvh - 52px)}
  .shop-section-nav{top:52px}
  body.river-fullscreen .river-fullscreen-topbar{top:.5rem;left:.5rem;right:auto;width:auto;max-width:calc(100% - 4rem);transform:none}
  body.river-fullscreen .river-place-chip{min-height:44px;padding:.4rem .6rem;gap:.4rem}
  body.river-fullscreen .river-place-copy strong{font-size:.76rem}
  body.river-fullscreen .river-camera-lock{top:.5rem;right:.5rem;min-width:44px;min-height:44px;padding:.4rem}
  body.river-fullscreen .global-chat-toggle{top:3.8rem;min-height:44px}
}
