:root{
  --ink:#f3eee5; --ink-dim:#b9b1a4;                    /* text on dark panels */
  --glass:rgba(22,19,16,.74); --line:rgba(255,255,255,.12);
  --gold:#cfae6c; --gold-ink:#1d1710; --radius:14px;
  --serif:Georgia, Gelasio, serif; --sans:"Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#15120f;color:var(--ink);font-family:var(--sans);-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit}
.glass{background:var(--glass);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 40px rgba(0,0,0,.35)}
.hidden{display:none!important}
.btn{background:var(--gold);color:var(--gold-ink);border:0;padding:13px 26px;border-radius:999px;font-weight:400;font-size:14px;cursor:pointer;letter-spacing:.03em}
.btn:hover{filter:brightness(1.08)}
.btn:disabled{opacity:.5;cursor:default}

/* ---------- the 3D view and its cursors ---------- */
#stage{transition:opacity .15s linear;position:fixed;inset:0;touch-action:none}
#stage canvas{display:block;width:100%;height:100%;cursor:default}   /* nothing to click here: the plain arrow */
#stage.dragging canvas{cursor:grabbing}                              /* looking around */
#stage.hovering canvas{cursor:pointer}                               /* something to click: a place to walk to, a work, a wall text… */
#stage.zoomable canvas{cursor:zoom-in}
#stage.goup canvas{cursor:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3E%3Cpath%20d='M14%203L24%2014H18V25H10V14H4Z'%20fill='white'%20stroke='black'%20stroke-width='1.6'%20stroke-linejoin='round'/%3E%3C/svg%3E") 14 14,n-resize}       /* the stairs: up to the other floor */
#stage.godown canvas{cursor:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3E%3Cpath%20d='M14%2025L24%2014H18V3H10V14H4Z'%20fill='white'%20stroke='black'%20stroke-width='1.6'%20stroke-linejoin='round'/%3E%3C/svg%3E") 14 14,s-resize}   /* … or down */            /* in front of a work: click to see it in full */

/* ---------- top left: title and room ---------- */
#hud{position:fixed;left:50%;bottom:calc(7px + env(safe-area-inset-bottom, 0px));transform:translateX(-50%);pointer-events:none;z-index:6;
  display:flex;align-items:baseline;gap:7px;white-space:nowrap;max-width:calc(100vw - 24px);overflow:hidden;text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 6px rgba(0,0,0,.8),0 0 14px rgba(0,0,0,.5)}   /* plain text, no panel: not a button */
#hud .t{font-family:var(--serif);font-size:12.5px;color:var(--ink);letter-spacing:.01em}
#hud .sepd{color:var(--ink-dim);font-size:11px}
#hud .r{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);overflow:hidden;text-overflow:ellipsis}

/* ---------- navigation bar ---------- */
#bar{position:fixed;left:50%;bottom:calc(28px + env(safe-area-inset-bottom, 0px));transform:translateX(-50%);display:flex;gap:4px;padding:6px;align-items:center}
#bar button,#bar a.barlink{background:none;border:0;padding:9px 13px;border-radius:10px;cursor:pointer;font-size:13px;display:flex;gap:7px;align-items:center;white-space:nowrap;color:var(--ink);text-decoration:none}
#bar button:hover,#bar a.barlink:hover{background:rgba(255,255,255,.09)}
#bar button.on{background:var(--gold);color:var(--gold-ink)}
#bar button.soon{position:relative;color:rgba(243,238,229,.38);cursor:default}   /* not yet open (the Walk button): dimmed; a click says "Coming soon" */
#bar button.soon:hover{background:none}
#bar button.soon .tipBubble{left:50%;transform:translate(-50%,6px)}
#bar button.soon .tipBubble.show{transform:translate(-50%,0)}
#bar button.soon .tipBubble::after{left:calc(50% - 5px)}
#bar .sep{width:1px;height:22px;background:var(--line);margin:0 4px}
#bar svg{width:17px;height:17px;flex:none}
#bar #bTour{display:none}   /* the Tour button is hidden for now (the guided tour still works: js/visitor/tour.js) */
/* Tour button: ▶ when stopped, ❙❙ while touring; during a stop it fills up from the left
   (--progress goes 0 → 1, set by js/visitor/tour.js) to show when the tour moves on */
