/* Approved 青绿国风: shared layout proportions with NativeScreens.ts. */
:root{--jade:#34594b;--jade-light:#e4ead8;--ivory:#f7f2e5;--red:#aa4536;--line:#a4ae96;--ink:#243f37}
body,body:has(#lobby:not([hidden])),body:has(#battle-view:not([hidden])){background:#233d34;color:var(--ink)}
main:has(#lobby:not([hidden])),main:has(#battle-view:not([hidden])){width:min(100vw,calc(100dvh * 9 / 16));max-width:720px;background:var(--ivory);box-shadow:0 0 60px #102c2580}
#lobby.home-scene{background-image:url('/assets/art/jade/home-background.webp');background-position:center;background-size:cover}
.home-scene .home-title{left:12%;top:10.6%;width:76%;height:auto;margin:0;color:var(--ink);font:900 11.5cqw/1.35 KaiTi,STKaiti,serif;letter-spacing:.3cqw;filter:none;text-shadow:0 2px 0 #edf3df}
.home-title small{display:block;color:#496b5b;font:3cqw/1.6 KaiTi,serif;letter-spacing:.6cqw}
.home-scene .home-title{top:8.1%;left:10.4%;width:79.2%;font-size:0;letter-spacing:0;text-shadow:none}
.home-title>img{display:block;width:100%;height:25.8cqw;object-fit:contain}
.home-title small{margin-top:.8cqw}
#runner-layer{filter:drop-shadow(0 1px 1px #29453655);will-change:transform;pointer-events:none}
.home-resources{top:1.2%;height:6%;left:2%;right:2%}
.home-scene .avatar{border:2px solid #b7bd98!important;border-radius:50%!important;background:#496e5d!important;box-shadow:none!important}
.lord{top:12%;left:12%;width:17%;color:#faf5e6;text-shadow:none;background:#33594ee8;border-radius:5px;padding:.6cqw}
.xp-track{height:.9cqw;border:0;background:#203e36}.xp-track i{background:#bac991}
.home-scene .resource{background:#33594eee!important;border:1px solid #9bac8d!important;border-radius:8px!important;box-shadow:none!important;color:#faf5e6!important}
.resource .plus{background:#688b65;border:1px solid #b9c89f;box-shadow:none;border-radius:4px}
.home-resources #energy-countdown{top:67%;font-size:2cqw;color:#e2e9be;-webkit-text-stroke:0;text-shadow:none}
.home-scene .home-left,.home-scene .home-right{top:24%;width:11%;gap:3.7cqw}
.home-scene .home-entry{background:#33594eea;border:1px solid #b9bea0;border-radius:8px;padding:.6cqw;filter:none}
.home-scene .home-entry span{font-size:2.8cqw;line-height:1.1;color:#faf3df;-webkit-text-stroke:0;text-shadow:none;margin-top:-.5cqw}
.home-left [data-home=events],.home-right [data-home=settings]{display:none}
.home-scene .hero-stage{left:10%;right:10%;top:34%;height:30%;z-index:4}
.hero-stage .home-zhao{height:90%;width:43%;left:-2%}.hero-stage .home-guan{height:104%;width:48%;left:26%;bottom:0}.hero-stage .home-zhuge{height:90%;width:40%;right:-2%}
.home-scene .wall-front,.home-scroll,.home-wind-flags,.home-fire,.home-scene>.skill-entry{display:none!important}
.home-scene .promotion{left:6.4%;right:6.4%;top:64.1%;height:8.8%;padding:1.3cqw 2.5cqw 2.9cqw;background:#f7f1e2f5;border:1px solid #aaa98a;border-radius:10px;box-shadow:0 3px 0 #70816a55;gap:3%}
.promotion>b{background:none;color:var(--jade);font-size:4.5cqw;text-shadow:none;padding:0}
.promotion #home-stars{font-size:4.2cqw;color:#b28b42;-webkit-text-stroke:0;text-shadow:none}.promotion .star-off{color:#bdc0af}
.rank-track{height:1.2cqw;background:#d9ddc9;border:0}.rank-track i{background:#63876a}
.reward-chest{width:14%;filter:none}
.home-scene #home-protection{left:23%;right:23%;top:70.1%;font-size:1.7cqw;color:#667961;line-height:1.1}
#home-protection small{display:inline;font-size:1.7cqw;color:#667961}.protection-stages{width:25%;margin-right:1cqw}.protection-stages i{height:.6cqw;border:0;background:linear-gradient(90deg,#80986d var(--stage,0%),#cdd6bf var(--stage,0%));box-shadow:none}
.home-scene .art-button.start-button{left:16%;top:74.5%;width:68%;height:7.5%;display:flex;flex-direction:column;gap:0;background:var(--red);border:1px solid #d7ae77;border-radius:12px;box-shadow:0 4px 0 #6e4737,inset 0 0 0 3px #b75b44;color:#fff7e5!important;text-shadow:none;font-size:5.5cqw}
.start-button .swords{display:none}.start-button span{-webkit-text-stroke:0}.start-button small{font:2.4cqw/1.1 KaiTi,serif;color:#fff7e5;letter-spacing:.3cqw}
.home-scene .secondary-actions{left:28.5%;right:28.5%;top:83.1%;height:4.4%}
.home-scene .friend-button{background:#f5efde;border:1px solid #718c77;border-radius:9px;color:var(--jade);font:700 3.8cqw KaiTi,serif;box-shadow:0 3px 0 #718c7740}
.home-nav{position:absolute;z-index:9;left:3.3%;right:3.3%;bottom:1.4%;height:8.8%;display:grid;grid-template-columns:repeat(4,1fr);background:#f7f1e2f5;border:1px solid #aaa98a;border-radius:12px;padding:.6cqw}
.home-nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.2cqw;color:var(--jade);font:700 3.1cqw KaiTi,serif;border-radius:8px}
.home-nav .active{background:var(--red);color:#fff7e5}.home-nav .sprite{width:8cqw;height:8cqw;aspect-ratio:1}
.home-scene .start-button{top:73.75%}
.home-scene .secondary-actions{left:16%;right:16%;top:82.1875%;height:7.5%}
.home-scene .friend-button{border-radius:12px;font-size:5.5cqw;box-shadow:0 4px 0 #718c7760,inset 0 0 0 3px #dce4cf}
.home-scene .home-entry,.home-nav,.home-nav button,.home-nav .active{background:none;border:0;box-shadow:none}
.home-nav{height:7.5%}
.home-scene .home-entry span,.home-nav button{color:#234b40;font-weight:900;-webkit-text-stroke:.6px #fff5dc;paint-order:stroke fill;text-shadow:0 1px 1px #fff5dc,1px 0 #fff5dc,-1px 0 #fff5dc}
.home-nav .active{color:#a13d29}
.save-warning{bottom:10.5%;background:var(--ivory);color:#8a4939}
.sprite{background-image:url('/assets/art/jade/icons.webp')!important;background-size:400% 400%!important;filter:none!important;display:inline-block;aspect-ratio:1;background-repeat:no-repeat}
.sprite.calendar{background-position:0 0!important}.sprite.gift{background-position:33.333% 0!important}.sprite.chest{background-position:66.667% 0!important}.sprite.book{background-position:100% 0!important}
.sprite.trophy{background-position:0 33.333%!important}.sprite.gear{background-position:33.333% 33.333%!important}.sprite.skill{background-position:66.667% 33.333%!important}.sprite.reward{background-position:100% 33.333%!important}
.sprite.swords{background-position:0 66.667%!important}.sprite.coin{background-position:33.333% 66.667%!important}.sprite.rice{background-position:66.667% 66.667%!important}.sprite.lightning{background-position:100% 66.667%!important}
.sprite.home-gate{background-position:0 100%!important}.sprite.helmet{background-position:33.333% 100%!important}.sprite.market{background-position:66.667% 100%!important}
/* Battle remains a continuous field with equal square deployment cells. */
#battle-view .battle-stage{background-image:url('/assets/art/jade/battle-background.webp')}
.battle-top{background:#33594eea;border:1px solid #a4ae96;border-radius:8px;padding:0 1cqw}
.battle-top .battle-title{background:none;font-size:4cqw;color:#faf5e6;-webkit-text-stroke:0;text-shadow:none}
.battle-stage .round-control{border:1px solid #a4ae96;background:#486c5c;box-shadow:none;border-radius:8px;width:7cqw;height:7cqw;padding:.7cqw}
.battle-hud{text-shadow:none}.battle-hud b{background:#33594eee;border:1px solid #a4ae96;box-shadow:none;clip-path:none;border-radius:6px;color:#faf5e6}
.enemy-health-track{border:1px solid #b2ac8b;background:#526457;box-shadow:none}.enemy-health-track i{background:#ac5140}
#battle-view .cell{background:#8c9c89df!important;border:1px solid #b0baa5!important;border-radius:5px!important;box-shadow:0 2px 0 #53665d,inset 0 0 0 2px #c7d0b940!important;color:#526b5b;text-shadow:none}
#battle-view .cell.open,#battle-view .hand .cell{background:#dde1ce!important;border-color:#a4ae96!important;box-shadow:0 2px 0 #53665d,inset 0 0 0 2px #f0f0dd80!important}
#battle-view .cell.filled,#battle-view .cell.hero-card{background:#f3edda!important;color:#994333}
#battle-view .cell.chosen{background:#e0e8cb!important;outline:2px solid #a74935;outline-offset:0}
#battle-view #board .cell.open:not(.filled)::after,#battle-view #enemy-board .cell.open:not(.filled)::after{content:'+';color:#829480;font:700 4cqw/1 system-ui;pointer-events:none}
#battle-view .cell:not(.open)::before{content:'';position:absolute;left:50%;top:37%;width:1.6cqw;height:1.8cqw;border:.45cqw solid #657b68;border-radius:1.2cqw;transform:translateX(-50%);pointer-events:none}
#battle-view .cell:not(.open)::after{content:'';position:absolute;left:50%;top:49%;width:2.8cqw;height:2.1cqw;background:#657b68;border-radius:.4cqw;transform:translateX(-50%);pointer-events:none}
#battle-view .cell em{color:#60725e;background:#f7f2e5c9;font-size:1.4cqw}.hero-name{color:var(--jade)}
#battle-view .cell .cooldown-fill:before{background:#7b9a7345}
#battle-view .camp-banner{color:#34594b!important;background:#f7f2e5e0!important;border:1px solid #a4ae96!important;text-shadow:none!important;box-shadow:none!important}
#battle-view .home-health-track{background:#526457;border:1px solid #b2ac8b;box-shadow:none}#battle-view #home-health-fill{background:#638d70}
#battle-view #grain-bag{left:4%;bottom:1.5%;width:25%;height:5.5%;background:#f7f1e2eb;border:1px solid #aaa98a;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:1cqw;padding:.8cqw}
#grain-bag img{display:none}#grain-bag .sprite{width:8cqw;height:8cqw;flex:none}#grain-bag b{position:static!important;color:var(--jade)!important;-webkit-text-stroke:0!important;text-shadow:none!important;font:bold 3.6cqw system-ui!important}
#battle-view .battle-recruit{left:36.4%;bottom:1.5%;width:34.4%;height:5.5%;background:var(--red);border:1px solid #d7ae77;border-radius:10px;box-shadow:0 3px 0 #6e4737;text-shadow:none;flex-direction:row;gap:2cqw}
.recruit-title{font-size:4cqw}.recruit-price{font-size:3cqw}.recruit-buns{display:none}
#battle-view .battle-skill{right:5%;bottom:1.5%;width:11%;border:1px solid #b9bea0;border-radius:8px;background:#33594e;box-shadow:none;padding:.5cqw}
.battle-skill b{font-size:2.5cqw;-webkit-text-stroke:0;text-shadow:none}.notification-dot{display:none}
#battle-view #status{color:var(--jade);font-size:1.6cqw}
/* Every secondary surface uses the same restrained paper and jade treatment. */
dialog,#pause-menu,#home-modal,#end{background:var(--ivory);color:var(--jade);border:2px solid #82967c;border-radius:14px;box-shadow:0 14px 50px #102c2566;scrollbar-color:#8ca07c #e4ead8}
dialog::backdrop,#home-modal::backdrop{background:#152f29a6}
dialog h2,dialog h3,dialog b,.book-row b,.book-card>b,.rank-reward>b,.hero-entry h3{color:var(--jade)!important}
dialog button,#home-modal .book-card,#pause-menu button{background:var(--jade-light);color:var(--jade);border:1px solid #8da285;box-shadow:0 3px 0 #78907b,inset 0 0 0 1px #f9f7e8;border-radius:8px}
dialog button:focus-visible,.home-scene button:focus-visible{outline:3px solid #aa4536;outline-offset:3px}
#home-modal .modal-topbar{background:var(--jade-light);border-color:#a4ae96;box-shadow:0 3px 7px #294b3518}
#home-modal .modal-topbar .modal-close{background:#cbd8be;color:var(--jade);border:1px solid #8da285;box-shadow:none}
.hero-entry,.rank-reward,#home-modal .book-card,.sign-day,.book-row{background:#e9eddf;border-color:#adb89c;box-shadow:none;color:var(--jade)}
.hero-entry p,.hero-entry small,.book-detail p,.book-detail small,.book-hint,.book-row p,.book-owned{color:#60765f!important}
.book-count{background:#496e5d;color:#f7f2e5;border-color:#a4ae96}
.book-art{background-image:url('/assets/art/jade/books.webp')!important;background-size:200% 400%!important}
.book-art-blood{background-position:0 0}.book-art-haste{background-position:100% 0}.book-art-guard{background-position:0 33.333%}.book-art-heal{background-position:100% 33.333%}.book-art-supply{background-position:0 66.667%}.book-art-frost{background-position:100% 66.667%}.book-art-rally{background-position:0 100%}.book-art-aegis{background-position:100% 100%}
.result-badge{position:relative;width:130px;max-width:55%;aspect-ratio:1;margin:0 auto 45px;background:url('/assets/art/jade/icons.webp') 0 33.333%/400% 400% no-repeat}
.result-loss{background-position:66.667% 0}.result-draw{background-position:100% 33.333%}.result-badge:after{position:absolute;top:100%;left:50%;transform:translateX(-50%);width:220px;content:'大获全胜';font:bold 28px KaiTi,serif;color:var(--jade)}.result-loss:after{content:'再整旗鼓';color:#984e3e}.result-draw:after{content:'势均力敌'}
.home-settings input{accent-color:#63876a}
.skill-book-row{background:#e9eddf;border-color:#adb89c;box-shadow:none}.skill-book-info>b{color:var(--jade)}.skill-book-info>small,.sign-hint,.sign-feedback,.sign-reset,.sign-day>small{color:#60765f}
.sign-today{background:#eff2df;border-color:#63876a;box-shadow:0 0 0 2px #cbd8be}.sign-claimed{background:#dce2d0}
dialog::-webkit-scrollbar-thumb,dialog *::-webkit-scrollbar-thumb{background:#91a47f;border-color:#e4ead8}
dialog::-webkit-scrollbar-track,dialog *::-webkit-scrollbar-track{background:#e4ead8}
#match-loading{background:linear-gradient(#173e32e8,#294f3ee8),url('/assets/art/jade/battle-background.webp') center/cover;color:#faf5e6}
#match-loading::before{background:url('/assets/art/jade/battle-background.webp') center/cover;opacity:.12;filter:none}#match-loading::after{background:linear-gradient(145deg,transparent 49.8%,#adc7a077 50%,transparent 50.2%)}
.match-heading h2{color:#faf5e6;text-shadow:none}.match-heading small{color:#c8d9bb}.duel-versus{color:#e7edcf;text-shadow:0 2px #34594b}
.duel-card.player{background:#33594eea;border-color:#adc7a0}.duel-card.opponent{background:#824839ea;border-color:#c6af86}.match-track i{background:#b6ca96}
@media(prefers-reduced-motion:reduce){.hero-stage img{animation:none!important}}

/* Battle HUD: free-standing icons and bold lettering, without decorative plates. */
#battle-view .battle-top,#battle-view .battle-title,#battle-view .round-control,#battle-view .battle-hud b,#battle-view .camp-banner,#battle-view #grain-bag,#battle-view .battle-recruit,#battle-view .battle-skill,#battle-view #viewport,#battle-view #enemy-camp{background:none!important;border:0!important;box-shadow:none!important;clip-path:none;filter:none}
#battle-view .battle-title,#battle-view .battle-hud b,#battle-view .camp-banner,#battle-view .recruit-title,#battle-view .recruit-price,#battle-view .battle-skill b,#battle-view #food,#battle-view #status,#battle-view #active-books{color:#234b40!important;font-weight:900!important;-webkit-text-stroke:.6px #fff5dc;paint-order:stroke fill;text-shadow:0 1px 1px #fff5dc,1px 0 #fff5dc,-1px 0 #fff5dc,0 -1px #fff5dc!important}
#battle-view #clock,#battle-view #food,#battle-view .recruit-title,#battle-view .recruit-price{color:#9d3c29!important}
#battle-view .battle-hud{font-size:3.2cqw}#battle-view #pop{font-size:3cqw}#battle-view .camp-banner{font-size:3cqw}
#battle-view .battle-recruit:disabled{opacity:.65;filter:none}#battle-view .recruit-title{font-size:4.5cqw}#battle-view .recruit-price{font-size:3.6cqw}
#battle-view #grain-bag b{font-size:4.3cqw!important}#battle-view .battle-skill b{font-size:3cqw}
#battle-view .pause-bars{border-left-color:#234b40;border-right-color:#234b40;filter:drop-shadow(0 1px 1px #fff5dc)}
#battle-view .round-control.is-paused .pause-bars{border-color:transparent;border-left-color:#234b40}
#battle-view .piece{font-weight:900}#battle-view .piece em{font-weight:700}
#battle-view .battle-title{display:none}
#battle-view .battle-top{left:1.7%;right:auto;top:1.2%;width:12%;height:auto;display:flex;flex-direction:column;gap:2cqw;padding:0;align-items:center}
#battle-view .round-control{width:11.5cqw;height:11.5cqw;padding:1cqw;flex:none}
#battle-view .battle-hud{left:21%;right:4%;top:1.4%;height:9.2%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:1cqw}
#battle-view #clock{position:absolute;left:50%;top:0;transform:translateX(-50%);width:24%;text-align:center}#battle-view #pop{grid-column:2;grid-row:1}#battle-view #hp{grid-column:1/-1;grid-row:2}
#battle-view .battle-hud{left:0;right:0;grid-template-columns:1fr 1fr}#battle-view #pop{justify-self:end;margin-right:4%}
#battle-view .battle-recruit{background:#aa4536!important;border:1px solid #d7ae77!important;box-shadow:0 3px 0 #634634,inset 0 0 0 2px #b75b44!important}
#battle-view .battle-recruit.food-short{background:#8c8170!important}
#battle-view .battle-recruit .recruit-title,#battle-view .battle-recruit .recruit-price{color:#fff5dc!important;-webkit-text-stroke:0;text-shadow:0 1px #634634!important}
#food-toast{position:absolute;z-index:40;left:10%;right:10%;top:48%;text-align:center;font:900 6cqw KaiTi,serif;color:#a13d29;-webkit-text-stroke:1px #fff5dc;paint-order:stroke fill;pointer-events:none;opacity:0}
#food-toast.show{animation:food-toast-fade 1.8s ease-out both}
@keyframes food-toast-fade{0%,30%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-1.5cqw)}}
.sprite{transform:scale(1.15);transform-origin:center}.promotion .sprite{transform:none}
.home-scene .home-left,.home-scene .home-right{width:13%;gap:3cqw}.home-scene .home-left{left:2%}.home-scene .home-right{right:2%}
.home-scene .home-entry span{font-size:3.2cqw}.home-nav .sprite{width:9cqw;height:9cqw}
#battle-view .round-control .sprite{transform:scale(1.15)}#battle-view .pause-bars{width:65%;height:80%}
#battle-view .pause-symbol{width:85%;height:85%;fill:#234b40;filter:drop-shadow(0 1px 1px #fff5dc)}
.pause-symbol .play-symbol{display:none}.is-paused .pause-symbol .play-symbol{display:block}.is-paused .pause-symbol .pause-strokes{display:none}
#end>button{width:min(100%,240px)!important;height:46px!important;padding:8px 12px!important;font-size:16px!important}
#settlement-fx{height:52px;position:relative;display:grid;place-items:center;margin:5px auto 10px;color:#bc8b29}
#settlement-fx>b{font:900 34px KaiTi,serif;color:inherit!important;animation:settlement-gain 1.5s ease-out both}
#settlement-fx.star-loss{color:#9b5a4a}#settlement-fx.star-loss>b{animation:settlement-loss 1.5s ease-out both}
#settlement-fx>i{position:absolute;left:50%;top:40%;font-style:normal;color:inherit;pointer-events:none;animation:settlement-spark 1.5s ease-out both}
@keyframes settlement-gain{0%{opacity:0;transform:scale(.2) rotate(-20deg)}45%{opacity:1;transform:scale(1.35)}70%{transform:scale(.95)}100%{opacity:1;transform:scale(1)}}
@keyframes settlement-loss{0%{opacity:0;transform:translateY(-18px) scale(1.3)}35%{opacity:1;transform:translateY(0) scale(1.15)}65%{transform:translateY(8px) rotate(8deg)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes settlement-spark{0%{opacity:0;transform:translate(0,0) scale(.2)}20%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.5)}}
@media(prefers-reduced-motion:reduce){#settlement-fx>b,#settlement-fx>i{animation:none}#settlement-fx>i{display:none}}
#result-rank{display:flex;flex-direction:column;align-items:center;gap:8px;min-height:75px}
.settlement-stars{display:flex;align-items:center;justify-content:center;min-height:42px;overflow:visible}
.settlement-stars i{display:inline-block;width:34px;font:normal 36px/42px serif;color:#c29639;transform-origin:center}
.settlement-stars .star-arriving{animation:star-arrive-slot 1.25s cubic-bezier(.2,.65,.3,1) both;color:#d8a332}
.settlement-stars .star-vanishing{animation:star-leave-slot 1.5s ease-in forwards}
@keyframes star-arrive-slot{0%{opacity:0;transform:translate(55px,-65px) rotate(360deg) scale(1.35)}25%{opacity:1}85%{transform:translate(0,0) rotate(0) scale(1.1)}100%{opacity:1;transform:translate(0,0) rotate(0) scale(1)}}
@keyframes star-leave-slot{from{opacity:1}to{opacity:0}}
.battle-hud { pointer-events: none; }
