:root {
  --primary-green: #dce4aa;
  --primary-green-light: #e5ecb7;
  --primary-green-dark: #d3dc9d;
  --primary-blue: #8CA6B1;
  --primary-blue-dark: #7a95a1;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow-light: rgba(0,0,0,0.04);
  --shadow-medium: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: noka, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
}
body.admin { background: var(--primary-blue); }
body.login-page {
  background: var(--primary-blue);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
a { color: var(--primary-blue-dark); text-decoration: none; }
h1, h2, h3 { font-weight: 700; }
/* Topbar */
.topbar { background: rgba(255,255,255,0.95); box-shadow: 0 2px 12px var(--shadow-medium); }
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text-dark); display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 36px; display: block; }
.brand span { color: var(--primary-blue-dark); font-weight: 400; font-size: 17px; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--text-dark); font-weight: 700; }
.topbar .who { color: var(--text-light); }
.wrap { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
/* Cards */
.card {
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.15);
  padding: 32px;
  margin-bottom: 24px;
}
.card.login-card { width: 420px; max-width: 92vw; padding: 48px; text-align: center; }
/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary-green);
  color: var(--text-dark);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220,228,170,0.3);
  transition: background 0.15s;
}
.btn:hover { background: var(--primary-green-dark); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-secondary { background: var(--bg-light); box-shadow: none; border: 2px solid var(--border-light); }
.btn-danger { background: #f3d6d6; }
.btn-block { width: 100%; }
/* Forms */
label { display: block; text-align: left; font-weight: 700; margin: 14px 0 6px; }
.input, select.input, textarea.input {
  width: 100%;
  background: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-dark);
}
.input:focus { outline: none; border-color: var(--primary-blue); }
.hint { color: var(--text-light); font-size: 13px; margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row > div { flex: 1; }
/* Projekt-Karten */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  box-shadow: 0 8px 24px var(--shadow-medium);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.18); }
.pc-thumb {
  position: relative; display: block; height: 150px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
}
.pc-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-empty {
  height: 52px; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); opacity: 0.75;
}
.pc-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.pc-lock {
  position: absolute; top: 10px; right: 12px;
  background: rgba(255,255,255,0.92); border-radius: 8px;
  padding: 2px 8px; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pc-body { padding: 16px 18px 4px; }
.project-card h3 { margin: 0 0 2px; font-size: 19px; }
.project-card .meta { color: var(--text-light); font-size: 13px; }
.pc-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  color: var(--text-light); font-size: 13px; margin-top: 10px; font-weight: 700;
}
.pc-date { color: var(--text-light); font-size: 12px; margin-top: 8px; }
.project-card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 18px; }
.badge {
  display: inline-block; border-radius: 8px; padding: 2px 10px;
  font-size: 12px; font-weight: 700;
}
.badge.draft { background: var(--bg-light); color: var(--text-light); }
.badge.published { background: var(--primary-green); color: var(--text-dark); }
/* Tabellen */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
table.list th { color: var(--text-light); font-size: 13px; }
.flash {
  background: var(--primary-green-light);
  border-radius: 12px; padding: 12px 18px; margin-bottom: 20px; font-weight: 700;
}
.error {
  background: #f3d6d6;
  border-radius: 12px; padding: 12px 18px; margin-bottom: 20px; font-weight: 700;
}
.logo-img { max-width: 160px; margin: 0 auto 8px; display: block; }
/* ===== Kundenansicht ===== */
body.customer { background: var(--bg-light); }
.c-header { background: var(--white); box-shadow: 0 2px 12px var(--shadow-light); }
.c-title h1 { margin: 0; font-size: 38px; }
.c-title .client { color: var(--text-light); font-size: 20px; margin-top: 4px; }
.c-header-center {
  max-width: 1100px; margin: 0 auto; padding: 30px 24px 26px;
  text-align: center;
}
.header-logo { height: 96px; display: block; margin: 0 auto 16px; }
.c-header-center .c-title h1 { font-size: 38px; }
.c-header-center .c-title .client { font-size: 20px; margin-top: 4px; }
.c-section { max-width: 1100px; margin: 36px auto; padding: 0 24px; }
.c-section h2 { font-size: 27px; margin: 0 0 4px; }
.c-section h2::after {
  content: ''; display: block; width: 56px; height: 5px;
  background: var(--primary-green); border-radius: 3px; margin: 8px 0 18px;
}
.sec-actions {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.sec-actions .btn { padding: 12px 24px; font-size: 15px; }
.btn-big { padding: 16px 40px; font-size: 18px; border-radius: 14px; }
.contact-row { display: flex; align-items: center; justify-content: center; gap: 12px 44px; flex-wrap: wrap; font-size: 17px; }
.footer-logo { height: 56px; display: block; margin: 0 auto; }
.c-footer {
  background: var(--primary-blue); color: var(--white);
  margin-top: 60px; padding: 36px 24px; text-align: center;
}
.c-footer a { color: var(--white); font-weight: 700; }
/* ===== Sektionen-Editor ===== */
.sec {
  background: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.sec.dragging { opacity: 0.5; }
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-head .sec-title { flex: 1; min-width: 180px; }
.sec-drag { cursor: grab; font-size: 18px; color: var(--text-light); user-select: none; }
.sec-files { margin-top: 10px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--border-light);
}
.file-row .fname { flex: 1; font-size: 14px; overflow-wrap: anywhere; }
.thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; background: #ddd; }
.thumb-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.upload-progress { min-height: 18px; margin-top: 6px; }
/* ===== Kundenseite: Inhalte ===== */
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.carousel {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.carousel img {
  height: 220px; width: auto; border-radius: 12px; display: block;
  scroll-snap-align: start; box-shadow: 0 4px 12px var(--shadow-medium);
}
.carousel-wrap { position: relative; }
.car-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary-green); color: var(--text-dark);
  font-size: 28px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: background 0.15s;
}
.car-nav:hover { background: var(--primary-green-dark); }
.car-prev { left: -10px; }
.car-next { right: -10px; }
.car-item { scroll-snap-align: start; flex-shrink: 0; }
.img-name {
  font-size: 13px; color: var(--text-light); margin-top: 6px;
  text-align: center; overflow-wrap: anywhere;
}
.masonry { columns: 3; column-gap: 14px; margin-top: 14px; }
.mas-item { break-inside: avoid; margin-bottom: 14px; }
.masonry img {
  width: 100%; border-radius: 12px; display: block;
  box-shadow: 0 4px 12px var(--shadow-medium);
}
.mas-item .img-name { margin-top: 4px; margin-bottom: 6px; }
@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 560px) { .masonry { columns: 1; } .carousel img { height: 160px; } }
.video-wrap { margin-bottom: 24px; }
.video-wrap video {
  width: 100%; max-height: 70vh; border-radius: 14px; background: #000;
  box-shadow: 0 8px 24px var(--shadow-medium);
}
.tour-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px var(--shadow-medium);
}
.tour-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.doc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.doc-row:last-child { border-bottom: none; }
/* ===== Lightbox ===== */
#lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 28, 35, 0.94);
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
#lightbox img {
  max-width: 90vw; max-height: 86vh;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff;
  border: none; cursor: pointer; border-radius: 50%;
  width: 52px; height: 52px; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#lightbox button:hover { background: var(--primary-green); color: var(--text-dark); }