#bTour{position:relative;overflow:hidden}
#bTour > *{position:relative}
#bTour .i-pause{display:none}
#bTour.touring .i-play{display:none}
#bTour.touring .i-pause{display:block}
#bTour .cd{font-variant-numeric:tabular-nums;font-weight:400;min-width:1ch;color:var(--gold)}
#bTour .cd:empty{display:none}
#bTour::before{content:'';position:absolute;left:0;top:0;bottom:0;width:calc(var(--progress, 0) * 100%);background:rgba(207,174,108,.42);pointer-events:none}
@media (max-width:720px){ #bar .lbl{display:none} #bar #bTour.touring .lbl{display:inline;font-variant-numeric:tabular-nums} #bar button,#bar a.barlink{padding:10px 7px} #bar{gap:0;padding:5px;max-width:calc(100vw - 12px)} #bar .sep{margin:0 2px} }

/* ---------- artwork card (white) ----------
   Set like a museum label: the title in the serif, the medium in serif italic, small gold capitals for
   the room and the "Details" heading, and the story itself in the serif at a comfortable reading size. */
#info{position:fixed;right:18px;bottom:94px;width:min(392px,calc(100vw - 36px));padding:20px 24px 16px;transition:opacity .35s, transform .35s, left .35s;
  background:#fbf8f2;color:#1c1814;border-color:rgba(60,45,20,.1);border-radius:12px;box-shadow:0 14px 44px rgba(0,0,0,.26), 0 1px 0 rgba(255,255,255,.6) inset}
#info.off{opacity:0;transform:translateX(56px);pointer-events:none}   /* it slides in from the right */
#info{font-family:var(--serif);line-height:1.6}
#info .count{font-family:var(--sans);font-size:10.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#a07c3c;padding-right:28px}
#info h2{font-family:var(--serif);font-weight:400;font-size:25px;line-height:1.18;letter-spacing:-.005em;color:#1c1814;margin:9px 0 4px}
#info .meta{font-family:var(--serif);font-style:italic;font-size:14.5px;color:#6e665c}
/* the story sits in a gold double-ruled frame; its "Details" heading is set into the top rule like a legend */
#info .storyhead{display:flex;align-items:center;gap:7px;width:max-content;position:relative;z-index:1;margin:19px 0 -8px 15px;padding:0 8px;background:#fbf8f2;
  font-family:var(--sans);font-size:10.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#a07c3c}
#info .storyhead svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;flex:none}
#info .desc{font-family:var(--serif);font-style:italic;font-size:15px;line-height:1.62;color:#6e665c;margin:0 3px;padding:17px 18px 14px;max-height:30vh;overflow:auto;text-wrap:pretty;
  border:1px solid rgba(184,146,72,.62);border-radius:3px;outline:1px solid rgba(184,146,72,.3);outline-offset:3px;
  background:linear-gradient(180deg,rgba(214,178,98,.075),rgba(214,178,98,.025));scrollbar-width:thin;scrollbar-color:rgba(184,146,72,.45) transparent}
