/* 3D-Objektvorschau Wolf + Diefenbach: helle CAD-Arbeitsflaeche, Farben aus dem alten Auftritt (#2d4a8f, #6599ff, #252b39, #c47529). */
@font-face { font-family: "Quicksand"; src: url("../fonts/quicksand-var-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; src: url("../fonts/quicksand-var-latin-ext.woff2") format("woff2"); font-weight: 300 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --blau: #2d4a8f; --siegel: #6599ff; --nacht: #252b39; --kupfer: #c47529; --kupfer-tief: #a8611f;
  --text: #2b2f38; --leise: #5a616d; --linie: #d5dbe3; --flaeche: #ffffff; --grund: #e9edf2;
  --rot: #b4372f;
  --kurve: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: grid; grid-template-rows: auto 1fr auto; background: var(--grund); color: var(--text);
  font: 500 15px/1.5 "Quicksand", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2 { font-family: inherit; color: var(--blau); margin: 0; line-height: 1.2; }
h2 { font-size: 1.12rem; font-weight: 700; }
button { font: inherit; }
a { color: var(--blau); }
:focus-visible { outline: 2px solid var(--kupfer); outline-offset: 2px; }
.leise { color: var(--leise); margin: 4px 0 0; }
.klein { font-size: .8rem; line-height: 1.45; }

/* Kopf */
.kopf { display: flex; align-items: center; gap: 18px; padding: 8px 16px; background: var(--nacht); color: #e8ebf1; min-height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #e8ebf1; text-decoration: none; white-space: nowrap; }
.logo svg { width: 38px; height: 38px; flex: none; }
.logo .wort { font-weight: 300; font-size: 1.15rem; }
.logo .wort span { margin-left: 2px; }
.objekt { display: flex; flex-direction: column; border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 16px; min-width: 0; }
.objekt strong { font-weight: 700; color: #fff; }
.objekt span { font-size: .82rem; color: #b8bfcc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beispiel { display: inline-block; margin-left: auto; background: var(--kupfer-tief); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 3px; white-space: nowrap; }
.beispiel.gross { margin: 0 0 12px; font-size: .8rem; }

.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border-radius: 4px; border: 1px solid transparent;
  font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; transition: background .2s var(--kurve), color .2s var(--kurve), border-color .2s; }
.knopf.voll { background: var(--blau); color: #fff; }
.knopf.voll:hover { background: var(--nacht); }
.knopf.rand { background: #fff; color: var(--blau); border-color: var(--blau); }
.knopf.rand:hover { background: #eef3ff; }
.knopf.hell { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .28); }
.knopf.hell:hover { background: rgba(255, 255, 255, .2); }

/* Arbeitsflaeche */
.arbeitsflaeche { position: relative; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 1fr auto; min-height: 0; }
.ansicht { position: relative; grid-column: 2; grid-row: 1; min-height: 0; overflow: hidden; touch-action: none; }
.ansicht canvas { display: block; width: 100%; height: 100%; outline: none; }
.laden { position: absolute; inset: 0; display: grid; place-items: center; color: var(--leise); font-weight: 700; background: var(--grund); transition: opacity .4s; }
.laden.weg { opacity: 0; pointer-events: none; }

.liste { grid-column: 1; grid-row: 1 / span 2; background: var(--flaeche); border-right: 1px solid var(--linie); padding: 14px 12px; overflow: auto; z-index: 4; }
.panel-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.zu { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--leise); cursor: pointer; padding: 2px 6px; border-radius: 4px; min-width: 36px; min-height: 36px; }
.zu:hover { background: #eef1f5; color: var(--text); }
#listeZu { display: none; }
.geschoss { margin: 12px 0 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); }
.we { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; margin: 0 0 4px;
  border: 1px solid var(--linie); border-radius: 4px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.we:hover { border-color: var(--siegel); background: #f4f7ff; }
.we[aria-current="true"] { border-color: var(--blau); background: #e9f0ff; box-shadow: inset 3px 0 0 var(--blau); }
.we b { font-weight: 700; color: var(--blau); }
.we small { grid-column: 1 / -1; color: var(--leise); font-size: .8rem; }
.we .qm { grid-column: 3; font-weight: 700; font-size: .86rem; color: var(--text); }

.details, .sanierung { position: absolute; right: 12px; top: 12px; bottom: 70px; width: 360px; max-width: calc(100% - 24px); overflow: auto; z-index: 5;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 14px 40px rgba(37, 43, 57, .18); padding: 16px; }
.sanierung { bottom: auto; max-height: calc(100% - 90px); }
.details[hidden], .sanierung[hidden] { display: none; }
.zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.zahlen div { background: #f3f6fa; border-radius: 4px; padding: 8px 10px; }
.zahlen b { display: block; font-size: 1.15rem; color: var(--blau); }
.zahlen span { font-size: .76rem; color: var(--leise); }
.grundriss { margin: 0 0 10px; border: 1px solid var(--linie); border-radius: 4px; background: #fbfcfd; padding: 8px; }
.grundriss svg { display: block; width: 100%; height: auto; }
.grundriss figcaption { font-size: .76rem; color: var(--leise); margin-top: 4px; }
.raeume { width: 100%; border-collapse: collapse; font-size: .86rem; margin-bottom: 12px; }
.raeume td { padding: 4px 0; border-bottom: 1px solid #edf0f4; }
.raeume td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.raeume tr.summe td { font-weight: 700; border-bottom: 0; padding-top: 8px; }
.details .knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
#sTabelle { width: 100%; border-collapse: collapse; font-size: .86rem; }
#sTabelle th, #sTabelle td { text-align: left; padding: 7px 6px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
#sTabelle th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); }
#sTabelle td:first-child { font-weight: 700; color: var(--blau); }
#sTabelle td.alt { color: #7a5a3c; }

/* Werkzeugleiste */
.leiste { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; background: var(--flaeche); border-top: 1px solid var(--linie); z-index: 4; }
.leiste .knopf.hell { background: #f3f6fa; color: var(--blau); border-color: var(--linie); }
.leiste .knopf.hell:hover { border-color: var(--blau); }
.gruppe { display: inline-flex; align-items: center; border: 1px solid var(--linie); border-radius: 5px; overflow: hidden; background: #f3f6fa; }
.gtitel { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); padding: 0 10px; }
.gruppe button { border: 0; border-left: 1px solid var(--linie); background: transparent; padding: 0 12px; min-height: 40px; font-weight: 700; font-size: .88rem; color: var(--text); cursor: pointer; }
.gruppe button:hover { background: #e6ecf6; }
.gruppe button[aria-pressed="true"] { background: var(--blau); color: #fff; }
.nur-handy { display: none; }

/* Ueberlagerungen im Modell */
.steuerhinweis { position: absolute; left: 12px; bottom: 10px; margin: 0; font-size: .78rem; color: var(--leise); background: rgba(255, 255, 255, .85); padding: 4px 8px; border-radius: 3px; pointer-events: none; }
.zustand-etikett { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .92); border: 1px solid var(--linie); border-left: 3px solid var(--siegel); padding: 5px 10px; font-weight: 700; font-size: .85rem; color: var(--blau); border-radius: 3px; pointer-events: none; }
.tipp { position: absolute; z-index: 6; pointer-events: none; background: var(--nacht); color: #fff; font-size: .82rem; padding: 6px 9px; border-radius: 4px; white-space: nowrap; transform: translate(14px, 14px); }
.griff { position: absolute; top: 0; bottom: 0; width: 0; z-index: 3; cursor: ew-resize; }
.griff i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(37, 43, 57, .35); }
.griff i::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px; display: grid; place-items: center; border-radius: 50%; background: var(--blau); color: #fff; font-size: 1.1rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.griff span { position: absolute; top: 12px; font-weight: 700; font-size: .82rem; padding: 4px 9px; border-radius: 3px; background: rgba(255, 255, 255, .92); border: 1px solid var(--linie); white-space: nowrap; }
.griff .l { right: 10px; color: #7a5a3c; } .griff .r { left: 10px; color: var(--blau); }
.griff-zone { position: absolute; top: 0; bottom: 0; left: -22px; width: 44px; }

/* Navigationswuerfel (aus dem 5D-Modell) */
.wuerfel { --w: 64px; --h: 32px; position: absolute; right: 14px; top: 12px; width: 112px; height: 120px; z-index: 3; user-select: none; }
.w-buehne { position: absolute; left: 24px; top: 18px; width: var(--w); height: var(--w); perspective: 600px; }
.w-koerper { position: absolute; inset: 0; transform-style: preserve-3d; }
.w-seite { position: absolute; inset: 0; display: grid; grid-template: 22% 1fr 22% / 22% 1fr 22%; background: rgba(250, 251, 252, .94); border: 1px solid #aeb6bf; backface-visibility: hidden; }
.w-seite b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .4px; color: #3d4650; pointer-events: none; text-transform: uppercase; }
.w-zone { display: block; cursor: pointer; }
.w-zone.an { background: rgba(101, 153, 255, .38); }
.w-zone.flaeche.an { background: rgba(101, 153, 255, .26); }
.w-ring { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; border: 8px solid rgba(255, 255, 255, .75); box-shadow: 0 0 0 1px #b8c0c8, inset 0 0 0 1px #b8c0c8; transform: translateY(calc(var(--h) + 1px)) rotateX(90deg); }
.w-ring span { position: absolute; width: 16px; height: 16px; margin: -8px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #4a535d; cursor: pointer; border-radius: 50%; }
.w-ring span:hover { background: var(--blau); color: #fff; }
.w-ring .n { left: 50%; top: -4px; color: var(--rot); } .w-ring .s { left: 50%; bottom: -12px; } .w-ring .o { right: -12px; top: 50%; } .w-ring .w { left: -4px; top: 50%; }
.w-start, .w-dreh { position: absolute; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid var(--linie); border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--leise); cursor: pointer; }
.w-start:hover, .w-dreh:hover { color: var(--blau); border-color: var(--blau); }
.w-start { left: 0; top: 0; }
.w-dreh.links { left: 0; bottom: 2px; } .w-dreh.rechts { right: 0; bottom: 2px; }

/* Fuss */
.fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 6px 16px; font-size: .76rem; color: #b8bfcc; background: var(--nacht); }
.fuss a { color: #fff; text-decoration: none; }
.fuss a:hover { color: var(--siegel); }

/* Intro */
.intro { max-width: 520px; width: calc(100% - 32px); border: 0; border-radius: 8px; padding: 28px 28px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); color: var(--text); }
.intro::backdrop { background: rgba(37, 43, 57, .55); }
.intro h1 { font-size: 1.45rem; font-weight: 600; margin-bottom: 10px; }
.intro ul { padding-left: 1.1em; margin: 10px 0 14px; }
.intro li { margin-bottom: 4px; }

@media (max-width: 900px) {
  .arbeitsflaeche { grid-template-columns: 1fr; }
  .ansicht, .leiste { grid-column: 1; }
  .liste { position: absolute; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); grid-row: auto; box-shadow: 12px 0 30px rgba(0, 0, 0, .18); transform: translateX(-105%); transition: transform .25s var(--kurve); }
  .liste.offen { transform: none; }
  #listeZu, .nur-handy { display: inline-flex; }
  .objekt span { display: none; }
}
@media (max-width: 640px) {
  .kopf { gap: 10px; padding: 6px 10px; min-height: 50px; }
  .logo .wort, #infoKnopf { display: none; }
  .logo svg { width: 34px; height: 34px; }
  .objekt { padding-left: 10px; }
  .objekt strong { font-size: .92rem; }
  .beispiel { font-size: .66rem; padding: 4px 7px; }
  .leiste { gap: 6px; padding: 6px 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
  .leiste > * { flex: none; }
  .gtitel { display: none; }
  .gruppe button { padding: 0 10px; min-height: 44px; font-size: .84rem; }
  .leiste .knopf { min-height: 44px; white-space: nowrap; }
  .details, .sanierung { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: 72%; border-radius: 10px 10px 0 0; }
  .wuerfel { transform: scale(.8); transform-origin: top right; right: 6px; top: 6px; }
  .steuerhinweis { display: none; }
  .zustand-etikett { font-size: .78rem; }
  .fuss { font-size: .7rem; padding: 5px 10px; }
  .fuss span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
