#tour-ui{font:13px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#292923;--tour-paper:rgba(250,248,242,.96);--tour-line:#d9d7cf}
#tour-ui button,#tour-ui select,#tour-ui summary,#tour-ui a{font:inherit;color:inherit;box-sizing:border-box;min-height:42px;border:1px solid var(--tour-line);border-radius:5px;background:var(--tour-paper);padding:10px 12px;cursor:pointer;text-decoration:none;touch-action:manipulation}
#tour-ui button:hover,#tour-ui a:hover{background:#fff}#tour-ui :is(button,a,select,summary):focus-visible{outline:2px solid #904732;outline-offset:3px}#tour-ui button[aria-pressed="true"]{background:#292923;color:#fff;border-color:#292923}
#tour-ui .tour-header{position:fixed;inset:max(14px,env(safe-area-inset-top)) 20px auto;display:flex;align-items:center;gap:14px;justify-content:space-between;z-index:25;pointer-events:none}#tour-ui .tour-header>*{pointer-events:auto}#tour-ui .tour-header strong{font-size:15px;font-weight:500;background:var(--tour-paper);padding:10px 14px;border-radius:5px}#tour-ui .tour-header nav{display:flex;gap:6px}
#tour-ui .tour-bar{position:fixed;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:25;display:flex;align-items:center;gap:7px;padding:7px;border:1px solid var(--tour-line);border-radius:8px;background:var(--tour-paper);max-width:calc(100vw - 24px);white-space:nowrap}#tour-ui .tour-bar [role="group"]{display:flex;gap:3px}#tour-ui .tour-bar label{display:flex;align-items:center;gap:5px}#tour-ui select{max-width:150px}#tour-ui .tour-more{position:relative}#tour-ui .tour-extra-actions{position:absolute;bottom:54px;right:0;display:grid;gap:6px;min-width:175px;max-height:60dvh;overflow:auto;padding:10px;background:var(--tour-paper);border:1px solid var(--tour-line);border-radius:8px}#tour-ui .tour-extra-actions>*{width:100%}#tour-ui .tour-extra-actions svg{display:none}#tour-ui .tour-extra-actions .icon-only{width:100%}
#tour-ui .tour-pad{position:fixed;left:max(18px,env(safe-area-inset-left));bottom:100px;z-index:24;display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:5px;touch-action:none}#tour-ui .tour-pad button{padding:0;font-size:22px;user-select:none;touch-action:none}#tour-ui .tour-pad button:first-child{grid-column:2}#tour-ui .tour-pad button:nth-child(2){grid-column:1}#tour-ui .tour-pad .held{background:#292923;color:white}body[data-mode="overview"] .tour-pad{display:none!important}
#tour-ui .tour-hint{position:fixed;left:50%;bottom:82px;transform:translateX(-50%);margin:0;padding:4px 10px;background:var(--tour-paper);border-radius:4px;pointer-events:none;font-size:11px;white-space:nowrap;z-index:23}#tour-ui .tour-message{position:fixed;top:85px;left:50%;transform:translateX(-50%);z-index:26;background:var(--tour-paper)}
#tour-ui dialog{position:fixed;inset:0;margin:auto;width:440px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;border:1px solid var(--tour-line);border-radius:10px;padding:28px;background:#faf8f2;color:#292923;box-shadow:0 15px 60px #0003}#tour-ui dialog::backdrop{background:#19191580}#tour-ui dialog h2{font-size:24px;font-weight:500;margin:0 45px 22px 0}#tour-ui dialog p{font-size:14px;line-height:1.8;margin:12px 0}#tour-ui #close-help{position:absolute;right:12px;top:12px;width:42px;padding:0;font-size:24px}#tour-ui .tour-specific-help{font-size:13px;line-height:1.8;border-top:1px solid var(--tour-line);padding-top:16px;margin-top:18px;white-space:pre-line}
body[data-ui-hidden="true"] #tour-ui{display:none}
/* Plan-specific panels leave the shared navigation clear. */
body[data-tour="bauhaus"] #walk-options{bottom:90px}body[data-tour="bauhaus"] #attack-button{bottom:100px}body[data-tour="bauhaus"] .scene-caption{display:none}body[data-tour="bauhaus"] .map-panel{bottom:210px}body[data-tour="green"] footer{bottom:84px;left:18px;right:auto}body[data-tour="green"] #door{z-index:24}
@media(max-width:760px){#tour-ui .tour-header{inset:max(10px,env(safe-area-inset-top)) 10px auto;gap:6px;flex-wrap:wrap}#tour-ui .tour-header strong{order:3;font-size:12px;padding:4px 8px}#tour-ui .tour-header nav{gap:4px}#tour-ui .tour-header a,#tour-ui .tour-header button{font-size:11px;padding:10px 8px}#tour-ui .tour-bar{width:calc(100vw - 20px);flex-wrap:wrap;justify-content:center;gap:4px;bottom:max(10px,env(safe-area-inset-bottom))}#tour-ui .tour-bar button,#tour-ui .tour-bar select,#tour-ui summary{font-size:12px;padding:9px}#tour-ui .tour-hint{bottom:125px;font-size:10px}#tour-ui .tour-pad{bottom:151px;left:12px}body[data-tour="bauhaus"] #walk-options{bottom:145px;max-width:calc(100vw - 20px)}body[data-tour="bauhaus"] #attack-button{bottom:155px}body[data-tour="bauhaus"] .map-panel{display:none}body[data-tour="bauhaus"] #game-hud{top:105px}body[data-tour="green"] footer{display:none}}
@media(max-height:500px){#tour-ui .tour-header strong,#tour-ui .tour-hint{display:none}#tour-ui .tour-pad{bottom:85px}body[data-tour="bauhaus"] #game-hud{top:70px}#tour-ui .tour-bar{flex-wrap:nowrap;width:auto;font-size:11px}#tour-ui .tour-bar button,#tour-ui .tour-bar select{font-size:11px;padding:7px}}

#tour-ui #fullscreen{display:inline-block}#tour-ui #controls-toggle{position:static;transform:none;min-height:42px;padding:10px 12px}
body[data-tour] #loading{position:fixed;inset:0;z-index:40;width:100%;height:100dvh;max-width:none;margin:0;padding:0;transform:none;border:0;border-radius:0;background:#292622;text-align:left}body[data-tour] #loading>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}body[data-tour] #loading .loading-content{position:absolute;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);width:calc(100% - 48px);max-width:480px;padding:18px 22px;background:#1e1c19e0;color:#fff8ee;z-index:1}body[data-tour] #loading .loading-content :is(h1,.loading-title){font:500 16px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;margin:0}body[data-tour] #loading .loading-content p{font-size:12px;color:#e3ddd2;margin:8px 0 0}

#tour-ui .tour-message:not(:empty){padding:8px 12px;border-radius:5px;max-width:calc(100vw - 32px);font-size:12px}#tour-ui .tour-overview-hint{display:none}body[data-mode="overview"] #tour-ui .tour-walk-hint{display:none}body[data-mode="overview"] #tour-ui .tour-overview-hint{display:inline}
#tour-ui #day-toggle{width:auto;flex-shrink:0}#tour-ui #day-toggle span{display:inline!important}#tour-ui .tour-bar>*{flex-shrink:0}

.loading-home{display:inline-block;margin-top:12px;color:#fff8ee;font-size:12px;text-underline-offset:3px}

#tour-ui .tour-stick,#tour-ui .tour-stick-hint{display:none}
#tour-ui .tour-pad,#tour-ui .tour-stick,#tour-ui .tour-stick *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}
@media(max-width:760px),(pointer:coarse){
 #tour-ui .tour-pad,#tour-ui .tour-keyboard-hint{display:none}
 #tour-ui .tour-stick-hint{display:inline}
 #tour-ui .tour-stick{display:grid;place-items:center;position:fixed;z-index:24;left:max(18px,env(safe-area-inset-left));bottom:150px;width:112px;height:112px;border:1px solid #fff9;border-radius:50%;background:#faf8f24d;box-shadow:inset 0 0 0 17px #faf8f226;overscroll-behavior:none}
 #tour-ui .tour-stick-knob{display:block;width:48px;height:48px;border-radius:50%;background:#faf8f2ed;border:1px solid #d9d7cf;box-shadow:0 2px 10px #0002;pointer-events:none}
}
body[data-mode="overview"] #tour-ui .tour-stick{display:none}
@media(max-height:500px){#tour-ui .tour-stick{bottom:85px;width:96px;height:96px}}

@media(max-width:760px){
 #tour-ui .tour-bar{flex-wrap:nowrap;justify-content:space-between;gap:5px;width:calc(100vw - 20px)}
 #tour-ui .tour-bar label{min-width:0;flex:1;font-size:0;gap:0}
 #tour-ui .tour-bar select{width:100%;min-width:0;max-width:none;font-size:12px}
 #tour-ui .tour-bar button,#tour-ui .tour-bar summary{font-size:12px;padding:9px 8px}
 #tour-ui .tour-header{flex-wrap:nowrap}
 #tour-ui .tour-header strong{display:none}
 #tour-ui .tour-hint{bottom:82px}
 #tour-ui .tour-stick{bottom:110px}
 body[data-tour="bauhaus"] #attack-button{bottom:115px}
}

/* Compact nonmodal help and one shared navigation row. */
#tour-ui .tour-header nav{position:relative}
#tour-ui #help-dialog{position:absolute;right:0;top:48px;width:210px;padding:10px 12px;border:1px solid var(--tour-line);border-radius:6px;background:var(--tour-paper);box-shadow:0 5px 18px #0001;font-size:12px;line-height:1.6}
#tour-ui #help-dialog[hidden]{display:none}
#tour-ui #help-dialog p{margin:0}
#tour-ui .tour-specific-help{font-size:11px;border:0;padding:0;margin:3px 0 0;line-height:1.6}
#tour-ui .tour-bar{width:max-content;gap:4px;padding:5px}
#tour-ui .tour-more[hidden]{display:none}
#tour-ui .tour-extra-actions{min-width:130px;padding:6px;gap:4px}
@media(max-width:760px){#tour-ui .tour-bar{width:max-content;max-width:calc(100vw - 16px);gap:3px}#tour-ui .tour-bar button,#tour-ui .tour-bar summary{font-size:11px;padding:8px 6px}#tour-ui .tour-bar label{flex:0 1 92px}#tour-ui .tour-bar select{max-width:92px;font-size:11px;padding:8px 4px}#tour-ui .tour-bar #day-toggle{font-size:11px}}

body[data-tour="bauhaus"]:has(#help-button[aria-expanded="true"]) #game-hud{top:150px}
