/* 3D Room Tour – Vollbild */
.page-tour { overflow: hidden; background: #ece8e0; overscroll-behavior: none; }
.tour { position: fixed; inset: 0; }
.tour-viewer { position: absolute; inset: 0; }

.tour-top { position: absolute; inset: 0 0 auto; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px var(--gutter); pointer-events: none; }
.tour-top > * { pointer-events: auto; }
.tour-top-l, .tour-top-r { display: flex; align-items: center; gap: 10px; flex: 1; }
.tour-top-r { justify-content: flex-end; }
.tour-mark { font: 400 26px/1 var(--f-display); text-decoration: none; color: var(--ink); letter-spacing: .01em; }
.pill svg { width: 15px; height: 15px; }

.seg { display: inline-flex; background: #fff; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: 600 12.5px/1 var(--f-body); white-space: nowrap; transition: background .2s, color .2s; }
.seg button small { font: 500 10px/1 var(--f-mono); opacity: .65; margin-left: 5px; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.seg button:hover:not([aria-checked="true"]):not([aria-pressed="true"]) { background: var(--paper); }

.tour-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 10; display: flex; gap: 4px; align-items: center; padding: 5px; background: rgba(20,20,20,.9); border-radius: 999px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.seg--dark { background: transparent; border: 0; padding: 0; }
.seg--dark button { height: 34px; padding: 0 16px; color: #fff; }
.seg--dark button:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.12) !important; }
.seg--dark button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.tbtn { height: 34px; min-width: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; font: 500 12.5px/1 var(--f-body); white-space: nowrap; transition: background .2s, color .2s; }
.tbtn:hover { background: rgba(255,255,255,.2); }
.tbtn[aria-pressed="true"] { background: #fff; color: var(--ink); }
#btnAscii { font-family: var(--f-mono); font-weight: 700; letter-spacing: .06em; }

.tour-info { position: absolute; top: 66px; left: var(--gutter); z-index: 9; width: 260px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 16px 16px 14px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.tour-info h1 { font: 400 52px/.9 var(--f-display); margin: 6px 0 4px; }
.ti-price { font-weight: 600; margin: 0 0 10px; }
.ti-price span { font-weight: 400; color: var(--muted); font-size: 13px; }
.ti-more .mono { font-size: 12px; line-height: 1.6; padding-top: 10px; border-top: 1px solid var(--line); }
.ti-actions { display: flex; gap: 6px; align-items: center; }

.tour-stations { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 9; display: grid; gap: 6px; }
.tour-stations .pill { justify-content: flex-start; height: 34px; padding: 0 14px 0 10px; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.tour-stations .pill .mono { font-size: 10px; opacity: .55; margin-right: 4px; }

.tour-map { position: absolute; left: var(--gutter); bottom: 18px; z-index: 9; width: 156px; background: rgba(255,255,255,.95); border-radius: 12px; padding: 8px 8px 6px; cursor: crosshair; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.tour-map .label { margin: 4px 2px 0; font-size: 9.5px; }
.tour-map .fp-cam { opacity: 0; transition: opacity .3s; }
.tour.is-walk .tour-map .fp-cam { opacity: 1; }

.tour-hint { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 9; margin: 0; font-size: 11px; color: var(--ink); background: rgba(255,255,255,.88); padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.tour-clock { position: absolute; right: var(--gutter); bottom: 26px; margin: 0; font-size: 11px; font-weight: 700; z-index: 9; color: var(--ink); }
.tour.hs-off .rv-hotspots { display: none; }

.tour-loader { position: absolute; inset: 0; z-index: 30; background: #000; color: #f2f2f2; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; transition: opacity .7s; letter-spacing: .3em; text-transform: uppercase; font-size: 13px; }
.tour-loader p { margin: 0; }
.tour-loader-line { font-size: 11px; opacity: .7; letter-spacing: .2em; }
.tour-loader.is-done { opacity: 0; pointer-events: none; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* Nacht / ASCII → dunkle Oberfläche */
body.is-dark .tour-mark, body.is-dark .tour-clock { color: #f2f2f2; }
body.is-dark .tour-info, body.is-dark .tour-map { background: rgba(10,10,10,.82); color: #f2f2f2; box-shadow: none; border: 1px solid #2a2a2a; }
body.is-dark .tour-info .ti-more .mono { border-color: #333; }
body.is-dark .tour-hint { background: rgba(0,0,0,.75); color: #f2f2f2; }
body.is-dark .tour-map .fp-floor { fill: #1b1b1b; }
body.is-dark .tour-map .fp-wet { fill: #222; }
body.is-dark .tour-map .fp-item { fill: #111; stroke: #ddd; }
body.is-dark .tour-map .fp-line, body.is-dark .tour-map .fp-door { stroke: #ddd; }
body.is-dark .tour-map .fp-wall { fill: #f2f2f2; }
body.is-ascii, body.is-ascii .pill, body.is-ascii .seg button, body.is-ascii .tbtn, body.is-ascii .tour-info { font-family: var(--f-mono); }
body.is-ascii .tour-info h1, body.is-ascii .tour-mark { font-family: var(--f-mono); font-weight: 700; letter-spacing: .2em; font-size: 15px; white-space: nowrap; }
.page-tour .toast { bottom: 84px; }
body.is-ascii .tour-info h1 { font-size: 34px; letter-spacing: .02em; }

/* Tablet: Toolbar braucht die Breite → Uhr weg, Grundriss kleiner und über die Toolbar */
@media (min-width: 761px) and (max-width: 1100px) {
  .tour-clock { display: none; }
  .tour-map { width: 120px; bottom: 74px; }
}
/* Niedrige Fenster: Infokarte kompakt, damit sie den Grundriss nicht berührt */
@media (max-height: 700px) {
  .ti-more { display: none; }
}
@media (max-height: 600px) {
  .tour-map { width: 88px; }
  .tour-map .label { display: none; }
}
/* Querformat-Handy: kein Platz für den Mini-Grundriss */
@media (max-height: 460px) {
  .tour-map { display: none; }
}

@media (max-width: 760px) {
  .tour-top { padding: 10px 12px; }
  .tour-mark, .tour-clock { display: none; }
  .tour-top-l, .tour-top-r { flex: none; }
  .seg button { padding: 0 9px; }
  .seg button small { display: none; }
  .tour-info { top: 56px; left: 12px; width: auto; max-width: 54vw; padding: 9px 12px; border-radius: 12px; }
  .tour-info h1 { font-size: 28px; margin: 2px 0; }
  .tour-info .label { font-size: 9.5px; }
  .ti-price { font-size: 13px; margin: 0; }
  .ti-more { display: none; }
  .tour-stations { top: 56px; right: 12px; transform: none; gap: 4px; }
  .tour-stations .pill { height: 28px; font-size: 12px; padding: 0 10px 0 8px; }
  .tour-map { width: 104px; left: 12px; bottom: 70px; padding: 6px; }
  .tour-map .label { display: none; }
  .tour-bar { bottom: 12px; max-width: calc(100% - 24px); }
  .seg--dark button { padding: 0 12px; }
  .tbtn { padding: 0 11px; }
  .tour-hint { bottom: 64px; left: auto; right: 12px; transform: none; white-space: normal; max-width: 52vw; text-align: right; border-radius: 12px; }
}
