:root {
  --green: #2d4a35;
  --green-2: #3d5f45;
  --copper: #b8794f;
  --ink: #1d221e;
  --muted: #687068;
  --line: #e2e4de;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --bg: #e9ece5;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24, 32, 26, 0.14), 0 1px 3px rgba(24, 32, 26, 0.08);
  --serif: 'Marcellus', 'Trajan Pro', Georgia, serif;
  --script: 'Pinyon Script', cursive;
  --sans: 'Jost', 'Futura', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }

#stage { position: fixed; inset: 0; }
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* Pins */
#pins { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.pin {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.pin:hover { background: var(--green); color: #fff; }
.pin.active { background: var(--copper); color: #fff; transform: translate(-50%, -50%) scale(1.12); }
.pin.hidden { display: none; }

/* Panel */
#panel {
  position: fixed; z-index: 5;
  top: 16px; left: 16px;
  width: 360px; max-height: calc(100% - 32px);
  overflow-y: auto;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
  scrollbar-width: thin;
}
.sheet-handle { display: none; }
.brand .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--copper);
}
.brand h1 {
  font-weight: 400; margin: 8px 0 6px; line-height: 1; color: var(--green);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px;
}
.brand h1 .caps { font-family: var(--serif); font-size: 27px; letter-spacing: 0.14em; }
.brand h1 em { font-family: var(--script); font-style: normal; font-size: 34px; color: var(--copper); line-height: 0.8; }
.brand .sub { margin: 0; color: var(--muted); font-size: 13px; }

