.campaign-selector{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 12px;font-size:12px;color:#ffe296}
.campaign-selector select{font:inherit;color:#ffe296;background:#142238;border:1px solid #c49d52;padding:6px 10px;min-height:36px;max-width:100%}
@media(orientation:portrait) and (max-width:700px){
 body[data-game-viewport=pvz] #home .title{display:flex;align-items:center;justify-content:space-between;gap:6px}
 body[data-game-viewport=pvz] #home .title h1{font-size:21px;letter-spacing:0;margin:0;white-space:nowrap}
 body[data-game-viewport=pvz] #home .title>.eyebrow,body[data-game-viewport=pvz] #home .title>p{display:none}
 body[data-game-viewport=pvz] #home .campaign-selector{order:1;margin:0;min-width:0}
 body[data-game-viewport=pvz] #home .campaign-selector label{display:none}
 body[data-game-viewport=pvz] #home .campaign-selector select{font-size:11px;min-height:32px;max-width:150px;padding:4px 6px}
}
@media(orientation:landscape) and (min-width:461px) and (max-height:600px){
 body[data-game-viewport=pvz]{height:var(--game-visible-height,100dvh);min-height:0}
 body[data-game-viewport=pvz] main{box-sizing:border-box;height:var(--game-visible-height,100dvh);min-height:0;width:100%;max-width:none;padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));display:flex}
 body[data-game-viewport=pvz] #game:not([hidden]){display:grid;grid-template-rows:36px minmax(0,1fr) 34px 30px;gap:4px;flex:1;width:100%;height:100%;min-height:0;padding:4px;border-width:2px}
 body[data-game-viewport=pvz] #game .battle-hud{position:static;min-height:0;height:36px;padding:0 0 2px;gap:6px;grid-template-columns:auto minmax(0,1fr) 100px auto;border-bottom-width:1px}
 body[data-game-viewport=pvz] #game .battle-brand{gap:6px;min-width:0}
 body[data-game-viewport=pvz] #game #back{grid-column:1;grid-row:1}
 body[data-game-viewport=pvz] #game .battle-brand{grid-column:2;grid-row:1}
 body[data-game-viewport=pvz] #game .wave-panel{grid-column:3;grid-row:1}
 body[data-game-viewport=pvz] #game .hud-actions{grid-column:4;grid-row:1}
 body[data-game-viewport=pvz] #game .battle-brand a{display:none}
 body[data-game-viewport=pvz] #game .battle-brand h1{font-size:19px;line-height:1.15;white-space:nowrap;text-align:left;letter-spacing:0}
 body[data-game-viewport=pvz] #game .battle-brand h1::after{content:'第 ' attr(data-level) ' 关';display:block;font-size:10px;line-height:1.1;letter-spacing:0;color:#d5ce9d;text-shadow:none}
 body[data-game-viewport=pvz] #game .hud-button,body[data-game-viewport=pvz] #game .game-feedback button,body[data-game-viewport=pvz] #game .sound-settings summary{min-height:32px;height:32px;min-width:36px;line-height:1.15;padding:4px 7px;font-size:11px;white-space:nowrap}
 body[data-game-viewport=pvz] #game .wave-panel{font-size:10px;gap:2px;min-width:60px}
 body[data-game-viewport=pvz] #game .wave-track{height:8px}
 body[data-game-viewport=pvz] #game #stage-caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip-path:inset(50%);white-space:nowrap}
 body[data-game-viewport=pvz] #game .combat-layout{display:grid;flex:none;min-height:0;height:100%;grid-template-columns:112px minmax(0,1fr);grid-template-rows:28px minmax(0,1fr);gap:4px 6px}
 body[data-game-viewport=pvz] #game .seed-rail{display:flex;flex-direction:column;grid-column:1;grid-row:1/span 2;min-height:0;height:100%;padding:3px;gap:3px}
 body[data-game-viewport=pvz] #game .sun-counter{flex:none;min-height:0;height:24px;font-size:19px;flex-direction:row;gap:5px;padding:0 0 2px;border:0;border-bottom:1px solid #8c7545}
 body[data-game-viewport=pvz] #game .sun-icon{width:23px;height:23px}
 body[data-game-viewport=pvz] #game .cards{display:grid;flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:3px}
 body[data-game-viewport=pvz] #game .cards:has(.card:nth-child(7)){grid-template-rows:repeat(4,minmax(0,1fr))}
 body[data-game-viewport=pvz] #game .card{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 12px;gap:0;min-height:0;height:100%;padding:1px 2px;text-align:center;justify-items:center;align-items:center}
 body[data-game-viewport=pvz] #game .card .sprite{grid-column:1;grid-row:1;width:100%;height:100%;max-height:28px;align-self:center}
 body[data-game-viewport=pvz] #game .card .plant-name{position:absolute;clip-path:inset(50%);width:1px;height:1px;min-height:0;overflow:hidden}
 body[data-game-viewport=pvz] #game .plant-cost{grid-column:1;grid-row:2;font-size:12px;line-height:12px}
 body[data-game-viewport=pvz] #game .cooldown{font-size:11px}
 body[data-game-viewport=pvz] #game .battle{grid-column:2;grid-row:2;width:100%;height:100%;min-height:0;aspect-ratio:auto;align-self:stretch;padding:0;grid-template-columns:6% minmax(0,1fr) 4%}
 body[data-game-viewport=pvz] #game .battle::before{background-size:cover;background-position:center}
 body[data-game-viewport=pvz] #game .field{top:3%;height:94%;margin:0}
 body[data-game-viewport=pvz] #game .zombie .sprite{width:100%;height:100%}
 body[data-game-viewport=pvz] #game .sun{width:32px;height:32px;font-size:10px}
 body[data-game-viewport=pvz] #game .battle-footer{display:flex;flex-wrap:nowrap;align-items:center;min-height:0;height:34px;gap:6px;padding:2px 0 0;margin:0;border-top-width:1px}
 body[data-game-viewport=pvz] #game .battle-footer .help{order:0;flex:1;flex-basis:auto;min-width:0;margin:0;font-size:10px;line-height:1.2;max-height:26px;overflow:auto;text-align:left}
 body[data-game-viewport=pvz] #game .battle-footer #mobile-map{display:none}
 body[data-game-viewport=pvz] #game .battle-footer .race-live-label{position:static;transform:none;order:0;flex:1;min-width:0;padding:2px 6px;font-size:10px;line-height:1.2;border-radius:2px;white-space:normal}
 body[data-game-viewport=pvz] #game .battle-footer:has(.race-live-label:not([hidden])) #battle-help{display:none}
 body[data-game-viewport=pvz] #game #back{display:block}
 body[data-game-viewport=pvz] #game .game-feedback{gap:4px;flex:none}
 body[data-game-viewport=pvz] #game #restart{margin:0;flex:none}
 body[data-game-viewport=pvz] #game .sound-controls{left:auto;right:0;transform:none;bottom:calc(100% + 4px);width:180px;padding:10px}
 body[data-game-viewport=pvz] #game .game-sponsors{max-width:none;width:100%;height:100%;min-height:0;margin:0;align-self:stretch}
 body[data-game-viewport=pvz] #game .sponsors-top{grid-column:2;grid-row:1}
 body[data-game-viewport=pvz] #game .game-sponsors .sponsor-link{display:grid;grid-template-columns:auto auto auto auto;grid-template-areas:'badge name domain arrow';justify-content:center;gap:6px;min-height:0;height:100%;padding:3px 12px;aspect-ratio:auto;line-height:1.1}
 body[data-game-viewport=pvz] #game .game-sponsors .sponsor-name{font-size:14px;line-height:1.1}
 body[data-game-viewport=pvz] #game .game-sponsors .sponsor-domain{font-size:10px;line-height:1.1;padding:0;border:0}
 body[data-game-viewport=pvz] #game .game-sponsors .sponsor-badge{font-size:9px;line-height:1;padding:2px 3px}
 body[data-game-viewport=pvz] #game .game-sponsors .sponsor-arrow{width:12px;height:12px}
 body[data-game-viewport=pvz] #game .sponsors-top .sponsor-name{font-size:17px}
 body[data-game-viewport=pvz] #game .sponsors-top .sponsor-domain{font-size:11px}
 body[data-game-viewport=pvz] #game .sponsors-bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body[data-game-viewport=pvz] #game:has(.sponsors-bottom[hidden]){grid-template-rows:36px minmax(0,1fr) 34px}
 body[data-game-viewport=pvz] #game:has(.sponsors-top[hidden]) .combat-layout{grid-template-rows:minmax(0,1fr)}
 body[data-game-viewport=pvz] #game:has(.sponsors-top[hidden]) .battle{grid-row:1}
 body[data-game-viewport=pvz] #home:not([hidden]){display:grid;grid-template-rows:30px 36px minmax(0,1fr) 30px;gap:4px;width:100%;max-width:none;min-height:0;height:100%;flex:1}
 body[data-game-viewport=pvz] #home>header{min-height:0;height:30px;font-size:11px;gap:5px}
 body[data-game-viewport=pvz] #home>header a,body[data-game-viewport=pvz] #home .race-entry{min-height:28px;padding:3px 6px;font-size:10px;margin:0}
 body[data-game-viewport=pvz] #home .race-entry small{display:none}
 body[data-game-viewport=pvz] #home .title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;text-align:left}
 body[data-game-viewport=pvz] #home .title h1{font-size:22px;margin:0;white-space:nowrap;letter-spacing:0}
 body[data-game-viewport=pvz] #home .title .eyebrow,body[data-game-viewport=pvz] #home .title>p{display:none}
 body[data-game-viewport=pvz] #home .campaign-selector{order:1;gap:5px;font-size:10px;margin:0}
 body[data-game-viewport=pvz] #home .campaign-selector label{display:none}
 body[data-game-viewport=pvz] #home .campaign-selector select{min-height:30px;padding:3px 6px;font-size:11px}
 body[data-game-viewport=pvz] #home .adventure{display:grid;grid-template-columns:1.3fr 1fr;grid-template-rows:26px 28px minmax(0,1fr);min-height:0;padding:4px;gap:4px 10px}
 body[data-game-viewport=pvz] #home .chapters{grid-column:1/-1;grid-row:1;margin:0;gap:5px}
 body[data-game-viewport=pvz] #home .chapters button{min-height:0;height:26px;padding:2px;font-size:11px}
 body[data-game-viewport=pvz] #home .sponsors-top{grid-column:1/-1;grid-row:2;margin:0;height:28px}
 body[data-game-viewport=pvz] #home .road{grid-column:1;grid-row:3;min-height:0;height:100%;width:100%;margin:0;padding:8px 0 3px;gap:7px}
 body[data-game-viewport=pvz] #home .road .block{height:100%;min-height:0;font-size:13px;box-shadow:0 3px #182a29}
 body[data-game-viewport=pvz] #home .road .marker{top:-9px;font-size:8px}
 body[data-game-viewport=pvz] #home .challenge{grid-column:2;grid-row:3;width:100%;min-height:0;margin:0;padding:2px 0 0;border:0;display:flex;flex-direction:column;justify-content:center}
 body[data-game-viewport=pvz] #home .challenge h2{font-size:14px;line-height:1.15;margin:0 0 2px}
 body[data-game-viewport=pvz] #home .challenge p{font-size:10px;line-height:1.2;margin:2px 0}
 body[data-game-viewport=pvz] #home #enter{min-height:28px;height:28px;margin-top:4px;font-size:12px}
 body[data-game-viewport=pvz] #home .game-sponsors{height:100%;min-height:0;margin:0;max-width:none}
 body[data-game-viewport=pvz] #home .game-sponsors .sponsor-link{height:100%;min-height:0;padding:3px 12px;gap:6px;grid-template-columns:auto auto auto auto;grid-template-areas:'badge name domain arrow'}
 body[data-game-viewport=pvz] #home .game-sponsors .sponsor-name{font-size:14px;line-height:1.1}
 body[data-game-viewport=pvz] #home .game-sponsors .sponsor-domain{font-size:10px;padding:0;border:0;line-height:1.1}
 body[data-game-viewport=pvz] #home .game-sponsors .sponsor-badge{font-size:9px;padding:2px 3px}
 body[data-game-viewport=pvz] #home .game-sponsors .sponsor-arrow{width:12px;height:12px}
 body[data-game-viewport=pvz] #home .sponsors-bottom{gap:6px}
}
/* Always expose all six campaign ranges; the map remains an overview, not an unlock bypass. */
body[data-game-viewport=pvz] #home>header{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:6px}
body[data-game-viewport=pvz] #home .games-login{font-size:11px;white-space:nowrap}
body[data-game-viewport=pvz] #home .games-login[aria-disabled=true]{pointer-events:none;opacity:.75}
body[data-game-viewport=pvz] #home .wallet{min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px 6px;font-size:11px;line-height:1.2}
body[data-game-viewport=pvz] #home .wallet span{white-space:nowrap}
body[data-game-viewport=pvz] #home .title{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 38px;gap:5px 8px;text-align:left;margin:8px 0}
body[data-game-viewport=pvz] #home .title h1{grid-column:1;grid-row:1;font-size:25px;letter-spacing:0;margin:0;white-space:nowrap}
body[data-game-viewport=pvz] #home .campaign-overview{grid-column:2;grid-row:1;align-self:center;font-size:11px;color:#e9ca7f;white-space:nowrap}
body[data-game-viewport=pvz] #home .campaign-selector{display:block;grid-column:1/-1;grid-row:2;width:100%;height:38px;margin:0;order:0}
body[data-game-viewport=pvz] #home #campaign-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;height:100%}
body[data-game-viewport=pvz] #home #campaign-tabs button{display:grid;align-content:center;justify-items:center;gap:2px;min-width:0;min-height:0;height:100%;padding:2px;border:1px solid #9b8656;background:#14283a;color:#e0d9b2;font-size:11px;line-height:1.1;white-space:nowrap;touch-action:manipulation}
body[data-game-viewport=pvz] #home #campaign-tabs .campaign-name{font-size:10px;color:inherit}
body[data-game-viewport=pvz] #home #campaign-tabs strong{font-size:12px;font-weight:800}
body[data-game-viewport=pvz] #home #campaign-tabs button[aria-pressed=true]{background:#e9be5a;color:#17273a;border-color:#ffdf84;box-shadow:inset 0 0 0 1px #ffdf84}
@media(max-width:460px){
 body[data-game-viewport=pvz] #home .title h1{font-size:20px}
 body[data-game-viewport=pvz] #home .campaign-overview{font-size:10px}
 body[data-game-viewport=pvz] #home .games-login{font-size:10px;padding-left:6px;padding-right:6px}
 body[data-game-viewport=pvz] #home .wallet{font-size:9px;gap:1px 4px}
 body[data-game-viewport=pvz] #home #campaign-tabs{gap:3px}
 body[data-game-viewport=pvz] #home #campaign-tabs .campaign-name{font-size:9px}
 body[data-game-viewport=pvz] #home #campaign-tabs strong{font-size:10px}
}
@media(orientation:landscape) and (min-width:461px) and (max-height:600px){
 body[data-game-viewport=pvz] #home:not([hidden]){grid-template-rows:30px 64px minmax(0,1fr) 30px}
 body[data-game-viewport=pvz] #home .title{height:64px;margin:0;grid-template-rows:24px 36px;gap:4px}
 body[data-game-viewport=pvz] #home .title h1{font-size:21px;line-height:24px}
 body[data-game-viewport=pvz] #home .campaign-selector{height:36px}
 body[data-game-viewport=pvz] #home .campaign-overview{font-size:11px}
 body[data-game-viewport=pvz] #home .wallet{font-size:10px;gap:1px 5px}
 body[data-game-viewport=pvz] #home #campaign-tabs strong{font-size:12px}
 body[data-game-viewport=pvz] #home #campaign-tabs .campaign-name{font-size:10px}
}
@media(orientation:portrait) and (max-width:700px) and (max-height:640px){
 body[data-game-viewport=pvz] #home .road{min-height:90px;gap:8px 5px}
 body[data-game-viewport=pvz] #home .road .block{min-height:34px;height:38px}
 body[data-game-viewport=pvz] #home .challenge{padding:5px}
 body[data-game-viewport=pvz] #home .challenge h2{font-size:16px;line-height:1.2;margin-bottom:3px}
 body[data-game-viewport=pvz] #home .challenge p{font-size:10px;line-height:1.2;margin:3px 0}
}

