/* Based on flat-to-3d by Samnang Aing (MIT) https://github.com/Sam1983Aing/flat-to-3d */
:root{--paper:#fff;--ink:#242a25;--mute:#70776e;--accent:#56634a;--line:#dce0d9}
*{box-sizing:border-box}html,body{margin:0;background:var(--paper);color:var(--ink);font-family:"Noto Sans JP",sans-serif;font-variant-numeric:tabular-nums}body{overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit}a{color:inherit;text-decoration:none}#scene{position:fixed;inset:0;width:100%;height:100%;display:block}.sheet-frame{position:fixed;inset:18px;border:1px solid var(--line);pointer-events:none;z-index:2}.sheet-frame:before,.sheet-frame:after{content:"";position:absolute;width:18px;height:18px;border-color:var(--accent)}.sheet-frame:before{top:-1px;left:-1px;border-top:2px solid;border-left:2px solid}.sheet-frame:after{right:-1px;bottom:-1px;border-bottom:2px solid;border-right:2px solid}
header{position:fixed;z-index:5;top:40px;left:52px;right:52px;display:flex;justify-content:space-between;align-items:flex-start}header a{font-size:16px;font-weight:600;letter-spacing:.12em}header a span{display:block;margin-top:8px;font-size:10px;letter-spacing:.1em;font-weight:400}.cg{font-size:10px;padding:8px 12px;border:1px solid #b7bfb3;background:#ffffffed;letter-spacing:.14em}
#intro{position:fixed;z-index:3;left:7.5vw;top:22vh;width:310px;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:.22em;color:var(--accent);margin:0 0 22px}h1{font-size:44px;font-weight:500;letter-spacing:.08em;line-height:1.55;margin:0}h1 span{font-size:38px;letter-spacing:.01em}.lead{font-size:17px;line-height:1.9;letter-spacing:.12em;margin-top:26px}.instruction{font-size:11px;line-height:2;color:var(--mute);margin:24px 0}dl{display:flex;gap:24px;border-top:1px solid var(--line);padding-top:18px;margin:0}dt{font-size:9px;color:var(--mute);margin-bottom:8px}dd{font-size:22px;margin:0}dd small{font-size:10px}.note{font-size:9px;line-height:1.9;color:var(--mute);margin-top:26px}
#labels{position:fixed;inset:0;pointer-events:none;z-index:2}.plan-label{position:absolute;transform:translate(-50%,-50%);text-align:center;white-space:nowrap;font-size:12px;line-height:1.65;font-weight:500;color:#181d19}.plan-label small{display:block;font-size:10px;font-weight:400}.plan-label.dim{font-size:10px;font-weight:400;color:#626b60;letter-spacing:.07em}
#caption{position:fixed;left:52px;top:135px;z-index:4;max-width:340px;padding:23px 26px;background:#fffffff0;border-left:2px solid var(--accent);opacity:0;pointer-events:none}#chapter{font-size:10px;letter-spacing:.16em;color:var(--accent);margin:0 0 12px}h2{font-size:27px;letter-spacing:.07em;font-weight:500;margin:0}#room-copy{font-size:12px;line-height:1.9;color:#60685d;margin:14px 0 0}#map{position:fixed;right:44px;bottom:125px;width:143px;z-index:4;padding:13px 15px;background:#ffffffed;border:1px solid var(--line);opacity:0}#map p{font-size:9px;margin:0 0 8px;display:flex;justify-content:space-between}#map p span{color:var(--mute)}#mini{display:block;width:100%;height:148px}#mini-rooms rect{fill:#f5f6f2;stroke:#90988a;stroke-width:.055}#mini-rooms rect.active{fill:#d9e2d2}#dot{fill:#56634a;stroke:white;stroke-width:.08}#route{fill:none;stroke:#56634a;stroke-width:.045;stroke-dasharray:.13 .13;opacity:.5}
#scroll-space{height:1550vh}footer{position:fixed;z-index:6;bottom:35px;left:52px;right:52px;display:flex;justify-content:space-between;align-items:center}.progress{position:absolute;left:0;right:0;top:-16px;height:1px;background:#cfd5ca}.progress i{display:block;height:2px;background:var(--accent);transform-origin:left;transform:scaleX(0)}#hint{font-size:10px;letter-spacing:.12em;background:#ffffffdb;padding:7px 0}#next{display:flex;align-items:center;gap:24px;border:0;background:var(--accent);color:white;padding:16px 21px;cursor:pointer;font-size:11px;letter-spacing:.1em}#next b{font-size:18px;font-weight:400}#stop-counter{font-size:10px;opacity:.78}#next:hover{background:#404d35}button:focus-visible,a:focus-visible{outline:3px solid #a7bb96;outline-offset:5px}#contact{position:fixed;left:52px;bottom:125px;font-size:12px;background:#fffffff2;padding:18px 24px;z-index:4;opacity:0;pointer-events:none}#loading{position:fixed;inset:0;display:grid;place-items:center;background:white;z-index:20;font-size:13px;letter-spacing:.12em}#loading.off{display:none}body.walk header a{background:#fffffff0;padding:9px 12px;margin:-9px -12px}
@media(max-width:700px){.sheet-frame{inset:10px}header{top:25px;left:25px;right:25px}header a{font-size:12px}header a span{font-size:8px;margin-top:5px;letter-spacing:0}.cg{font-size:8px;padding:6px 8px}#intro{left:27px;top:110px;width:calc(100% - 54px)}.eyebrow{font-size:9px;margin:0 0 10px;letter-spacing:.12em}h1{font-size:27px;line-height:1.4}h1 br{display:none}h1 span{font-size:26px}.lead{font-size:11px;line-height:1.7;margin:13px 0;letter-spacing:.1em}.lead br{display:none}.instruction{font-size:10px;position:fixed;bottom:111px;left:27px;line-height:1.65;margin:0}.instruction br{display:none}dl{display:none}.note{position:fixed;bottom:83px;left:27px;font-size:8px;margin:0;line-height:1.5}.note br{display:none}.plan-label{font-size:10px}.plan-label small{font-size:8px}.plan-label.dim{font-size:8px}#caption{top:98px;left:25px;max-width:calc(100% - 50px);padding:14px 16px}#chapter{font-size:9px;margin-bottom:7px}h2{font-size:21px}#room-copy{font-size:10px;line-height:1.8;margin-top:8px}#map{right:24px;bottom:108px;width:105px;padding:9px}#map p{font-size:8px}#mini{height:106px}footer{left:25px;right:25px;bottom:24px}#hint{font-size:8px;max-width:135px;line-height:1.7;letter-spacing:0}#next{gap:11px;padding:13px 12px;font-size:10px}#stop-counter{font-size:8px}#contact{bottom:108px;left:25px;padding:12px 9px;font-size:9px;max-width:220px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* v0.3: wrap only at meaningful phrase boundaries. */
h1,h2{word-break:keep-all;overflow-wrap:normal}h2 .heading-part{white-space:nowrap}#caption{max-width:390px}
@media(max-width:700px){#caption{max-width:calc(100% - 50px)}}

/* v0.3.6: reserve the lower equipment area at the last two stops. */
@media(max-width:700px){body.detail-stop #caption{left:15px;width:174px;padding:12px 10px}body.detail-stop h2{font-size:17px}body.detail-stop #room-copy{font-size:9px}body.detail-stop #map{right:15px;bottom:105px;width:70px;padding:5px}body.detail-stop #mini{height:70px}body.detail-stop #map p{font-size:6px}body.detail-stop #map p span{display:none}body.detail-stop #contact{top:235px;bottom:auto;left:15px;padding:8px;font-size:8px}}

body.bath-stop #contact{top:330px;bottom:auto}
@media(max-width:700px){body.bath-stop #map{top:85px;bottom:auto}body.bath-stop #contact{top:225px;bottom:auto}}

/* v0.3.8: keep the intro clear of the footer on short desktop windows. */
@media(min-width:701px) and (max-height:790px){#intro{top:100px}.eyebrow{margin-bottom:12px}h1{font-size:36px;line-height:1.4}h1 span{font-size:31px}.lead{font-size:15px;line-height:1.7;margin:14px 0 0}.instruction{margin:12px 0;line-height:1.7}dl{padding-top:12px}dt{margin-bottom:4px}dd{font-size:19px}.note{margin-top:12px;line-height:1.6}}
@media(min-width:701px) and (max-height:600px){#intro{top:96px}.instruction{display:none}dl{margin-top:12px}}
@media(min-width:701px) and (max-height:480px){dl{display:none}h1 br{display:none}h1{font-size:30px}h1 span{font-size:26px}.lead{font-size:13px;letter-spacing:.06em;margin-top:8px}.lead br{display:none}.note{margin-top:8px}}
/* v0.3.9: 3D を表示できないときの案内 */
#loading.failed{overflow:auto;align-content:center;gap:14px;padding:24px;text-align:center;letter-spacing:.04em;line-height:1.7}#loading.failed img{width:min(100%,560px);height:auto}#loading.failed p{margin:0}
/* v0.3.9: 図面の線や設備に重なっても読めるように、部屋の名札に文字ぶんの白地を敷く。スマホの注記は進み具合の線の上へ上げる */
.plan-label:not(.dim){background:rgba(255,255,255,.86);padding:0 3px;border-radius:2px;line-height:1.35}
@media(max-width:700px){.note{bottom:100px}.instruction{bottom:118px}}
@media(max-width:700px){.note{right:27px}}@media(max-width:700px) and (max-height:620px){.instruction{display:none}}
#hint{white-space:pre-line}
/* v0.3.9: 横向きのスマホでは箱が下の線や地図に重なり、問い合わせ先が画面の外へ出るので、小さくまとめる */
@media(min-width:701px) and (max-height:480px){header{top:18px}#intro{top:72px}#caption{top:70px;padding:10px 14px;max-width:300px}h2{font-size:18px}#chapter{font-size:9px;margin-bottom:5px}#room-copy{font-size:10px;line-height:1.6;margin-top:5px}#map{right:44px;bottom:68px;width:96px;padding:7px 9px}#map p{font-size:8px;margin-bottom:4px}footer{bottom:12px}.progress{top:-8px}#next{padding:10px 14px}#contact,body.bath-stop #contact{top:auto;bottom:72px;padding:8px 14px;font-size:10px}}
@media(max-width:700px) and (max-height:480px) and (orientation:landscape){#intro{top:68px;width:280px}h1{font-size:22px}h1 span{font-size:21px}.note{right:auto;max-width:270px;bottom:88px}body.bath-stop #contact{top:98px;left:199px;bottom:auto}}
#contact.on{pointer-events:auto}
