/* หอพักธนดล — palette taken from the real rooms: door blue, butter-yellow walls, tile cream, wood trim */
:root {
  --blue: #14507f;
  --blue-deep: #0d3a5c;
  --butter: #efd978;
  --butter-deep: #e2c453;
  --tile: #f4efe3;
  --wood: #7a3b26;
  --ink: #14304a;

  --hero-bg: var(--blue);
  --hero-ink: #fdf8e6;
  --hero-sub: #cfe0ee;
  --wall-bg: var(--butter);
  --wall-ink: var(--ink);
  --paper-bg: var(--tile);
  --paper-ink: #1d2b38;
  --paper-sub: #4a5b69;
  --contact-bg: var(--blue-deep);
  --foot-bg: #091f33;
  --accent: var(--butter);
  --accent-ink: #14304a;
  --line: rgba(20, 48, 74, .18);
  --wall-fill: var(--butter);
  --door-fill: var(--blue);
  --focus: #b3501f;
  --ctl: #14507f;
  --ctl-ink: #fff;

  --fs: 1;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --head: "Mitr", "Noto Sans Thai", system-ui, sans-serif;
  --body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  color-scheme: light;
}

:root[data-size="s"] { --fs: .93; }
:root[data-size="l"] { --fs: 1.14; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hero-bg: #0b2f4d; --wall-bg: #2c2610; --wall-ink: #f1dd8e;
    --paper-bg: #101b26; --paper-ink: #ece6d4; --paper-sub: #aebac4;
    --contact-bg: #071a2b; --foot-bg: #040f19; --line: rgba(241, 221, 142, .22);
    --focus: #f0a870; --ctl: #f0d978; --ctl-ink: #14304a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --hero-bg: #0b2f4d; --wall-bg: #2c2610; --wall-ink: #f1dd8e;
  --paper-bg: #101b26; --paper-ink: #ece6d4; --paper-sub: #aebac4;
  --contact-bg: #071a2b; --foot-bg: #040f19; --line: rgba(241, 221, 142, .22);
  --focus: #f0a870; --ctl: #f0d978; --ctl-ink: #14304a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper-bg); color: var(--paper-ink);
  font: 400 calc(1.0625rem * var(--fs))/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
::selection { background: var(--butter); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--blue) transparent; }
.skip { position: absolute; left: -999px; top: 0; background: var(--butter); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

h1, h2 { font-family: var(--head); font-weight: 500; line-height: 1.25; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.sub { color: var(--paper-sub); max-width: 38rem; margin: .8rem 0 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.2rem; padding: .5rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  font: 500 calc(1.05rem * var(--fs))/1 var(--head); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.btn-call { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.btn-call:hover { transform: translateY(-2px); background: #f7e48f; }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { min-height: 2.6rem; padding-inline: 1.2rem; font-size: calc(.98rem * var(--fs)); }
.icon-btn {
  width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; border-radius: 50%;
  border: 2px solid rgba(253, 248, 230, .35); background: transparent; color: inherit; cursor: pointer; font: 400 1.6rem/1 var(--body);
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: rgba(253, 248, 230, .14); border-color: rgba(253, 248, 230, .7); }
.icon-btn svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: .4rem .8rem; min-height: 2.75rem; }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: 4rem; padding-inline: max(1.25rem, calc((100vw - 1180px)/2));
  display: flex; align-items: center; gap: 1.5rem; color: var(--hero-ink);
  background: color-mix(in srgb, var(--hero-bg) 86%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(253, 248, 230, .12);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 500 1.3rem/1 var(--head); color: inherit; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: calc(.98rem * var(--fs)); opacity: .88; padding: .3rem 0; background: linear-gradient(currentColor, currentColor) 0 100%/0 2px no-repeat; transition: background-size .35s var(--ease), opacity .2s; }
.nav a:hover { opacity: 1; background-size: 100% 2px; }
.top-actions { display: flex; align-items: center; gap: .6rem; }

/* hero */
.hero {
  position: relative; min-height: 100svh; background: var(--hero-bg); color: var(--hero-ink); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; padding-top: 4rem;
}
.stage { position: absolute; inset: 4rem 0 0 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
#gl:active { cursor: grabbing; }
.stage-fallback { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0; pointer-events: auto; width: 2.75rem; height: 2.75rem; margin: -1.375rem 0 0 -1.375rem;
  border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; transition: opacity .3s;
}
.hs::before {
  content: ""; width: 1rem; height: 1rem; border-radius: 50%; background: var(--butter); border: 3px solid var(--blue-deep);
  box-shadow: 0 0 0 0 rgba(239, 217, 120, .7); animation: ping 2.4s var(--ease) infinite;
}
.hs span {
  position: absolute; left: 50%; top: calc(100% - .2rem); transform: translate(-50%, -4px); white-space: nowrap; opacity: 0; pointer-events: none;
  background: var(--butter); color: var(--ink); padding: .25rem .75rem; border-radius: 999px; font: 500 calc(.9rem * var(--fs))/1.5 var(--head);
  transition: opacity .25s, transform .25s var(--ease);
}
.hs:hover span, .hs:focus-visible span, .hs[aria-pressed="true"] span { opacity: 1; transform: translate(-50%, 0); }
.hs[aria-pressed="true"]::before { background: #fff; animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(239, 217, 120, .65); } 70%, 100% { box-shadow: 0 0 0 .9rem rgba(239, 217, 120, 0); } }

.hero-copy { position: relative; z-index: 2; align-self: center; width: min(1180px, 100% - 2.5rem); margin-inline: auto; padding: 2rem 0; pointer-events: none; }
.hero-copy > * { max-width: 30rem; pointer-events: auto; }
.hero-copy h1 { font-size: clamp(3.4rem, 9.5vw, 6rem); letter-spacing: 0; line-height: 1.15; }
.lead { font-size: calc(1.25rem * var(--fs)); color: var(--hero-sub); margin: 1rem 0 1.8rem; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.num { margin: 1.2rem 0 0; font: 500 1.1rem/1 var(--head); color: var(--hero-sub); font-variant-numeric: tabular-nums; }

.stage-ui { position: relative; z-index: 2; width: min(1180px, 100% - 2.5rem); margin: 0 auto 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; pointer-events: none; }
.stage-ui > * { pointer-events: auto; }
.swatches { display: inline-flex; align-items: center; gap: .6rem; }
.swatch-label { font-size: calc(.95rem * var(--fs)); color: var(--hero-sub); }
.swatch { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 3px solid rgba(253, 248, 230, .4); background: var(--c); cursor: pointer; transition: transform .25s var(--ease), border-color .2s; padding: 0; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 3px var(--butter); }
.hint { margin: 0; font-size: calc(.9rem * var(--fs)); color: var(--hero-sub); }
.hint-note { opacity: .75; }

:root[data-scene="off"] #gl, :root[data-scene="off"] .hotspots, :root[data-scene="off"] .swatches, :root[data-scene="off"] #reset-view { display: none !important; }
:root[data-scene="off"] .stage-fallback, .nogl .stage-fallback { display: block; }
.nogl #gl, .nogl .hotspots, .nogl .swatches, .nogl #reset-view { display: none !important; }
:root[data-scene="off"] .hint-touch, .nogl .hint-touch { display: none; }
:root[data-scene="off"] .hint-note, .nogl .hint-note { display: none; }
:root[data-scene="off"] .stage::after, .nogl .stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--hero-bg) 8%, transparent 70%); }

@media (max-width: 899px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  .hero { grid-template-rows: auto 1fr auto; }
  .stage { inset: 4rem 0 0 0; }
  .hero-copy { align-self: start; padding: 1.5rem 0 0; }
  .hero-copy .lead { margin-bottom: 1.2rem; }
  .hero-copy .num { display: none; }
  .stage-ui { align-self: end; margin-bottom: 1rem; }
  .hint-note { display: none; }
}
@media (min-width: 900px) { .hero-copy { padding-bottom: 6rem; } }

/* inside */
.inside { background: var(--wall-bg); color: var(--wall-ink); padding: clamp(4rem, 9vw, 8rem) 0 3rem; }
.inside .sub, .inside p { color: inherit; }
.inside-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .inside-grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } .inside-head { position: sticky; top: 6rem; } }
.inside-head p { margin: 1rem 0 0; max-width: 26rem; }
.amen { list-style: none; margin: 0; padding: 0; border-top: 2px solid currentColor; }
.amen li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent); }
.amen h3 { margin: 0; font: 500 calc(1.35rem * var(--fs))/1.4 var(--head); }
.amen p { margin: 0; grid-column: 1; font-size: calc(.98rem * var(--fs)); opacity: .85; }
.amen .acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  min-height: 2.75rem; padding: .3rem 1rem; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; cursor: pointer;
  font: 500 calc(.92rem * var(--fs))/1.2 var(--head); transition: background-color .2s, color .2s;
}
.chip:hover { background: var(--wall-ink); color: var(--wall-bg); }
.price-note { margin-top: 2.5rem; font-size: calc(1.05rem * var(--fs)); }
.price-note a { font-weight: 700; }
@media (max-width: 560px) { .amen li { grid-template-columns: 1fr; } .amen .acts { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: .5rem; } }