@media(max-width:350px){body[data-game-viewport=pvz] #home #campaign-tabs{gap:2px}body[data-game-viewport=pvz] #home #campaign-tabs button{padding:1px 0}body[data-game-viewport=pvz] #home #campaign-tabs strong{font-size:9px}}
body[data-game-viewport=pvz] #home{width:100%}
@media(orientation:portrait) and (max-width:700px){
 body[data-game-viewport=pvz] #home .title h1{line-height:1.15}
 body[data-game-viewport=pvz] #home .sponsors-top{margin:4px 0 8px;flex:none}
 body[data-game-viewport=pvz] #home .challenge{width:100%;margin-left:0;margin-right:0}
}
@media(orientation:portrait) and (max-width:700px) and (max-height:640px){
 body[data-game-viewport=pvz] #home .chapters{margin-bottom:6px}
 body[data-game-viewport=pvz] #home .chapters button{height:32px;min-height:32px;padding:2px}
 body[data-game-viewport=pvz] #home .sponsors-top{margin:2px 0 6px}
 body[data-game-viewport=pvz] #home .sponsors-top .sponsor-link{min-height:40px;height:40px;padding:7px 12px}
 body[data-game-viewport=pvz] #home .sponsors-top .sponsor-name{font-size:17px;line-height:1.1}
 body[data-game-viewport=pvz] #home .sponsors-top .sponsor-domain{font-size:11px}
 body[data-game-viewport=pvz] #home .road{min-height:86px;margin:6px 0;gap:6px 5px}
 body[data-game-viewport=pvz] #home .road .block{height:36px;min-height:32px}
 body[data-game-viewport=pvz] #home .challenge{padding:3px}
}
