/* Shared layout primitives. The map retains its own immersive surface. */
body.realm-app:not(.realm-village-page):not(.admin-app){background:#dfe7d4;background-image:linear-gradient(150deg,#eef0e3,#dbe5d0);background-attachment:fixed}
body.realm-player-content::before{background:none}
.realm-player-content .realm-main{width:min(1440px,calc(100% - 48px));margin:28px auto 40px;min-width:0}
.realm-player-content .wallet-core{width:100%;max-width:none;margin:0}
.realm-player-content .realm-card{padding:22px;border-radius:14px;background:#fff9ec;box-shadow:0 3px 0 #bbaa7b30}
.realm-player-content .realm-heading{margin:0 0 20px;gap:20px;align-items:center}
.realm-player-content .realm-heading p{max-width:75ch;margin:8px 0 0}
.realm-player-content :is(h1,h2,h3){line-height:1.2}
.realm-player-content .realm-button{min-height:44px}
.realm-player-content .realm-section-tabs :is(a,button){min-height:44px;padding:9px 16px;border:1px solid transparent;background:transparent;color:#4a423c;box-shadow:none;border-radius:8px;text-decoration:none;flex:0 1 auto;font:600 14px/1.4 var(--body)}
.realm-player-content .realm-section-tabs :is([aria-current=page],[aria-selected=true]){background:#665077;color:#fff9ec;border-color:#665077}
.site-header{min-height:0}
.site-header .site-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);width:calc(100% - 40px);max-width:none;min-height:72px;gap:12px}
.site-header .brand{grid-column:1;justify-self:start;margin:0;width:54px;min-height:64px;height:64px}
.site-header .nav-links{display:contents}
.site-header .nav-primary{grid-column:2;display:flex;align-items:center;gap:4px}
.site-header .nav-context{grid-column:3;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.site-header .nav-item{white-space:nowrap;gap:6px;min-height:44px;font-size:13px;padding:8px 9px}
.site-header .nav-item .ui-icon{width:22px;height:22px;flex:none}
.site-header .profile-menu summary{max-width:140px}
.site-header .vr-token-balances{display:flex;align-items:center;gap:5px;flex:none}
.site-header .vr-token-chip{display:inline-flex;align-items:center;gap:5px;min-height:38px;padding:5px 8px;border:1px solid #c8a76e;border-radius:11px;color:#fff4da;background:#372b36;text-decoration:none;white-space:nowrap;font:600 12px/1.3 var(--body)}
.site-header .vr-token-dt{background:#243e40;border-color:#9ba88b}
.site-header .vr-token-chip strong{max-width:70px;overflow:hidden;text-overflow:ellipsis}
.site-header .vr-token-chip:hover{background:#5a4269}
.site-header .vr-token-dt:hover{background:#345b5a}
.site-header .vr-token-chip img{width:22px;height:22px;object-fit:contain}
/* A single strip, with deliberate contained scrolling when its contents cannot fit. */
.site-header .vr-resource-strip{padding:8px 16px;background:#25433d;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#b89e6d #25433d;position:relative}
.vr-resource-strip .vr-resource-strip-inner{display:flex;align-items:center;justify-content:center;gap:8px;min-width:max-content;width:100%;max-width:none;padding:0;margin:0}
.vr-resource-strip .vr-resource-token{display:flex;flex:0 0 auto;gap:6px;min-width:0;max-width:none;width:auto;min-height:44px;height:44px;padding:7px 12px;border-radius:10px}
.vr-resource-strip .vr-resource-symbol,.vr-resource-strip .resource-icon{width:25px;height:25px;flex:none}
.vr-resource-strip .vr-resource-name{font-size:12px;display:inline}
.vr-resource-strip .vr-resource-amount{display:flex;align-items:baseline;gap:3px;font-size:14px;white-space:nowrap}
.vr-resource-strip .vr-resource-cap{font-size:11px}
.vr-resource-status-row{display:contents}
.vr-resource-status-row>[data-resource-message]:not(:empty){position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:500;width:min(500px,90vw);padding:12px;background:#fff5d9;color:#33463b;border:1px solid #ac8553;border-radius:12px}
.vr-resource-status-row [data-building-production]{padding:0;margin:0;flex:0 0 auto}
.vr-resource-strip .building-production-card{margin:0;padding:0;border:0;background:none;color:#fff2d5}
.vr-resource-strip .building-production-card>summary{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;min-height:44px;height:44px;padding:0 9px;background:#38534a;border:1px solid #ad9768;border-radius:10px;list-style:none}
.vr-resource-strip .building-production-card>summary::after{content:'âŒ„';margin:0;font-size:16px;background:none;border:0;box-shadow:none;width:16px;height:24px}
.vr-resource-strip .building-rates{display:flex;align-items:center;gap:8px}
.vr-resource-strip .building-production-card .building-rate{display:inline-flex;align-items:center;gap:3px;padding:0;background:none;border:0;box-shadow:none;border-radius:0;color:inherit;white-space:nowrap;font-size:12px;min-height:0}
.vr-resource-strip .building-production-card .building-rate .resource-icon{width:20px;height:20px}
.vr-resource-strip .building-production-detail{z-index:600;background:#fff9ec;color:#33463b;box-shadow:0 10px 28px #112c3955;border:1px solid #c4ac80;border-radius:12px;padding:16px}
.vr-resource-strip .vr-realm-clock{position:static;display:flex;align-items:center;flex:none;margin:0;min-height:44px;padding:5px 10px;border-radius:10px;font-size:11px;white-space:nowrap;color:#fff4dc;background:#38534a;border:1px solid #ad9768}
.vr-resource-strip .vr-resource-tooltip{position:fixed;z-index:650;top:132px;left:50%;transform:translateX(-50%);width:min(340px,90vw);white-space:normal}
.realm-village-page .village-map-shell{min-height:320px;height:calc(100dvh - var(--vr-header-height,140px));max-height:none}
/* Discover: preview, identity, facts, action each have their own space. */
.vr-discover .vr-discover-hero{padding:4px 0 20px;background:none;border:0;box-shadow:none;gap:24px}
.vr-discover .vr-discover-hero h1{margin:8px 0 12px}
.vr-discover .vr-discover-highlight{width:250px;flex:none;padding:16px;border-radius:12px}
.vr-discover .vr-discover-filters{grid-template-columns:minmax(200px,2fr) repeat(2,minmax(155px,1fr)) auto auto;background:#f3eddd;padding:16px;border:1px solid var(--vr-line);border-radius:12px;gap:12px;margin:0 0 24px}
.vr-discover .vr-discover-results{margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--vr-line)}
.vr-discover .vr-results-pill{font-size:13px;line-height:1.4;padding:7px 12px;border-radius:20px;margin:0;white-space:normal}
.vr-discover .vr-discover-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.vr-discover .discovery-card{overflow:hidden;border-radius:14px;margin:0}
.vr-discover .discovery-preview{height:auto;aspect-ratio:2.7/1;padding:0;border-radius:0;overflow:hidden}
.vr-discover .discovery-preview img,.vr-discover .discovery-preview canvas{width:100%;height:100%;object-fit:cover}
.vr-discover .discovery-copy{padding:18px;align-items:flex-start;gap:14px}
.vr-discover .discovery-emblem{width:42px;height:48px;padding:0;border:0;background:none;box-shadow:none;margin:0;flex:0 0 42px}
.vr-discover .discovery-emblem svg{display:block;width:42px;height:48px}
.vr-discover .discovery-copy h2{font-size:23px;margin:0 0 8px}
.vr-discover .vr-discover-world{font-size:14px;margin:0 0 10px;display:flex;gap:7px;align-items:center}
.vr-discover .world-illustration{width:26px;height:26px;object-fit:contain;margin:0}
.vr-discover .vr-discover-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:13px;line-height:1.5;margin-bottom:12px}
.vr-discover .vr-discover-visit{margin-top:12px;padding-top:12px;font-size:14px}
.wallet-balance-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.wallet-summary-token{display:flex;align-items:center;gap:12px;padding:16px;background:#fff9ec;border:1px solid var(--vr-line);border-radius:12px;text-decoration:none}
.wallet-summary-token[aria-current]{border-color:#80608c;box-shadow:inset 0 0 0 1px #80608c}
.wallet-summary-token>span{min-width:0;flex:1;font-weight:700}
.wallet-summary-token small{display:block;font-size:12px;font-weight:400;color:#59685c}
.wallet-summary-token strong{font-size:22px;overflow-wrap:anywhere}
.wallet-core .wallet-history>li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 18px;padding:16px 0}
.wallet-core .wallet-history time{font-size:13px;margin-top:3px}
.wallet-core .wallet-audit{grid-column:1/-1;justify-self:start;background:#eee8da;color:#425347;padding:6px 10px;width:100%}
.wallet-core .wallet-audit:not([open]){width:fit-content}
.wallet-core .wallet-audit :is(summary,p){color:#425347;font-size:13px}
.wallet-core .wallet-audit summary{min-height:32px;display:list-item}
.wallet-core .wallet-reserved{color:#fff4dc;font-size:14px;grid-column:2;margin:0}
.achievement-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr))}
.achievement-card[data-achievement-state=completed] progress{accent-color:#38735b}
.achievement-card[data-achievement-state=paused] progress{accent-color:#8b826d}
@media(min-width:1151px) and (max-width:1500px){
 .site-header .nav-context>.nav-item[href='/admin/'] span,.site-header .comm-notifications>summary>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .site-header .nav-context{gap:3px}.site-header .profile-menu summary{max-width:108px;padding-inline:4px}.site-header .vr-token-chip{gap:3px;padding-inline:5px}.site-header .nav-item{font-size:12px;padding-inline:7px}
}
@media(max-width:1150px){
 .site-header .site-nav{display:flex;justify-content:space-between;min-height:64px;width:calc(100% - 24px)}
 .site-header .brand{margin-right:auto}
 .site-header .nav-links{display:none;position:absolute;top:100%;left:0;right:0;width:100%;max-height:calc(100dvh - 80px);overflow:auto;padding:12px;background:#30483f;border:1px solid #a68d62;flex-direction:column;align-items:stretch}
 .site-header .nav-links.open{display:flex}
 .site-header .nav-primary,.site-header .nav-context{display:flex;flex-direction:column;align-items:stretch;gap:4px;width:100%}
 .site-header .nav-context{border-top:1px solid #c8b08055;padding-top:10px;margin-top:6px}
 .site-header .nav-item{width:100%;font-size:15px;justify-content:flex-start}
 .site-header .vr-token-balances{padding:8px;justify-content:flex-start}
 .site-header .vr-token-chip{min-height:44px;font-size:14px}
 .site-header .profile-menu summary{max-width:none}
 .site-header .mobile-nav-toggle{display:flex}
 .vr-discover .vr-discover-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .vr-discover .vr-discover-filters>label:first-child{grid-column:1/-1}
}
@media(max-width:700px){
 .realm-player-content .realm-main{width:calc(100% - 24px);margin-top:18px}
 .realm-player-content .realm-card,.realm-player-content .comm-journal.vr-discover{padding:16px}
 .vr-resource-strip .vr-resource-strip-inner{justify-content:flex-start}
 .site-header .vr-resource-strip{padding:7px 10px}
 .vr-resource-strip .vr-resource-token{padding:7px 9px;min-height:44px}
 .vr-discover .vr-discover-grid{grid-template-columns:1fr}
 .vr-discover .vr-discover-filters{grid-template-columns:minmax(0,1fr)}
 .vr-discover .vr-discover-hero{display:block}
 .vr-discover .vr-discover-highlight{display:none}
 .vr-discover .vr-discover-filters>label:first-child{grid-column:auto}
 .wallet-balance-overview{grid-template-columns:1fr;gap:10px}
 .wallet-core .wallet-history>li{grid-template-columns:1fr}
 .wallet-core .wallet-movement{text-align:left}
}

.vr-discover img.discovery-preview{display:block;width:100%;height:auto;aspect-ratio:2.7/1;object-fit:cover}
.vr-discover img.discovery-preview.world-illustration{object-fit:contain;background:#e7e5d7}

/* Existing account and map-guide components share these tokens. */
.vr-avatar-editor{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px 24px;align-items:center}
.vr-avatar-editor>img{grid-column:1;grid-row:1/3;cursor:pointer}
.vr-avatar-editor>div{grid-column:2}
.vr-avatar-editor h2{margin:3px 0}
.vr-avatar-editor p{margin:4px 0;font-size:14px}
.vr-avatar-editor form{grid-column:2;display:flex;gap:12px;margin:0;align-items:center}
.vr-avatar-editor input[type=file]{max-width:290px;font:inherit}
.vr-avatar-editor input[type=file]::file-selector-button{min-height:44px;border:1px solid var(--vr-line);border-radius:9px;padding:8px 14px;background:#eee4d3;color:var(--vr-ink);cursor:pointer;margin-right:8px}
.vr-avatar-editor form label{display:grid;gap:4px;font-size:13px}
.vr-map-guide[open]{display:flex;flex-direction:column;gap:16px;max-height:calc(100dvh - 32px);overflow:auto;padding:20px}
.vr-map-guide>header{position:sticky;top:-20px;z-index:2;display:flex;align-items:start;justify-content:space-between;gap:14px;padding:12px 0;background:#fff7e5;border-bottom:1px solid var(--vr-line)}
.vr-map-guide>header button{flex:none;min-width:44px;min-height:44px;border:1px solid var(--vr-line);border-radius:9px;background:#eee4d3;font-size:24px}
.vr-map-guide h2,.vr-map-guide h3{margin:4px 0 10px}
.vr-map-guide .vr-map-guide-grid{display:block}
.vr-map-guide .vr-map-guide-grid article[hidden]{display:none}
.vr-map-guide .vr-map-guide-grid article{min-height:0;border:0;box-shadow:none}
.map-guide-chips{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:14px}
.map-guide-chips button{min-height:44px;flex:1;padding:8px 14px;border:1px solid var(--vr-line);border-radius:10px;background:#eee4d3;color:#344537;font:600 14px var(--body)}
.map-guide-chips [aria-selected=true]{background:#655084;color:#fff9ed;border-color:#655084}
.map-guide-status{padding:14px;background:#edf0df;border-radius:12px}
.map-guide-status>div{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.map-guide-status>div span{padding:6px 9px;background:#fff9ec;border:1px solid var(--vr-line);border-radius:8px;font-size:13px}
.map-guide-status p,.map-guide-callout p{margin-bottom:0}

.wallet-reference summary{min-height:36px;cursor:pointer}.wallet-reference p{font-size:14px;margin:6px 0}.vr-resource-token[data-tip-open=true] .vr-resource-tooltip{visibility:visible;opacity:1}
@media(max-width:650px){.vr-avatar-editor{grid-template-columns:64px minmax(0,1fr);gap:12px}.vr-avatar-editor>img{width:64px;height:64px;grid-row:1}.vr-avatar-editor form{grid-column:1/-1}.vr-avatar-editor input[type=file]{width:100%;max-width:100%}.vr-map-guide[open]{padding:14px}.vr-map-guide>header{top:-14px}.map-guide-chips button{flex:1 1 40%}}
