.realm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}.realm-card,.realm-map-link,.realm-section{border:1px solid var(--line);padding:16px;margin-bottom:16px}.realm-card h2{margin:0}.realm-card details{border-top:1px solid var(--line);padding:10px 0}.realm-card button{margin:4px 6px 4px 0}.realm-card select{display:block;width:100%;margin:6px 0}.realm-panel{overflow-wrap:anywhere}.realm-team{display:flex;gap:8px;flex-wrap:wrap}.realm-team>label{flex:1;min-width:130px}.realm-route{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.realm-route>div{border:1px solid var(--line);padding:10px}.realm-route .current{border-color:var(--green);background:var(--panel)}
.realm-subnav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.realm-subnav a{padding:6px 10px;border:1px solid var(--line)}.realm-section{scroll-margin-top:12px}@media(max-width:540px){.realm-route{grid-template-columns:repeat(2,1fr)}}
/* Journey choices stay compact; page controls handle narrow screens. */
.journey-home{border:1px solid var(--line);border-left:3px solid var(--gold);padding:10px 12px;margin-bottom:12px}.journey-home h2{margin:0}.journey-home p{margin:6px 0}
.journey-panel>h1{font-size:23px;margin:8px 0}.journey-panel>label{display:flex;align-items:center;gap:10px}.journey-panel>label select{min-width:0;flex:1}.journey-tier{border-top:1px solid var(--line);padding:8px 0}.journey-tier>b{margin-right:12px}.journey-tier>span{font-size:12px;color:var(--muted)}.journey-offers .realm-card{padding:10px 12px;margin:8px 0}.journey-offers h3{margin:0}.journey-route{border-left:2px solid var(--line);padding-left:10px}.journey-route p[aria-current=step]{color:var(--gold)}
@media(max-width:900px){.journey-panel .realm-card{padding:8px;margin-bottom:8px}.journey-panel h1{font-size:19px}.journey-panel h2{font-size:16px!important;margin:8px 0}.journey-offers h3{font-size:14px!important}.journey-offers .realm-card p{font-size:12px!important;line-height:1.45!important;margin:4px 0!important}.journey-offers .realm-card button{margin:2px 0}.journey-tier{padding:5px 0}.journey-tier button{display:block}.journey-route p{font-size:12px!important;margin:3px 0!important}}
@media(max-width:900px){.journey-offers .realm-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;padding:7px 8px;break-inside:avoid}.journey-offers .realm-card h3,.journey-offers .realm-card p{grid-column:1}.journey-offers .realm-card button{grid-column:2;grid-row:1/3;align-self:center;max-width:94px;padding:5px 8px!important;white-space:normal}.journey-panel>h1{margin:3px 0}.journey-offers>h2{margin:5px 0!important}}
.journey-battle{border-left:3px solid var(--gold);padding:4px 8px;margin-bottom:8px}.journey-controls{display:flex;gap:5px;flex-wrap:wrap}.journey-warning{color:var(--gold)}.journey-controls button{margin:0}.journey-battle details{margin-top:5px}.journey-report{border-top:1px solid var(--line);padding:6px 0}
@media(max-width:900px){.journey-battle .journey-warning{font-size:12px!important;line-height:1.4!important;margin:3px 0!important}.journey-controls button{font-size:11px!important;padding:4px 6px!important;min-height:36px!important}.journey-battle details{font-size:11px!important}.journey-battle summary{min-height:28px!important;font-size:11px!important}.journey-consequence{font-size:11px!important}}
.journey-vitals p{font-size:12px!important;margin:3px 0!important;line-height:1.4!important}.journey-vitals b{color:var(--muted);margin-right:4px}
@media(max-width:900px){.journey-vitals p{font-size:11px!important}}

/* Compact route collection goals, compatible with horizontal screen paging. */
.route-rewards .realm-card { padding:10px 12px; margin:8px 0; }
.route-rewards h2 { display:flex; justify-content:space-between; gap:8px; }
.route-rewards h2 small { font:inherit; color:var(--muted); white-space:nowrap; }
.route-prize-line { margin-bottom:0; }
@media(max-width:900px){.route-rewards .realm-card p{margin:5px 0;font-size:12px;line-height:1.4}.route-rewards h2{font-size:14px;margin:0 0 5px}.route-rewards .actions{gap:5px}.route-rewards .realm-card button{font-size:12px;padding:7px 9px}}

@media(max-width:900px){.viewport-shell .main .route-rewards .realm-card{padding:7px 9px;margin:6px 0}.viewport-shell .main .route-rewards h2{font-size:14px;line-height:1.3;margin:0 0 4px}.viewport-shell .main .route-rewards .realm-card p{font-size:12px;line-height:1.35;margin:4px 0}.viewport-shell .main .route-rewards .actions button{font-size:12px;padding:5px 8px}.viewport-shell .main .route-rewards .actions{margin:5px 0 0}}

.lesson-health{display:flex;gap:12px}.lesson-health>span{flex:1;padding:8px;border:1px solid var(--line)}.lesson-health b,.lesson-health small{display:block}.lesson-battle{max-width:640px}.lesson-battle .battle-state{margin:8px 0}.reward-next{margin:3px 0}.reward-next b{font-weight:500}
@media(max-width:900px){.viewport-shell .main .lesson-battle h1{font-size:17px;margin:4px 0}.viewport-shell .main .lesson-battle p{font-size:12px;line-height:1.45;margin:6px 0}.viewport-shell .main .lesson-battle .actions{gap:5px;margin:5px 0}.viewport-shell .main .lesson-battle button{font-size:12px;padding:6px 8px}.lesson-health{font-size:12px;gap:6px}.lesson-health>span{padding:5px}.lesson-battle .lesson-health b{font-size:14px}}

@media(max-width:900px){.viewport-shell .main .campaign-planning h1{font-size:17px;margin:3px 0}.viewport-shell .main .campaign-planning p{font-size:12px;line-height:1.35;margin:5px 0}.viewport-shell .main .campaign-planning label{display:flex;align-items:center;gap:8px;margin:4px 0;font-size:12px}.viewport-shell .main .campaign-planning select{flex:1;min-width:0;padding:5px 7px;font-size:12px;min-height:30px}.viewport-shell .main .campaign-planning button{font-size:12px;padding:6px 10px;min-height:32px}.viewport-shell .main .campaign-planning details{margin:5px 0}.campaign-form{padding:0;border:0;margin:0 0 7px}}
