/* Tutorial only. Existing scenery, graphics, gameplay panels and narration are untouched. */
#tour-layer{position:fixed;inset:0;z-index:210;pointer-events:none;color:#3d3828;font-family:"Trebuchet MS","Segoe UI",sans-serif;--tour-card-limit:620px;}
#tour-layer [hidden]{display:none!important;}
.tour-dim{position:fixed;inset:0;background:rgba(12,24,36,.66);}
.tour-hole{position:fixed;box-shadow:0 0 0 2px rgba(26,17,8,.95),0 0 0 6px #ffd97a,0 0 0 8px rgba(26,17,8,.75),0 0 20px 8px rgba(255,217,122,.25),0 0 0 4000px rgba(12,24,36,.66);}
.tour-card{position:fixed;width:clamp(330px,33vw,560px);max-width:calc(100vw - 28px);max-height:var(--tour-card-limit,calc(100dvh - 130px));display:flex;flex-direction:column;pointer-events:auto;box-sizing:border-box;padding:20px 24px 18px;border:24px solid transparent;border-image:url('../../assets/game/board_panel_clean.webp') 82 fill /24px stretch;background:transparent;color:#3d3828;box-shadow:0 6px 22px #15262b44;}
.tour-card header{display:flex;align-items:center;gap:14px;flex-shrink:0;}
.tour-face{width:74px;height:82px;object-fit:contain;flex:0 0 auto;}
.tour-credit{font-weight:800;letter-spacing:.12em;font-size:10px;color:#6b5b42;}
.tour-card h2{font:700 clamp(20px,1.65vw,28px)/1.13 Georgia,serif;margin:6px 0;outline:none;}
.tour-card-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#af9265 transparent;}
#tour-speech{font-size:clamp(15px,1.02vw,19px);line-height:1.55;margin:16px 0;}
.tour-step-action{flex:0 0 auto;display:flex;align-items:center;gap:10px;justify-content:flex-end;padding-top:12px;border-top:1px solid #bda882;}
#tour-action-hint{font-size:12px;line-height:1.45;color:#6a563d;}
.tour-card button,.tour-foot button{cursor:pointer;font:700 13px/1.3 "Trebuchet MS",sans-serif;color:#443928;background:#f5ead0 url('../../assets/game/plate_cream.webp') center/100% 100% no-repeat;border:0;padding:10px 15px;min-height:40px;border-radius:4px;}
.tour-card button.primary{background-color:#e1d7af;color:#354432;}
.tour-foot button:disabled,.tour-card button:disabled{opacity:.5;cursor:default;}
.tour-card button:focus-visible,.tour-foot button:focus-visible{outline:3px solid #7e6436;outline-offset:2px;}
.tour-foot{position:fixed;bottom:max(10px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 16px);padding:8px 12px;box-sizing:border-box;background:#f0e6cb url('../../assets/game/panel_wood_tile.webp') center/400px auto;border:2px solid #b8a27b;border-radius:8px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 13px;pointer-events:auto;box-shadow:0 3px 12px #152b3655;}
#tour-count{font-size:13px;white-space:nowrap;font-weight:700;}
.tour-dots{display:flex;gap:3px;}.tour-dots i{width:5px;height:5px;border-radius:50%;background:#b4a37c;}.tour-dots i.on{background:#4e695e;box-shadow:0 0 0 1px #4e695e;}
.tour-voice-controls{display:flex;gap:5px;}.tour-foot button{font-size:11px;min-height:34px;padding:7px 10px;}
#tour-exit{color:#713e30;}
#tour-audio-status{font-size:10px;max-width:270px;color:#695b47;}
#tour-layer.dialog-open .tour-card,#tour-layer.dialog-open .tour-hole,#tour-layer.dialog-open .tour-dim{display:none!important;}
body.touring #game-overlay{z-index:200;padding-bottom:95px;}
body.touring #game-overlay .game-dialog{max-height:calc(100dvh - 120px);}
body.touring #game-hud .game-brand,body.touring #game-hud [data-ui=hide-all],body.touring #game-hud [data-ui=fold],body.touring #game-hud .hide-info,body.touring #game-hud .hide-hands,body.touring .developer-tray,body.touring #game-show-ui,body.touring #environment-controls,body.touring #debug-panel{visibility:hidden!important;}
body.touring #game-hud .sidebar-shell{top:68px;bottom:90px;--side-width:clamp(310px,31vw,510px);}
body.touring #game-hud .game-hands{left:22px;top:100px;bottom:auto;width:48vw;height:220px;}
body.touring[data-tour-focus=hands] #game-hands .player-1{display:none;}
body.touring[data-tour-focus=hands] #game-hands{grid-template-columns:1fr;}
body.touring #game-hud .draft-corner{top:85px;}
body.touring #pyramid .pcard.open{filter:drop-shadow(0 0 4px #ffd777);}
#tour-reference{position:fixed;right:18px;top:75px;width:clamp(300px,36vw,570px);max-height:calc(100dvh - 172px);overflow:auto;z-index:24;padding:16px 18px;color:#433825;box-sizing:border-box;border:20px solid transparent;border-image:url('../../assets/game/panel_wood.webp') 54 fill stretch;background:#eee7d1 url('../../assets/game/panel_wood_tile.webp') center/400px;pointer-events:auto;scrollbar-width:thin;}
#tour-reference h2{margin:0 0 12px;font:700 21px Georgia,serif;}
.tour-item-list{display:grid;grid-template-columns:1fr 1fr;gap:15px;}
.tour-item-list article{display:grid;grid-template-columns:1fr 1fr;text-align:center;align-items:center;font-size:12px;}
.tour-item-list strong,.tour-item-list span,.tour-item-list small{grid-column:1/-1;line-height:1.5;}
.tour-item-list img{width:65px;height:66px;object-fit:contain;max-width:100%;justify-self:center;}
.tour-card-guide article{display:flex;gap:12px;margin-bottom:12px;border-bottom:1px solid #bba77d;padding-bottom:12px;font-size:13px;}
.tour-card-guide p{margin:5px 0;line-height:1.45;}.tour-guide-art{width:50px;height:58px;object-fit:contain;}.tour-card-guide .coin-icon{width:13px;height:13px;}
#tour-farewell{position:fixed;inset:0;z-index:250;display:grid;place-items:center;background:rgba(12,24,36,.5);}
#tour-farewell .tour-card{position:relative;left:auto;top:auto;text-align:center;align-items:center;animation:tour-farewell-in .6s ease both;}
@keyframes tour-farewell-in{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}
@media(max-width:1000px){.tour-dots{display:none;}#tour-audio-status{flex-basis:100%;text-align:center;}.tour-foot{gap:4px 10px;padding:5px 8px;}}
@media(max-width:759px){
 .tour-card{width:calc(100vw - 24px);border-width:15px;padding:10px 12px;max-height:var(--tour-card-limit,35dvh);}
 .tour-face{width:47px;height:51px;}.tour-card header{gap:9px;}.tour-card h2{font-size:19px;margin:3px 0;}.tour-credit{font-size:8px;}
 #tour-speech{font-size:13px;line-height:1.48;margin:8px 0;}.tour-step-action{padding-top:7px;}.tour-card button{min-height:36px;padding:8px 14px;font-size:12px;}
 .tour-foot{width:calc(100vw - 16px);gap:3px 8px;}.tour-voice-controls{gap:3px;flex-wrap:wrap;justify-content:center;}.tour-foot button{font-size:10px;padding:6px 8px;min-height:32px;}#tour-count{font-size:11px;}#tour-audio-status{font-size:9px;max-width:100%;}
 body.touring #game-hud .draft-corner{top:65px;left:14px;}body.touring #game-hud .draft-heading{height:37px;}.touring .pyramid-help{display:none;}
 body.touring #game-hud .sidebar-shell{top:84px;left:16px;right:16px;width:auto;bottom:var(--tour-reserved,380px);}
 body.touring #game-hud .game-hands{top:95px;left:16px;right:16px;width:auto;height:clamp(125px,20vh,200px);}
 #tour-reference{top:78px;left:16px;right:16px;width:auto;max-height:calc(100dvh - var(--tour-reserved,380px) - 90px);padding:8px 10px;border-width:14px;}
 .tour-item-list{gap:10px;}.tour-item-list img{height:42px;}.tour-item-list article{font-size:10px;}
 body.touring #game-overlay{padding:8px 8px 105px;}body.touring #game-overlay .game-dialog{max-height:calc(100dvh - 115px);}
}
@media(max-height:550px) and (min-width:760px){.tour-card{width:330px;border-width:17px;padding:10px 12px;}.tour-face{width:43px;height:50px;}#tour-speech{font-size:13px;line-height:1.45;}.tour-card h2{font-size:20px;}.tour-dots{display:none;}#tour-audio-status{display:none;}.tour-foot{padding:3px 8px;}.tour-foot button{min-height:30px;}body.touring #game-hud .game-hands{top:70px;height:165px;}body.touring #game-hud .sidebar-shell{top:68px;bottom:75px;width:300px;}}
@media(prefers-reduced-motion:reduce){#tour-farewell .tour-card{animation:none;}}

/* Use the original paper-and-timber reference panel, not a new visual theme. */
body.touring:not([data-tour-focus="draft"]) .draft-corner{visibility:hidden;}
#tour-farewell{transition:opacity .6s ease;}#tour-farewell.leaving{opacity:0;pointer-events:none;}
@media(max-width:759px){.tour-card{border-image-width:15px;}}
@media(max-height:550px) and (min-width:760px){.tour-card{border-image-width:17px;}}
@media(prefers-reduced-motion:reduce){#tour-farewell{transition:none;}}
/* Only actionable draft choices receive the original tutorial's warm invitation glow. */
body.touring[data-tour-focus="draft"] #game-hud .pcard.open:not(:disabled){filter:drop-shadow(0 0 4px #ffe29a);}
.tour-card-scroll:focus-visible,#tour-reference:focus-visible{outline:2px solid #af8542;outline-offset:2px;}
/* Creature lessons expose the reserve rather than wasting the small panel on deeds. */
body.touring[data-tour-focus="hands"] #game-hud .deeds-section{display:none;}
body.touring[data-tour-focus="hands"] #game-hud .creatures-section{margin-top:0;padding-top:0;border-top:0;}
body.touring[data-tour-focus="hands"] #game-hud .game-hands{height:min(300px,calc(100dvh - 160px));}
#tour-reference{border-image:url('../../assets/game/board_panel_clean.webp') 82 fill /20px stretch;background:transparent;}
@media(max-width:759px){
 body.touring[data-tour-focus="hands"] #game-hud .game-hands{height:min(230px,calc(100dvh - var(--tour-reserved,380px) - 104px));min-height:140px;}
 #tour-reference{border-image-width:14px;}
}
@media(max-height:550px) and (min-width:760px){body.touring[data-tour-focus="hands"] #game-hud .game-hands{height:230px;}}

/* 5.1 task/result cards retain the same wood, paper, layout and font treatment. */
.tour-checkpoint{font-size:11px;line-height:1.4;border-bottom:1px solid #baaa84;padding-bottom:8px;color:#6a5b43;}
.tour-result,.tour-hint-copy{font-size:13px;line-height:1.48;background:rgba(211,221,182,.4);padding:9px 11px;border-left:3px solid #718460;margin:9px 0;}
.tour-hint-copy{background:rgba(233,215,176,.45);border-color:#ad8e53;}
#tour-hint{flex:0 0 auto;font-size:11px;padding:7px 9px;}
body.touring[data-tour-focus=interface] #game-hud [data-ui=hide-all],body.touring[data-tour-focus=interface] #game-show-ui{visibility:visible!important;}
body.touring[data-tour-focus=interface] #game-hud:not(.all-hidden) .draft-corner{visibility:visible;}
body.touring[data-tour-focus=world] .tour-hole{box-shadow:0 0 0 2px rgba(26,17,8,.8),0 0 0 4000px rgba(12,24,36,.6);}
@media(max-width:759px){.tour-checkpoint{font-size:9px;}.tour-result,.tour-hint-copy{font-size:11px;padding:6px 8px;}.tour-step-action{gap:5px;}#tour-action-hint{font-size:10px;}#tour-hint{font-size:10px;padding:6px;}}

/* 5.3 interface practice: don't park both inventories across the map as if this
   were the reserve-only lesson. Keep their normal bottom-left location. The
   spotlight follows Hide/Inspect/Show so a visible panel never covers its target. */
body.touring[data-tour-focus="interface"] #game-hud .game-hands{
 top:auto;left:14px;right:auto;bottom:94px;width:min(48vw,760px);height:clamp(150px,24vh,260px);
}
body.touring[data-tour-focus="interface"] #game-hud .sidebar-shell{top:82px;bottom:94px;}
body.touring[data-tour-focus="interface"] #game-hud .draft-corner{top:86px;}
@media(max-width:759px){
 body.touring[data-tour-focus="interface"] #game-hud .game-hands{
  top:180px;bottom:auto;left:12px;right:12px;width:auto;height:clamp(125px,20vh,180px);
 }
 body.touring[data-tour-focus="interface"] #game-hud .sidebar-shell{top:180px;bottom:var(--tour-reserved,380px);}
}
