:root{font-family:ui-rounded,"PingFang SC","Microsoft YaHei",sans-serif;color:#edeedc;background:#17291f;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 30%,#345b37 0,transparent 55%),#17291f;min-height:100vh}header{height:78px;margin:0 auto;max-width:1320px;padding:0 36px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff16}.brand{font-size:24px;font-weight:900;color:#f0e4b8;text-decoration:none}.brand span{font-size:11px;letter-spacing:2px;display:inline-block;margin-left:14px;color:#9ab69c}#connection{font-size:12px;color:#b3c9ad}main{max-width:1320px;margin:auto;padding:30px 36px}.entry{display:grid;grid-template-columns:1.2fr 1fr;gap:80px;max-width:1050px;margin:30px auto}.eyebrow{color:#b8ce85;font-size:12px;font-weight:bold;letter-spacing:3px}h1{font-size:64px;line-height:1.18;margin:22px 0;color:#f7efcf;letter-spacing:-2px}h1 em{font-style:normal;color:#b9d477}.intro p{line-height:1.9;color:#c6d2b7}.scene{display:flex;align-items:center;gap:30px;height:168px}.scene img:first-child{width:90px;image-rendering:auto}.scene img:last-child{height:164px}.scene span{font-size:23px;font-weight:900;color:#d8bc70}.small{font-size:12px;letter-spacing:2px;color:#a3b998}.panel{background:#f3eedb;color:#233b2a;border-radius:20px;padding:30px 36px;box-shadow:0 20px 60px #0003}.panel .eyebrow{color:#668442}h2{margin:10px 0 24px;font-size:28px}.panel label{display:block;font-size:13px;font-weight:700;margin-bottom:18px}input:not([type=radio]){display:block;margin-top:8px;width:100%;padding:12px 14px;border:1px solid #c9ccb8;background:#fffdf3;border-radius:8px;color:#223a29;font:inherit;font-size:16px}input:focus{outline:2px solid #7f9f52}fieldset{padding:0;border:0;margin:20px 0}legend{font-size:13px;margin-bottom:12px;font-weight:bold}.side{display:flex!important;align-items:center;gap:12px;background:#e8e6d3;padding:13px;border:1px solid transparent;border-radius:10px;cursor:pointer;margin-bottom:8px!important}.side:has(input:checked){border-color:#739947;background:#dbe6c4}.side small{display:block;font-size:11px;font-weight:400;margin:5px 0 0 26px;color:#64715c}button{cursor:pointer;font:inherit;border:1px solid #ffffff30;background:#2b4431;color:#eaf0de;border-radius:8px;padding:11px 18px;font-weight:700}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:#c4dc82;color:#213a23;border:0}.panel .primary{width:100%;background:#365a35;color:#fff5dc;padding:15px}.hint{font-size:11px;line-height:1.8;color:#9eb294}.panel .hint{color:#7d856e}.error{min-height:16px;font-size:13px;color:#b3382d}.arena-heading,.actions,.score{display:flex;align-items:center;justify-content:space-between;gap:12px}.arena-heading h2{margin:8px 0 18px}.score{background:#101f17;border:1px solid #49623a;border-radius:10px;padding:14px 22px;font-size:13px}.score strong{font-size:25px;font-variant-numeric:tabular-nums;color:#e8d28d}#notice{font-size:13px;color:#cad9bc;min-height:20px}/* Fixed original pixel stage. The entire scene scales as one unit. */
.field-wrap{position:relative;max-width:1080px;margin:auto}
#viewport{position:relative;width:100%;aspect-ratio:3/2;overflow:hidden;border-radius:5px;box-shadow:0 12px 40px #0005}
#field{position:absolute;left:0;top:0;width:900px;height:600px;transform-origin:top left;background:url('/original/images/interface/background1.jpg') -115px 0 / 1400px 600px no-repeat;overflow:hidden;color:#241b0f}
#game-toolbar{position:absolute;inset:0;pointer-events:none;z-index:30}
.wallet{position:absolute;left:10px;top:18px;width:123px;height:34px;background:url('/original/images/interface/SunBack.png') no-repeat;pointer-events:auto}
.wallet strong{position:absolute;left:40px;top:3px;width:75px;text-align:center;font:bold 23px Georgia,serif;color:#1e1a10}
#cards{position:absolute;left:145px;top:6px;display:flex;gap:5px}
.card{position:relative;width:100px;height:60px;border:0;border-radius:0;padding:0;background:none;overflow:hidden;pointer-events:auto;opacity:1!important;color:#181407}
.card-art,.card-cooldown{position:absolute;inset:0;background-size:100px 120px;background-repeat:no-repeat;background-position:0 0;pointer-events:none}
.card-cooldown{background-position:0 -60px;clip-path:inset(100% 0 0);z-index:2}
.card.unaffordable .card-art{filter:brightness(.55)}
.card.selected{outline:2px solid #fff291;outline-offset:1px;box-shadow:0 0 10px #fff08a}
.card:hover:not(:disabled){filter:brightness(1.12)}
.card .cost{position:absolute;right:5px;bottom:3px;min-width:29px;padding:0 2px;text-align:center;font:bold 17px Georgia,serif;background:#e9dfb7ed;border-radius:2px;z-index:3}
.card .cooldown{position:absolute;right:5px;top:2px;font:bold 13px Arial;color:white;text-shadow:1px 1px 2px black;z-index:4}
#shovel{position:absolute;left:575px;top:18px;width:71px;height:35px;padding:0;border:0;border-radius:0;background:url('/original/images/interface/ShovelBack.png');pointer-events:auto;opacity:1}
#shovel img{position:absolute;left:-2px;top:0;width:76px;height:34px}
#shovel.selected{outline:2px solid #fff291;box-shadow:0 0 10px #fff08a}
#shovel:disabled{filter:brightness(.6)}
#grid{position:absolute;inset:0;z-index:12}
.cell{position:absolute;background:transparent;border:0;border-radius:0;padding:0;opacity:1!important}
.cell:hover:not(:disabled){background:#fff29a25;box-shadow:inset 0 0 0 2px #fff29a88}
.cell:disabled{cursor:default}
.cell.spawn{border-left:1px dashed #f6e6a650;color:#fff8c7;text-shadow:1px 1px 2px #352216;font-size:19px}
.entity{position:absolute;pointer-events:none;transition:left .1s linear}
.entity img{position:absolute;left:0;top:0;width:100%;height:100%}
.entity.plant{width:71px;height:71px}
.entity.plant.sunflower{width:73px;height:74px;overflow:hidden}
.entity.plant.sunflower img{height:148px}
.entity.plant.nut{width:65px;height:73px}
.entity.zombie{width:166px;height:144px}
.entity.mower{width:70px;height:57px}
.entity .hp{position:absolute;left:20%;bottom:-3px;width:60%;height:3px;background:#42281188;border-radius:2px;overflow:hidden;opacity:0;transition:opacity .2s}
.entity.damaged .hp{opacity:1}
.hp i{display:block;height:100%;background:#a0d843}
.zombie .hp i{background:#ddab57}
.bullet{position:absolute;width:13px;height:13px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#d6f888,#75b52c 65%);border:1px solid #538921;transition:left .1s linear;pointer-events:none;z-index:10}
.bullet.ice{background:#9fe8fc;border-color:#638eaa}
#ghost{position:absolute;pointer-events:none;z-index:13;opacity:.5;background-repeat:no-repeat;background-position:top left;background-size:100% auto}
#result{position:absolute;inset:0;z-index:40;background:#14251ee8;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:36px;color:#f5db93;text-align:center}
#result small{font-size:14px;color:#c4d0b3;margin-top:16px}
.field-caption{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px;color:#c2d0ae}
.field-caption p{margin:12px 0}.field-caption span{color:#91aa84;font-size:11px}
#toast{min-height:22px;font-size:13px;color:#f5d795}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
footer{text-align:center;font-size:10px;color:#8aa085;line-height:1.9;padding:24px}footer a{color:#a7bb8a} [hidden]{display:none!important}@media(max-width:800px){header{padding:0 18px;height:56px}.brand{font-size:18px}.brand span{display:none}main{padding:14px}.entry{gap:20px;grid-template-columns:1fr;max-width:460px;margin:0 auto}.intro h1{font-size:40px}.intro p,.scene,.small{display:none}.panel{padding:24px}.score{padding:8px 12px;font-size:11px}.score strong{font-size:20px}.arena-heading h2{font-size:21px;margin-bottom:12px}.actions button{padding:9px;font-size:12px}.field-caption{display:block}.field-caption span{display:block}footer{padding:12px}}

/* Keep the match chrome compact; attribution remains available on demand. */
body:has(#arena:not([hidden])) header{display:none}
#arena{max-width:1080px;margin:auto}
.arena-heading{margin-bottom:8px}
.arena-heading>div:first-child{display:flex;align-items:center;gap:12px}
.arena-heading h2{font-size:18px;margin:0}
.room-label{font-size:12px;color:#9cb28b}
.score{padding:5px 12px;border:0;background:transparent;margin-bottom:6px}
.score strong{font-size:20px}
#notice{font-size:12px;margin:4px 0 10px}
#toast:empty{display:none}
footer{padding:8px}footer summary{cursor:pointer;color:#8aa085;font-size:11px}footer details[open]{padding:8px;line-height:2}
/* Original JiangNan seed chooser; the list scrolls inside the retained frame. */
#chooser{position:absolute;left:218px;top:35px;width:465px;height:540px;background:url('/original/images/interface/SeedChooser_Background.png') no-repeat;z-index:35;color:#f6dc9b;padding:0 18px;box-shadow:0 10px 45px #0009}
#chooser h3{position:absolute;top:4px;left:100px;width:265px;margin:0;background:#80431d;text-align:center;font-size:20px;line-height:27px;color:#f7cf60;text-shadow:1px 2px #5a2c11}
#picked{position:absolute;top:43px;left:20px;right:20px;height:38px;display:flex;gap:4px;align-items:center}
#picked .pick-card,#picked .empty-slot{width:49px;height:30px;background-size:49px 60px;flex-shrink:0;font-size:11px}
#picked .pick-card span{font-size:10px;bottom:1px;right:2px}
.empty-slot{display:flex;align-items:center;justify-content:center;border:1px dashed #caa45c88;color:#ad875c;background:#2b130b80}
#catalog{position:absolute;top:95px;left:20px;right:15px;height:335px;overflow-y:auto;display:grid;grid-template-columns:repeat(4,100px);grid-auto-rows:60px;gap:9px 6px;align-content:start;scrollbar-color:#b98244 #46200e;scrollbar-width:thin}
.pick-card{position:relative;width:100px;height:60px;background-size:100px 120px;background-position:top;border:0;border-radius:0;padding:0;overflow:hidden;opacity:1!important}
.pick-card span{position:absolute;bottom:3px;right:5px;background:#f0e1b5;min-width:22px;font:bold 16px Georgia;color:#251a0d;padding:0 2px}
.pick-card.picked{box-shadow:inset 0 0 0 3px #f6db59;filter:brightness(.75)}
.pick-card.picked:after{content:'✓';position:absolute;left:3px;top:0;color:#fff094;font-size:22px;text-shadow:1px 2px #271d0e}
.pick-card:disabled:not(.picked){filter:grayscale(1) brightness(.6)}
.pick-card i{position:absolute;left:0;right:0;top:22px;color:white;font:12px sans-serif;background:#281b0dbb}
#cardInfo{position:absolute;top:435px;left:22px;right:22px;height:35px;margin:0;font-size:12px;line-height:17px;color:#ffe3aa}
.chooser-actions{position:absolute;bottom:15px;left:22px;right:22px;display:flex;align-items:center;gap:12px}
#deckCount{margin-right:auto;font:bold 19px Georgia;color:#e5c07a}
.chooser-actions button{background:#9b5526;color:#ffe6a2;border:2px outset #c48b43;padding:5px 18px;border-radius:3px;font-size:15px;text-shadow:1px 1px #56270d}
#game-toolbar #cards{gap:3px}
#game-toolbar .card{width:75px;height:45px}
#game-toolbar .card-art,#game-toolbar .card-cooldown{background-size:75px 90px}
#game-toolbar .card-cooldown{background-position:0 -45px}
#game-toolbar .card .cost{font-size:13px;bottom:2px;right:3px;min-width:22px}
#game-toolbar .card .cooldown{font-size:11px}
#game-toolbar #shovel{left:785px}
.entity img.armor{width:100px;height:70px;left:50%;top:auto;bottom:-8px;transform:translateX(-50%)}
@media(min-width:801px){#arena{max-width:min(1080px,calc((100dvh - 180px)*1.5))}}

.pick-card.upgrade{outline:2px solid #b287da;outline-offset:-2px}.bullet.lob{width:17px;height:17px;background:#91ac39;border:2px solid #43591b}.bullet.butter{background:#f5d96b;border-radius:3px}.entity.digger{opacity:.9}
.entity canvas{position:absolute;left:0;top:0;pointer-events:none}

.bullet.sprite{background-color:transparent;border:0;background-size:contain;background-repeat:no-repeat;width:24px;height:24px}.entity.cob .hp{width:80%}
