/* Shared design tokens, base rules, then the scene viewer and editor. The landing page is in site.css. */
:root {
  color-scheme: light;
  --bg: #f6f1e9; --bg2: #efe8dc; --panel: #fffdf8; --line: #e3d8c8;
  --text: #1c1714; --muted: #766b62; --accent: #e2552e; --accent2: #f0a25a;
  --nav-bg: rgba(246,241,233,.72); --glass: rgba(255,253,248,.82); --shadow: rgba(80,45,20,.30);
  --art-bg: #e8d9c6; --art1: #ee8f63; --art2: #e6b45e; --art3: #9dbb86;
  --serif: "Fraunces", Georgia, "Iowan Old Style", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100d0b; --bg2: #16120f; --panel: #1b1612; --line: #2b221b;
  --text: #f4ece3; --muted: #a2958a; --accent: #ff6a3d; --accent2: #ffb26b;
  --nav-bg: rgba(16,13,11,.72); --glass: rgba(27,22,18,.78); --shadow: rgba(0,0,0,.65);
  --art-bg: #1c1612; --art1: #9a4526; --art2: #7b5b25; --art3: #35543f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; transition: background .35s, color .35s; }
a { color: var(--accent); text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.modal { position: fixed; inset: 0; height: 100dvh; z-index: 20; background: #16110e; color: #f4ece4; }
.modal[hidden] { display: none; }
.stage, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bar {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left)); background: linear-gradient(#000a, transparent); pointer-events: none;
}
.bar strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.2rem; }
.bar span { color: #c8b9ac; font-size: .9rem; }
.bar button { pointer-events: auto; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid #ffffff33; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: #c8b9ac; pointer-events: none; }
.loading.done { display: none; }

.pills { position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; }
.pill { padding: 11px 24px; border-radius: 999px; border: 1px solid #ffffff33; background: rgba(20,14,10,.6); color: #fff; font: 500 .9rem "Inter", sans-serif; cursor: pointer; backdrop-filter: blur(10px); }
.pill[hidden] { display: none; }
.pill:hover { background: var(--accent); border-color: var(--accent); }

/* walk mode */
.stick { position: absolute; left: max(24px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgba(20,14,10,.35); border: 1px solid #ffffff33; backdrop-filter: blur(6px); touch-action: none; }
.stick[hidden] { display: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(255,255,255,.35); border: 1px solid #ffffff66; pointer-events: none; }
.toast { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); margin: 0; padding: 9px 18px; border-radius: 999px; background: rgba(20,14,10,.7); color: #fff; font: 500 .85rem "Inter", sans-serif; backdrop-filter: blur(8px); pointer-events: none; text-align: center; max-width: 90vw; }
.toast[hidden] { display: none; }
@media (max-width: 600px) { .pills { bottom: auto; top: calc(64px + env(safe-area-inset-top)); } .toast { top: calc(116px + env(safe-area-inset-top)); } }

/* loading overlay: preview picture backdrop + progress bar */
.loading { background-size: cover; background-position: center; }
.loading.has-thumb::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); }
.loadbox { position: relative; display: grid; gap: 12px; justify-items: center; min-width: 200px; }
.loadbar { width: min(260px, 70vw); height: 4px; border-radius: 4px; background: #ffffff26; overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.planbtn[hidden], .miniplan[hidden], .roomname[hidden] { display: none; }
.miniplan { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: calc(max(24px, env(safe-area-inset-bottom)) + 56px); z-index: 3; padding: 6px; border-radius: 16px; background: rgba(20,14,10,.7); border: 1px solid #ffffff2a; backdrop-filter: blur(10px); box-shadow: 0 18px 40px -16px #000a; }
.miniplan canvas { display: block; border-radius: 11px; cursor: pointer; touch-action: manipulation; }
.roomname { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 8px 18px; border-radius: 999px; background: rgba(20,14,10,.6); border: 1px solid #ffffff2a; backdrop-filter: blur(10px); color: #fff; font: 500 .95rem "Inter", sans-serif; pointer-events: none; }
.roomname.pop { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -6px); } }
@media (max-width: 700px) { .roomname { top: 66px; left: 20px; transform: none; } @keyframes pop { from { opacity: 0; } } }

/* the 3D model of the place (modelview.js): a switch at the top, the model's camera modes at the bottom, room names over it */
.vswitch { position: absolute; z-index: 4; top: max(18px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; padding: 4px; border-radius: 999px; border: 1px solid #ffffff33; background: rgba(20,14,10,.62); backdrop-filter: blur(10px); }
.vswitch button, .mseg button { padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: #e8dcd0; font: 500 .88rem "Inter", sans-serif; cursor: pointer; transition: background .25s, color .25s; }
.vswitch button:hover, .mseg button:hover { color: #fff; }
.vswitch button.on, .mseg button.on { background: var(--accent); color: #fff; }
.has-model .roomname { top: 72px; } .has-model .toast { top: 124px; }
.mbar { position: absolute; z-index: 4; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; width: max-content; max-width: calc(100% - 32px); }
.mbar[hidden] { display: none; }
.mseg { display: flex; padding: 4px; border-radius: 999px; border: 1px solid #ffffff33; background: rgba(20,14,10,.62); backdrop-filter: blur(10px); }
.mbar select { padding: 10px 14px; border-radius: 999px; border: 1px solid #ffffff33; background: rgba(20,14,10,.62); color: #fff; font: 500 .88rem "Inter", sans-serif; cursor: pointer; backdrop-filter: blur(10px); }
.mbar select option { color: #111; }
.mhint { flex: 0 1 auto; order: -1; margin: 0 auto 2px; width: max-content; max-width: 100%; padding: 5px 14px; border-radius: 999px; background: rgba(20,14,10,.58); backdrop-filter: blur(8px); text-align: center; color: #eadfd4; font-size: .76rem; pointer-events: none; }
.mbar { flex-direction: row; } .mhint { flex-basis: 100%; }
.mlabels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; padding: 2px 9px; border-radius: 10px; background: rgba(20,23,28,.62); backdrop-filter: blur(3px); color: #fff; font: 600 12px "Inter", sans-serif; white-space: nowrap; }
.is-model .planbtn, .is-model .miniplan, .is-model .roomname, .is-model #tourBtn, .is-model .toast { display: none !important; }
.is-model .stick:not([hidden]) { z-index: 4; }
@media (max-width: 600px) {
  .vswitch { top: calc(64px + env(safe-area-inset-top)); }
  .has-model .pills { top: calc(116px + env(safe-area-inset-top)); } .has-model .toast { top: calc(168px + env(safe-area-inset-top)); } .has-model .roomname { top: 20px; }
  .is-model .mbar { bottom: 176px; }
}
@media (pointer: fine) { .is-model .mbar { bottom: 22px; } }

/* the intro: the knot while loading, then the flight in (introknot.js, intro.js) */
.introknot { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.has-intro .loading { z-index: 3; } .has-intro .loadbox { margin-top: 44vh; }
.introskip { position: absolute; z-index: 5; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); }
.is-intro .vswitch, .is-intro .mbar, .is-intro .pills, .is-intro .planbtn, .is-intro .miniplan, .is-intro .roomname, .is-intro .toast, .is-intro .stick { display: none !important; }
.planbtn { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 3; padding: 11px 20px; border-radius: 999px; border: 1px solid #ffffff33; background: rgba(20,14,10,.6); color: #fff; font: 500 .9rem "Inter", sans-serif; cursor: pointer; backdrop-filter: blur(10px); }
