/* Cloudstride 1.3 — scene-first game lobby. Shared cards and shop live in lobby.css. */
body{overflow:hidden}
#app{position:relative;display:block;height:100dvh;min-height:0;overflow:hidden}
.site-header{position:absolute;inset:0 0 auto;z-index:50;max-width:none;width:100%;height:auto;margin:0;border:0;padding:max(25px,env(safe-area-inset-top)) max(34px,env(safe-area-inset-right)) 0 max(34px,env(safe-area-inset-left));display:flex;justify-content:space-between;align-items:start;gap:20px;pointer-events:none}
.site-header .brand{display:flex;align-items:center;gap:10px;padding:0;pointer-events:auto;text-shadow:0 1px 12px #fff9}
.site-header .brand-mark{width:43px;height:52px;color:#315e53;filter:drop-shadow(0 1px 2px #fff8)}
.site-header .brand-mark .icon{width:41px;height:46px;stroke-width:1.2}
.site-header .brand-name{font-family:var(--serif);font-weight:400;font-size:36px;line-height:1.1;letter-spacing:-1.2px;color:#21483f;margin:0}
.site-header .brand-sub{font-size:9px;font-weight:600;letter-spacing:2.6px;color:#496c5d;margin:6px 0 0 2px}
:lang(zh-CN) .site-header .brand-name{letter-spacing:5px;font-size:33px}
.menu-toggle{pointer-events:auto;display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 17px;border:1px solid #e6d7ac;border-radius:6px;background:linear-gradient(145deg,#fffef1f2,#eaeedbe8);color:#355c50;box-shadow:0 4px 16px #173c4226,inset 0 0 0 3px #fff7;backdrop-filter:blur(12px);font-size:14px;transition:transform .2s,background .2s}
.menu-toggle .icon{width:21px;height:21px;transform:rotate(45deg);stroke-width:1.5}
.menu-toggle:hover{background:#fffdec;transform:translateY(-2px)}
.menu-toggle[aria-expanded=true]{border-color:#567e6b}
.lobby-hud{display:flex;align-items:center;gap:13px;pointer-events:auto}
.lobby-hud .coin-pill{min-height:43px;min-width:88px;font-size:15px;background:linear-gradient(145deg,#fffef2ee,#eaf0dce3);border-color:#e0d3a4;box-shadow:0 4px 15px #173f4626,inset 0 0 0 3px #fff7;backdrop-filter:blur(12px)}
.lobby-v13{position:absolute;inset:0;isolation:isolate;max-width:none;width:100%;height:100%;margin:0;overflow:hidden}
.lobby-v13 .lobby-backdrop,.lobby-v13 .lobby-wash{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.lobby-v13 .lobby-backdrop{z-index:-3;object-fit:cover;object-position:center 42%}
.lobby-v13 .lobby-wash{z-index:-2;background:linear-gradient(180deg,#edfafb30 0%,transparent 26%,transparent 60%,#153f4733 100%),radial-gradient(ellipse at 50% 49%,transparent 30%,#21485017 100%)}
.scene-orbit{position:absolute;left:50%;top:50%;width:min(74vw,1050px);height:min(53vh,490px);transform:translate(-50%,-50%) rotate(-8deg);border:1px solid #fffa;border-radius:50%;box-shadow:0 0 30px #eafae926,inset 0 0 30px #f2ffe520;pointer-events:none;z-index:-1}
.scene-orbit:before,.scene-orbit:after{content:'';position:absolute;inset:9px -12px;border:1px solid #f7e9b94d;border-radius:50%}
.scene-orbit:after{inset:18px 5px;border-style:dashed;border-color:#ffffff40}
.lobby-v13 .chapter-section{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);width:min(1550px,100%);height:min(62dvh,calc(100dvh - 260px),600px);margin:0 auto;padding:0;display:grid;grid-template-rows:36px minmax(0,1fr) 22px;gap:8px;min-height:0}
.lobby-v13 .section-heading{width:max-content;max-width:calc(100% - 40px);min-height:36px;height:36px;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:22px;padding:0 18px;background:#f9faecdf;border:1px solid #ffffffe0;border-radius:30px;box-shadow:0 3px 18px #204a4820;backdrop-filter:blur(12px)}
.lobby-v13 .section-heading h2{font-family:var(--sans);font-size:14px;font-weight:600;letter-spacing:.8px;line-height:1.2;color:#35574b;white-space:nowrap}
.lobby-v13 .completion{font-size:12px;line-height:1.2;color:#59725a;padding:0;gap:5px;white-space:nowrap}
.lobby-v13 .completion .icon{width:14px;height:14px}
.lobby-v13 #chapter-deck{--card-width:clamp(320px,32vw,450px);--card-height:clamp(268px,42dvh,410px);grid-template-rows:minmax(0,1fr) 44px}
.lobby-v13 .depth-viewport{perspective:1300px;perspective-origin:50% 50%}
.lobby-v13 .depth-card{border-radius:10px;border:1px solid #ccd0ab;box-shadow:0 20px 28px #173a4938,0 3px 5px #29423326;background:#f6f6e6}
.lobby-v13 .depth-card.is-active{border:2px solid #b9a26c;box-shadow:0 22px 40px #17353f66,0 0 0 4px #ffffe333,0 0 28px #f3f8cf44}
.lobby-v13 .depth-card.is-active:after{inset:4px;border:1px solid #f3efd5;border-radius:6px}
.lobby-v13 .depth-card.chapter-card{grid-template-rows:minmax(0,1fr) 126px}
.lobby-v13 .chapter-art>img{filter:saturate(.95);object-position:50% 42%}
.lobby-v13 .chapter-art:after{background:linear-gradient(0deg,#163b4bd9 0%,#183f4b18 44%,transparent 68%)}
.lobby-v13 .depth-card .chapter-number{font-size:40px;top:14px;left:20px;color:#fffbe5;text-shadow:0 2px 8px #143a4c70}
.lobby-v13 .depth-card .chapter-status{top:17px;right:18px;background:#203f455c;border:1px solid #fff7;border-radius:50%;padding:5px;color:#fffbe7;display:grid;place-items:center}
.lobby-v13 .depth-card .chapter-status .icon{width:17px;height:17px}
.lobby-v13 .depth-card .chapter-art .chapter-tag{left:19px;bottom:13px;font-size:10px;letter-spacing:1.5px;color:#f4f7e9}
.lobby-v13 .chapter-duration{right:18px;bottom:12px;font-size:12px;color:#fff9dc}
.lobby-v13 .depth-card .chapter-body{padding:14px 20px 13px;min-height:0;background:linear-gradient(135deg,#fffff0,#e9efda);display:flex;flex-direction:column}
.lobby-v13 .depth-card .chapter-body h3{font-size:29px;font-weight:400;line-height:1.12;color:#25483e;letter-spacing:-.4px}
.lobby-v13 .chapter-subtitle{font-size:12px;line-height:1.4;margin-top:4px;color:#657953}
.lobby-v13 .chapter-card-foot{margin-top:auto;padding-top:8px;gap:10px}
.lobby-v13 .chapter-enter{font-size:12px;font-weight:600;line-height:1.2;color:#40684c;min-height:28px;gap:7px}
.lobby-v13 .chapter-enter .icon{width:14px;height:14px}
.lobby-v13 .is-locked .chapter-enter{color:#65705e}
.lobby-v13 .depth-card .stars{gap:4px}
.lobby-v13 .depth-card .stars .icon{width:13px;height:13px}
.lobby-v13 .depth-controls{gap:16px}
.depth-controls .deck-arrow{width:44px;height:44px;flex-shrink:0;background:#fafcece8;border:1px solid #f5e9c4;color:#365f50;box-shadow:0 3px 12px #143e4720,inset 0 0 0 3px #fff7}
.depth-controls .deck-arrow .icon{width:20px;height:20px}
.depth-controls .deck-counter{font-size:11px;letter-spacing:2px;color:#3a5f50;min-width:61px;text-align:center;background:#fbfbe9e8;border:1px solid #fff9;border-radius:20px;padding:8px 10px;line-height:1.3;box-shadow:0 2px 12px #173f4e16}
.lobby-v13 .deck-dots{display:none}
.lobby-v13 .deck-help{margin:0;padding:0 16px;font-size:12px;line-height:22px;font-weight:500;color:#224d43;text-shadow:0 1px 4px #fff,0 0 12px #fff;background:radial-gradient(ellipse at center,#ffffe96b,transparent 65%);letter-spacing:.1px}
.lobby-v13 .lobby-dock{position:absolute;bottom:max(28px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(850px,calc(100% - 72px));height:90px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;z-index:3}
.lobby-v13 .lobby-dock:before{content:'';position:absolute;left:-30px;right:-30px;bottom:-12px;height:70px;background:radial-gradient(ellipse,#bfe2c244,transparent 70%);filter:blur(12px);z-index:-1;pointer-events:none}
.lobby-v13 .dock-entry{position:relative;isolation:isolate;display:flex;flex-direction:row;align-items:center;justify-content:start;min-width:0;min-height:72px;gap:16px;padding:8px 18px 8px 9px;background:transparent;border:0;border-radius:10px;text-align:left;backdrop-filter:none;transition:transform .2s,filter .2s}
.lobby-v13 .dock-entry:before{content:'';position:absolute;inset:14px 0 8px 18px;background:linear-gradient(100deg,#fbfce9f5,#f4f7e2dc);clip-path:polygon(0 0,calc(100% - 17px) 0,100% 50%,calc(100% - 17px) 100%,0 100%);box-shadow:inset 0 1px #fff,inset 0 -1px #c2b97b;z-index:-1}
.lobby-v13 .dock-entry:hover{transform:translateY(-5px);filter:drop-shadow(0 6px 12px #193f4933)}
.lobby-v13 .dock-entry:active{transform:translateY(-1px)}
.lobby-v13 .dock-glyph{position:relative;display:grid;place-items:center;width:62px;height:62px;flex-shrink:0;background:linear-gradient(140deg,#fffef1,#dfe9ce);border:1px solid #c4b783;border-radius:13px;box-shadow:0 4px 10px #1c464d33,inset 0 0 0 4px #fff9;color:#4b6c4e}
.lobby-v13 .dock-glyph:before{content:'';position:absolute;inset:5px;border:1px solid #b6bc8e;border-radius:9px;pointer-events:none}
.lobby-v13 .dock-glyph .icon{width:31px;height:31px;stroke-width:1.2}
.lobby-v13 .dock-entry .avatar{width:60px;height:60px;object-fit:contain;background:transparent;border:0;border-radius:12px}
.lobby-v13 .dock-copy{gap:5px;align-items:start;max-width:100%;text-align:left;overflow:hidden}
.lobby-v13 .dock-copy strong{font-family:var(--serif);font-size:22px;line-height:1.2;font-weight:400;color:#2e5344;max-width:100%}
.lobby-v13 .dock-copy>span{font-size:11px;color:#657b56;line-height:1.3;max-width:100%}
/* Native modal provides focus trapping and makes the scene behind it inert. */
.lobby-menu-dialog{position:fixed;inset:auto;top:max(24px,env(safe-area-inset-top));right:max(28px,env(safe-area-inset-right));left:auto;bottom:auto;margin:0;width:348px;max-width:calc(100% - 32px);max-height:calc(100dvh - 48px);padding:0;border:1px solid #c9ba8a;border-radius:12px;background:linear-gradient(155deg,#fffff1f5,#e9f0ddf7);box-shadow:0 24px 90px #153f4a66,inset 0 0 0 4px #ffffed80;backdrop-filter:blur(22px);overflow:auto}
.lobby-menu-dialog::backdrop{background:#113a4659;backdrop-filter:blur(4px)}
.lobby-menu-dialog #modal-content{padding:0 24px 22px}
.menu-head{padding:25px 0 19px;align-items:center;border-bottom:1px solid #cfd8bb;gap:12px}
.menu-head h2{font-size:32px;margin-top:5px;line-height:1.1}
.menu-overline{font-family:var(--serif);font-size:14px;color:#788861;letter-spacing:1.5px}
.lobby-menu-dialog .icon-button,.modal-back{min-width:44px;width:44px;height:44px;flex-shrink:0}
.lobby-menu-dialog .icon-button{border:1px solid #cdd6b9;background:#f7f9e9}
.menu-wallet{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 0;font-size:13px;color:#5c7351}
.menu-wallet .coin-pill{background:#fffdec;border-color:#dcd3aa;font-size:16px;padding:10px 14px}
.menu-links{display:grid;gap:5px;border-top:1px solid #d2dbc2;padding:12px 0}
.menu-mobile-links{display:none}
.menu-links button,.menu-preferences button{display:flex;align-items:center;gap:13px;background:transparent;text-align:left;min-height:52px;padding:10px 8px;border-radius:5px;font-size:15px;color:#355947}
.menu-links button>.icon:last-child,.menu-preferences button>.icon:last-child{width:16px;height:16px;margin-left:auto;color:#768b62}
.menu-links button:hover,.menu-preferences button:hover{background:#dce9cc}
.menu-preferences{border-top:1px solid #cfd9c0;border-bottom:1px solid #cfd9c0;display:grid;gap:2px;padding:12px 0}
.menu-preferences strong{font-size:12px;font-weight:500;margin-left:auto;color:#6b7d58}
.menu-save{display:flex;align-items:start;justify-content:center;gap:7px;font-size:11px;line-height:1.6;color:#6b7b5b;padding-top:20px}
.menu-save .icon{width:15px;height:15px;margin-top:1px}
.modal-back{background:#edf1e0;border:1px solid #d2d9c3;border-radius:50%}
.modal-back .icon{transform:rotate(180deg)}
.modal-head>.modal-back{margin-right:5px}
dialog:not(.lobby-menu-dialog){border:1px solid #c9ba8a;border-radius:12px;background:linear-gradient(145deg,#fbfcedf5,#edf1dff5);box-shadow:0 24px 90px #153f4a66,inset 0 0 0 4px #ffffed80;backdrop-filter:blur(20px)}
dialog:not(.lobby-menu-dialog)::backdrop{background:#113a4659;backdrop-filter:blur(5px)}
dialog[open]{animation:panel-arrive .18s ease-out}
@keyframes panel-arrive{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
.modal-head:not(.menu-head){background:linear-gradient(110deg,#fbfcedf5,#eef3e2d9),url('./assets/art/world-keyart-v1.png') center 35%/cover;border-bottom:1px solid #d7d4b7;align-items:center}
.modal-tools{display:flex;align-items:center;gap:12px;margin-left:auto;flex-shrink:0}
.modal-head>div:first-of-type{flex:1;min-width:0}
.modal-tools .coin-pill,.shop-header-tools .coin-pill{background:#fffbe7;border-color:#dbd0a0}
dialog .modal-head .icon-button{width:44px;height:44px;flex-shrink:0}
.shop-dialog .shop-tabs{border-bottom-color:#d5d8bb;background:#f4f7e7aa}
.shop-dialog .shop-tab{min-height:48px}
.shop-dialog .shop-tab.active{color:#315f49}
.shop-dialog .shop-tab.active:after{background:#a68f52}
.shop-dialog .depth-card{border-radius:9px}
.shop-dialog .depth-card.is-active{border-color:#ae985e;box-shadow:0 14px 30px #1e4a4038,0 0 0 3px #fff7}
.shop-dialog .product-art{background:radial-gradient(ellipse at 40% 60%,color-mix(in srgb,var(--item-accent) 23%,#edf2dd),#eff4df 75%)}
.shop-dialog .product-info{background:linear-gradient(130deg,#fffef0,#f0f3e0)}
.shop-dialog .product-info .shop-buy{min-height:44px;border-radius:5px}
.shop-dialog .shop-footer{background:#f1f5e4b3;border-top-color:#d7dbc3}
.traveler-card{border-radius:8px;border-color:#d5d6b6;background:#f3f5e6}
.traveler-card.selected{border-color:#a79559;box-shadow:0 0 0 3px #fff9}
.traveler-info{background:linear-gradient(130deg,#fffef0,#eff3df)}
.traveler-info .shop-buy{min-height:44px;border-radius:5px}
/* Larger pagination targets also benefit the shared shop on touchscreens. */
.deck-dots{gap:0}
.deck-dots button,.deck-dots button.active{width:40px;height:44px;background:transparent;border-radius:0}
.deck-dots button:before{inset:auto;top:50%;left:50%;width:6px;height:6px;background:#b3bda5;border-radius:10px;transform:translate(-50%,-50%);transition:width .2s,background .2s}
.deck-dots button.active:before{width:20px;background:#62815e}
.shop-dialog .depth-carousel{grid-template-rows:minmax(0,1fr) 44px}
.shop-dialog .depth-controls{gap:6px}
@media(max-height:660px) and (min-width:601px){
 .site-header{padding-top:max(16px,env(safe-area-inset-top))}.site-header .brand-name{font-size:30px}.site-header .brand-sub{font-size:8px}
 .lobby-v13 #chapter-deck{--card-height:216px}.lobby-v13 .depth-card.chapter-card{grid-template-rows:minmax(0,1fr) 102px}
 .lobby-v13 .depth-card .chapter-body{padding:10px 18px}.lobby-v13 .depth-card .chapter-body h3{font-size:24px}.lobby-v13 .chapter-subtitle{font-size:11px}
 .lobby-v13 .depth-card .chapter-number{font-size:30px;top:10px}.lobby-v13 .lobby-dock{height:78px;bottom:18px}
 .lobby-v13 .dock-glyph{width:54px;height:54px}.lobby-v13 .dock-entry .avatar{width:52px;height:52px}.lobby-v13 .dock-copy strong{font-size:19px}
}
@media(min-width:601px) and (max-width:1000px){
 .lobby-v13 #chapter-deck{--card-width:350px}.lobby-v13 .lobby-dock{width:calc(100% - 48px);gap:12px}
 .lobby-v13 .dock-entry{gap:10px;padding-right:15px}.lobby-v13 .dock-copy strong{font-size:19px}.lobby-v13 .dock-copy>span{font-size:10px}
}
@media(max-width:600px){
 .site-header{padding:max(22px,env(safe-area-inset-top)) max(19px,env(safe-area-inset-right)) 0 max(19px,env(safe-area-inset-left));gap:12px}
 .site-header .brand-mark{width:30px;height:40px}.site-header .brand-mark .icon{width:30px;height:36px}
 .site-header .brand{gap:6px}.site-header .brand-name{font-size:28px;letter-spacing:-.7px}.site-header .brand-sub{font-size:7px;letter-spacing:1.5px;margin-top:5px}
 :lang(zh-CN) .site-header .brand-name{font-size:26px;letter-spacing:3px}
 .menu-toggle{padding:0;gap:0;width:48px;min-height:48px;border-radius:11px}.menu-toggle>span{display:none}.menu-toggle .icon{width:20px;height:20px}
 .lobby-hud{gap:8px}.lobby-hud .coin-pill{min-width:63px;min-height:35px;font-size:12px;padding:7px 9px;gap:4px}.lobby-hud .coin-pill .icon{width:15px;height:15px}
 .lobby-v13 .lobby-backdrop{object-position:74% center}
 .lobby-v13 .lobby-wash{background:linear-gradient(0deg,#183e4f33,transparent 65%),linear-gradient(180deg,#ffffff38,transparent 22%)}
 .scene-orbit{width:150vw;height:58vh;transform:translate(-50%,-50%) rotate(-20deg)}
 .lobby-v13 .chapter-section{top:53%;height:min(72dvh,calc(100dvh - 180px));grid-template-rows:36px minmax(0,1fr) 22px;gap:8px}
 .lobby-v13 .section-heading{gap:12px;padding:0 13px}.lobby-v13 .section-heading h2{font-size:12px;letter-spacing:.3px}.lobby-v13 .completion{font-size:11px}
 .lobby-v13 #chapter-deck{--card-width:min(76vw,330px);--card-height:min(48dvh,calc(100dvh - 306px),420px)}
 .lobby-v13 .depth-card.chapter-card{grid-template-rows:minmax(0,1fr) 132px}
 .lobby-v13 .depth-card .chapter-body{padding:15px 18px 12px}.lobby-v13 .depth-card .chapter-body h3{font-size:27px}
 .lobby-v13 .chapter-subtitle{font-size:12px}.lobby-v13 .chapter-enter{font-size:12px}.lobby-v13 .deck-help{font-size:11px}
 .lobby-v13 .lobby-dock{display:none}.menu-mobile-links{display:grid}
 .lobby-menu-dialog{top:max(16px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));max-height:calc(100dvh - 32px);width:348px}
 .lobby-menu-dialog #modal-content{padding:0 20px 20px}.menu-head{padding-top:21px}.menu-head h2{font-size:29px}.menu-wallet{padding:16px 0}
 .shop-dialog .modal-head>.modal-back{margin-right:1px;width:44px;min-width:44px;height:44px}.shop-dialog .modal-head{gap:8px}
 .shop-dialog .modal-head p{max-width:170px}.shop-dialog .shop-header h2{font-size:25px}
 .modal-tools{gap:5px}.modal-tools .coin-pill{min-width:59px;font-size:11px;padding:7px 9px}.modal-tools .coin-pill .icon{width:14px;height:14px}
 .modal-head>.modal-back{width:44px;min-width:44px;height:44px}
 .modal-head{gap:8px}.modal-head h2{font-size:27px}
 dialog:not(.shop-dialog) .modal-head{flex-wrap:wrap}dialog:not(.shop-dialog) .modal-head p{max-width:210px}
 .deck-dots button,.deck-dots button.active{width:36px}
}
@media(max-width:360px){
 .site-header{padding-left:13px;padding-right:13px;gap:8px}.site-header .brand-name{font-size:23px}.site-header .brand-sub{font-size:6px;letter-spacing:1px}
 .site-header .brand-mark,.site-header .brand-mark .icon{width:23px}.site-header .brand{gap:4px}.lobby-hud{gap:6px}.lobby-hud .coin-pill{min-width:57px;padding:7px}.menu-toggle{width:44px;min-height:44px}
 .lobby-v13 .depth-card .chapter-body h3{font-size:24px}.lobby-v13 .chapter-subtitle{font-size:11px}.lobby-v13 .depth-card .chapter-body{padding-left:14px;padding-right:14px}
 .lobby-v13 .depth-card .chapter-number{font-size:34px}
}
@media(max-height:500px) and (max-width:1000px) and (min-width:601px){
 .site-header{padding-top:13px;padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 .site-header .brand-name{font-size:25px}.site-header .brand-sub{display:none}.site-header .brand-mark{height:36px}.menu-toggle{min-height:44px}
 .lobby-v13 .lobby-dock{display:none}.menu-mobile-links{display:grid}
 .lobby-v13 .chapter-section{top:54%;height:calc(100dvh - 100px);grid-template-rows:26px minmax(0,1fr);gap:5px}
 .lobby-v13 .section-heading{height:26px;min-height:26px}.lobby-v13 .section-heading h2,.lobby-v13 .completion{font-size:11px}
 .lobby-v13 #chapter-deck{--card-width:290px;--card-height:198px}.lobby-v13 .depth-card.chapter-card{grid-template-rows:minmax(0,1fr) 88px}
 .lobby-v13 .depth-card .chapter-body{padding:9px 16px}.lobby-v13 .depth-card .chapter-body h3{font-size:23px}
 .lobby-v13 .chapter-subtitle{display:none}.lobby-v13 .deck-help{display:none}
 .lobby-v13 .chapter-card-foot{padding-top:4px}
}
@media(prefers-reduced-motion:reduce){.menu-toggle,.lobby-v13 .dock-entry,.deck-dots button:before{transition:none}dialog[open]{animation:none}}
