:root {
  --ink: #1b1a18;
  --muted: #6a655d;
  --line: rgba(27, 26, 24, .1);
  --accent: #c2512c;
  --glass: rgba(250, 248, 244, .68);
  --glass-strong: rgba(252, 251, 248, .82);
  --glass-border: rgba(255, 255, 255, .75);
  --blur: 26px;
  --radius: 22px;
  --panel-w: 420px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #ece8e1; color: var(--ink);
  font: 15px/1.6 var(--sans);
  overflow: hidden; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#scene.is-hover { cursor: pointer; }
#scene.is-drag { cursor: grabbing; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 45%, transparent 60%, rgba(30, 22, 12, .16)); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.5); backdrop-filter: blur(var(--blur)) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 28px 60px -28px rgba(30, 22, 12, .45), 0 2px 10px rgba(30, 22, 12, .07);
}

/* ---------- HUD ---------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 20; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: max(18px, env(safe-area-inset-top)) 24px 0;
  transition: opacity .6s, transform .8s var(--ease);
}
.hud > * { pointer-events: auto; }
.brand { text-decoration: none; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 14px rgba(255, 255, 255, .7); }
.brand-name { font: 600 27px/1 var(--serif); letter-spacing: .005em; }
.brand-tag { font: 500 10.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* After dark the ceiling behind the name is dim, so the name turns light and a soft shade sits in the corner behind it. */
.brand, .brand-tag { transition: color .8s, text-shadow .8s; }
.hud::before {
  content: ""; position: absolute; left: 0; top: 0; width: min(520px, 100%); height: 190px; z-index: -1; pointer-events: none;
  background: radial-gradient(100% 100% at 0 0, rgba(20, 14, 8, .62), rgba(20, 14, 8, .3) 45%, rgba(20, 14, 8, 0) 72%);
  opacity: 0; transition: opacity .8s;
}
.is-night .hud::before { opacity: 1; }
.is-night .brand { color: #fffaf0; text-shadow: 0 1px 2px rgba(16, 11, 6, .7), 0 0 20px rgba(16, 11, 6, .55); }
.is-night .brand-tag { color: rgba(255, 250, 240, .9); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 14px; font: 500 11.5px/1 var(--mono); letter-spacing: .06em; color: #45413a; }

.hint {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 15;
  margin: 0; border-radius: 999px; padding: 9px 18px; white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #4a463f;
  transition: opacity .8s, transform .8s var(--ease); pointer-events: none;
}
.hint.gone { opacity: 0; transform: translate(-50%, 8px); }

/* ---------- Back to the room, sound, and the way in ---------- */
.back-room {
  position: fixed; z-index: 28; top: calc(74px + env(safe-area-inset-top)); left: 22px;
  display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px 0 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 14.5px/1 var(--sans);
  box-shadow: 0 14px 30px -12px rgba(20, 16, 10, .6), 0 2px 6px rgba(20, 16, 10, .2);
  opacity: 0; transform: translateX(-14px); pointer-events: none;
  transition: opacity .45s, transform .6s var(--ease), background .2s;
}
.back-room svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.is-focused .back-room { opacity: 1; transform: none; pointer-events: auto; transition-delay: .5s, .5s, 0s; }
.back-room:hover, .back-room:focus-visible { background: #3b3731; outline: none; }
.back-room:hover svg { transform: translateX(-3px); }
.is-design .back-room, .is-loading .back-room { display: none; }

.hud-right { display: flex; align-items: center; gap: 8px; }
.fork-btn { gap: 7px; padding: 6px 13px 6px 10px; text-decoration: none; cursor: pointer; transition: background .2s; }
.fork-btn:hover { background: rgba(255, 255, 255, .9); }
.fork-btn svg { width: 16px; height: 16px; }
.fork-btn i { font-style: normal; }
.sound-toggle { gap: 7px; cursor: pointer; padding: 6px 13px 6px 10px; transition: background .2s; }
.sound-toggle:hover { background: rgba(255, 255, 255, .9); }
.sound-toggle svg { width: 17px; height: 17px; }
.sound-toggle .mute, .sound-toggle[aria-pressed="false"] .wave { display: none; }
.sound-toggle[aria-pressed="false"] .mute { display: inline; }
.sound-toggle[aria-pressed="false"] { color: #8a857c; }

.enter { display: none; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.loader.ready .enter { display: flex; animation: rise .7s var(--ease) backwards; }
.loader.ready .loader-bar, .loader.ready .loader-sub { visibility: hidden; height: 0; margin: 0; }
.enter-btn { padding: 13px 22px; border-radius: 999px; font: 500 14.5px/1 var(--sans); border: 1px solid rgba(27, 26, 24, .2); transition: background .2s, transform .3s var(--ease); }
.enter-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.enter-btn:hover, .enter-btn:focus-visible { transform: translateY(-1px); outline: none; box-shadow: 0 0 0 3px rgba(27, 26, 24, .12); }

/* ---------- Markers ---------- */
.markers { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .5s; }
.is-focused .markers, .is-design .markers { opacity: 0; }
.is-focused .marker { pointer-events: none; }
.marker {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  display: grid; place-items: center; pointer-events: auto; will-change: transform;
}
.marker i {
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .28), 0 2px 8px rgba(0, 0, 0, .35);
  transition: transform .3s var(--ease);
}
.marker i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .9); animation: ping 2.8s var(--ease) infinite;
}
.marker:nth-child(3n) i::after { animation-delay: .9s; }
.marker:nth-child(3n+1) i::after { animation-delay: 1.7s; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(3.6); opacity: 0; } }
.marker span {
  position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 6px); white-space: nowrap;
  background: rgba(24, 23, 21, .86); color: #fff; border-radius: 999px; padding: 6px 11px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase;
  opacity: 0; transition: opacity .25s, transform .3s var(--ease); pointer-events: none;
}
.marker.on i, .marker:hover i, .marker:focus-visible i { transform: scale(1.5); }
.marker.on span, .marker:hover span, .marker:focus-visible span { opacity: 1; transform: translate(-50%, 0); }
.marker:focus-visible { outline: none; }