#info .desc p{margin:0;white-space:pre-line}
#info .desc p + p{margin-top:.75em}
#info .desc p.zh{font-family:"Noto Serif TC","Songti TC","Source Han Serif TC","PMingLiU",serif;font-style:normal;font-size:14px;line-height:1.8;color:#7a7268;letter-spacing:.03em}
#info .desc p + p.zh{margin-top:.6em;padding-top:.6em;border-top:1px solid rgba(184,146,72,.22)}
#info a{display:inline-block;font-family:var(--sans);color:#8a6623;font-size:12.5px;font-weight:600;letter-spacing:.03em;text-decoration:none;border-bottom:1px solid rgba(138,102,35,.35)}
#info .foot{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:14px;row-gap:6px;margin-top:15px}   /* ♡, link button and the post link left, the credit right */
#info .foot .credit{margin-left:auto}
#info .credit{font-family:var(--serif);font-style:italic;font-size:12.5px;color:#8a8278;margin-left:auto;white-space:nowrap}
#info .hidden{display:none}
/* phones: as wide as the Map panel and low on the screen, with smaller text */
@media (max-width:720px){
  #info{left:12px;right:12px;bottom:86px;width:auto;padding:13px 16px 12px;line-height:1.5}
  #info .count{font-size:9.5px}
  #info h2{font-size:19px;margin:5px 0 2px}
  #info .meta{font-size:12.5px}
  #info .storyhead{margin:12px 0 -7px 11px;padding:0 6px;font-size:9.5px}
  #info .desc{font-size:13px;line-height:1.55;padding:13px 13px 10px;max-height:24vh}   /* room for a two-language story; longer ones scroll */
  #info .desc p.zh{font-size:12.5px}
  #info a{font-size:11.5px}
  #info .foot{margin-top:9px}
  #info .credit{font-size:11px}
  #info .x{top:4px;right:4px}
}
#info{display:flex;flex-direction:column;max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);box-sizing:border-box}
#info .desc{flex:0 1 auto;min-height:3.2em}
#info .credit:empty{display:none}
#info .foot:has(.credit:empty){display:none}
/* the work's buttons at the top of the card: ♥ like (count inside), share, the original post: big and labelled */
#info .acts{display:flex;gap:14px;margin:0 0 10px;padding-right:28px;flex:none}
#info .act{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;padding:0;cursor:pointer;color:#7a5a20;text-decoration:none;font:600 11.5px var(--sans);letter-spacing:.04em;border-bottom:0}
#info .act.hidden{display:none}
#info .act .ic{position:relative;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#fff;border:1.5px solid rgba(184,146,72,.6);color:#9a7428;transition:background .2s, transform .2s}
#info .act svg{width:24px;height:24px}
#info .act:hover .ic{background:#fbf1dc;transform:scale(1.05)}
#info #infoFav svg{width:30px;height:30px}
#info #infoFav.on .ic{background:var(--gold);border-color:var(--gold);color:#fff8e6}
#info #infoFav.on svg{fill:none;stroke-width:1.8}
#info .act .hn{position:absolute;inset:0;display:grid;place-items:center;padding-bottom:2px;font:700 10.5px var(--sans);letter-spacing:0;color:#7a5a20;pointer-events:none}
#info #infoFav.on .hn{color:#fff8e6}
@media (max-width:720px){ #info .acts{gap:14px;margin-bottom:9px} #info .act .ic{width:46px;height:46px} }
#info .x{position:absolute;right:10px;top:10px;background:none;border:0;color:#8a8278;cursor:pointer;font-size:18px;padding:4px 8px}
#info .x:hover{color:#1f1b17}

/* ---------- map panel ---------- */
#map{position:fixed;left:50%;bottom:86px;transform:translateX(-50%);padding:10px 12px 12px;width:min(1240px,calc(100vw - 24px));z-index:7}
#map .mwrap{overflow-x:auto;overflow-y:hidden}
#map canvas{display:block;margin:0 auto;border-radius:6px}
#map .cap{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-dim);margin:0 2px 8px;display:flex;justify-content:space-between;gap:12px}
#map .cap span:first-child{color:var(--gold)}
#map .dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#fff;vertical-align:middle;margin:0 2px 1px 4px}
body.mapopen #watch, body.mapopen #visit, body.mapopen #farewell, body.mapopen #welcome, body.mapopen #linkbox{display:none}
body.mapopen #info{bottom:calc(var(--mapH, 200px) + 98px)}

/* ---------- room banner and tooltip ---------- */
#banner{position:fixed;left:50%;top:18%;transform:translate(-50%,0);text-align:center;pointer-events:none;transition:opacity .9s,transform .9s;z-index:5;text-shadow:0 2px 24px rgba(0,0,0,.6)}
#banner.off{opacity:0;transform:translate(-50%,10px)}
#banner .n{font-size:12px;letter-spacing:.32em;text-transform:uppercase;color:var(--gold)}
#banner .t{font-family:var(--serif);font-weight:400;font-size:clamp(34px,5vw,60px);line-height:1.05;margin-top:8px;max-width:80vw}
#banner .m{font-size:13px;color:#e8e1d5;margin-top:10px;letter-spacing:.06em}
#tip{position:fixed;pointer-events:none;padding:6px 10px;font-size:12px;border-radius:8px;transform:translate(14px,14px);white-space:nowrap}
#toast{position:fixed;top:18px;left:50%;transform:translateX(-50%);padding:10px 16px;font-size:13px;z-index:40;max-width:calc(100vw - 40px)}

/* ---------- full picture ---------- */
#lightbox{position:fixed;inset:0;z-index:70;background:rgba(8,7,6,.97);display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;padding:24px 24px 16px;cursor:zoom-out}
#lightbox.hidden{display:none}
#lightbox .stage{min-height:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;gap:28px}
#lightbox img{max-width:calc(94vw - 110px);max-height:100%;min-width:0;object-fit:contain;box-shadow:0 30px 120px rgba(0,0,0,.8);background:#111}
#lightbox img.round{border-radius:50%;background:none}
#lightbox .cap{text-align:center;margin-top:14px;width:min(760px,86vw)}
#lightbox .c{font-family:var(--sans);font-size:10.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#c9a35e;margin-bottom:4px}
/* caption in the museum's lettering (Cormorant Garamond), like the gold titles on the walls */
#lightbox .cap{font-family:var(--serif)}
#lightbox .t{font-size:27px;font-weight:400;letter-spacing:.01em;line-height:1.2}
#lightbox .m{color:var(--ink-dim);font-size:16px;font-style:italic;font-weight:500;margin-top:2px}
#lightbox .d{font-style:italic;font-size:15px;line-height:1.6;color:#d8d0c3;text-align:left;max-height:min(19vh,170px);overflow:auto;margin:10px 0 0;padding:10px 18px 2px;border-top:1px solid rgba(207,174,108,.25);cursor:auto;text-wrap:pretty;scrollbar-width:thin;scrollbar-color:rgba(207,174,108,.55) transparent}   /* the story: scrolls when long */
#lightbox .d p{margin:0;white-space:pre-line}
#lightbox .d p + p{margin-top:.7em}
#lightbox .d p.zh{font-family:"Noto Serif TC","Songti TC","Source Han Serif TC","PMingLiU",serif;font-style:normal;font-size:14px;line-height:1.8;color:#c9c0b3;letter-spacing:.03em}
#lightbox .d.hidden{display:none}
#lightbox .cr{font-style:italic;font-size:12.5px;color:#8f877c;text-align:right;margin-top:4px}
#lightbox .cr:empty{display:none}
/* beside the picture: ♡ (vote), share, the original post, big and labelled */
#lightbox .acts{flex:none;display:flex;flex-direction:column;gap:20px;cursor:auto;transition:opacity .2s}
#lightbox .acts.hidden,#lightbox .act.hidden{display:none}
#lightbox .act{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;background:none;border:0;padding:0;color:var(--ink);cursor:pointer;text-decoration:none;font:500 12px var(--sans);letter-spacing:.05em}
#lightbox .act .ic{position:relative;width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.07);border:1.5px solid rgba(207,174,108,.55);color:var(--gold);transition:background .2s, transform .2s}
#lightbox .act svg{width:27px;height:27px}
#lightbox .act:hover .ic{background:rgba(207,174,108,.2);transform:scale(1.06)}
#lightbox #lbFav.on .ic{background:var(--gold);border-color:var(--gold);color:var(--gold-ink)}
#lightbox #lbFav.on svg{fill:currentColor}
#lightbox #lbFav svg{width:38px;height:38px}
#lightbox .act .hn{position:absolute;inset:0;display:grid;place-items:center;padding-bottom:2px;font:700 12px var(--sans);letter-spacing:0;color:var(--gold);pointer-events:none}
#lightbox #lbFav.on .hn{color:var(--gold)}
#lightbox #lbFav.on svg{color:var(--gold-ink)}
#lightbox .act .tipBubble{left:50%;transform:translate(-50%,6px)}
#lightbox .act .tipBubble.show{transform:translate(-50%,0)}
#lightbox .act .tipBubble::after{left:calc(50% - 5px)}
#lightbox.zoomed .acts{opacity:0;pointer-events:none}
#lightbox img{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;transform-origin:50% 50%;will-change:transform}
#lightbox.zoomed img{cursor:grab}
#lightbox.zoomed.panning img{cursor:grabbing}
#lightbox .cap{position:relative;z-index:1;transition:opacity .2s}
#lightbox.zoomed .cap{opacity:0;pointer-events:none}   /* out of the way while zoomed in */
#lightbox .zh{font-size:14px;font-style:italic;color:var(--ink-dim);margin-top:6px;letter-spacing:-0.02em}
#lightbox .zoom{position:absolute;right:62px;top:12px;display:flex;gap:4px;z-index:2;background:rgba(30,26,22,.8);border:1px solid var(--line);border-radius:10px;padding:4px}
#lightbox .zoom button{background:none;border:0;color:var(--ink);font:inherit;font-size:15px;min-width:34px;height:30px;border-radius:7px;cursor:pointer}
#lightbox .zoom button:hover{background:rgba(255,255,255,.1)}
#lightbox .x{position:absolute;right:18px;top:12px;background:none;border:0;color:#fff;font-size:26px;cursor:pointer}

/* ---------- film player ---------- */
#theater{position:fixed;inset:0;z-index:60;background:rgba(4,4,6,.94);display:flex;align-items:center;justify-content:center;padding:20px}
#theater .box{width:min(94vw,calc(80vh * 16 / 9));position:relative}
#theater .frame{position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:6px;overflow:hidden;box-shadow:0 30px 120px rgba(0,0,0,.8)}
#theater .fbbox{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}
#theater .frame .sound{position:absolute;left:50%;bottom:64px;transform:translateX(-50%);background:var(--gold);color:var(--gold-ink);border:0;border-radius:999px;padding:12px 24px;font-size:15px;cursor:pointer;box-shadow:0 8px 30px rgba(0,0,0,.5)}
#theater .frame iframe,#theater .frame video{width:100%;height:100%;border:0;display:block;background:#000}
#theater .cap{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-top:14px;flex-wrap:wrap}
#theater .t{font-family:var(--serif);font-size:26px;font-weight:400}
#theater .m{color:var(--ink-dim);font-size:13px;margin-top:2px}
#theater .links{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#theater .links a{color:var(--gold);font-size:14px;text-decoration:none;border-bottom:1px solid rgba(207,174,108,.4)}
#theater .links button{background:rgba(255,255,255,.08);border:1px solid var(--line);color:var(--ink);border-radius:8px;padding:6px 12px;cursor:pointer}
#theater .links button.on{background:var(--gold);color:var(--gold-ink)}
#theater .ext{position:relative;width:100%;height:100%;background:#000}
#theater .ext img{width:100%;height:100%;object-fit:cover;filter:brightness(.42) blur(1px);display:block}
#theater .ext .ov{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:20px;text-align:center}
#theater .ext .btn{font-size:18px;padding:16px 30px;text-decoration:none}
#theater .ext .note{font-size:13px;color:#e6dfd3;max-width:460px;line-height:1.5}
#theater .x{position:absolute;right:-6px;top:-44px;background:none;border:0;color:#fff;font-size:24px;cursor:pointer}
#watch,#visit{position:fixed;left:50%;bottom:94px;transform:translateX(-50%);z-index:6;box-shadow:0 10px 40px rgba(0,0,0,.4)}
#visit{text-decoration:none;white-space:pre}

/* ---------- link boxes (last room, kiosks) ---------- */
#farewell,#welcome,#linkbox{position:fixed;left:50%;bottom:94px;transform:translateX(-50%);padding:16px 26px;text-align:center;z-index:6}
#linkbox{z-index:8}
#farewell .t,#welcome .t,#linkbox .t{font-family:var(--serif);font-size:22px;font-weight:400;margin-bottom:10px}
#farewell .u,#linkbox .u{font-size:11px;color:var(--ink-dim);margin-top:8px;letter-spacing:.08em}
#farewell .btn,#welcome .btn,#linkbox .btn{display:inline-block;text-decoration:none}
#farewellBack{display:block;margin:12px auto 0;background:transparent;color:var(--ink);border:1px solid var(--line)}
#farewellBack:hover{background:rgba(255,255,255,.08)}
#welcomeStart{display:block;margin:12px auto 0;background:var(--gold);color:var(--gold-ink);border:1.5px solid var(--gold);font-weight:600}   /* solid gold: the one to press */
#welcomeStart:hover{filter:brightness(1.08)}
#help .helpBtns{margin-top:24px;display:flex;gap:10px;justify-content:center;flex-wrap:wrap}   /* (the help card: the tips again, or Got it) */
#helpTips{background:transparent;color:var(--gold);border:1.5px solid var(--gold)}
#helpTips:hover{background:rgba(207,174,108,.12);filter:none}
#welcome.returning #welcomeStart{background:transparent;color:var(--gold);border:1.5px solid var(--gold);font-weight:500}   /* back at the entrance: only outlined */
#welcome.returning #welcomeStart:hover{background:rgba(207,174,108,.12);filter:none}

/* ---------- tips for getting around (js/ui/tips.js; #tips and #tipsArrows in index.html): in the welcome box's place ---------- */
#tips{position:fixed;left:50%;bottom:94px;transform:translateX(-50%);z-index:7;width:min(400px,calc(100vw - 24px));box-sizing:border-box;padding:18px 22px 12px;text-align:left}
#tips .tp-list{list-style:none;margin:0;padding:0 18px 0 0;display:grid;gap:8px}
#tips .tp-list li{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.45;color:var(--ink)}
#tips .tp-list b{color:#ffd98a;font-weight:600}
#tips .tp-n{flex:none;width:21px;height:21px;border-radius:50%;background:#ffc452;color:#2a1d08;font:700 11.5px/21px var(--sans);text-align:center;margin-top:-1px;box-shadow:0 0 10px rgba(255,180,70,.6)}
#tips .tp-btns{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
#tips .tp-skip{background:none;border:0;color:var(--ink-dim);font:500 13px var(--sans);cursor:pointer;padding:8px 4px;text-decoration:underline;text-underline-offset:3px}
#tips .tp-skip:hover{color:var(--ink)}
#tips .tp-nav{margin-left:auto;display:flex;align-items:center;gap:8px}
#tips .tp-arr{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid var(--line);color:var(--ink);cursor:pointer;padding:0}
#tips .tp-arr svg{width:20px;height:20px}
#tips .tp-arr:hover:not(:disabled){background:rgba(255,255,255,.16)}
#tips .tp-arr:disabled{opacity:.3;cursor:default}
#tips .tp-arr.tp-done{width:auto;height:38px;border-radius:999px;padding:0 18px;background:var(--gold);border-color:var(--gold);color:var(--gold-ink);font:600 13.5px var(--sans)}
#tips .tp-dots{display:flex;gap:6px}
#tips .tp-dots button{width:8px;height:8px;border-radius:50%;border:0;padding:0;background:rgba(243,238,229,.3);cursor:pointer}
#tips .tp-dots button.on{background:#ffc452;box-shadow:0 0 6px rgba(255,180,70,.7)}
#tips .x{position:absolute;right:6px;top:4px;background:none;border:0;color:var(--ink-dim);cursor:pointer;font-size:16px}
body.mapopen #tips{display:none}
#tipsArrows{position:fixed;inset:0;width:100vw;height:100vh;z-index:6;pointer-events:none;overflow:visible}
/* the arrows: in the stair flames' colours, flowing towards what they point at, and breathing */
#tipsArrows .ta-glow{fill:none;stroke:rgba(255,150,40,.45);stroke-width:11;stroke-linecap:round;filter:blur(4px)}
#tipsArrows .ta-path{fill:none;stroke:#ffe6a6;stroke-width:3.5;stroke-linecap:round;stroke-dasharray:12 9;animation:taFlow .9s linear infinite}
#tipsArrows .ta-head{fill:#ffe6a6;stroke:#ffb347;stroke-width:1.5;stroke-linejoin:round}
#tipsArrows .ta,#tipsArrows .tb{animation:taBreathe 1.3s ease-in-out infinite;filter:drop-shadow(0 0 6px rgba(255,190,90,.9))}
#tipsArrows .ta-hit{fill:none;stroke:#fff3cf;stroke-width:2.5;transform-box:fill-box;transform-origin:center;animation:taPing 1.3s ease-out infinite}
#tipsArrows .ta-n{fill:#ffc452;stroke:#fff3cf;stroke-width:1.5}
#tipsArrows .ta-t{fill:#2a1d08;font:700 12px var(--sans);text-anchor:middle}
#tipsArrows .tb-ring{fill:rgba(255,196,82,.12);stroke:#ffd27a;stroke-width:2.5}
@keyframes taFlow{to{stroke-dashoffset:-21}}
@keyframes taBreathe{0%,100%{opacity:.6}50%{opacity:1}}
@keyframes taPing{0%{transform:scale(.55);opacity:1}100%{transform:scale(1.5);opacity:0}}
@media (max-width:720px){ #tips{bottom:86px;padding:15px 16px 10px} #tips .tp-list li{font-size:13px} }
/* black fade used when jumping back to the entrance, and between floors on the stairs */
#fade{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;transition:opacity .45s;z-index:60}
#fade.on{opacity:1;pointer-events:auto}
#lkL{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
#linkbox .x,#farewell .x,#welcome .x{position:absolute;right:6px;top:4px;background:none;border:0;color:var(--ink-dim);cursor:pointer;font-size:16px}

/* ---------- entry card and help ---------- */
.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(12,10,8,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:20;padding:20px}
.card{max-width:520px;width:100%;padding:34px 34px 28px;text-align:center;max-height:calc(100vh - 40px);overflow:auto}
.card h1{font-family:var(--serif);font-weight:400;font-size:clamp(34px,6vw,52px);line-height:1;margin:0 0 8px;text-wrap:balance}
.card h1 .l1,.card h1 .l2{display:block;white-space:nowrap}
.card h1 .l2{font-size:.62em;font-weight:500;letter-spacing:.08em;margin-top:.22em}
.card .sub{color:var(--ink-dim);letter-spacing:.12em;text-transform:uppercase;font-size:12px}
.card .rule{width:60px;height:1px;background:var(--gold);margin:22px auto}
.card .actions{margin-top:26px;display:flex;flex-direction:column;align-items:center;gap:12px}
.avatar{width:104px;height:104px;border-radius:50%;object-fit:cover;display:block;margin:0 auto 14px;box-shadow:0 6px 30px rgba(0,0,0,.4)}
.galink{color:var(--gold);font-size:13px;letter-spacing:.04em;text-decoration:none;border-bottom:1px solid rgba(207,174,108,.4);padding-bottom:1px}
.keys{display:grid;grid-template-columns:104px 1fr;gap:10px 16px;align-items:center;text-align:left;font-size:13px;line-height:1.45;color:#ddd5c8;margin:0 auto;max-width:400px}
.keys b{font-weight:500;color:var(--ink)}
.keys .hv{display:flex;justify-content:center;align-items:center;min-height:34px}
.keys .hv svg{display:block;overflow:visible}
.keys .hv svg *{fill:none;stroke-linecap:round;stroke-linejoin:round}
.keys .hv .i{stroke:rgba(243,238,229,.72);stroke-width:1.05}
.keys .hv .d{stroke:rgba(185,177,164,.75);stroke-width:.9}
.keys .hv .g{stroke:var(--gold);stroke-width:1.1}
.keys .hv use.i{stroke-width:1.1}
.keys .hv use.h{stroke:rgba(22,19,16,.9);stroke-width:3.8}
.keys .hvs{position:relative;width:80px}
.keys .hvs canvas,.keys .hvs svg{position:absolute;left:0;top:0;width:100%;height:100%}
.keys .kcl{display:flex;gap:6px;align-items:flex-end}
.keys .kcl.turn{gap:3px;align-items:center}
.keys .kcl i{font-style:normal;font-size:11px;color:var(--ink-dim);margin:0 3px}
.keys .tcl{display:grid;grid-template-columns:repeat(3,20px);gap:3px}
.keys .tcl .up{grid-column:2}
.keys .tcl kbd:nth-child(2){grid-column:1}
.keys .arr{display:flex;flex-direction:column;gap:3px}
/* keyboard keys: grey keycaps in the panels' glass style */
kbd{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:20px;height:20px;padding:0 5px;font-family:var(--sans);font-size:11px;font-weight:500;line-height:1;color:var(--ink);background:linear-gradient(rgba(255,255,255,.17),rgba(255,255,255,.09));border:1px solid rgba(255,255,255,.14);border-bottom:2px solid rgba(0,0,0,.4);border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.35)}
kbd.wide{padding:0 9px;min-width:58px}
.keys span kbd{min-width:17px;height:17px;padding:0 4px;font-size:10px;vertical-align:1px}
.keys .hv kbd{min-width:20px;height:20px;font-size:11px;vertical-align:0}
.keys .hv kbd.wide{min-width:58px;padding:0 9px}
#loadmsg{font-size:12px;color:var(--ink-dim);min-height:16px}   /* "Hanging artwork 12 of 95…", between the button and the gallery link */
.hint{font-size:12px;color:var(--ink-dim);margin-top:16px;line-height:1.5}
@media (max-height:720px){ .card{padding:22px 26px 18px} .card h1{font-size:34px} .card .rule{margin:12px auto} .avatar{width:68px;height:68px;margin-bottom:8px} .keys{gap:5px 14px} }

/* ---------- ♡ favourite button on the artwork card (js/ui/favourite.js) ----------
   In the card's small gold sans-serif, like the "View original post" link beside it. */
#bShare{position:relative}
.tipBubble{position:absolute;z-index:5;left:-4px;bottom:calc(100% + 9px);transform:translateY(6px);white-space:nowrap;pointer-events:none;opacity:0;
  background:#2a241c;color:#f6e7c4;font-family:var(--serif);font-style:italic;font-weight:400;font-size:13px;letter-spacing:0;padding:6px 12px;border-radius:999px;
  box-shadow:0 6px 18px rgba(0,0,0,.25);transition:opacity .25s, transform .35s}
.tipBubble::after{content:'';position:absolute;left:18px;top:100%;border:5px solid transparent;border-top-color:#2a241c}
.tipBubble.show{opacity:1;transform:none}

/* ---------- guestbook (js/ui/guestbook.js; the panel is #guestbook in index.html) ---------- */
#guestbook .gb{position:relative;text-align:left}
#guestbook h1,#guestbook .sub{text-align:center}
#gbX{position:absolute;right:10px;top:8px;background:none;border:0;color:var(--ink-dim);cursor:pointer;font-size:18px}
#gbForm{display:flex;flex-direction:column;gap:10px}
#gbForm input,#gbForm textarea{font:inherit;font-size:14px;color:var(--ink);background:rgba(255,255,255,.06);
  border:1px solid var(--line);border-radius:10px;padding:10px 12px;resize:vertical}
#gbForm input:focus,#gbForm textarea:focus{outline:none;border-color:var(--gold)}
#gbForm .btn{align-self:center;margin-top:4px}
#gbForm .trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}   /* the spam-robot trap, out of sight */
#gbStatus{min-height:18px;font-size:13px;color:var(--gold);text-align:center}
/* "Read the guestbook" under the form */
.gbReadRow{text-align:center;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
#gbRead{background:transparent;color:var(--ink);border:1px solid var(--line);font-size:13px;padding:10px 22px}
#gbRead:hover{background:rgba(255,255,255,.08)}

/* ---------- reading the guestbook: notes scattered over a dark wall, like the far wall of the last room ---------- */
#gbView{padding:28px}
#gbView .gbv{position:relative;width:min(1180px,100%);height:min(780px,100%);display:flex;flex-direction:column;border-radius:var(--radius);overflow:hidden;
  background:radial-gradient(120% 90% at 50% 45%,#34435a 0%,#2d3a4f 55%,#232e40 100%);border:1px solid rgba(207,174,108,.28);
  box-shadow:0 24px 70px rgba(0,0,0,.5), inset 0 0 0 6px rgba(0,0,0,.08), inset 0 0 0 7px rgba(207,174,108,.18)}
.gbvBar{position:absolute;top:0;left:0;right:0;z-index:2;display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:12px 14px;pointer-events:none}
.gbvBar > *{pointer-events:auto}
.gbvBtn{background:rgba(20,26,36,.55);color:#e6dccb;border:1px solid rgba(207,174,108,.35);border-radius:999px;padding:6px 14px;font-family:var(--sans);font-size:12px;letter-spacing:.04em;cursor:pointer;
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.gbvBtn:hover{background:rgba(207,174,108,.18)}
#gbvSign{background:var(--gold);color:var(--gold-ink);border-color:var(--gold)} #gbvSign:hover{filter:brightness(1.07);background:var(--gold)}   /* gold, like the other Sign buttons */
.gbvScroll{flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(207,174,108,.4) transparent}
.gbvWall{position:relative;width:100%}
.gbvTitle{position:absolute;text-align:center;white-space:nowrap;padding:4px 10px}
.gbvTitle .t{font-family:var(--serif);font-size:52px;line-height:1.1;color:#dcb86a;letter-spacing:.01em;text-shadow:0 0 18px rgba(220,184,106,.25)}
.gbvTitle .r{width:90px;height:2px;margin:12px auto 10px;background:#b8955a;opacity:.9}
.gbvTitle .s{font-family:var(--sans);font-size:12px;font-weight:300;letter-spacing:.32em;text-transform:uppercase;color:#d8cfbf;opacity:.8}
.gbn{position:absolute;color:#c9c2b6;animation:gbnIn .7s ease both}
.gbn .m{font-family:var(--serif);font-style:italic;font-weight:400;white-space:pre}
.gbn .w{font-family:var(--sans);font-weight:600;letter-spacing:.08em;color:#a99a7c;text-align:right;margin-top:.45em;white-space:nowrap}
@keyframes gbnIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (max-width:720px){
  #gbView{padding:10px}
  .gbvTitle .t{font-size:36px}
  .gbvTitle .s{font-size:10px;letter-spacing:.24em}
  .gbvBtn{font-size:11px;padding:5px 11px}
}
/* "Sign the guestbook" in the last room's box, styled like "Back to the entrance" */
#farewellBook{display:block;margin:12px auto 0;background:var(--gold);color:var(--gold-ink);border:1px solid var(--gold)}   /* gold, like the guestbook's own button */
#farewellBook:hover{filter:brightness(1.07)}
#welcomeBook{display:block;margin:12px auto 0;background:transparent;color:var(--gold);border:1.5px solid var(--gold)}   /* gold outline: there, but second */
#welcomeBook:hover{background:rgba(207,174,108,.12)}
/* the guestbook's pen (same as in the navigation bar) inside its buttons */
.penIcon{width:1.15em;height:1.15em;vertical-align:-.22em;margin-right:.45em;flex:none}
/* the link button beside the ♡ on the card */
/* the entry card when it was opened from a shared link: where "Enter" leads */
#introTo{margin-top:10px;font-family:var(--serif);font-style:italic;font-size:14px;color:var(--ink-2, #cfc6b6);opacity:.9}
#introTo b{font-weight:400;color:var(--gold)}
/* ---------- Visitors' favourites: the votes panel (podium, list, "Go see it") ---------- */
#voteView{padding:28px}
#voteView .vview{position:relative;width:min(640px,100%);max-height:100%;display:flex;flex-direction:column;border-radius:var(--radius);overflow:hidden;
  background:#2d3a4f;box-shadow:0 24px 70px rgba(0,0,0,.5)}   /* the last room's wall colour, plain */
#voteX{position:absolute;top:10px;right:12px;z-index:2;background:none;border:0;color:#cfc6b6;font-size:18px;cursor:pointer;padding:4px 8px}
#voteView .vhead{padding:22px 26px 6px;text-align:center}
#voteView .vtitle{font-family:var(--serif);font-size:24px;color:var(--gold)}
#voteView .vsub{font-size:12px;letter-spacing:.06em;color:rgba(216,207,191,.8);margin-top:4px}
#voteView .vbody{overflow:auto;padding:8px 22px 4px;flex:1;min-height:120px}
#voteView .vempty{text-align:center;font-family:var(--serif);font-style:italic;color:rgba(216,207,191,.85);margin:40px 0}
#voteView .vpodium{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:14px;align-items:end;margin:12px 0 18px}
#voteView .vpod{display:flex;flex-direction:column;align-items:center;gap:6px;background:none;border:0;padding:6px;border-radius:12px;cursor:pointer;color:var(--ink);min-width:0}
#voteView .vpod:hover{background:rgba(255,255,255,.06)}
#voteView .vpod .vthumb{width:100%;height:96px}
#voteView .vpod.first .vthumb{height:132px}
#voteView .vcrown{font-size:11px;letter-spacing:.06em;color:var(--gold)}
#voteView .vthumb{display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06);border-radius:3px;overflow:hidden}
#voteView .vthumb img{max-width:100%;max-height:100%;display:block;border:3px solid #15120f;box-shadow:0 4px 12px rgba(0,0,0,.35)}
#voteView .vthumb.round img{border-radius:50%}
#voteView .vthumb.has{background:none}
#voteView .vname{font-family:var(--serif);font-size:14px;line-height:1.3;text-align:center;overflow-wrap:anywhere}
#voteView .vpod.first .vname{font-size:15.5px}
#voteView .vcount{font-size:11.5px;color:var(--gold)}
#voteView .vlist{border-top:1px solid rgba(255,255,255,.1)}
#voteView .vrow{display:grid;grid-template-columns:20px 54px minmax(0,1fr) auto;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid rgba(255,255,255,.08)}
#voteView .vrank{font-size:12px;color:var(--ink-dim);text-align:right}
#voteView .vrow .vthumb{height:42px}
#voteView .vinfo{display:flex;flex-direction:column;gap:4px;min-width:0}
#voteView .vrow .vname{text-align:left;font-size:14px}
#voteView .vbar{height:4px;border-radius:2px;background:rgba(255,255,255,.08);overflow:hidden}
#voteView .vbar i{display:block;height:100%;background:var(--gold);border-radius:2px}
#voteView .vmeta{font-size:11.5px;color:var(--ink-dim)}
#voteView .vmine{color:var(--gold)}
#voteView .vgo{background:none;border:1px solid rgba(207,174,108,.55);color:var(--gold);border-radius:999px;padding:6px 12px;font-size:12px;cursor:pointer;white-space:nowrap}
#voteView .vgo:hover{background:rgba(207,174,108,.12)}
#voteView .vfoot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 22px 16px;border-top:1px solid rgba(255,255,255,.1);font-size:12px;color:var(--ink-dim)}
@media (max-width:720px){
  #voteView{padding:10px}
  #voteView .vhead{padding:18px 18px 4px} #voteView .vtitle{font-size:21px}
  #voteView .vbody{padding:6px 14px 4px}
  #voteView .vpodium{gap:8px} #voteView .vpod .vthumb{height:74px} #voteView .vpod.first .vthumb{height:100px}
  #voteView .vrow{grid-template-columns:16px 44px minmax(0,1fr);gap:10px}
  #voteView .vgo{grid-column:2 / -1;justify-self:stretch;text-align:center;padding:8px 12px}
  #voteView .vfoot{flex-direction:column;align-items:stretch;padding:12px 14px 14px;text-align:center}
}
/* the favourites walk's bar (js/ui/fav-walk.js) */
#favWalk{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(88px + env(safe-area-inset-bottom, 0px));z-index:7;display:flex;align-items:center;gap:6px;padding:5px 6px 5px 14px;border-radius:999px;font-size:12.5px;color:var(--ink);max-width:calc(100vw - 24px)}
#favWalk .fw-h{color:var(--gold);display:flex;align-items:center;gap:3px}
#favWalk .fw-h svg{width:16px;height:16px}
#favWalk .fw-t{color:var(--gold);margin-right:4px}
#favWalkN{color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px;min-width:0}
#fwPrev,#fwNext{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:var(--ink);cursor:pointer}
#fwPrev:hover,#fwNext:hover{background:rgba(255,255,255,.16)} #fwPrev:disabled,#fwNext:disabled{opacity:.35;cursor:default}
#fwPrev svg,#fwNext svg{width:16px;height:16px}
#favWalkX{background:none;border:0;color:var(--ink-dim);font-size:14px;cursor:pointer;padding:4px 8px}
#bar #bFav.fwon{color:var(--gold)}
/* while it is open, what sits just above the navigation bar moves up to make room */
body.fwopen #farewell, body.fwopen #welcome, body.fwopen #linkbox, body.fwopen #watch, body.fwopen #visit, body.fwopen #info{bottom:142px}
body.fwopen #infoPeek{bottom:134px}
body.mapopen #favWalk{bottom:calc(var(--mapH, 200px) + 98px)}
body.mapopen.fwopen #info{bottom:calc(var(--mapH, 200px) + 146px)}
@media (max-width:720px){ #favWalk .fw-t{display:none} body.fwopen #info{bottom:132px} #favWalkN{max-width:52vw} }

/* the share menu (Share button, the artwork card's share button): app logos in their own colours, then the link */
#shareMenu{position:fixed;z-index:80;width:340px;box-sizing:border-box;padding:14px 14px 12px;border-radius:14px}
#shareMenu .sm-t{font-family:var(--serif);font-size:16px;color:var(--ink);padding:0 4px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#shareMenu .sm-apps{display:flex;justify-content:space-between;margin:0 0 14px}
#shareMenu .sm-apps button{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:7px;width:64px;padding:4px 0;border-radius:10px;cursor:pointer;color:var(--ink-dim);font:11.5px var(--sans)}
#shareMenu .sm-apps button:hover,#shareMenu .sm-apps button:focus-visible{color:var(--ink);outline:none}
#shareMenu .ic{width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:transform .15s}
#shareMenu .sm-apps button:hover .ic{transform:scale(1.07)}
#shareMenu .ic svg{width:24px;height:24px;fill:#fff}
#shareMenu .ic.wa{background:#25d366}
#shareMenu .ic.fb{background:#0866ff}
#shareMenu .ic.fb svg{width:46px;height:46px}   /* (the logo is itself the round badge) */
#shareMenu .ic.ig{background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}
#shareMenu .ic.th,#shareMenu .ic.x{background:#000;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
#shareMenu .ic.th svg{width:22px;height:22px} #shareMenu .ic.x svg{width:19px;height:19px}
#shareMenu .sm-link{display:flex;gap:6px;align-items:center;background:rgba(0,0,0,.3);border:1px solid var(--line);border-radius:10px;padding:4px 4px 4px 10px}
#smUrl{flex:1;min-width:0;background:none;border:0;color:var(--ink-dim);font:12px var(--sans);outline:none;text-overflow:ellipsis}
#shareMenu .cp{flex:none;background:var(--gold);color:var(--gold-ink);border:0;border-radius:7px;padding:7px 12px;font:500 12px var(--sans);cursor:pointer}
#shareMenu .cp:hover{filter:brightness(1.08)}
#shareMenu .note{font-size:11px;color:var(--ink-dim);padding:10px 4px 0;white-space:normal}
@media (max-width:380px){ #shareMenu{width:calc(100vw - 16px)} #shareMenu .sm-apps button{width:56px} #shareMenu .ic{width:42px;height:42px} #shareMenu .ic.fb svg{width:42px;height:42px} }

/* phone: the button that opens a work's details card */
#infoPeek{position:fixed;right:12px;bottom:86px;z-index:6;display:flex;align-items:center;gap:6px;padding:8px 13px 8px 10px;border-radius:999px;color:#5a4a2c;font:500 12.5px var(--sans);cursor:pointer;background:#fbf8f2;border:1px solid rgba(184,146,72,.35);box-shadow:0 4px 16px rgba(0,0,0,.3);backdrop-filter:none;-webkit-backdrop-filter:none}   /* white, like the card it opens */
#infoPeek svg{width:17px;height:17px}
/* the card on a phone (#info.phone, js/ui/info-card.js): opens on arrival; the story in a shorter scrolling box */
#info.phone .storyhead{margin-top:12px}
#info.phone .desc{max-height:17vh}
body.phonecard #visit, body.phonecard #watch{display:none}   /* (a room's "Visit the website" / "Watch" button: back once the card is closed) */
