/* Compact town controls, purchase previews, resident requests and a keepsake album. */
.app:not(.is-onboarding) .world-head{grid-template-columns:minmax(0,1fr) auto 44px;gap:12px;padding:10px 14px;min-height:76px}
.app:not(.is-onboarding) .player-hud{gap:9px;min-width:0}
.app:not(.is-onboarding) #hudAvatar{width:44px;height:44px;border-radius:9px}
.app:not(.is-onboarding) .player-hud>div{gap:2px;min-width:0}
.app:not(.is-onboarding) .hud-name{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app:not(.is-onboarding) .player-hud .town-name{display:none}
.app:not(.is-onboarding) .player-hud #count{font-size:12px}
.app:not(.is-onboarding) .world-head .town-wallet{position:static;width:auto;max-width:none;padding:0;margin:0;border:0;grid-column:auto;grid-row:auto}
.town-wallet>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 10px;border:1px solid var(--leaf);border-radius:9px;background:var(--mint);color:var(--leaf);font-size:11px;line-height:1.5;list-style:none;cursor:pointer}
.town-wallet>summary::-webkit-details-marker{display:none}
.town-wallet>summary svg{flex:none;width:19px;height:19px}
.town-wallet>summary strong{display:block;font-size:17px;line-height:1.4;font-variant-numeric:tabular-nums}
.town-wallet[open]>summary{background:var(--peach)}
.wallet-details{display:none;position:absolute;top:calc(100% + 4px);left:8px;right:8px;max-width:420px;margin-left:auto;padding:18px;border:2px solid var(--leaf);border-radius:14px;background:var(--paper)}
.world-head:has(#walletDisclosure[open]) .wallet-details{display:block}
.world-head .wallet-details .wallet-summary{font-size:13px;gap:24px;justify-content:flex-start}
.world-head .wallet-details .wallet-summary strong{font-size:17px}
.world-head .wallet-details p{font-size:13px;line-height:1.8}
#preferencesButton{display:grid;place-items:center;width:44px;height:44px;padding:10px;border:1px solid var(--leaf);border-radius:9px;background:var(--mint);color:var(--leaf)}
#preferencesButton svg{width:23px;height:23px}
#compactPreview{grid-column:2;grid-row:2;margin:-5px 0 0;text-align:center;color:var(--leaf);font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
.app.is-arriving #preferencesButton{visibility:hidden}
.app:not(.is-onboarding) .scene-toolbar #albumButton{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid var(--leaf);border-radius:9px;background:var(--paper);color:var(--leaf);font-size:12px}
#albumButton svg{width:19px;height:19px}
#residentRequest{position:absolute;transform:translate(-50%,-100%);display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;max-width:142px;padding:8px 10px;border:2px solid var(--leaf);border-radius:12px;background:var(--paper);color:var(--leaf);font-size:12px;font-weight:700;line-height:1.5}
#residentRequest::after{content:'';position:absolute;bottom:-6px;left:calc(50% - 5px);width:9px;height:9px;border:solid var(--leaf);border-width:0 2px 2px 0;background:var(--paper);transform:rotate(45deg)}
#residentRequest svg{width:18px;height:18px;flex:none}
.app.is-arriving #residentRequest{display:none!important}
.selection-budget{margin:0 0 18px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.budget-equation{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:8px;color:var(--leaf)}
.budget-equation>div{display:grid;gap:4px;font-size:12px;text-align:center}
.budget-equation strong{font-size:18px;line-height:1.5;font-variant-numeric:tabular-nums}
.budget-equation .budget-cost{color:var(--ink)}
.budget-equation svg{width:16px;height:16px}
.budget-segments{display:flex;height:10px;margin-top:12px;overflow:hidden;border-radius:5px;background:var(--mint)}
#budgetSpentBar{background:var(--leaf)}#budgetSelectedBar{background:var(--peach)}
.budget-legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:6px;font-size:11px;color:var(--muted)}
.budget-legend span{display:flex;align-items:center;gap:5px}.budget-legend i{display:block;width:8px;height:8px;background:var(--mint)}
.budget-legend span:nth-child(1) i{background:var(--leaf)}.budget-legend span:nth-child(2) i{background:var(--peach)}
#selectionBudgetHint{font-size:12px;line-height:1.8;color:var(--muted);margin:9px 0 0}
#gameDialog #choiceCheck{display:flex;flex-wrap:wrap;gap:8px 14px;list-style:none;padding:0;margin:16px 0 8px;font-size:13px;line-height:1.7;color:var(--leaf)}
.condition-met{display:flex;align-items:center;gap:6px}.condition-met::before{content:'';width:5px;height:9px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);margin:0 4px 3px 2px}
#choiceBenefit{margin:8px 0;color:var(--leaf);font-size:14px;line-height:1.8}
#gameDialog .product-name{font-size:14px}
#gameDialog .product-choice .product-specs{font-size:14px;line-height:1.7;min-height:48px}
#gameDialog .product-choice .card-balance{font-size:12px;word-break:keep-all}
#gameDialog .product-choice{min-height:320px}
#gameDialog .budget{margin-bottom:10px}
#requestSpeaker{font-size:14px;font-weight:700;color:var(--leaf);margin:0 0 8px}
.placement-tray{order:3;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:14px 16px;border-top:2px solid var(--leaf);background:var(--mint)}
.placement-tray>div:first-child{flex:1;min-width:180px}
#placementTitle{margin:0;font-size:15px;line-height:1.6;color:var(--leaf)}
#placementInfo{margin:5px 0 0;font-size:13px;line-height:1.7}
.placement-actions{display:flex;gap:8px;flex-wrap:wrap}
.placement-actions button{min-height:46px;font-size:13px;margin:0;padding:10px 14px}
.app.is-placing #place,.app.is-placing .map-note{display:none!important}
@media(min-width:781px){.app.is-placing #sceneStage{width:min(100%,780px,calc((100svh - 300px)*1.5));min-width:min(100%,360px);align-self:center;margin-inline:auto}.app.is-placing .world{background:var(--mint)}}
.app:not(.is-onboarding) .map-note{font-size:13px;padding:11px 14px}
#sceneStage{scroll-margin-top:100px}
.settings-group{margin:20px 0;padding:0;border:0}
.settings-group legend{font-size:15px;color:var(--leaf);font-weight:700;margin-bottom:10px}
.settings-options{display:flex;flex-wrap:wrap;gap:8px}
.settings-options button,.album-tabs button{min-height:44px;padding:9px 14px;border:1px solid var(--leaf);border-radius:9px;background:var(--paper);color:var(--leaf);font-size:14px;line-height:1.6}
.settings-options button[aria-pressed=true],.album-tabs button[aria-pressed=true]{background:var(--leaf);color:var(--paper)}
.settings-sound{display:flex;align-items:center;justify-content:space-between;font-size:15px;color:var(--leaf);font-weight:700;padding-top:15px;border-top:1px solid var(--line)}
#preferencesStatus{font-size:13px;line-height:1.8;color:var(--muted)}
#albumView h2,#preferencesView h2{font-size:25px;color:var(--leaf);margin:0 0 18px}
.album-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}
.album-tabs button{padding:8px}
.album-photo{margin:0;background:var(--mint);padding:8px;border:1px solid var(--line);border-radius:12px}
#albumCanvas{display:block;width:100%;height:auto;aspect-ratio:3/2;border-radius:6px}
#albumLocation{padding:11px 4px 4px;font-size:14px;font-weight:700;color:var(--leaf);line-height:1.7}
.album-compare{justify-content:flex-end;margin:12px 0}
#albumMessage{font-size:15px;line-height:1.9;margin:18px 0}
#albumItems{padding:14px 0 0;list-style:none;border-top:1px solid var(--line);font-size:13px;line-height:1.9}
#endingAlbum{margin-top:15px}
.large-text #gameDialog .request,.large-text #arrivalText,.large-text .arrival-copy,.large-text #albumMessage{font-size:18px}
.large-text #gameDialog .product-choice .product-specs,.large-text #gameDialog .product-name,.large-text #gameDialog .feedback,.large-text #gameDialog #choiceBenefit{font-size:16px}
.large-text #gameDialog .card-balance,.large-text #gameDialog .budget,.large-text #selectionBudgetHint{font-size:14px}
.selection-dock{position:sticky;bottom:0;z-index:2;margin:18px -24px -24px;padding:12px 24px 18px;border-top:2px solid var(--leaf);background:var(--paper)}
.dock-budget{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 8px;font-size:14px;line-height:1.7;color:var(--leaf);font-variant-numeric:tabular-nums}
#gameDialog .selection-dock #reviewDelivery{position:static;width:100%;margin:0;border:0;min-height:48px}
#residentBubbleText{overflow-wrap:normal;word-break:keep-all;text-wrap:pretty}
.large-text #residentBubbleText{font-size:18px;line-height:1.7}
.large-text #residentBubbleName{font-size:14px}
.large-text #placementTitle{font-size:18px}
.large-text #placementInfo,.large-text .placement-actions button,.large-text .dock-budget{font-size:16px}
@media(max-width:780px){
 .selection-dock{margin:18px -18px -20px;padding:10px 18px 14px}
 .app:not(.is-onboarding) .world-head{grid-template-columns:minmax(0,1fr) auto 44px;gap:8px;padding:9px 10px;min-height:76px}
 .app:not(.is-onboarding) #hudAvatar{width:36px;height:40px}
 .app:not(.is-onboarding) .hud-name{font-size:12px}.app:not(.is-onboarding) .player-hud #count{font-size:11px}
 .town-wallet>summary{gap:5px;padding:3px 7px}.town-wallet>summary svg{width:17px;height:17px}
 .town-wallet>summary strong{font-size:16px}
 .app:not(.is-onboarding) .scene-toolbar #albumButton{grid-column:1/-1;grid-row:4}
 #gameDialog .product-choice{min-height:166px}
 #gameDialog .product-choice .product-specs{min-height:0}
 .budget-equation{gap:4px}.budget-equation strong{font-size:16px}.budget-equation>div{font-size:11px}
 .placement-tray{order:2;padding:12px;gap:10px}
 .placement-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.placement-actions button{padding:10px 8px;font-size:12px}
 .app.is-placing .scene-toolbar{order:3}
 #sceneStage{scroll-margin-top:100px}
 .large-text #gameDialog .product-choice{grid-template-columns:68px minmax(0,1fr)}
 .large-text #gameDialog .product-choice .product-image{width:68px}
}
@media(max-width:360px){
 .app:not(.is-onboarding) .world-head{gap:6px;padding:8px;grid-template-columns:minmax(0,1fr) auto 40px}
 .app:not(.is-onboarding) .player-hud{gap:6px}.app:not(.is-onboarding) #hudAvatar{width:30px;height:36px}
 .town-wallet>summary{font-size:11px;padding:3px 5px}.town-wallet>summary svg{display:none}
 .town-wallet>summary strong{font-size:15px}#preferencesButton{width:40px;height:44px}
 #compactPreview{font-size:11px}.budget-equation strong{font-size:15px}
 #gameDialog .product-name{font-size:14px}
 .budget-legend{gap:10px}
}