/* ---------- Dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 2px; padding: 7px; border-radius: 22px; max-width: calc(100vw - 24px);
  overflow-x: auto; scrollbar-width: none; transition: opacity .6s, transform .8s var(--ease);
}
.dock::-webkit-scrollbar { display: none; }
.dock-sep { flex: none; width: 1px; height: 26px; background: var(--line); margin: 0 6px; }
.tab {
  flex: none; position: relative; display: flex; align-items: center; height: 42px; min-width: 42px; padding: 0 10.5px;
  border-radius: 15px; color: #3c3832; transition: background .25s, color .25s;
}
.tab svg { width: 21px; height: 21px; flex: none; }
.tab b {
  font: 500 12.5px/1 var(--sans); white-space: nowrap; max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width .5s var(--ease), opacity .3s, margin .5s var(--ease);
}
.tab:hover, .tab:focus-visible { background: rgba(255, 255, 255, .7); outline: none; }
.tab.on { background: var(--ink); color: #fff; }
.tab.on b { max-width: 170px; opacity: 1; margin-left: 9px; }
.tab::after {
  content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 4px);
  background: rgba(24, 23, 21, .88); color: #fff; padding: 6px 10px; border-radius: 9px; white-space: nowrap;
  font: 500 11.5px/1 var(--sans); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
}
@media (hover: hover) { .tab:not(.on):hover::after { opacity: 1; transform: translate(-50%, 0); } }
/* tooltips would be clipped by the scrolling dock, so let them escape on wide screens */
@media (min-width: 900px) { .dock { overflow: visible; } }