h2 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 22px 0 8px;
}
.block-label { font-size: 12px; font-weight: 600; color: var(--green); margin: 14px 0 4px; }
.unit-row {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 0; background: transparent;
  padding: 9px 8px; border-radius: 10px;
  border-bottom: 1px solid var(--line);
}
.unit-row:hover, .unit-row.hover { background: #f1f3ee; }
.unit-row .code {
  font-weight: 600; font-size: 14px; color: var(--green);
  background: #edf1ea; border-radius: 8px; padding: 5px 0; text-align: center;
}
.unit-row .meta { font-size: 13px; color: var(--ink); }
.unit-row .meta small { display: block; color: var(--muted); font-size: 12px; }
.unit-row .area { font-weight: 600; font-size: 14px; white-space: nowrap; }

.link-btn { border: 0; background: none; padding: 0; color: var(--green); font-weight: 600; font-size: 13px; margin-top: 18px; }
.detail-head { display: flex; gap: 14px; align-items: center; margin: 14px 0 12px; }
.unit-code {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 17px; flex: none;
}
.unit-title { font-weight: 600; font-size: 17px; }
.unit-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.stats div { background: #f3f5f0; border-radius: 10px; padding: 9px 11px; }
.stats div.wide { grid-column: span 2; background: #edf1ea; }
.stats dt { font-size: 11px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-weight: 600; font-size: 16px; }
.stats div.wide dd { color: var(--green); font-size: 19px; }
.plan-thumb { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; background: #fff; }
.plan-thumb img { display: block; width: 100%; height: auto; }
.ref-thumb { position: relative; }
.ref-tag { position: absolute; left: 8px; bottom: 8px; background: rgba(255,255,255,0.92); color: var(--green); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; }
.ref-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ref-strip button { border: 0; padding: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: #e6e8e2; }
.ref-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.ref-strip button:hover img { transform: scale(1.06); }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  flex: 1; text-align: center; text-decoration: none;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600;
}
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn:hover { filter: brightness(0.97); }

.note { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.note p { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 0 0 4px; }
.note .credit { font-weight: 600; }

/* Top bar */
#topbar {
  position: fixed; z-index: 4; top: 16px; right: 16px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end;
}
.chip {
  border: 0; background: var(--surface); box-shadow: var(--shadow);
  border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600;
}
a.chip { text-decoration: none; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; }
.lang { display: flex; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--green); color: #fff; }

/* Dock */
#dock {
  position: fixed; z-index: 4;
  left: calc(50% + 188px); transform: translateX(-50%);
  bottom: 18px;
  display: flex; gap: 10px; align-items: stretch;
  max-width: calc(100% - 420px);
}
.views {
  display: flex; gap: 4px; align-items: center;
  background: var(--surface); box-shadow: var(--shadow); border-radius: var(--radius); padding: 6px;
}
.views button {
  border: 0; background: transparent; border-radius: 10px; padding: 9px 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.views button:hover { background: #eef1eb; }
.views button.active { background: var(--green); color: #fff; }
.sun {
  background: var(--surface); box-shadow: var(--shadow); border-radius: var(--radius);
  padding: 8px 14px 9px; min-width: 300px;
}
.sun-row { display: flex; justify-content: space-between; align-items: baseline; }
.sun-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sun-time { font-size: 13px; font-weight: 600; }
.sun input[type="range"] { width: 100%; accent-color: var(--copper); margin: 4px 0 2px; }
.dates { display: flex; gap: 4px; }
.dates button {
  border: 0; background: #f0f2ed; border-radius: 999px; padding: 4px 9px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.dates button.active { background: var(--copper); color: #fff; }

#compass {
  position: fixed; z-index: 4; right: 18px; bottom: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
#compass svg { width: 40px; height: 40px; transition: transform 0.05s linear; }
#compass circle { fill: none; stroke: var(--line); stroke-width: 1.5; }
#compass path { fill: var(--copper); }
#compass text { font: 600 8px var(--sans); fill: var(--green); text-anchor: middle; }

#hint {
  position: fixed; z-index: 3; left: calc(50% + 188px); transform: translateX(-50%);
  bottom: 104px;
  background: rgba(29, 34, 30, 0.72); color: #fff;
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  pointer-events: none; transition: opacity 0.6s;
}
#hint.gone { opacity: 0; }

#loading {
  position: fixed; inset: 0; z-index: 20; display: flex; gap: 12px; align-items: center; justify-content: center;
  background: var(--bg); color: var(--green); font-weight: 600; transition: opacity 0.5s;
}
#loading.done { opacity: 0; pointer-events: none; }
#loading[hidden] { display: none; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #cfd6cb; border-top-color: var(--green); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#lightbox {
  position: fixed; inset: 0; z-index: 30; background: rgba(250, 251, 249, 0.97);
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: calc(100% - 140px); max-height: calc(100% - 60px); box-shadow: var(--shadow); border-radius: 6px; background: #fff; }
.lb-close { position: absolute; top: 14px; right: 18px; border: 0; background: none; font-size: 34px; color: var(--ink); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-solid); box-shadow: var(--shadow); width: 46px; height: 46px; border-radius: 50%; font-size: 26px; color: var(--green); }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }
.lb-nav[hidden] { display: none; }

/* Tablet */
@media (max-width: 1180px) {
  #dock { left: auto; right: 16px; transform: none; flex-direction: column; max-width: 340px; bottom: 80px; }
  .views { flex-wrap: wrap; }
  #hint { display: none; }
}

/* Phone */
@media (max-width: 760px) {
  #panel {
    top: auto; bottom: 0; left: 0; right: 0; width: auto;
    max-height: 46%;
    border-radius: 18px 18px 0 0;
    padding: 10px 16px 14px;
    transition: max-height 0.25s ease;
  }
  #panel.collapsed { max-height: 132px; overflow: hidden; }
  .sheet-handle { display: block; width: 44px; height: 5px; border: 0; border-radius: 3px; background: #cfd4cc; margin: 0 auto 10px; padding: 0; }
  .brand h1 .caps { font-size: 22px; }
  .brand h1 em { font-size: 28px; }
  #topbar { top: 10px; right: 10px; left: 10px; gap: 6px; }
  .chip { padding: 7px 11px; font-size: 12px; }
  #dock {
    left: 10px; right: 10px; transform: none; max-width: none;
    bottom: calc(46% + 10px); flex-direction: column; gap: 6px;
  }
  body.sheet-collapsed #dock { bottom: 142px; }
  .views { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .views button { padding: 7px 10px; font-size: 12px; }
  .sun { min-width: 0; padding: 6px 12px 7px; }
  #compass { top: 58px; bottom: auto; right: auto; left: 10px; width: 40px; height: 40px; }
  body:not(.sheet-collapsed) #dock { display: none; }
  .brand { cursor: pointer; }
  #compass svg { width: 34px; height: 34px; }
  #lightbox img { max-width: calc(100% - 20px); }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
}

/* Status (K3) */
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: -2px 0 6px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--copper); display: inline-block; }
.dot.res { background: #9a9c97; }
.unit-row.reserved .code { color: #7d807b; background: #eeefec; }
.unit-row.reserved .area { color: #7d807b; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #edf1ea; color: var(--green); margin-left: 6px; vertical-align: 2px; }
.badge.res { background: #eeefec; color: #6f726d; }
.pin.reserved { background: rgba(236, 237, 233, 0.92); color: #6f726d; }
.pin.reserved.active { background: #8b8f8a; color: #fff; }
.ref-strip.three { grid-template-columns: repeat(3, 1fr); }

/* ===== v4: calmer controls ===== */
#panel { width: 330px; padding: 20px 20px 14px; }
.unit-row { grid-template-columns: 48px 1fr auto; padding: 8px 6px; }
.unit-row .meta small { font-size: 11.5px; }
#dock {
  left: calc(50% + 173px); bottom: 18px; gap: 8px; align-items: center;
  background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 5px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#dock .views { background: none; box-shadow: none; padding: 0; gap: 2px; }
#dock .views button { border-radius: 999px; padding: 8px 13px; }
.sun-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-left: 1px solid var(--line);
  background: transparent; padding: 8px 14px 8px 12px; font-size: 13px; font-weight: 600; border-radius: 0 999px 999px 0;
}
.sun-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--copper); stroke-width: 1.8; stroke-linecap: round; }
.sun-btn svg circle { fill: var(--copper); stroke: none; }
body.is-night .sun-btn svg circle { fill: #9aa3b5; }
body.is-night .sun-btn svg path { stroke: #9aa3b5; }
.sun-btn[aria-expanded="true"] { color: var(--copper); }
#sunPop {
  position: fixed; z-index: 6; bottom: 74px; left: calc(50% + 173px); transform: translateX(-50%);
  width: 300px; background: var(--surface-solid); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 14px;
}
#sunPop[hidden] { display: none; }
#sunPop .sun-val { font-size: 12px; font-weight: 600; color: var(--muted); }
#sunPop input[type="range"] { width: 100%; accent-color: var(--copper); margin: 8px 0 6px; }
.toggle { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; cursor: pointer; }
.toggle input { accent-color: var(--green); width: 16px; height: 16px; }
#hint { left: calc(50% + 173px); bottom: 76px; }
#compass { width: 40px; height: 40px; bottom: 20px; }
#compass svg { width: 34px; height: 34px; }
.btn.enter { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; font-size: 14px; margin: 2px 0 14px; }
.btn.enter svg { width: 18px; height: 18px; fill: currentColor; }

/* walk mode */
#walkbar {
  position: fixed; z-index: 6; top: 16px; left: calc(50% + 173px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; background: var(--surface); box-shadow: var(--shadow);
  border-radius: 999px; padding: 6px 6px 6px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: calc(100% - 420px);
}
#walkbar[hidden] { display: none; }
.wb-title { font-weight: 600; font-size: 14px; white-space: nowrap; }
.wb-hint { font-size: 11.5px; color: var(--muted); }
.chip.dark { background: var(--green); color: #fff; }
body.walking #pins, body.walking #dock .views, body.walking #hint, body.walking #topbar .chip:not(.keep) { display: none; }
body.walking #dock { padding: 0; }
body.walking .sun-btn { border-left: 0; border-radius: 999px; }
body.walking #stage canvas { cursor: grab; }
body.walking #stage canvas:active { cursor: grabbing; }

@media (max-width: 1180px) {
  #dock { left: 50%; right: auto; transform: translateX(-50%); flex-direction: row; max-width: calc(100% - 32px); bottom: 18px; }
  #sunPop, #hint, #walkbar { left: 50%; }
  #walkbar { max-width: calc(100% - 32px); }
}
@media (max-width: 760px) {
  #dock { left: 10px; right: 10px; transform: none; bottom: 142px; max-width: none; justify-content: space-between; }
  body:not(.sheet-collapsed) #dock { display: none; }
  #dock .views { overflow-x: auto; scrollbar-width: none; flex: 1; }
  #dock .views button { padding: 7px 10px; font-size: 12px; }
  .sun-btn { padding: 7px 10px; font-size: 12px; flex: none; }
  #sunPop { left: 10px; right: 10px; width: auto; transform: none; bottom: 196px; }
  #walkbar { top: auto; bottom: 150px; left: 10px; right: 10px; transform: none; border-radius: 16px; padding: 8px 8px 8px 14px; }
  .wb-hint { display: none; }
  body.walking #dock { left: auto; right: 10px; bottom: 206px; }
}

/* walkthrough video */
.tour-thumb { position: relative; display: block; width: 100%; border: 0; border-radius: 10px; padding: 0; overflow: hidden; background: #e9e4dc; margin: 0 0 14px; cursor: pointer; text-align: left; }
.tour-thumb[hidden] { display: none; }
.tour-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.tour-thumb:hover img { transform: scale(1.03); }
.tour-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow); }
.tour-play svg { width: 24px; height: 24px; fill: var(--green); margin-left: 3px; }
.tour-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; display: flex; flex-direction: column; }
.tour-label b { font-size: 14px; font-weight: 600; }
.tour-label small { font-size: 12px; opacity: .85; }
#tourBox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 24, 20, .82); display: grid; place-items: center; }
#tourBox[hidden] { display: none; }
#tourBox video { width: min(1280px, calc(100% - 40px)); max-height: calc(100% - 80px); border-radius: 8px; background: #000; box-shadow: var(--shadow); }
#tourBox .lb-close { color: #fff; }

/* reserved units: visible, not clickable */
.pin.reserved, .unit-row.reserved { cursor: default; }
.pin.reserved { pointer-events: none; }
.unit-row.reserved:hover { background: none; }

/* ===== v5: editorial, like the Immobilien pages (Leon, 2026-11-27: less generic) =====
   square edges, hairlines instead of shadows, no pills, the unit list reads like a price list */
:root {
  --paper: #fbfaf7;
  --hair: rgba(29, 34, 30, 0.14);
  --hair-2: rgba(29, 34, 30, 0.07);
  --radius: 0;
  --shadow: none;
  --surface: var(--paper);
  --surface-solid: var(--paper);
}
#panel {
  top: 0; left: 0; bottom: 0; max-height: none; width: 340px;
  background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none;
  border-right: 1px solid var(--hair); border-radius: 0; box-shadow: none;
  padding: 28px 28px 18px; display: flex; flex-direction: column;
}
#panel > section { flex: none; }
#panel .note { margin-top: auto; }
.brand { padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
.brand .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }
.brand h1 { margin: 10px 0 8px; }
.brand .sub { font-size: 13px; color: var(--ink); opacity: 0.72; }
h2 {
  font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink);
  margin: 26px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--hair);
}
.block-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin: 18px 0 0; padding-bottom: 6px;
}
.unit-row {
  grid-template-columns: 44px 1fr auto; gap: 12px; padding: 11px 0; border-radius: 0;
  border-bottom: 1px solid var(--hair-2); transition: color 0.15s;
}
.block-label + .unit-row { border-top: 1px solid var(--hair); }
.unit-row:hover, .unit-row.hover { background: none; }
.unit-row .code {
  background: none; border-radius: 0; padding: 0; text-align: left;
  font-size: 15px; font-weight: 500; color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.unit-row:hover .code, .unit-row.hover .code { color: var(--copper); }
.unit-row .meta { font-size: 14px; }
.unit-row .meta small { font-size: 12px; margin-top: 1px; }
.unit-row .area { font-weight: 400; font-size: 15px; font-variant-numeric: tabular-nums; }
.unit-row.reserved .code { background: none; color: #9a9d98; }
.unit-row.reserved .meta, .unit-row.reserved .area { color: #9a9d98; }
.legend { margin: 10px 0 0; }
.badge { border-radius: 0; background: none; border: 1px solid currentColor; padding: 2px 6px; font-size: 10px; }
.badge.res { background: none; }

.link-btn { font-weight: 500; margin-top: 22px; }
.detail-head { display: block; margin: 16px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
.unit-code {
  width: auto; height: auto; border-radius: 0; background: none; color: var(--green); display: block;
  font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: 0.06em; margin-bottom: 10px;
}
.unit-title { font-weight: 500; font-size: 16px; }
.stats { display: block; margin: 0 0 18px; border-top: 1px solid var(--hair); }
.stats div, .stats div.wide {
  display: flex; justify-content: space-between; align-items: baseline;
  background: none; border-radius: 0; padding: 9px 0; border-bottom: 1px solid var(--hair-2);
}
.stats dt { font-size: 13px; }
.stats dd { margin: 0; font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; }
.stats div.wide dd { font-size: 16px; font-weight: 500; }
.btn { border-radius: 0; font-weight: 500; border-color: var(--ink); padding: 12px; transition: background 0.2s, color 0.2s; }
.btn:hover { filter: none; background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn.enter { margin: 0 0 16px; }
.plan-thumb, .tour-thumb, .ref-strip button { border-radius: 0; }
.ref-tag { border-radius: 0; }
.note { border-top: 1px solid var(--hair); padding-top: 12px; }
.note .credit { font-weight: 500; color: var(--ink); }

/* top right: plain boxes with a hairline, no pills */
#topbar { gap: 0; top: 16px; right: 16px; }
.chip {
  border-radius: 0; box-shadow: none; background: var(--paper); border: 1px solid var(--hair);
  padding: 9px 14px; font-weight: 500;
}
#topbar .chip + .chip { border-left: 0; }
a.chip:hover, button.chip:hover { background: #fff; color: var(--green); }
.lang { border-radius: 0; box-shadow: none; background: var(--paper); border: 1px solid var(--hair); border-left: 0; padding: 0 4px; }
.lang button { border-radius: 0; padding: 9px 8px; font-weight: 500; position: relative; }
.lang button[aria-pressed="true"] { background: none; color: var(--ink); }
.lang button[aria-pressed="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 1px; background: var(--ink); }
.chip.dark { border-color: var(--green); }

/* views: a plain bar, active view underlined */
#dock {
  left: calc(50% + 170px); bottom: 18px; border-radius: 0; box-shadow: none; padding: 0;
  background: var(--paper); border: 1px solid var(--hair); backdrop-filter: none; -webkit-backdrop-filter: none;
}
#dock .views { gap: 0; }
#dock .views button { border-radius: 0; padding: 12px 16px; font-weight: 500; color: var(--muted); position: relative; }
#dock .views button:hover { background: none; color: var(--ink); }
#dock .views button.active { background: none; color: var(--ink); }
#dock .views button.active::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; background: var(--copper); }
.sun-btn { border-left: 1px solid var(--hair); border-radius: 0; padding: 12px 16px; font-weight: 500; }
#sunPop { left: calc(50% + 170px); bottom: 70px; border: 1px solid var(--hair); }
.dates button { border-radius: 0; background: none; border: 1px solid var(--hair); }
.dates button.active { border-color: var(--copper); }
#hint { left: calc(50% + 170px); bottom: 72px; border-radius: 0; background: rgba(29, 34, 30, 0.82); }
#walkbar { left: calc(50% + 170px); border-radius: 0; border: 1px solid var(--hair); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* pins: small square tags */
.pin {
  border-radius: 0; box-shadow: none; padding: 4px 7px;
  background: var(--paper); border: 1px solid rgba(29, 34, 30, 0.22);
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink);
}
.pin:hover { background: var(--green); border-color: var(--green); }
.pin.active { background: var(--copper); border-color: var(--copper); transform: translate(-50%, -50%); }
.pin.reserved { background: rgba(240, 240, 237, 0.9); border-color: rgba(29, 34, 30, 0.12); color: #8b8e89; }

#compass { border-radius: 0; box-shadow: none; border: 1px solid var(--hair); background: var(--paper); }
#compass circle { stroke: none; }
.spinner { border-width: 1.5px; border-color: var(--hair); border-top-color: var(--green); }
.lb-nav { border-radius: 0; box-shadow: none; border: 1px solid var(--hair); }
.tour-play { box-shadow: none; }
#tourBox video, #lightbox img { border-radius: 0; }

@media (max-width: 1180px) {
  #dock, #sunPop, #hint, #walkbar { left: calc(50% + 170px); }
}
@media (max-width: 900px) {
  #dock, #sunPop, #hint, #walkbar { left: 50%; }
}
@media (max-width: 760px) {
  #panel {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 46%;
    border-right: 0; border-top: 1px solid var(--hair); padding: 10px 18px 14px; display: block;
  }
  #panel.collapsed { max-height: 132px; }
  .sheet-handle { border-radius: 0; height: 3px; width: 36px; background: rgba(29, 34, 30, 0.25); }
  .brand { padding-bottom: 14px; }
  #topbar { top: 10px; right: 10px; left: 10px; }
  .chip { padding: 8px 11px; }
  .lang button { padding: 8px 7px; }
  #dock { left: 10px; right: 10px; bottom: 142px; transform: none; }
  #dock .views button { padding: 10px 11px; }
  #dock .views button.active::after { left: 11px; right: 11px; bottom: 5px; }
  .sun-btn { padding: 10px 11px; }
  #sunPop { left: 10px; right: 10px; transform: none; bottom: 190px; }
  #walkbar { left: 10px; right: 10px; transform: none; }
}

/* panel foot: the Oberegger logo in black instead of the notes (Leon, 2026-11-27) */
#panel .panel-logo { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--hair); }
.panel-logo img { display: block; width: 150px; height: auto; filter: brightness(0) saturate(0); opacity: 0.88; }
/* required source credit for the orthophoto (CC BY 4.0), tiny in the map corner */
#attrib { position: fixed; z-index: 3; right: 70px; bottom: 22px; font-size: 10px; line-height: 1.3; color: rgba(29, 34, 30, 0.62); background: rgba(251, 250, 247, 0.7); padding: 2px 6px; pointer-events: none; }
body.walking #attrib { display: none; }
@media (max-width: 1180px) { #attrib { bottom: 70px; right: 16px; } }
@media (max-width: 760px) {
  .panel-logo img { width: 120px; }
  #attrib { top: 106px; bottom: auto; left: 10px; right: auto; font-size: 9px; }
}

/* loading screen: the building draws itself, then the windows light up one after another, real progress below */
#loading { flex-direction: column; gap: 0; background: rgba(251, 250, 247, 0.96); color: var(--ink); font-weight: 400; }
.ld3 { display: grid; justify-items: center; gap: 18px; padding: 0 24px; text-align: center; }
.ld3-draw { width: min(360px, 80vw); height: auto; overflow: visible; }
.ld3-draw path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ld3Draw 1.3s cubic-bezier(.65, 0, .25, 1) forwards; animation-delay: var(--d, 0s); }
.ld3-draw path.g { stroke-width: 2.2; }
.ld3-draw path.f { stroke-width: 1; stroke: var(--copper); }
.ld3-draw rect { fill: var(--copper); opacity: 0; animation: ld3Lit 4.2s ease-in-out infinite; animation-delay: calc(1.5s + var(--k) * .09s); }
@keyframes ld3Draw { to { stroke-dashoffset: 0; } }
@keyframes ld3Lit { 0% { opacity: 0; } 6% { opacity: .9; } 62% { opacity: .9; } 78%, 100% { opacity: 0; } }
.ld3-name { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 10px; color: var(--green); margin-top: 6px; opacity: 0; animation: ld3Fade .8s ease .5s forwards; }
.ld3-name .caps { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); letter-spacing: 0.14em; }
.ld3-name em { font-family: var(--script); font-style: normal; font-size: clamp(30px, 3.6vw, 40px); color: var(--copper); line-height: .8; }
.ld3-bar { position: relative; width: 220px; height: 1px; background: var(--hair); }
.ld3-bar i { position: absolute; left: 0; right: 0; top: -0.5px; height: 2px; background: var(--copper); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.ld3-txt { display: flex; gap: 10px; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.ld3-txt b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: left; }
@keyframes ld3Fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ld3-draw path { animation: none; stroke-dashoffset: 0; } .ld3-draw rect { animation: none; opacity: .9; } .ld3-name { animation: none; opacity: 1; } }

/* phones: no project header in the sheet, the list starts right away (Leon, 2026-11-27) */
@media (max-width: 760px) {
  #panel .brand { display: none; }
  #panel h2 { margin-top: 4px; }
  #panel .link-btn { margin-top: 6px; }
}

/* no project header in the panel at all (Leon, 2026-11-27): the list starts at the top */
#listView > h2 { margin-top: 0; }
#detailView > .link-btn { margin-top: 0; }
.actions .btn { flex: 1; }

/* back to the start view: button next to the compass, the compass does the same (Leon, 2026-11-27) */
#homeView {
  position: fixed; z-index: 4; right: 66px; bottom: 20px; width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center; background: var(--paper); border: 1px solid var(--hair); border-radius: 0; color: var(--ink);
}
#homeView svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#homeView circle { fill: var(--copper); stroke: none; }
#homeView:hover { color: var(--copper); }
body.walking #homeView { display: none; }
.panel-logo .attrib { display: block; margin-top: 10px; font-size: 9px; line-height: 1.3; color: rgba(29, 34, 30, 0.45); }
@media (max-width: 760px) {
  #homeView { top: 104px; bottom: auto; right: auto; left: 10px; }
}
