/* A small paper guide, kept in the top layer of the active discovery. */
.tour-start { position:absolute;top:126px;right:28px;z-index:10;display:flex;align-items:center;gap:10px;padding:10px 15px;border:2px solid #b39455;background:#e6d2a1;color:#3b5034;box-shadow:3px 3px #172d2b;font:600 14px/1.2 var(--sans); }
.tour-start>span:first-child { font:17px var(--pixel); }
.tour-start:hover { background:#f4e3b9;transform:translateY(-1px); }
.index-view .tour-start { display:none; }
#room-tour { position:fixed;inset:auto 16px 14px;margin:0 auto;width:min(670px,calc(100vw - 32px));max-height:min(280px,44svh);overflow:auto;padding:17px 23px 14px;background:#f0dfb5 url('./assets/art/note-paper.webp') center/140% 180% no-repeat;border:2px solid #92723d;border-radius:1px;box-shadow:4px 5px #132c2c99;color:#4c4e32;z-index:100;font-family:var(--sans);text-shadow:none; }
#room-tour::backdrop { background:transparent;pointer-events:none;backdrop-filter:none; }
#room-tour .tour-heading { display:flex;align-items:center;gap:15px;margin:0 0 9px; }
#room-tour .tour-kicker { color:#807044;font:8px/1.4 var(--pixel);letter-spacing:.2px; }
#room-tour #tour-count { margin-left:auto;font:8px/1.4 var(--pixel);color:#827045; }
#room-tour #tour-exit { width:28px;height:28px;display:grid;place-items:center;margin:-5px -8px -5px 0;padding:0;background:none;color:#6b5a38;font:25px/1 var(--sans); }
#room-tour .tour-title { font:600 23px/1.12 var(--sans);letter-spacing:0;color:#43543a;margin:0 0 7px;max-width:none; }
#room-tour .tour-copy { font:15px/1.4 var(--sans);letter-spacing:0;color:#655a3c;margin:0; }
#room-tour .tour-bottom { display:flex;align-items:center;gap:15px;margin-top:11px; }
#room-tour #tour-status { font:11px/1.3 var(--sans);color:#83734d;flex:1; }
#room-tour .tour-controls { display:flex;align-items:center;gap:7px;flex-shrink:0; }
#room-tour .tour-controls button { min-width:32px;min-height:32px;padding:4px 9px;border:1px solid #ac925c;background:#f0dfb4;color:#4d5a38;font:600 13px/1.2 var(--sans);box-shadow:1px 2px #c2a471; }
#room-tour .tour-controls button:hover:not(:disabled) { background:#fcf0cc; }
#room-tour button:focus-visible { outline:3px solid #365c46;outline-offset:3px; }
#room-tour button:disabled { opacity:.4;cursor:default; }
#room-tour .tour-progress { height:3px;margin-top:10px;background:#b6a17266;overflow:hidden; }
#room-tour .tour-progress span { display:block;height:100%;width:0;background:#6a8050;transition:width .2s linear; }
body.touring dialog[open] { max-height:calc(100svh - var(--tour-hud-height,220px) - 44px);margin:16px auto 0;animation:none;transform:none; }
body.touring .game-toolbar,body.touring .touch-controls { visibility:hidden; }
body.touring .nearby-prompt,body.touring .visitor-bubble { display:none; }
.album-photo.tour-photo-current { outline:3px solid #fbe1a4;outline-offset:5px; }
@media(max-width:760px) {
  .tour-start { top:126px;right:16px;padding:9px 11px;font-size:13px;gap:8px; }
  #room-tour { inset:auto 8px max(8px,env(safe-area-inset-bottom));width:calc(100vw - 16px);padding:13px 16px 11px;max-height:40svh; }
  #room-tour .tour-heading { margin-bottom:7px;gap:10px; }
  #room-tour .tour-kicker,#room-tour #tour-count { font-size:7px; }
  #room-tour .tour-title { font-size:20px;margin-bottom:6px; }
  #room-tour .tour-copy { font-size:14px;line-height:1.32; }
  #room-tour .tour-bottom { gap:9px;margin-top:9px; }
  #room-tour #tour-status { font-size:10px; }
  #room-tour .tour-controls { gap:5px; }
  #room-tour .tour-controls button { min-height:36px;padding:5px 8px;font-size:12px; }
  #room-tour .tour-progress { margin-top:8px; }
  body.touring dialog[open] { max-height:calc(100svh - var(--tour-hud-height,244px) - 28px);margin-top:8px; }
}
@media(max-width:380px) { #room-tour .tour-copy { font-size:13px; } #room-tour .tour-title { font-size:18px; } }
@media(prefers-reduced-motion:reduce) { #room-tour .tour-progress span,.tour-start { transition:none; } }

/* Fit the whole illustration above the guide instead of clipping its lower edge. */
body.touring .object-dialog:not(.arcade-dialog),body.touring .utility-dialog.tv-dialog{width:min(1080px,calc((100svh - var(--tour-hud-height,220px) - 44px)*1.5),calc(100vw - 24px))}
body.touring .book-dialog{width:min(1080px,calc((100svh - var(--tour-hud-height,220px) - 110px)*1.5),calc(100vw - 24px))}
body.touring .arcade-dialog{width:min(680px,calc((100svh - var(--tour-hud-height,220px) - 110px)*.8),calc(100vw - 24px))}
@media(max-width:760px){
body.touring .sofa-dialog,body.touring .drawer-dialog,body.touring .duoji-dialog,body.touring .fern-dialog,body.touring .globe-dialog,body.touring .trunk-dialog,body.touring .utility-dialog.tv-dialog{width:min(calc(100vw - 20px),calc((100svh - var(--tour-hud-height,220px) - 28px)/1.5))}
}

body.touring :is(.utility-dialog,.object-dialog).go-dialog{width:min(calc(100vw - 20px),calc((100svh - var(--tour-hud-height,220px) - 28px)/1.5));padding:0}
body.touring :is(.utility-dialog,.object-dialog).travel-dialog{width:min(920px,max(300px,calc((100svh - var(--tour-hud-height,220px) - 280px)*2)),calc(100vw - 24px));padding:24px 28px 20px;overflow:auto}
body.touring .travel-dialog .travel-intro,body.touring .travel-dialog .travel-places{display:none}
body.touring .travel-dialog h2{font-size:28px}
