/* Exploration owns only its HUD and dock; authored terrain/camera stay intact. */
.exp-map-page.exploration-system{padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));gap:8px}
.exploration-system .exp-map-heading{padding:12px 16px;min-height:76px;gap:16px;border:0;border-radius:18px;background:linear-gradient(180deg,var(--pm-ui-surface),color-mix(in srgb,var(--pm-ui-surface) 96%,transparent));box-shadow:0 8px 24px var(--pm-ui-shadow);overflow:visible;z-index:10}
.exploration-system .exp-map-title{min-width:0;flex:1}
.exploration-system .exp-map-title>small{font-size:12px;letter-spacing:.08em;line-height:1.4;color:var(--pm-ui-muted,#b7c8c8)}
.exploration-system .exp-map-title h2{font-size:23px;line-height:1.2;letter-spacing:-.03em;margin:4px 0 0;text-wrap:balance;color:var(--pm-ui-text,#f1eee3)}
.exploration-system .exp-journey-progress{max-width:240px;width:100%;margin-top:8px;height:3px;gap:3px}
.exploration-system .exp-resources{display:flex;align-items:center;gap:12px;flex-shrink:0}
.exploration-system .exp-hud-amount{display:flex;flex-direction:column;align-items:center;gap:3px}
.exploration-system .exp-hud-amount>small{font-size:11px;line-height:1.3;letter-spacing:.03em;color:var(--pm-ui-muted,#b7c8c8)}
.exploration-system .exp-hud-amount .exp-money{font-size:17px;gap:5px}
.exploration-system .exp-resources>.exp-icon-button{width:44px;min-height:44px;flex-basis:44px;height:44px;padding:10px;background:var(--pm-ui-surface-raised);border:0}
.exploration-system .exp-map-tools.exploration-tools{position:relative;top:auto;left:auto;display:block;z-index:12;gap:0;font-size:14px;color:var(--pm-ui-text,#f1eee3)}
.exploration-tools>summary{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:64px;padding:8px;list-style:none;cursor:pointer;border-radius:10px;background:var(--pm-ui-surface-raised);font-size:14px;font-weight:500;line-height:1.3}
.exploration-tools>summary::-webkit-details-marker{display:none}
.exploration-tools>summary .exp-icon{height:14px;width:14px;transform:rotate(90deg)}
.exploration-tools[open]>summary .exp-icon{transform:rotate(-90deg)}
.exploration-tools>summary:focus-visible{outline:2px solid var(--pm-ui-focus,#f3d795);outline-offset:3px}
.exploration-tools>nav{position:absolute;right:0;top:calc(100% + 8px);width:228px;max-width:calc(100vw - 32px);max-height:56dvh;overflow-y:auto;overscroll-behavior:contain;display:grid;gap:4px;padding:8px;border:1px solid var(--pm-ui-line,#3c505b);border-radius:16px;background:var(--pm-ui-ink,#0d1921);box-shadow:0 12px 28px var(--pm-ui-shadow)}
.exploration-system .exploration-tool{min-height:48px;width:100%;padding:10px 12px;border:0;background:none;justify-content:flex-start;font-size:15px;font-weight:500;color:var(--pm-ui-text,#f1eee3);border-radius:10px}
.exploration-tool:hover{background:color-mix(in srgb,var(--pm-ui-accent) 10%,transparent)}
.exploration-audio{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 12px;font-size:14px;color:var(--pm-ui-muted,#b7c8c8);border-top:1px solid var(--pm-ui-line,#3c505b)}
.exploration-system .exploration-audio .exp-icon-button{min-height:44px;width:44px;flex-basis:44px;border:0;background:none;box-shadow:none;padding:10px}
.exploration-system .exp-board-viewport{padding-top:8px;padding-bottom:8px}
.exploration-system .exp-map-dock{padding:12px 14px;border:0;border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--pm-ui-surface) 96%,transparent),var(--pm-ui-surface));box-shadow:0 -8px 24px var(--pm-ui-shadow);display:block;max-width:780px}
.exploration-system .exp-party-strip{padding-bottom:8px;border-bottom:1px solid var(--pm-ui-line);gap:12px}
.exploration-system .exp-party-card{min-height:52px;padding:0;gap:8px;background:none;border:0;border-radius:8px;max-width:none}
.exploration-system .exp-party-card.injured{box-shadow:none}
.exploration-system .exp-party-image{height:44px;width:36px;border-radius:8px;box-shadow:none}
.exploration-system .exp-party-copy{gap:4px}
.exploration-system .exp-party-copy strong{font-size:14px;line-height:1.3;letter-spacing:0}
.exploration-system .exp-party-copy small{display:block;font-size:12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
.exploration-system .exp-party-copy em{color:var(--pm-ui-muted,#b7c8c8)}
.exploration-system .exp-party-health{height:3px}
.exploration-system .exp-path-controls{padding-top:8px;gap:8px}
.exploration-system .exp-path-heading{gap:8px;min-height:44px}
.exploration-system .exp-path-hint{font-size:14px;line-height:1.35;letter-spacing:0;text-align:left;color:var(--pm-ui-text,#f1eee3)}
.exploration-system .exp-path-hint>small{font-size:12px;line-height:1.35;color:var(--pm-ui-muted,#b7c8c8);white-space:nowrap}
.exploration-system .route-compare-button{min-height:44px;padding:8px 0 8px 10px;background:none;border:0;border-radius:8px;flex-shrink:0;font-size:13px;font-weight:500;color:var(--pm-ui-accent,#b5dac3)}
.exploration-system .exp-path-options{gap:8px}
.exploration-system .exp-path-choice{min-height:60px;padding:10px 12px;gap:10px;border:1px solid var(--pm-ui-line);background:var(--pm-ui-surface-raised);font-size:15px;line-height:1.3;font-weight:600;max-width:none;box-shadow:none;border-radius:12px}
.exploration-system .exp-path-choice>.exp-icon{height:22px;width:22px}
.exploration-system .exp-path-choice>span{gap:3px}
.exploration-system .exp-path-choice>span>small{font-size:12px;line-height:1.3;letter-spacing:0;text-transform:none;color:var(--pm-ui-muted,#b7c8c8)}
.exploration-system .exp-path-controls>.exp-button{min-height:48px;font-size:16px}
@media(max-width:600px){
 .exploration-system .exp-map-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px}
 .exploration-system .exp-map-title h2{font-size:22px}
 .exploration-system .exp-journey-progress{max-width:none;margin-top:6px}
 .exploration-system .exp-resources{width:100%;gap:12px;justify-content:flex-end}
 .exploration-system .exp-hud-amount:first-child{margin-right:auto}
 .exploration-system .exp-hud-amount{align-items:flex-start}
 .exploration-system .exp-hud-amount .exp-money{font-size:16px}
 .exploration-system .exp-party-card{flex-direction:column;align-items:flex-start;gap:5px}
 .exploration-system .exp-party-image{height:40px;width:32px}
 .exploration-system .exp-party-copy{width:100%;gap:3px}
 .exploration-system .exp-party-copy strong{font-size:13px}
 .exploration-system .exp-path-choice{padding:9px 10px;font-size:14px;gap:6px}
 .exploration-system .exp-path-choice>.exp-icon{height:20px;width:20px}
}
@media(max-height:700px) and (orientation:portrait){
 .exp-map-page.exploration-system{gap:6px;padding:8px max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
 .exploration-system .exp-map-heading{gap:6px;padding:10px 12px}
 .exploration-system .exp-party-strip{gap:8px}
 .exploration-system .exp-party-card{flex-direction:row;align-items:center;gap:5px}
 .exploration-system .exp-party-image{height:36px;width:26px}
 .exploration-system .exp-map-dock{padding:10px}
 .exploration-system .exp-party-copy strong{font-size:12px}
}
@media(max-height:550px) and (orientation:landscape){
 .exp-map-page.exploration-system{padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));gap:6px}
 .exploration-system .exp-map-heading{padding:8px 12px;min-height:64px;gap:16px}
 .exploration-system .exp-map-title h2{font-size:20px;margin-top:2px}
 .exploration-system .exp-map-title>small{font-size:11px}
 .exploration-system .exp-journey-progress{margin-top:4px}
 .exploration-system .exp-map-dock{display:flex;align-items:center;gap:20px;padding:8px 12px;max-width:1000px}
 .exploration-system .exp-party-strip{flex:1;padding-bottom:0;border-bottom:0;gap:10px;min-width:0}
 .exploration-system .exp-party-card{gap:5px;min-height:48px}
 .exploration-system .exp-party-image{width:28px;height:36px}
 .exploration-system .exp-party-copy strong{font-size:12px}
 .exploration-system .exp-party-copy small{font-size:12px}
 .exploration-system .exp-path-controls{flex:1;padding:0;gap:4px;min-width:0}
 .exploration-system .exp-path-heading{min-height:32px}
 .exploration-system .exp-path-hint{font-size:13px}
 .exploration-system .route-compare-button{min-height:44px;font-size:12px;padding:6px 0 6px 6px}
 .exploration-system .exp-path-choice{min-height:48px;padding:6px 8px;font-size:13px;gap:6px}
 .exploration-system .exp-path-choice>span>small{font-size:12px}
 .exploration-tools>nav{max-height:48dvh}
}

.exploration-system :is(.exp-party-card,.exp-party-copy strong,.exp-party-copy small,.exp-path-choice,.exp-resources>.exp-icon-button,.exploration-audio .exp-icon-button){color:var(--pm-ui-text)}
.exploration-system .exp-money b{color:var(--pm-ui-text)}
.exploration-system .exp-hud-amount>small{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.exploration-system .exp-hud-amount{position:relative;padding:3px 8px 3px 5px;border-radius:20px;background:var(--pm-ui-surface-soft);gap:0}
.exploration-system .exp-hud-amount .exp-money{font-size:16px}
.exploration-system .exp-resources .exp-hud-amount .exp-money{font-size:16px}
.exploration-system .exp-map-title>small{color:var(--pm-ui-muted);letter-spacing:0}
.exploration-system .exp-board .exp-tile:not(.boss) .exp-stop-name{width:max-content;min-width:44px;max-width:none;left:50%;transform:translateX(-50%);white-space:nowrap!important;overflow-wrap:normal;word-break:normal;padding:4px 8px;line-height:1.3}
.exploration-system .exp-board .exp-tile.boss .exp-stop-name{width:max-content;max-width:160px;left:50%;transform:translateX(-50%);overflow-wrap:normal;word-break:normal}
.exploration-system .exp-board .exp-stop-name[data-stop-label=choice]{white-space:nowrap!important;overflow-wrap:normal;word-break:normal;max-width:none}
.exploration-system .exp-path-choice>span{min-width:0;overflow-wrap:normal;word-break:normal}
.exploration-system .exp-path-choice{border-radius:24px;font-weight:500}
.exploration-system .exp-map-heading,.exploration-system .exp-map-dock{box-shadow:none;border-radius:24px}

/* Compact floating map controls leave the route itself in view. */
.shell .exp-app:has(.exploration-system)>.profile-sync{position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;clip-path:inset(50%);padding:0;margin:-1px;flex:none;white-space:nowrap}
.shell .exp-app:has(.exploration-system)>.exp-page-host{flex:1;min-height:0;height:100%}
.shell .exp-app .exploration-system{padding:0;display:block;position:relative;overflow:hidden}
.shell .exp-app .exploration-system>.exp-board-viewport{position:absolute;inset:0!important;width:100%;height:100%!important;max-width:none;margin:0;padding:0!important;overflow:hidden}
.shell .exp-app .exploration-system .exp-board{width:100%;height:100%;max-width:none;margin:0}
.shell .exp-app .exploration-system:after{inset:0;background:none}
.shell .exp-app .exploration-system>.exp-map-heading{position:absolute;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:block;width:auto;min-height:0;padding:0;border:0;background:none;box-shadow:none;pointer-events:none;z-index:10}
.shell .exploration-system .exp-map-title{width:max-content;max-width:45%;padding:8px 12px;border-radius:20px;background:color-mix(in srgb,var(--pm-ui-surface) 96%,transparent);box-shadow:0 3px 12px var(--pm-ui-shadow);pointer-events:auto}
.shell .exploration-system .exp-map-title h2{font-size:17px;line-height:1.2;margin-top:2px}
.shell .exploration-system .exp-map-title>small{font-size:11px;line-height:1.3}
.shell .exploration-system .exp-resources{position:absolute;top:0;right:0;display:grid;grid-template-columns:auto auto;gap:6px;justify-items:end;width:auto;pointer-events:auto}
.shell .exploration-system .exp-hud-amount{margin:0!important;min-height:36px;padding:3px 8px 3px 5px;background:color-mix(in srgb,var(--pm-ui-surface) 96%,transparent);box-shadow:0 2px 10px var(--pm-ui-shadow)}
.shell .exploration-system .exp-hud-amount:first-child{grid-column:1;grid-row:1}
.shell .exploration-system .exp-hud-amount:nth-child(2){grid-column:1;grid-row:2}
.shell .exploration-system .exploration-tools{grid-column:2;grid-row:2}
.shell .exploration-system .exp-resources>.exp-icon-button{grid-column:2;grid-row:1;background:var(--pm-ui-surface);border-radius:50%;box-shadow:0 2px 10px var(--pm-ui-shadow)}
.shell .exp-app .exploration-system>.exp-map-dock{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:grid;grid-template-columns:minmax(0,1fr) 72px;grid-template-rows:auto auto;gap:8px;width:auto;max-width:780px;margin:auto;padding:0;background:none;border:0;border-radius:0;box-shadow:none;z-index:7}
.shell .exploration-system .exp-party-strip{grid-column:1;grid-row:1;min-width:0;gap:6px;align-items:center;padding:4px 8px;border:0;border-radius:24px;background:color-mix(in srgb,var(--pm-ui-surface) 96%,transparent);box-shadow:0 2px 12px var(--pm-ui-shadow)}
.shell .exploration-system .exp-party-card{flex-direction:row;gap:4px;min-height:44px;min-width:0;padding:0}
.shell .exploration-system .exp-party-image{width:24px;height:28px;flex-shrink:0}
.shell .exploration-system .exp-party-copy{gap:2px;min-width:0}
.shell .exploration-system .exp-party-copy strong{font-size:11px;line-height:1.2}
.shell .exploration-system .exp-party-copy small{font-size:11px;line-height:1.2}
.shell .exploration-system .exp-path-controls{display:contents}
.shell .exploration-system .exp-path-heading{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;min-height:44px;padding:0;border-radius:24px;background:color-mix(in srgb,var(--pm-ui-surface) 96%,transparent);box-shadow:0 2px 12px var(--pm-ui-shadow)}
.shell .exploration-system .exp-path-heading>.exp-path-hint{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shell .exploration-system .route-compare-button{min-height:44px;width:100%;padding:8px 6px;font-size:12px;line-height:1.25;color:var(--pm-ui-text)}
.shell .exploration-system .exp-path-options{grid-column:1/-1;grid-row:2;gap:8px}
.shell .exploration-system .exp-path-choice{min-height:48px;padding:6px 12px;font-size:14px;line-height:1.3;background:color-mix(in srgb,var(--pm-ui-surface) 96%,transparent);box-shadow:0 2px 12px var(--pm-ui-shadow)}
.shell .exploration-system .exp-path-choice>span>small{font-size:12px;line-height:1.2}
.shell .exploration-system .exp-path-controls>.exp-button{grid-column:1/-1;grid-row:2;min-height:48px}
@media(max-height:550px) and (orientation:landscape){
 .shell .exploration-system .exp-map-title{max-width:40%;padding:6px 12px}
 .shell .exploration-system .exp-resources{display:flex;align-items:center;gap:8px}
 .shell .exp-app .exploration-system>.exp-map-dock{grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr);grid-template-rows:auto;gap:8px;max-width:1000px}
 .shell .exploration-system .exp-path-options{grid-column:3;grid-row:1}
 .shell .exploration-system .exp-path-controls>.exp-button{grid-column:2/4;grid-row:1}
 .shell .exploration-system .exp-party-image{width:26px;height:30px}
 .shell .exploration-system .exp-path-choice{padding:6px 8px;font-size:13px}
}
.exploration-system .exp-map-heading{border-radius:24px;padding:10px 16px;box-shadow:0 3px 14px var(--pm-ui-shadow)}
.exploration-system .exp-map-title h2{font-size:19px;font-weight:600;line-height:1.2;margin:2px 0 0}
.exploration-system .exp-map-title>small{font-size:10px;letter-spacing:.04em}
.exploration-system .exp-hud-amount{flex-direction:row;align-items:center;gap:4px}
.exploration-system .exp-hud-amount>small{font-size:10px;text-transform:none;letter-spacing:0}
.exploration-system .exp-hud-amount .exp-money{font-size:15px}
.exploration-system .exp-resources{gap:10px}
.exploration-system .exploration-tools>summary{border-radius:999px;background:var(--pm-ui-surface);font-size:13px;box-shadow:none}
.exploration-system .exp-map-dock{border-radius:26px;padding:12px 16px;box-shadow:0 -2px 14px var(--pm-ui-shadow)}
.exploration-system .exp-party-strip{border:0;padding-bottom:4px;gap:10px}
.exploration-system .exp-party-card{flex-direction:row;align-items:center;min-height:44px}
.exploration-system .exp-party-image{border-radius:50%;width:36px;height:36px}
.exploration-system .exp-party-copy strong{font-size:12px;font-weight:500}
.exploration-system .exp-party-copy small{font-size:11px}
.exploration-system .exp-path-choice{background:var(--pm-ui-surface);border:0;border-radius:20px;box-shadow:0 2px 8px var(--pm-ui-shadow);min-height:56px;font-weight:500}
.exploration-system .exp-path-hint{font-size:13px}
.exploration-system .exp-path-hint>small{font-size:11px}
@media(max-width:600px){
 .exploration-system .exp-map-heading{gap:4px;padding:10px 14px;min-height:0}
 .exploration-system .exp-resources{justify-content:flex-end;gap:8px}
 .exploration-system .exp-map-title h2{font-size:18px}
 .exploration-system .exp-journey-progress{height:2px;margin-top:5px}
 .exploration-system .exp-party-card{flex-direction:row;gap:5px}
 .exploration-system .exp-party-image{width:28px;height:28px;flex-shrink:0}
 .exploration-system .exp-party-copy strong{font-size:11px}
 .exploration-system .exp-party-copy small{font-size:10px}
}
/* Route nodes are the primary controls; Compare stops retains the complete chooser. */
.shell .exploration-system .exp-path-options{display:none}
.shell .exp-app .exploration-system>.exp-map-dock{grid-template-rows:auto}
@media(max-height:550px) and (orientation:landscape){
 .shell .exp-app .exploration-system>.exp-map-dock{grid-template-columns:minmax(0,1fr) 90px;max-width:560px}
}
@media(max-height:700px) and (orientation:portrait){
 .shell .exploration-system .exp-party-strip{position:absolute;left:0;right:0;bottom:calc(100dvh - 170px);min-height:44px}
 .shell .exploration-system .exp-path-heading{grid-column:2}
}
/* Preserve visible save errors and keyboard access without reserving map space. */
.shell .exp-app:has(.exploration-system)>.profile-sync:is(:focus-within,:has([data-profile-sync="error"]),:has([data-profile-sync="conflict"])){position:absolute;top:max(112px,env(safe-area-inset-top));left:12px;right:12px;width:auto;height:auto;min-height:44px;margin:0;padding:4px 12px;clip-path:none;white-space:normal;z-index:30;border-radius:16px;background:var(--pm-ui-surface);color:var(--pm-ui-text)}