/* ---------- Panel ---------- */
.panel {
  position: fixed; z-index: 25; top: 84px; right: 20px; bottom: 96px; width: var(--panel-w);
  border-radius: var(--radius); overflow: hidden;
  opacity: 0; transform: translateX(28px) scale(.985); transition: opacity .45s, transform .7s var(--ease);
}
.panel.open { opacity: 1; transform: none; }
.panel-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(27, 26, 24, .06); transition: background .2s;
}
.panel-close:hover { background: rgba(27, 26, 24, .14); }
.panel-close svg { width: 15px; height: 15px; }
.panel-track { display: flex; width: 200%; height: 100%; transition: transform .6s var(--ease); }
.panel.show-detail .panel-track { transform: translateX(-50%); }
.pane { width: 50%; height: 100%; overflow-y: auto; padding: 30px 28px 30px; scrollbar-width: thin; }
.pane-list { transition: opacity .4s; }
.panel.show-detail .pane-list { opacity: 0; pointer-events: none; }
.eyebrow { margin: 0 0 6px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.panel h2 { margin: 0 44px 12px 0; font: 600 40px/1.02 var(--serif); letter-spacing: -.005em; }
.panel h3 { margin: 4px 0 4px; font: 600 33px/1.05 var(--serif); }
.intro { color: #403c35; }
.intro p, .body p { margin: 0 0 12px; }
.menu { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; }
.menu button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 14px 14px 14px 16px; border-radius: 15px; background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 1px 2px rgba(30, 22, 12, .05);
  transition: background .25s, transform .35s var(--ease), box-shadow .25s;
  animation: rise .6s var(--ease) backwards; animation-delay: calc(var(--i) * 55ms + 80ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.menu button:hover, .menu button:focus-visible { background: #fff; transform: translateX(3px); box-shadow: 0 8px 22px -12px rgba(30, 22, 12, .35); outline: none; }
.menu .m-t { font-weight: 600; font-size: 14.5px; }
.menu .m-s { grid-column: 1; color: var(--muted); font-size: 13px; line-height: 1.35; }
.menu svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: #9a948a; transition: transform .3s var(--ease), color .2s; }
.menu button:hover svg { transform: translateX(3px); color: var(--ink); }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 16px -6px; padding: 5px 10px 5px 4px; border-radius: 999px; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.crumb:hover { background: rgba(27, 26, 24, .07); color: var(--ink); }
.crumb svg { width: 17px; height: 17px; }
.sub { margin: 0 0 16px; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.sub:empty, .cta:empty, .gallery:empty { display: none; }
.body { color: #38342e; }
.body ul { margin: 0 0 14px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.body li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.body li span { color: var(--muted); text-align: right; }
.body a { text-decoration: underline; text-underline-offset: 3px; }
.body h4 { margin: 20px 0 6px; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: #d9d4ca; }
.cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; transition: background .2s, transform .3s var(--ease);
}
.cta:hover { background: #3b3731; transform: translateY(-1px); }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(15, 13, 10, .86); cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

/* ---------- Gift shelf form ---------- */
.custom:empty { display: none; }
.custom { margin-top: 18px; }
.gift-form { display: grid; gap: 9px; }
.gift-form label { font-weight: 600; font-size: 14.5px; }
.gift-form input {
  width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid rgba(27, 26, 24, .14); background: rgba(255, 255, 255, .7);
  font: inherit; color: var(--ink); transition: border-color .2s, background .2s, box-shadow .2s;
}
.gift-form input:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(27, 26, 24, .08); }
.gift-form input:disabled, .gift-form button:disabled { opacity: .6; cursor: progress; }
.gift-form .cta { justify-content: center; margin-top: 2px; border: 0; }
.gift-hp { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }
.gift-fine { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.gift-status { margin: 12px 0 0; font-size: 14px; color: #38342e; min-height: 1.2em; }
.gift-status:empty { display: none; }
.custom h4 { margin: 22px 0 6px; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gift-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gift-list li { display: flex; align-items: baseline; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; border-radius: 8px; cursor: default; transition: background .2s; }
.gift-list li:hover, .gift-list li:focus { background: rgba(255, 255, 255, .6); outline: none; }
.gift-list small { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.gift-list .gift-empty { color: var(--muted); }
.gift-remove { font-size: 12px; color: #a3352b; text-decoration: underline; }

/* ---------- The computer screen (mapped onto the 3D monitor) ---------- */
.screen-ui {
  position: fixed; left: 0; top: 0; z-index: 12; width: 1280px; height: 740px; transform-origin: 0 0;
  opacity: 0; transition: opacity .5s; pointer-events: none; overflow: hidden; border-radius: 3px;
}
.screen-ui.open { opacity: 1; pointer-events: auto; }
.os { position: absolute; inset: 0; display: flex; flex-direction: column; color: #eef0f6; font: 17px/1.5 var(--sans);
  background: radial-gradient(120% 130% at 12% 0%, #3d4d7a 0%, #252b45 45%, #151827 100%); }
.os-bar { display: flex; align-items: center; gap: 26px; height: 42px; padding: 0 22px; background: rgba(8, 10, 18, .45); font-size: 15px; color: rgba(255, 255, 255, .78); }
.os-bar b { color: #fff; font-weight: 600; }
.os-bar i { margin-left: auto; font: 500 14px var(--mono); font-style: normal; opacity: .8; }
.os-body { flex: 1; display: grid; grid-template-columns: 330px 1fr; min-height: 0; }
.os-side { padding: 22px 14px; background: rgba(255, 255, 255, .055); border-right: 1px solid rgba(255, 255, 255, .08); overflow-y: auto; }
.os-side p { margin: 4px 12px 8px; font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.os-side ul { list-style: none; margin: 0 0 22px; padding: 0; }
.os-side button, .os-side a {
  width: 100%; display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 12px; text-align: left; text-decoration: none; color: inherit;
  transition: background .2s;
}
.os-side button:hover, .os-side a:hover { background: rgba(255, 255, 255, .09); }
.os-side button.on { background: rgba(120, 150, 255, .32); }
.os-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font: 600 15px var(--mono); color: #fff; }
.os-ico svg { width: 20px; height: 20px; }
.os-side small { display: block; font-size: 13px; color: rgba(255, 255, 255, .5); line-height: 1.2; }
.os-main { padding: 44px 54px; overflow-y: auto; animation: osfade .5s var(--ease); }
@keyframes osfade { from { opacity: 0; transform: translateY(8px); } }
.os-main .eyebrow { color: #8fa8ff; font-size: 13px; }
.os-main h3 { margin: 6px 0 14px; font: 600 58px/1 var(--serif); }
.os-main p { max-width: 640px; font-size: 19px; color: rgba(238, 240, 246, .82); margin: 0 0 14px; }
.os-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.os-tags span { padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .1); font: 500 13px var(--mono); }
.os-main .cta { background: #fff; color: #171a26; font-size: 17px; padding: 14px 24px; }
.os-main .cta:hover { background: #dfe6ff; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #ece8e1; transition: opacity 1.1s ease .1s, visibility 0s 1.3s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-name { margin: 0 0 22px; font: 600 44px/1 var(--serif); }
.loader-bar { width: 180px; height: 2px; margin: 0 auto; background: rgba(27, 26, 24, .12); border-radius: 2px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 8%; background: var(--ink); transition: width .6s var(--ease); }
.loader-sub { margin: 16px 0 0; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.is-loading .hud, .is-loading .dock, .is-intro .hud, .is-intro .dock { opacity: 0; }
.is-intro .dock { transform: translate(-50%, 20px); }
.is-loading .hint, .is-intro .hint, .is-loading .markers, .is-intro .markers { opacity: 0; }

/* ---------- Design mode ---------- */
.is-design .hud, .is-design .dock, .is-design .hint, .is-design .panel, .is-design .screen-ui { display: none !important; }
.ed {
  position: fixed; z-index: 60; top: 14px; left: 14px; bottom: 14px; width: 318px; display: flex; flex-direction: column;
  background: rgba(22, 22, 26, .84); color: #ecebe8; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
  font: 13px/1.45 var(--sans); overflow: hidden;
}
.ed-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 8px; }
.ed-head strong { font: 600 21px/1 var(--serif); }
.ed-status { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #9d9a94; }
.ed-status.dirty { color: #ffb86b; }
.ed-tools { display: flex; gap: 6px; padding: 4px 12px; }
.ed button, .ed select, .ed-float {
  flex: 1; padding: 7px 8px; border-radius: 9px; background: rgba(255, 255, 255, .08); color: inherit; font: inherit; border: 1px solid transparent;
  transition: background .2s;
}
.ed button:hover, .ed select:hover { background: rgba(255, 255, 255, .16); }
.ed button.on { background: #f1efe9; color: #17171a; }
.ed button.primary { background: #c2512c; color: #fff; }
.ed button.danger:hover { background: #a3352b; }
.ed select { appearance: none; }
.ed-list { margin: 8px 12px 0; max-height: 26%; overflow-y: auto; border-radius: 10px; background: rgba(0, 0, 0, .22); flex: none; }
.ed-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border-radius: 0; background: none; padding: 6px 10px; }
.ed-list button.on { background: rgba(255, 255, 255, .16); color: #fff; }
.ed-list svg { width: 15px; height: 15px; opacity: .7; }
.ed-list em { margin-left: auto; font: 500 9px var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #ffb86b; }
.ed-insp { flex: 1; overflow-y: auto; padding: 12px 14px; display: grid; gap: 9px; align-content: start; }
.ed-insp label, .ed-row { display: grid; gap: 3px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #a5a29b; }
.ed-insp input, .ed-insp textarea, .ed-insp select {
  width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .28); color: #fff;
  font: 13px var(--sans); letter-spacing: 0; text-transform: none;
}
.ed-insp textarea { min-height: 62px; resize: vertical; }
.ed-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ed-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-check { display: flex !important; grid-auto-flow: column; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; font: 13px var(--sans) !important; color: #ecebe8 !important; }
.ed-check input { width: auto; }
.ed-empty { color: #9d9a94; margin: 6px 2px; }
.ed details { background: rgba(0, 0, 0, .2); border-radius: 9px; padding: 7px 9px; }
.ed details[open] { display: grid; gap: 7px; }
.ed summary { cursor: pointer; font-weight: 600; }
.ed-foot { display: flex; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ed-float { position: fixed; z-index: 60; top: 14px; left: 14px; flex: none; background: rgba(22, 22, 26, .84); color: #fff; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .14); cursor: pointer; }
.ed-toast {
  position: fixed; z-index: 70; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px;
  background: rgba(22, 22, 26, .92); color: #fff; font-size: 13px; pointer-events: none; transition: opacity .4s;
}
.ed-drop { position: fixed; inset: 10px; z-index: 65; border: 2px dashed #fff; border-radius: 22px; display: grid; place-items: center; background: rgba(22, 22, 26, .55); color: #fff; font: 600 30px var(--serif); pointer-events: none; }

/* ---------- Small screens ---------- */
/* ---------- Touch and small screens ----------
   Two handheld layouts. experience.js decides which applies and sets the class on <body>, so the layout and the camera
   always agree (see SHEET and SHORT there):
     .m-sheet  a tall screen (a phone or tablet held upright): the menu is a sheet rising from the bottom
     .m-short  a phone on its side: the menu is a narrower panel on the right */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, input, .marker { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hud, .dock, .markers, .hint, .back-room, .loader, .sheet-grip, .panel-nav { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pane { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.loader-name { font-size: clamp(34px, 11vw, 44px); }
.lightbox img { max-height: 92dvh; }

/* fingers need bigger targets than a mouse pointer does (44px is the usual floor) */
@media (pointer: coarse) {
  .marker { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .tab { height: 44px; min-width: 44px; padding: 0 11.5px; }
  .enter-btn { min-height: 48px; padding: 0 24px; }
  .crumb { min-height: 40px; padding: 8px 14px 8px 8px; margin-bottom: 10px; }
  .cta { min-height: 46px; }
  .gift-list li { padding: 13px 6px; }
  .gift-form input { font-size: 16px; min-height: 48px; }      /* under 16px, iOS zooms the whole page when the field is tapped */
}

/* the sheet's handle and the previous / next place buttons only exist on handheld layouts */
.sheet-grip, .panel-nav { display: none; }
.dock.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 46px), transparent); }
.dock.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 46px), transparent); }
.dock.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent); }

.m-sheet, .m-short { --blur: 14px; --glass: rgba(250, 248, 244, .8); --glass-strong: rgba(252, 251, 248, .9); }   /* a wide blur over a live 3D canvas is costly on a phone */
.m-sheet .hud, .m-short .hud { padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.m-sheet .brand-name, .m-short .brand-name { font-size: 23px; }
.m-sheet .brand-tag, .m-short .brand-tag { font-size: 10px; }
.m-sheet #clock, .m-short #clock, .m-sheet .sound-toggle span, .m-short .sound-toggle span { display: none; }
.m-sheet .sound-toggle, .m-short .sound-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.m-sheet .fork-btn, .m-short .fork-btn { height: 44px; padding: 0 15px 0 12px; }
.m-sheet .fork-btn i, .m-sheet #mine-btn span { display: none; }                 /* just "Fork" and an icon where the bar is narrow */
.m-sheet #mine-btn { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.m-sheet.is-focused .fork-btn, .m-short.is-focused .fork-btn { display: none; }   /* at a place, the bar belongs to Back */
/* at a place, the Back button takes the name's spot, and the dock steps aside for the menu (its arrows go to the next place) */
.m-sheet .brand, .m-short .brand { transition: opacity .4s, color .8s, text-shadow .8s; }
.m-sheet.is-focused .brand, .m-short.is-focused .brand { opacity: 0; pointer-events: none; }
.m-sheet .back-room, .m-short .back-room { top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); height: 44px; padding: 0 18px 0 13px; font-size: 14px; }
.m-sheet .dock, .m-short .dock { bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; max-width: calc(100vw - 20px); scroll-snap-type: x proximity; }
.m-sheet .tab, .m-short .tab { scroll-snap-align: center; }
.m-sheet.is-focused .dock, .m-short.is-focused .dock { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
.m-sheet .hint, .m-short .hint {   /* centred with margins, not left: 50%, which would only leave it half the screen to be wide in */
  left: 0; right: 0; width: max-content; max-width: calc(100vw - 24px); margin-inline: auto; transform: none;
  bottom: calc(80px + env(safe-area-inset-bottom)); padding: 9px 16px;
  font-size: 10.5px; letter-spacing: .07em; line-height: 1.5; white-space: normal; text-align: center;
}
.m-sheet .hint.gone, .m-short .hint.gone { transform: translateY(8px); }
.m-sheet .panel-close, .m-short .panel-close { display: none; }
.m-sheet .panel-nav, .m-short .panel-nav { display: flex; gap: 6px; position: absolute; z-index: 3; top: 14px; right: 12px; }
.panel-nav button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(27, 26, 24, .07); transition: background .2s; }
.panel-nav button:active { background: rgba(27, 26, 24, .16); }
.panel-nav svg { width: 18px; height: 18px; }

.m-sheet .panel {
  top: auto; left: 8px; right: 8px; width: auto; max-width: 600px; margin-inline: auto; border-radius: 24px;
  bottom: calc(8px + env(safe-area-inset-bottom) + var(--kb, 0px));
  height: var(--sheet-h, 46dvh); max-height: calc(100dvh - 68px - env(safe-area-inset-top) - var(--kb, 0px));
  transform: translateY(44px); transition: opacity .4s, transform .6s var(--ease), height .45s var(--ease);
}
.m-sheet .panel.open { transform: none; }
.m-sheet .panel.dragging { transition: none; }
.m-sheet .sheet-grip { display: block; position: absolute; z-index: 3; top: 0; left: 0; right: 112px; height: 30px; touch-action: none; cursor: grab; }
.m-sheet .sheet-grip::before { content: ""; position: absolute; left: calc(50% + 56px); top: 9px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(27, 26, 24, .24); }
.m-sheet .pane { padding: 34px 20px 24px; }
.m-sheet .panel h2 { font-size: 31px; margin-right: 100px; }
.m-sheet .panel h3 { font-size: 27px; }
.m-sheet .pane-detail { padding-top: 22px; }
.m-sheet .crumb { margin-right: 104px; }

.m-short .panel { top: 8px; right: max(8px, env(safe-area-inset-right)); bottom: 8px; width: clamp(260px, 44vw, 380px); border-radius: 20px; }
.m-short .pane { padding: 20px 18px 22px; }
.m-short .panel h2 { font-size: 27px; margin-right: 100px; }
.m-short .panel h3 { font-size: 24px; }
.m-short .crumb { margin-right: 100px; }
.m-short .intro, .m-short .body { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .marker i::after { animation: none; }
  .panel, .panel-track, .menu button { transition-duration: .01s; animation: none; }
}