.lb-close { top: 20px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; font-weight: 700; font-size: 14px; opacity: 0.8;
}
@media (max-width: 560px) {
  #lightbox button { width: 42px; height: 42px; font-size: 24px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; } .lb-close { right: 12px; }
}
/* --- Rundgang-Unterbereiche (Matterport-Deeplinks) --- */
.areas-block{margin-top:16px}
.areas-list{display:flex;flex-wrap:wrap;gap:10px}
.area-tile{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border:1px solid #dfe5e8;border-radius:12px;background:#fff;cursor:pointer;font-weight:600;color:#2c3e50;font-size:15px;transition:.15s;font-family:inherit}
.area-tile:hover{border-color:#8CA6B1;box-shadow:0 4px 12px rgba(0,0,0,.08)}
.area-tile.active{background:#dce4aa;border-color:#dce4aa}
.area-tile .mp-ico{width:20px;height:20px;flex:none;color:#8CA6B1}
.area-tile.active .mp-ico{color:#2c3e50}
.area-add{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:14px}
.area-add .input{flex:1;min-width:160px}
.area-add .area-ur{flex:2;min-width:200px}
.area-msg{min-width:120px}
.areas-box{margin-top:12px;padding:12px 14px;border:1px dashed #cfd8dc;border-radius:10px;background:#fafbfa}
.areas-toggle{display:flex;align-items:center;gap:8px;margin:4px 0;cursor:pointer;font-size:14px}
.areas-admin-list{margin:8px 0}
.area-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid #eef1f2}
.area-row .area-nm{font-weight:600;color:#2c3e50}
.area-row .area-u{color:#8a97a0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px;flex:1}
.area-row .area-by{font-size:11px;background:#dce4aa;color:#2c3e50;border-radius:8px;padding:1px 7px}
.area-add-admin{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.area-add-admin .area-name{flex:1;min-width:140px}
.area-add-admin .area-url{flex:2;min-width:180px}
.area-card{display:flex;gap:14px;align-items:stretch;border:1px solid #e8ecee;border-radius:12px;padding:10px;cursor:pointer;transition:.15s;background:#fff}
.area-card:hover{border-color:#8CA6B1;box-shadow:0 4px 12px rgba(0,0,0,.06)}
.area-card.active{border-color:#dce4aa;box-shadow:0 0 0 2px #dce4aa}
.area-embed{position:relative;width:150px;height:100px;flex:none;border-radius:8px;overflow:hidden;background:#dfe3e6}
.area-embed iframe{width:100%;height:100%;border:0;pointer-events:none}
.area-info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:8px}
.area-title{font-size:17px;font-weight:600;color:#2c3e50}
.area-linkrow{display:flex;gap:8px;align-items:center;min-width:0}
.area-link{flex:1;min-width:0;font-size:12px;color:#8a97a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.area-copy{white-space:nowrap}
@media(max-width:520px){.area-embed{width:110px;height:74px}.area-title{font-size:15px}}
.area-add{flex-direction:column;align-items:flex-start}
.area-add-fields{display:flex;gap:8px;flex-wrap:wrap;align-items:center;width:100%;margin-top:8px}
.area-add-fields[hidden]{display:none}
.area-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;color:#2c3e50}
.area-play svg{width:20px;height:20px;margin-left:2px}
.area-card:hover .area-play{background:#dce4aa}
.area-card{cursor:default}
.area-embed{cursor:pointer}
.area-embed iframe{pointer-events:auto}
.area-expand,.area-collapse{position:absolute;top:6px;right:6px;z-index:3;width:30px;height:30px;border-radius:8px;border:none;background:rgba(255,255,255,.92);color:#2c3e50;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.area-expand:hover,.area-collapse:hover{background:#dce4aa}
.area-expand svg,.area-collapse svg{width:17px;height:17px}
.area-expand[hidden],.area-collapse[hidden]{display:none}
.area-card.big{flex-direction:column;align-items:stretch}
.area-card.big .area-embed{width:100%;height:480px}
.area-card.big .area-info{margin-top:10px}
@media(max-width:520px){.area-card.big .area-embed{height:300px}}
.areas-list{flex-direction:column}
.area-card.big .area-embed{width:100%;height:0;padding-top:56.25%}
.area-card.big .area-embed iframe{position:absolute;inset:0;height:100%}
.area-card.big{padding:0;border:none;background:transparent}
.area-card.big .area-embed{border-radius:14px}
.area-card.big .area-info{margin-top:12px;padding:0 2px}
.area-card.big{display:block}
.areas-list{display:block}
.areas-list .area-card{margin-bottom:10px}
.areas-list .area-card{margin-bottom:16px}
/* area-card-divider */
.areas-list .area-card{margin-bottom:24px;position:relative}
.areas-list .area-card:last-child{margin-bottom:0}
.areas-list .area-card:not(:last-child)::after{content:'';position:absolute;left:6%;right:6%;bottom:-13px;height:1px;background:#e1e6e9}
.areas-block{margin-bottom:6px}
/* klare Trennung zwischen Hauptsektionen */
.c-section:has(h2){border-top:1px solid #dfe5e8;padding-top:44px;margin-top:44px}
.contact-photo{width:84px;height:84px;border-radius:50%;object-fit:cover;flex:none}
.contact-row.has-photo{justify-content:flex-start;text-align:left;gap:20px}
.header-logos{display:inline-flex;align-items:center;justify-content:center;gap:22px;flex-wrap:wrap}
.header-logos .header-logo{height:60px !important;width:auto !important;max-width:300px;object-fit:contain;margin:0}
.header-logos .hl-x{font-size:24px;color:#8CA6B1}
.header-logos .hl-x{font-size:34px}
.header-logos{margin-bottom:24px}
.c-header-center .header-logo{margin-bottom:24px}
.c-header-center{padding-bottom:46px}
.area-add-head{display:inline-flex;align-items:center;gap:8px}
.area-info-btn{width:28px;height:28px;flex:none;border-radius:50%;border:none;background:#dce4aa;color:#2c3e50;cursor:pointer;font-family:Georgia,serif;font-style:italic;font-weight:700;font-size:16px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.area-info-btn:hover{background:#cdd89a}
.sc-info-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.sc-info-box{background:#fff;border-radius:14px;max-width:520px;width:100%;padding:24px;position:relative;max-height:90vh;overflow:auto;color:#2c3e50}
.sc-info-box h3{margin:0 0 12px}
.sc-info-box ol{margin:0 0 16px;padding-left:20px;line-height:1.7}
.sc-info-box img{width:100%;border-radius:8px;border:1px solid #e3e8ea;display:block}
.sc-info-close{position:absolute;top:12px;right:12px;width:30px;height:30px;border-radius:8px;border:none;background:#eef1f2;cursor:pointer;font-size:18px;line-height:1}
.video-wrap.portrait{text-align:center}
.video-wrap.portrait video{display:inline-block;width:auto;max-width:min(360px,100%);max-height:80vh;height:auto;border-radius:12px}
.area-folder{border:1px solid #e1e6e9;border-radius:12px;margin-bottom:16px;overflow:hidden;background:#fbfcfa}
.area-folder-head{width:100%;text-align:left;border:none;background:transparent;cursor:pointer;padding:12px 14px;font-weight:600;color:#2c3e50;font-size:16px;display:flex;align-items:center;gap:8px}
.area-folder-head .af-caret{color:#8CA6B1}
.area-folder-head .af-count{color:#8a97a0;font-weight:400;font-size:13px}
.area-folder-body{padding:0 12px 12px}
.area-folder-body .area-card{background:#fff}
.area-folder-body[hidden]{display:none}
.area-fld-tag{font-size:11px;background:#eef1f2;color:#5f6b72;border-radius:8px;padding:1px 8px}
.video-wrap.portrait .sec-actions{justify-content:center}
.input-mini{font-size:12px;padding:3px 8px;border:1px solid #d5dbde;border-radius:8px;max-width:130px;color:#5f6b72}
.area-folder-edit.saved-flash{border-color:#8bbf4d;background:#f2f8e8}
.area-fld-edit{max-width:150px;font-size:13px}
.area-folder-head{font-size:18px;font-weight:700}
.area-folder-head .af-count{font-size:14px}
.area-card[draggable="true"]{cursor:grab}
.area-card.dragging{opacity:.45}
.area-folder.drag-over{outline:2px dashed #8CA6B1;outline-offset:2px;background:#eef4ee}
.areas-list.drag-over-root{outline:2px dashed #cdd6da;outline-offset:4px;border-radius:12px}
.area-dnd-hint{font-size:12px;color:#8a97a0;margin:6px 2px 14px}
.area-fld-select{max-width:220px}
.area-add-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.area-folder.dragging{opacity:.5}
.area-folder-head[draggable="true"]{cursor:grab}
.area-folder-head .af-del{margin-left:auto}
/* folder-tint */
.area-folder{background:rgba(140,166,177,0.10);border:1px solid rgba(140,166,177,0.32)}
.area-folder-head{background:transparent}
/* folder-head-size */
.area-folder-head{font-family:noka,Arial,sans-serif;font-size:22px;font-weight:700}
.area-folder-head .af-count{font-size:15px}
/* embed-anim3 */
.area-card.big .area-embed{transform-origin:top center;will-change:transform,opacity;animation:scGrow .8s cubic-bezier(.16,.7,.3,1)}
\@keyframes scGrow{0%{transform:scale(.78);opacity:.45}60%{opacity:1}100%{transform:scale(1);opacity:1}}
/* hide-af-count */
.area-folder-head .af-count{display:none}
/* brand-grey: Share wie Logo */
.brand span{color:#333334}
/* customer brand lockup */
.brand-lockup{display:flex;flex-direction:column;align-items:center;gap:2px;margin-bottom:16px}
.brand-lockup .header-logo{margin:0}
.brand-share{font-size:22px;color:#333334;letter-spacing:.01em;line-height:1}
/* brand lockup v2: Share rechts, fett */
.brand-lockup{flex-direction:row;justify-content:center;align-items:center;gap:22px}
.brand-share{font-size:46px;font-weight:700;letter-spacing:0;line-height:1}
/* brand share v3: normale Schriftstaerke wie Admin-Header */
.brand-share{font-weight:400;font-size:38px}
/* customer title grey (statt blau) */
.c-title h1{color:#333334}
.c-title .client{color:#6b6b6d}
/* video-grid: Hochformat-Videos nebeneinander je nach Platz */
.video-grid{display:flex;flex-wrap:wrap;gap:24px;justify-content:center;align-items:flex-start}
.video-grid .video-wrap{margin:0}
.video-grid .video-wrap.portrait{flex:0 1 320px;max-width:360px}
.video-grid .video-wrap:not(.portrait){flex:1 1 100%}
