:root{color-scheme:dark;--ink:#422516;--gold:#ffe3a0;--brass:#c09135;--teal:#063e4a;--cream:#faedc9;--red:#a82b20;--nav-height:90px;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-size:15px}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#191c19;color:var(--cream);-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #6ae4ed;outline-offset:2px}button{color:inherit}button:disabled{cursor:wait;opacity:.55}img{max-width:100%;user-select:none;-webkit-user-drag:none}h1,h2,h3,p{margin:0}h1{font-size:1.45rem}h2{font-size:1.15rem}h3{font-size:1rem}small{font-size:.76rem}p{line-height:1.6}button,input{min-height:44px}a{color:inherit}
#game{width:100%;max-width:540px;height:100vh;height:100dvh;margin:0 auto;position:relative;background:var(--teal) url('/assets/Texture/LoginScenes/module_bg.png') center/cover;box-shadow:0 0 60px #0009;overflow:hidden}#game>.boot{padding:30px}.boot{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:22px;text-align:center}.spinner{width:42px;height:42px;border:3px solid #d2a84c40;border-top-color:#ffe3a0;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.gold-button,.small-button{background:linear-gradient(#ffe6a2,#d8a24d 53%,#b67831);color:#4e260f;border:2px solid #ffdb71;border-radius:7px;box-shadow:inset 0 0 0 1px #8b531c,0 3px 0 #582d16;text-shadow:0 1px #ffefb7;font-weight:800;padding:7px 17px;line-height:1.2}.gold-button:active,.small-button:active{transform:translateY(2px);box-shadow:inset 0 0 0 1px #8b531c}.small-button{font-size:.78rem;padding:6px 10px;min-height:36px}.text-button{border:0;background:none;color:var(--gold);padding:9px 8px;text-decoration:underline;text-underline-offset:4px}.parchment{background:#f5e6c5;color:var(--ink);border:3px solid #c99642;box-shadow:inset 0 0 0 2px #fff2c8,0 5px 0 #61361e;border-radius:10px}.parchment .text-button{color:#6c381c}.submit{display:block;width:100%;font-size:1.13rem;margin-top:12px;min-height:48px}.muted,.save-note{color:#755a3d;font-size:.8rem;line-height:1.6}.save-note{text-align:center}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.login-screen{height:100%;position:relative;background:url('/assets/Texture/LoginScenes/main_bg.jpg') center/cover;overflow:auto;padding-bottom:calc(16px + env(safe-area-inset-bottom))}.login-art{width:100%;height:76%;object-fit:contain;object-position:top;position:absolute;top:0;left:0}.login-form{width:86%;position:relative;top:53%;margin:0 auto 60%;padding:18px 22px}.login-form h1{text-align:center;font-size:1.1rem;margin-bottom:14px}.login-form label,.role-form label{display:block;font-size:.86rem;font-weight:700;margin:10px 0}.login-form input,.role-form input{display:block;width:100%;border:1px solid #ae8c57;border-radius:5px;background:#fff9e9;color:#422516;padding:10px 12px;margin-top:5px;font-size:16px;min-width:0}.login-form>.text-button{display:block;margin:4px auto}.form-error{color:#a4241d;font-weight:700;font-size:.84rem;min-height:5px}.login-form .save-note{margin-top:6px;font-size:.73rem}
.choose-screen{height:100%;overflow:auto;display:flex;flex-direction:column;align-items:center;background:url('/assets/Texture/ChooseRole/user_bg.jpg') center/cover;padding:22px 22px calc(20px + env(safe-area-inset-bottom))}.ribbon{color:#ffe18b;text-shadow:2px 2px #5d2d0e,-1px -1px #663400;font-size:1.7rem}.choose-art{flex:1;min-height:200px;width:100%;max-height:53%;display:flex;align-items:end;justify-content:center}.choose-art img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 10px 10px #1009)}.sex-switch{display:flex;gap:24px;margin:12px}.sex-switch button:not(.selected){filter:saturate(.3);opacity:.8}.role-form{width:100%;padding:14px 20px}.role-form label{text-align:center}
.game-layout{height:100%;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}.player-header{flex:none;position:relative;display:grid;grid-template-columns:58px minmax(0,1fr) 114px;gap:7px;min-height:95px;align-items:center;padding:8px 10px;background:#553b25 url('/assets/Texture/MainScenes/avatar_attr_bg.png') center/100% 100%;border-bottom:3px solid #d7a644;z-index:4;box-shadow:0 3px 0 #5e2a19}.avatar{background:#562b18;border:2px solid #e3c66b;border-radius:7px;padding:1px;height:69px;position:relative;min-width:0}.avatar img{width:100%;height:51px;object-fit:cover;border-radius:4px}.avatar b{position:absolute;left:0;right:0;bottom:0;font-size:.68rem;color:#ffdc79;text-shadow:1px 1px #000;background:#3a241bd9}.player-info{min-width:0}.identity{display:flex;justify-content:space-between;align-items:center;gap:3px;margin-bottom:6px}.identity strong{font-size:.87rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px;color:#fbe7ac;text-shadow:1px 1px #4a2417}.sync-status{font-size:.61rem;color:#9fe5c8;background:none;border:0;min-height:22px;padding:0;white-space:nowrap}.meter-row{display:flex;align-items:center;gap:4px;font-size:.72rem;margin:5px 0;color:#f9df9b;white-space:nowrap}.meter{position:relative;width:100%;height:16px;background:#3b352a;border:1px solid #d4ad54;border-radius:4px;overflow:hidden}.meter i{display:block;background:#f4c148;height:100%;transition:width .25s}.meter.stamina i{background:#47b8da}.meter small{position:absolute;inset:0;text-align:center;line-height:14px;color:white;font-size:.61rem;text-shadow:1px 1px 1px #000,-1px -1px #583b20}.wealth{display:flex;flex-direction:column;font-size:.76rem;gap:6px;align-self:center;font-weight:700;white-space:nowrap}.wealth .silver{color:#f8f3df}.wealth .gold{color:#ffdc56}.combat-power{font-size:.68rem;color:#f2c685}.game-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b88b36 transparent}.bottom-nav{height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding:3px 5px calc(3px + env(safe-area-inset-bottom));flex:none;display:flex;justify-content:space-around;background:#604327 url('/assets/Texture/MainScenes/menu_bg.png') center top/100% 100%;border-top:3px solid #edc36d;z-index:4}.bottom-nav button{padding:0 3px;background:none;border:0;width:20%;max-width:98px;position:relative;display:flex;align-items:center;justify-content:center}.bottom-nav img{max-height:100%;object-fit:contain;filter:drop-shadow(0 2px 1px #271309)}.bottom-nav .active{background:#ffe17320;border-radius:9px;box-shadow:inset 0 0 0 1px #ffe5a04d}.bottom-nav .active img{filter:brightness(1.18) drop-shadow(0 0 3px #e8b637)}
.home-screen{min-height:100%;padding:20px 18px;display:flex;flex-direction:column;position:relative;background:url('/assets/Texture/LoginScenes/main_bg.jpg') center top/cover}.city-title{text-align:center;color:#fff2ad;text-shadow:2px 2px 0 #5d2919}.city-title span{font-size:.8rem;letter-spacing:.2em}.city-title h1{font-size:1.5rem;margin:5px 0}.city-actions{display:flex;justify-content:center;gap:2px;margin-top:clamp(110px,20vh,230px);margin-bottom:15px}.city-actions button{border:0;background:none;display:flex;flex-direction:column;align-items:center;width:25%;padding:0;text-shadow:1px 1px 2px #311900}.city-actions img{height:65px;object-fit:contain}.city-actions strong{font-size:.75rem;color:#fff1c1;background:#52321ac9;padding:3px 5px;border-radius:3px}.home-summary{padding:14px 18px;text-align:center;margin-top:auto}.home-summary>strong{font-size:1.05rem}.home-summary p{font-size:.75rem;margin:6px 0}.summary-stats{display:flex;justify-content:center;gap:24px;font-size:.8rem;margin:10px 0}.summary-stats b{display:block;color:#9b3719;font-size:1.2rem}.home-summary .gold-button{min-width:66%}
.tab-bar{display:flex;background:#4b3525;border-bottom:3px solid #bf9248;padding:10px 10px 0;gap:8px;position:sticky;top:0;z-index:3}.tab{border:2px solid #c39c4a;border-bottom:0;border-radius:10px 10px 0 0;background:#143a4b;color:#f7e6b8;padding:9px 15px;font-size:.95rem;flex:1;font-weight:700;min-height:44px}.tab.active{background:#14617a;color:#fff4bf;box-shadow:inset 0 2px 6px #ffe59c}.section-intro{text-align:center;font-size:.78rem;color:#f4dcaa;padding:15px 9px;line-height:1.65}.empty-state{padding:35px 15px;text-align:center;line-height:1.9}.empty-state h2{font-size:1.05rem}.empty-state p{font-size:.83rem;margin:8px 0 18px}.empty-state>.gold-button{display:block;margin:15px auto}.collection{max-height:60vh;overflow:auto}.collection>h2,.bag-content>h2{padding:14px 14px 5px;color:#f5db96}.bag-content h2 small{font-size:.8rem}.dialog .collection{max-height:58vh}.item-row{display:flex;align-items:center;gap:10px;min-height:102px;padding:12px 13px;background:#ede2c9;color:#55321f;border-bottom:1px solid #b7a078}.item-row:nth-child(even){background:#e7d6b8}.item-icon{width:60px;height:60px;object-fit:contain;background:#614d40;border:2px solid #ca9b4c;border-radius:8px;flex-shrink:0}.item-copy{flex:1;min-width:0}.item-copy h2,.item-copy strong{font-size:.95rem;line-height:1.4}.item-copy p{font-size:.74rem;line-height:1.55;color:#886143;margin-top:3px}.item-copy small{font-size:.69rem;color:#8a5a2f}.item-row>.gold-button{padding:8px 12px;font-size:.82rem;min-width:65px;flex:none}.bag-screen,.shop-screen,.chapter-screen{min-height:100%}.shop-screen{background:url('/assets/Texture/ShopScene/activeList_bg.jpg') center/cover}.recruit-banners{display:flex;gap:4px;padding:12px 9px;align-items:start}.recruit-banners button{border:0;background:none;padding:0;width:33.333%;display:flex;flex-direction:column;align-items:center}.recruit-banners img{width:100%;object-fit:contain}.recruit-banners span{margin:12px 0 0;color:#fee6a0;background:#3c2219e6;border:1px solid #b88b35;border-radius:6px;padding:8px 4px;width:94%;font-weight:800;font-size:.8rem;box-shadow:0 3px 0 #1f1a16}.shop-tip{font-size:.74rem;text-align:center;color:#ecd9ae;padding:18px 15px 30px}.shop-items{padding:8px}.recruit-result{text-align:center}.recruit-result h2{color:#9b321c;font-size:1.6rem}.reveal-hero{width:100%;height:300px;object-fit:contain;filter:drop-shadow(0 4px 7px #99662b66)}.recruit-result h3{font-size:1.6rem;color:#8d3a16}.recruit-result p{font-size:.79rem;margin:10px 0}.recruit-result>.gold-button{width:80%;margin:12px auto}.recruit-result>.text-button{display:block;margin:auto}
.unit-tabs{display:flex;gap:8px;padding:10px;min-height:77px;background:#084256;border-bottom:3px solid #cc9d45;overflow-x:auto}.portrait{min-width:52px;max-width:64px;width:16%;height:58px;padding:2px;border:2px solid #be8d37;background:#53381f;border-radius:8px;flex-shrink:0;position:relative}.portrait img{width:100%;height:100%;object-fit:contain}.portrait.selected{border-color:#fff7ac;box-shadow:0 0 0 2px #d4b54a}.portrait.add-hero{font-size:2rem;font-weight:400;color:#fae7ba}.formation-screen{min-height:100%;background:url('/assets/Texture/FormationScene/formationbg.jpg') center/cover;display:flex;flex-direction:column}.formation-stage{height:clamp(260px,43vh,450px);position:relative;display:flex;align-items:end;justify-content:center}.formation-hero{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 4px #2f0b0b80)}.equipment-slot{position:absolute;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:65px;height:76px;min-height:65px;border:2px solid #d3a54d;border-radius:9px;background:#312e2ce8;box-shadow:0 2px 0 #4e270e;padding:4px}.equipment-slot img{height:48px;max-width:48px;object-fit:contain}.equipment-slot span{font-size:.65rem;color:#fff0ae}.slot-0{top:17%;left:9px}.slot-1{top:17%;right:9px}.slot-2{top:58%;left:9px}.slot-3{top:58%;right:9px}.unit-sheet{padding:14px 18px;margin:0 10px 16px;margin-top:auto}.unit-name{display:flex;align-items:center;gap:12px;padding-bottom:11px;border-bottom:1px solid #b99b5b}.unit-name h1{font-size:1.3rem}.unit-name>.gold-button{margin-left:auto;font-size:.8rem}.tag{margin-left:auto;font-size:.75rem;color:#926328;border:1px solid #a98a51;padding:4px 8px}.attribute-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px 22px;font-size:.84rem;margin:15px 0}.attribute-grid span{display:flex;justify-content:space-between;gap:4px}.attribute-grid b{color:#a74320}.unit-sheet>p{font-size:.72rem;color:#906f44}.unit-sheet>.text-button{font-size:.78rem;padding-left:0}
.chapter-list{padding:2px 12px 18px}.chapter-banner{display:block;width:100%;padding:6px;margin:0 0 14px;border:3px solid #d4a145;border-radius:9px;background:#523b24;position:relative;box-shadow:inset 0 0 0 1px #fff0a0,0 3px #6f311a}.chapter-banner img{display:block;width:100%;border-radius:3px}.chapter-banner>span{position:absolute;bottom:9px;left:11px;right:11px;display:flex;justify-content:space-between;font-size:.75rem;color:#fff3bd;text-shadow:1px 1px #000}.chapter-banner b{background:#3d261cdd;border-radius:3px;padding:2px 6px}.nodes-screen{min-height:1050px;background-size:100% 100%;position:relative;padding-top:65px;padding-bottom:25px}.map-title{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:14px}.map-title h1{font-size:1.1rem;text-shadow:1px 2px #3f2010;color:#fff1b5}.node-path{display:flex;flex-direction:column;gap:29px;align-items:flex-start;padding:10px 10%}.map-node{margin-left:calc(var(--lane)*34%);width:68px;height:68px;min-height:68px;border-radius:50%;color:#fff2b1;background:radial-gradient(circle at 30% 20%,#a97138,#5f2e19);border:3px solid #e9c266;box-shadow:inset 0 0 0 2px #713311,0 5px #452917;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-shrink:0}.map-node>span{font-size:1.35rem;font-weight:900}.map-node>small{font-size:.6rem}.map-node.cleared{background:radial-gradient(circle at 30% 20%,#75a55b,#284c31);border-color:#daeaa5}.battle-preview-art img{height:170px;max-width:90%;object-fit:contain}.battle-preview-art{text-align:center}
.battle-screen{height:100%;display:flex;flex-direction:column;background-position:center;background-size:cover;padding:calc(10px + env(safe-area-inset-top)) 12px calc(15px + env(safe-area-inset-bottom))}.battle-top{display:flex;align-items:center;gap:8px;margin-bottom:15px;min-height:40px}.battle-top strong{font-size:.91rem;margin-right:auto;text-shadow:1px 1px #311a13}.team{display:flex;align-items:center;align-content:center;justify-content:center;flex-wrap:wrap;gap:10px 8px;flex:1}.fighter{position:relative;width:28%;max-width:133px;display:flex;align-items:center;flex-direction:column;background:#2f241ae6;border:2px solid #d3a14b;box-shadow:0 2px #32170d;border-radius:7px;padding:4px;transition:opacity .3s,filter .3s;min-width:0}.fighter-art{height:clamp(72px,12vh,130px);width:100%}.fighter img{height:100%;width:100%;object-fit:contain}.fighter>b{font-size:.72rem;white-space:nowrap;line-height:1.8}.fighter>b small{font-size:.55rem;color:#edc880}.hp-bar{width:100%;height:6px;background:#302521;border:1px solid #ddae5b;border-radius:3px;overflow:hidden}.hp-bar i{display:block;height:100%;width:100%;background:#5cc052;transition:width .15s}.enemy .hp-bar i{background:#d4543e}.hp-label{font-size:.52rem;line-height:1.7}.fighter.defeated{opacity:.25;filter:grayscale(1)}.damage-number{pointer-events:none;position:absolute;top:20%;font-size:1.7rem;font-weight:900;color:#ffeac8;text-shadow:2px 2px #9e2018,-1px -1px #9e2018;z-index:11}.battle-center{height:8vh;min-height:48px;display:flex;align-items:center;justify-content:center}.battle-center span{padding:7px 25px;border-top:1px solid #edc987;border-bottom:1px solid #edc987;color:#ffe8b2;text-shadow:1px 1px #311909;background:#3922177a;font-size:.8rem}.battle-caption{text-align:center;padding-top:14px;color:#f4d192;text-shadow:1px 1px #3b1d12;font-size:.75rem}.result-screen{height:100%;overflow:auto;display:flex;flex-direction:column;align-items:center;text-align:center;padding:50px 24px 25px;background:url('/assets/Texture/LoginScenes/module_bg.png') center/cover}.result-title{font-family:"STKaiti","KaiTi",serif;font-size:3rem;color:#ffe56e;text-shadow:3px 3px #8b3915,-1px -1px #91401e;margin-bottom:16px}.result-title.lost{color:#a5d0df;text-shadow:2px 2px #273849}.result-screen>p{font-size:.85rem;color:#ddcca0}.result-rewards{width:100%;margin:24px 0;padding:20px 16px}.result-rewards h2{color:#9c3b1e}.loot-list{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:25px 0}.loot-list>div{width:66px;display:flex;flex-direction:column;align-items:center;gap:5px}.loot-list img{width:52px;height:52px;object-fit:contain;background:#72513b;border:2px solid #b48c42;border-radius:5px}.loot-list small{font-size:.67rem;line-height:1.5}.result-screen>.submit{max-width:320px;margin-top:auto;flex-shrink:0}.result-screen>.text-button{margin-top:10px}
.modal-mask{position:fixed;z-index:30;inset:0;background:#05171dcc;display:flex;align-items:center;justify-content:center;padding:15px}.dialog{position:relative;max-width:500px;width:100%;max-height:86vh;max-height:86dvh;overflow-y:auto;padding:28px 18px 20px;overscroll-behavior:contain}.dialog>h2{font-size:1.2rem;color:#86381d;text-align:center;margin:5px 25px 18px}.dialog>h3{margin:18px 0 10px}.dialog>p{margin:12px 0;text-align:center}.dialog-close{position:absolute;top:4px;right:5px;min-width:40px;min-height:40px;padding:0;background:#a54227;color:#ffe4a2;border:2px solid #ffd57c;border-radius:50%;font-size:1.6rem;line-height:1}.dialog .item-row{padding:10px 4px;gap:8px;background:transparent}.dialog .item-row .item-icon{width:50px;height:50px}.dialog .item-row .gold-button{font-size:.75rem;min-width:58px;padding:8px}.dialog .save-note{margin:15px 0}.settings-actions{display:flex;flex-direction:column;gap:12px;margin-top:25px}.pending-banner{position:absolute;z-index:20;top:96px;left:0;right:0;width:100%;border:0;background:#9a3328;color:#fff0ce;font-size:.8rem;min-height:38px}.request-busy button:not([data-act="speed"]):not([data-act="skip-battle"]){opacity:.65;cursor:wait}.request-busy .submit{pointer-events:none}#toast{position:fixed;z-index:60;bottom:calc(110px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,10px);max-width:min(90%,480px);width:max-content;text-align:center;background:#fbefcf;color:#63381c;border:2px solid #c09242;border-radius:8px;box-shadow:0 4px 12px #0005;padding:12px 18px;opacity:0;transition:opacity .15s,transform .15s;pointer-events:none;font-size:.87rem;line-height:1.5}#toast.visible{opacity:1;transform:translate(-50%,0)}
.player-header{background:#4b3525;box-shadow:inset 0 0 0 2px #a77b32,0 3px 0 #5e2a19}
@media(min-width:700px){body{display:flex;align-items:center;justify-content:center}#game{height:100vh;height:100dvh;max-height:1100px}.home-screen{padding-top:26px}.city-actions{margin-top:clamp(150px,24vh,300px)}.dialog{max-width:470px}.login-form{top:55%}}
@media(max-width:360px){:root{font-size:14px;--nav-height:76px}.player-header{grid-template-columns:50px minmax(0,1fr) 92px;gap:5px;padding:7px;min-height:86px}.avatar{height:62px}.avatar img{height:45px}.identity strong{max-width:94px}.wealth{font-size:.69rem}.sync-status{font-size:.55rem}.item-row{gap:8px;padding:10px 9px}.item-icon{width:52px;height:52px}.item-row>.gold-button{min-width:57px;padding:8px}.recruit-banners span{font-size:.72rem}.equipment-slot{width:57px;height:67px}.equipment-slot img{height:42px}.home-screen{padding:14px 12px}.home-summary{padding:12px}.summary-stats{gap:18px}.login-form{padding:15px}.battle-top .small-button{font-size:.7rem;padding:6px}.fighter>b{font-size:.63rem}}
@media(max-height:700px){:root{--nav-height:74px}.player-header{min-height:82px;padding-top:5px;padding-bottom:5px}.avatar{height:61px}.avatar img{height:44px}.home-screen{padding:12px}.city-actions{margin-top:85px}.home-summary{padding:10px}.city-title h1{font-size:1.25rem}.city-actions img{height:52px}.home-summary .summary-stats{margin:6px}.choose-art{min-height:140px}.choose-screen{padding-top:12px}.role-form{padding:8px 16px}.login-form{top:43%;margin-bottom:55%}.formation-stage{height:260px}.fighter-art{height:65px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