/* photos */
.photos { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--paper-bg); }
.gallery { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 9.5rem; grid-auto-flow: dense; gap: .75rem; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 13rem; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 14rem; } }
.ph { position: relative; padding: 0; border: 0; overflow: hidden; border-radius: 6px; cursor: zoom-in; background: var(--line); }
.ph.tall { grid-row: span 2; }
.ph.wide { grid-column: span 2; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.ph:hover img { transform: scale(1.05); }
.ph::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); border-radius: inherit; pointer-events: none; }

/* contact */
.contact { background: var(--contact-bg); color: var(--hero-ink); padding: clamp(4rem, 9vw, 8rem) 0; }
.contact .sub { color: var(--hero-sub); }
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; } }
.phone { display: block; font: 500 clamp(2.4rem, 7vw, 4.2rem)/1.1 var(--head); color: var(--butter); text-decoration: none; margin-bottom: 1.4rem; font-variant-numeric: tabular-nums; }
.phone:hover { text-decoration: underline; text-underline-offset: .15em; }
.copied { min-height: 1.6rem; margin: .8rem 0 0; color: var(--hero-sub); font-size: calc(.95rem * var(--fs)); }

.foot { background: var(--foot-bg); color: #b4c5d3; padding: 1.5rem 0; font-size: calc(.88rem * var(--fs)); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100dvh; max-width: none; max-height: none; color: #fff; }
.lightbox::backdrop { background: rgba(6, 18, 30, .92); }
.lightbox figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 3.5rem 1rem 1rem; gap: .8rem; }
.lightbox img { max-height: 100%; max-width: min(100%, 1200px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { text-align: center; max-width: 40rem; font-size: calc(1rem * var(--fs)); }
.lb-btn { position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .35); color: #fff; font: 400 1.9rem/1 var(--body); cursor: pointer; display: grid; place-items: center; padding: 0 0 .15rem; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }
.lb-close { right: 1rem; top: 1rem; }

/* settings drawer */
.settings { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(24rem, 100vw); border: 0; padding: 1.4rem 1.4rem 2rem; background: var(--paper-bg); color: var(--paper-ink); overflow-y: auto; box-shadow: -12px 0 40px rgba(0, 0, 0, .3); }
.settings::backdrop { background: rgba(6, 18, 30, .55); }
.settings[open] { animation: slide .45s var(--ease); }
@keyframes slide { from { transform: translateX(100%); } }
.set-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.set-head h2 { font-size: 1.8rem; }
.set-head .icon-btn { border-color: var(--line); color: var(--paper-ink); }
.set-head .icon-btn:hover { background: var(--line); }
.settings fieldset { border: 0; border-top: 1px solid var(--line); padding: 1.1rem 0 1.2rem; margin: 0; }
.settings legend { font: 500 1.05rem/1.4 var(--head); padding: 0; float: left; width: 100%; margin-bottom: .8rem; }
.seg { clear: both; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid var(--ctl); border-radius: 999px; overflow: hidden; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: .7rem .4rem; min-height: 2.75rem; font: 500 calc(.95rem * var(--fs))/1.4 var(--head); transition: background-color .2s, color .2s; }
.seg input:checked + span { background: var(--ctl); color: var(--ctl-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.switch { display: flex; gap: .9rem; align-items: flex-start; padding: .7rem 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.track { flex: none; width: 3.1rem; height: 1.75rem; border-radius: 999px; background: #8996a2; position: relative; transition: background-color .25s; margin-top: .15rem; }
.track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.switch input:checked + .track { background: var(--ctl); }
.switch input:checked + .track::after { transform: translateX(1.35rem); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 3px; }
.sw-text { font: 500 calc(1rem * var(--fs))/1.4 var(--head); }
.sw-text small { display: block; font: 400 calc(.88rem * var(--fs))/1.5 var(--body); color: var(--paper-sub); margin-top: .2rem; }
.set-foot { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.set-foot .btn-ghost { color: var(--paper-ink); }
.set-foot .btn-ghost:hover { background: var(--line); }

/* reduced motion: system preference or in-page setting. Keep colour/opacity feedback, drop movement */
:root[data-motion="reduced"] { scroll-behavior: auto; }
:root[data-motion="reduced"] .hs::before, :root[data-motion="reduced"] .settings[open] { animation: none; }
:root[data-motion="reduced"] .btn, :root[data-motion="reduced"] .swatch, :root[data-motion="reduced"] .ph img, :root[data-motion="reduced"] .track::after { transition-property: background-color, color, border-color, opacity; }
:root[data-motion="reduced"] .btn-call:hover, :root[data-motion="reduced"] .swatch:hover, :root[data-motion="reduced"] .ph:hover img { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hs::before, .settings[open] { animation: none; }
  .btn, .swatch, .ph img, .track::after { transition-property: background-color, color, border-color, opacity; }
  .btn-call:hover, .swatch:hover, .ph:hover img { transform: none; }
}
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduced"]) .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  :root:not([data-motion="reduced"]) .js .reveal.in { opacity: 1; transform: none; }
}
.price { margin: 1.4rem 0 1.4rem; }
.price strong { display: inline-block; background: transparent; color: var(--butter); font: 500 calc(1.15rem * var(--fs))/1.3 var(--head); padding: .45rem 1.1rem; border-radius: .6rem; border: 2px dashed var(--butter); }
.price-note strong { font-family: var(--head); font-weight: 500; }
@media (max-width: 899px) { .hero-copy .price { margin: 1.1rem 0 1rem; } }
.where { margin: .5rem 0 0; font-size: calc(1rem * var(--fs)); color: var(--hero-sub); }
.loc { margin: 1.2rem 0 0; font-size: calc(1.1rem * var(--fs)); color: var(--hero-ink); }
.loc strong { font-family: var(--head); font-weight: 500; color: var(--butter); margin-right: .4rem; }
@media (max-width: 899px) { .hero-copy .where { display: none; } }
.alt-contact { margin: 1rem 0 0; color: var(--hero-sub); font-size: calc(1rem * var(--fs)); }
.alt-contact a, .foot a { color: inherit; text-underline-offset: .2em; }
.alt-contact a { color: var(--butter); font-weight: 700; display: inline-block; padding: .5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-photo .stage-fallback { display: block; }
.hero-photo .stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--hero-bg) 8%, transparent 70%); }
@media (max-width: 899px) { .hero-photo .stage::after { background: linear-gradient(180deg, var(--hero-bg) 20%, transparent 85%); } }
.map-block { margin-top: 3rem; }
.map-title { font: 500 calc(1.4rem * var(--fs))/1.3 var(--head); margin: 0 0 1rem; }
.map-frame { border-radius: 1rem; overflow: hidden; border: 2px solid rgba(253, 248, 230, .25); aspect-ratio: 16 / 9; max-height: 26rem; width: 100%; margin-bottom: 1.2rem; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 599px) { .map-frame { aspect-ratio: 4 / 3; } }
/* room page */
.room-body { overflow: hidden; }
.room-page { display: flex; flex-direction: column; justify-content: flex-end; height: 100svh; min-height: 0; }
.room-page .stage-ui { margin-bottom: 1.2rem; }
.room-page #gl { touch-action: none; }
.zoom-btns { display: inline-flex; gap: .4rem; }
.zoom-btns .icon-btn { font-size: 1.5rem; }
.back-link { margin-left: 1.5rem; text-decoration: none; opacity: .9; }
.back-link:hover { opacity: 1; text-decoration: underline; }
.photo-card { position: absolute; right: 1.25rem; bottom: 5.5rem; z-index: 3; }
.card-btn { display: grid; gap: .25rem; text-align: left; padding: .5rem; border-radius: .9rem; border: 2px solid rgba(253, 248, 230, .35); background: color-mix(in srgb, var(--hero-bg) 88%, transparent); color: var(--hero-ink); cursor: pointer; font: 500 calc(.95rem * var(--fs))/1.3 var(--head); max-width: 11rem; backdrop-filter: blur(8px); }
.card-btn img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .5rem; }
.card-btn small { font: 400 calc(.8rem * var(--fs))/1.2 var(--body); color: var(--hero-sub); }
.card-btn:hover { border-color: var(--butter); }
@media (max-width: 899px) { .photo-card { bottom: 9rem; right: .75rem; } .card-btn { max-width: 8.5rem; } }
@media (max-width: 520px) {
  .room-body .brand span { display: none; }
  .back-link { white-space: nowrap; margin-left: .75rem; }
}
.touch-only { display: none; }
@media (hover: none) { .mouse-only { display: none; } .touch-only { display: inline; } }
.room-page .stage-ui { width: 100%; margin: 0; padding: 3rem max(1.25rem, calc((100vw - 1180px) / 2)) 1.2rem; background: linear-gradient(to top, var(--hero-bg) 55%, transparent); }
@media (max-width: 899px) { .photo-card { bottom: auto; top: 4.75rem; right: .75rem; } }

/* room page: wall toggle, walk-through mode */
.tool-btn { text-decoration: none; border: 2px solid rgba(253, 248, 230, .5); border-radius: 999px; padding: .4rem 1.1rem; }
.tool-btn:hover { background: rgba(253, 248, 230, .14); border-color: rgba(253, 248, 230, .85); }
.tool-btn.on { background: var(--ctl, #f0d978); color: var(--ctl-ink, #14304a); border-color: transparent; }
.tool-btn:disabled { opacity: .45; cursor: not-allowed; }
.crosshair, .walk-pad, .hint-walk { display: none; }
.crosshair { position: absolute; left: 50%; top: 50%; width: .5rem; height: .5rem; margin: -.25rem 0 0 -.25rem; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 2px rgba(20, 48, 74, .6); pointer-events: none; z-index: 2; }
.walk-toast { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 3; max-width: min(34rem, calc(100% - 2rem)); padding: .6rem 1.1rem; border-radius: 1.2rem; background: color-mix(in srgb, var(--hero-bg) 90%, transparent); border: 2px solid rgba(253, 248, 230, .35); color: var(--hero-ink); font: 500 calc(.95rem * var(--fs))/1.4 var(--head); text-align: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.walk-toast.show { opacity: 1; }
.walk-pad { position: absolute; left: 1rem; bottom: 8.5rem; z-index: 3; grid-template-columns: repeat(3, 3.2rem); grid-template-rows: repeat(2, 3.2rem); gap: .35rem; touch-action: none; }
.walk-pad button { border-radius: 50%; border: 2px solid rgba(253, 248, 230, .5); background: color-mix(in srgb, var(--hero-bg) 80%, transparent); color: var(--hero-ink); font-size: 1.2rem; cursor: pointer; touch-action: none; user-select: none; }
.walk-pad button:active { background: var(--ctl, #f0d978); color: var(--ctl-ink, #14304a); }
.walk-pad [data-k="fwd"] { grid-column: 2; grid-row: 1; } .walk-pad [data-k="left"] { grid-column: 1; grid-row: 2; }
.walk-pad [data-k="back"] { grid-column: 2; grid-row: 2; } .walk-pad [data-k="right"] { grid-column: 3; grid-row: 2; }
:root[data-walk="on"] .crosshair { display: block; }
:root[data-walk="on"] .hint-walk { display: inline; }
:root[data-walk="on"] .hotspots, :root[data-walk="on"] .zoom-btns, :root[data-walk="on"] .swatches, :root[data-walk="on"] .hint-orbit, :root[data-walk="on"] .hint-note { display: none !important; }
:root[data-walk="on"] #gl { cursor: crosshair; }
@media (pointer: coarse) { :root[data-walk="on"] .walk-pad { display: grid; } }

.gl-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--hero-sub); font: 500 calc(1.05rem * var(--fs))/1.4 var(--head); pointer-events: none; }
.nogl .gl-loading, .gl-loading:empty { display: none; }
