/* WohnWerk 1v0 - created by AnnoBoy 2026 */
@font-face { font-family:"Montserrat"; font-weight:400; font-display:swap; src:url(schriften/montserrat-latin-400-normal.woff) format("woff"); }
@font-face { font-family:"Montserrat"; font-weight:700; font-display:swap; src:url(schriften/montserrat-latin-700-normal.woff) format("woff"); }

body.dunkel { --bg:#0b1517; --panel:#122124; --panel2:#182c30; --rand:#26444a; --text:#ecf7f5; --leise:#9dbdb8; --knopf:#1b3337; --knopfh:#244a50;
  --akz1:#14b8a6; --akz2:#0e7490; --akz3:#fbbf24; --rot:#ef4444; --schatten:rgba(0,0,0,.55); --flaeche:#0f1d20; }
body.hell   { --bg:#f3f7f6; --panel:#ffffff; --panel2:#eef6f4; --rand:#cfe2de; --text:#12302d; --leise:#56756f; --knopf:#e8f3f1; --knopfh:#d3ebe6;
  --akz1:#0d9488; --akz2:#0e7490; --akz3:#b45309; --rot:#dc2626; --schatten:rgba(20,80,70,.14); --flaeche:#e9efee; }
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body { background:var(--bg); color:var(--text); font:14px/1.4 "Segoe UI", Montserrat, system-ui, sans-serif; -webkit-tap-highlight-color:transparent; overflow:hidden; }
#app { display:flex; flex-direction:column; gap:8px; padding:10px 12px 6px; height:100vh; height:100dvh; }
h1, h2, h3 { margin:0; }
h2 { font-size:17px; display:flex; align-items:center; gap:8px; margin-bottom:10px; }
h3 { font-size:13px; margin:12px 0 6px; color:var(--akz1); text-transform:uppercase; letter-spacing:.6px; }
h3:first-child { margin-top:2px; }
.leise { color:var(--leise); }
.klein { font-size:12px; margin:6px 0; }
.luecke { flex:1; }
[hidden] { display:none !important; }

/* Kopf */
.kopf { display:flex; align-items:center; gap:8px; min-height:60px; border-radius:16px; padding:6px 14px; flex-wrap:wrap; flex:none; position:relative; z-index:30;
  background:linear-gradient(100deg,#0b3b3c 0%,#0f766e 40%,#0e9f8f 66%,#d97706 100%); color:#fff; box-shadow:0 8px 24px var(--schatten); }
.kopf h1 { font-size:23px; letter-spacing:.3px; font-family:Montserrat, "Segoe UI", sans-serif; }
.kopf p { margin:0; font-size:12px; opacity:.92; }
.logo { width:44px; height:44px; flex:none; filter:drop-shadow(0 0 6px rgba(251,191,36,.45)); }
.logo svg { width:100%; height:100%; }
.knopfgruppe { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.kopfknopf { color:#fff !important; background:rgba(255,255,255,.14) !important; border:1px solid rgba(255,255,255,.3) !important; }
.kopfknopf:hover { background:rgba(255,255,255,.28) !important; }
.nur-handy, .nur-handy-t, .nur-menue { display:none; }

/* Knöpfe & Felder */
button, .knopf { font:inherit; font-weight:600; color:var(--text); background:var(--knopf); border:1px solid var(--rand); border-radius:10px;
  padding:6px 11px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px; justify-content:center; min-height:32px;
  touch-action:manipulation; user-select:none; -webkit-user-select:none; transition:background .15s, transform .1s; }
button:hover, .knopf:hover { background:var(--knopfh); }
button:active { transform:scale(.97); }
button:disabled { opacity:.4; cursor:default; transform:none; }
button.haupt { background:linear-gradient(135deg,var(--akz1),var(--akz2)); color:#fff; border:none; }
button.haupt:hover { filter:brightness(1.08); }
button.rotknopf { background:linear-gradient(135deg,#b91c1c,#ef4444); color:#fff; border:none; }
.klein-knopf { padding:4px 9px; min-height:30px; font-size:13px; }
.klein-knopf.an { background:var(--akz1); color:#fff; }
input, select, textarea { font:inherit; color:var(--text); background:var(--panel2); border:1px solid var(--rand); border-radius:8px; padding:5px 7px; min-height:32px; min-width:0; }
input[type=range] { padding:0; accent-color:var(--akz1); background:none; border:none; }
input[type=checkbox] { accent-color:var(--akz1); width:17px; height:17px; min-height:0; flex:none; }
input[type=color] { padding:2px; width:52px; height:32px; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--akz1); outline-offset:0; }

/* Aufbau */
.mitte { flex:1; min-height:0; display:grid; grid-template-columns:58px 1fr 350px; gap:8px; }
.werkzeuge { display:flex; flex-direction:column; gap:5px; background:var(--panel); border:1px solid var(--rand); border-radius:14px; padding:6px; overflow:auto; }
.wz { width:44px; height:44px; padding:0; font-size:19px; border-radius:10px; flex:none; flex-direction:column; gap:1px; }
.wz .wz-t { display:block; font-size:9px; font-weight:700; line-height:1; opacity:.85; }
.wz.an { background:linear-gradient(135deg,var(--akz1),var(--akz2)); color:#fff; border:none; }
.wz-trenn { height:1px; background:var(--rand); margin:3px 2px; flex:none; }
.buehne-panel { display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--panel); border:1px solid var(--rand); border-radius:14px; overflow:hidden; }
.ansichtleiste { display:flex; align-items:center; gap:8px; padding:6px 8px; border-bottom:1px solid var(--rand); background:var(--panel2); flex:none; }
.umschalter { display:flex; background:var(--knopf); border:1px solid var(--rand); border-radius:11px; padding:2px; gap:2px; flex:none; }
.umschalter button { border:none; background:transparent; min-height:30px; padding:4px 10px; border-radius:9px; }
.umschalter button.an { background:linear-gradient(135deg,var(--akz1),var(--akz2)); color:#fff; }
.status { font-size:12.5px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1 1 auto; }
.status.warn { color:var(--rot); font-weight:700; }
.buehne { position:relative; flex:1; min-height:0; display:flex; background:var(--flaeche); }
.flaeche2d, .flaeche3d { position:relative; flex:1; min-width:0; min-height:0; overflow:hidden; }
.flaeche2d canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; display:block; }
.flaeche3d { display:none; }
.flaeche3d canvas { display:block; touch-action:none; }
.buehne.a-3d .flaeche2d, .buehne.a-laufen .flaeche2d { display:none; }
.buehne.a-3d .flaeche3d, .buehne.a-laufen .flaeche3d, .buehne.a-geteilt .flaeche3d { display:block; }
.buehne.a-geteilt .flaeche2d { border-right:2px solid var(--rand); }
.mitteknopf { color:var(--akz1); }

.zeichenleiste { position:absolute; left:50%; top:10px; transform:translateX(-50%); z-index:5; display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:center;
  background:var(--panel); border:1px solid var(--akz1); border-radius:14px; padding:6px 8px; box-shadow:0 8px 24px var(--schatten); max-width:calc(100% - 20px); }
.zl-text { font-weight:700; font-size:13px; padding:0 4px; }
.zl-laenge { display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--leise); }
.zl-laenge input { width:78px; }
.lauf-hilfe { position:absolute; inset:auto 0 0 0; pointer-events:none; z-index:4; padding:12px; display:flex; align-items:flex-end; gap:12px; }
.lauf-text { background:rgba(0,0,0,.55); color:#fff; padding:6px 12px; border-radius:10px; font-size:12.5px; }
.stick { width:120px; height:120px; border-radius:50%; background:rgba(255,255,255,.18); border:2px solid rgba(255,255,255,.55); position:relative; pointer-events:auto; touch-action:none; display:none; backdrop-filter:blur(2px); }
.stick i { position:absolute; left:50%; top:50%; width:50px; height:50px; margin:-25px 0 0 -25px; border-radius:50%; background:linear-gradient(135deg,var(--akz1),var(--akz2)); box-shadow:0 4px 12px rgba(0,0,0,.4); }
.ablage { position:absolute; inset:12px; border:3px dashed var(--akz1); border-radius:16px; background:rgba(20,184,166,.12); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; z-index:8; font-size:16px; pointer-events:none; }

/* Seite rechts */
.seite { display:flex; flex-direction:column; min-height:0; background:var(--panel); border:1px solid var(--rand); border-radius:14px; overflow:hidden; }
.reiter { display:grid; grid-template-columns:repeat(4,1fr); gap:3px; padding:5px; background:var(--panel2); border-bottom:1px solid var(--rand); flex:none; }
.reiter button { min-height:34px; padding:3px 2px; font-size:12.5px; border-color:transparent; background:transparent; }
.reiter button.an { background:linear-gradient(135deg,var(--akz1),var(--akz2)); color:#fff; }
.tafel { flex:1; min-height:0; overflow-y:auto; padding:10px 12px 14px; display:flex; flex-direction:column; gap:6px; }
.tafel > input[type=search] { width:100%; }
.gruppen { display:flex; flex-wrap:wrap; gap:4px; }
.gruppen button { min-height:28px; font-size:12px; padding:3px 8px; border-radius:20px; }
.gruppen button.an { background:var(--akz1); color:#fff; border-color:transparent; }
.kacheln { display:grid; grid-template-columns:repeat(auto-fill,minmax(98px,1fr)); gap:6px; }
.kachel { display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 4px; border-radius:12px; min-height:110px; justify-content:flex-start; background:var(--panel2); cursor:grab; }
.kachel canvas { width:76px; height:60px; }
.kachel b { font-size:11.5px; line-height:1.15; text-align:center; font-weight:700; }
.kachel small { font-size:10.5px; color:var(--leise); font-weight:500; }
.haken { display:flex; flex-direction:column; gap:6px; }
.haken label, .formular label { display:flex; align-items:center; gap:8px; font-size:13px; }
.haken.zwei { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; margin:6px 0; }
.formular { display:flex; flex-direction:column; gap:8px; }
.formular.zwei { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; }
.formular label { justify-content:space-between; }
.formular label > input[type=text], .formular label > select { flex:1; max-width:62%; }
.mit-einheit { display:inline-flex; align-items:center; gap:4px; color:var(--leise); font-size:12px; }
.mit-einheit input { width:86px; text-align:right; }
.feld-zeile { display:grid; grid-template-columns:1fr 1fr; gap:6px 10px; }
.feld { display:flex; flex-direction:column; gap:2px; font-size:11.5px; color:var(--leise); font-weight:600; }
.feld input, .feld select { width:100%; color:var(--text); }
.feld.breit { grid-column:1 / -1; }
.knopfreihe { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.knopfreihe button { flex:1 1 auto; }
.farben { display:flex; flex-wrap:wrap; gap:5px; align-items:center; }
.farben button { width:26px; height:26px; min-height:0; padding:0; border-radius:50%; border:2px solid var(--rand); }
.farben button.an { border-color:var(--akz1); box-shadow:0 0 0 2px var(--akz1); }
.eigen-kopf { display:flex; align-items:center; gap:8px; }
.eigen-kopf canvas { width:64px; height:50px; background:var(--panel2); border-radius:10px; flex:none; }
.eigen-kopf b { font-size:15px; }
.hinweisbox { background:var(--panel2); border-left:3px solid var(--akz3); border-radius:8px; padding:7px 10px; font-size:12.5px; }
.hinweisbox.warn { border-left-color:var(--rot); }
.raum-k { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; background:var(--panel2); border:1px solid var(--rand); cursor:pointer; text-align:left; width:100%; }
.raum-k.an { border-color:var(--akz1); }
.raum-k small { color:var(--leise); display:block; font-weight:500; }
.summe { display:flex; justify-content:space-between; font-weight:700; padding:8px 10px; border-top:2px solid var(--akz1); margin-top:4px; }
.einkauf table { width:100%; border-collapse:collapse; font-size:12.5px; }
.einkauf td { padding:4px 4px; border-bottom:1px solid var(--rand); }
.einkauf td:last-child { text-align:right; white-space:nowrap; }

/* Fuß */
.fuss { display:flex; align-items:center; gap:10px; font-size:12px; padding:2px 6px; flex:none; flex-wrap:wrap; }
.werbung { color:var(--akz3); text-decoration:none; }
.werbung:hover { text-decoration:underline; }
.signatur { color:var(--leise); }
.lizenzText { font-size:12px; }

/* Dialoge */
.dialog { position:fixed; inset:0; background:rgba(3,12,14,.6); display:flex; align-items:center; justify-content:center; z-index:50; padding:14px; backdrop-filter:blur(3px); }
.dialog-box { background:var(--panel); border:1px solid var(--rand); border-radius:16px; padding:18px; width:min(440px,100%); max-height:94vh; overflow:auto; box-shadow:0 20px 60px var(--schatten); }
.dialog-box.breit { width:min(660px,100%); }
.dialog-box input[type=email], .dialog-box > div > input[type=text] { width:100%; margin:6px 0; }
.knopf-zeile { display:flex; gap:8px; margin-top:14px; flex-wrap:wrap; }
.knopf-zeile.rechts { justify-content:flex-end; }
.fehler { color:var(--rot); font-weight:600; min-height:1em; }
.info-zeile { background:var(--panel2); border-radius:10px; padding:8px 12px; font-weight:600; font-size:13px; margin:10px 0 0; }
.info-zeile:empty { display:none; }
.start-wahl { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
.start-wahl.eins { grid-template-columns:1fr; }
.start-k { flex-direction:column; align-items:flex-start; text-align:left; padding:14px; border-radius:14px; min-height:88px; gap:4px; }
.start-k b { font-size:15px; }
.start-k span { font-weight:500; color:var(--leise); font-size:12.5px; }
.start-k:hover { border-color:var(--akz1); }
.meldung { position:fixed; left:50%; bottom:46px; transform:translateX(-50%); background:var(--panel); border:1px solid var(--akz1); border-radius:12px; padding:10px 16px; z-index:80; box-shadow:0 10px 30px var(--schatten); max-width:min(640px,92vw); font-weight:600; }
.meldung.fehler { border-color:var(--rot); }
.arbeit { position:fixed; inset:0; z-index:70; background:rgba(3,12,14,.5); display:flex; align-items:center; justify-content:center; }
.arbeit-box { background:var(--panel); border-radius:16px; padding:20px 26px; text-align:center; min-width:280px; border:1px solid var(--rand); display:flex; flex-direction:column; gap:10px; align-items:center; }
.fortschritt { width:100%; height:10px; background:var(--panel2); border-radius:6px; overflow:hidden; border:1px solid var(--rand); }
.fortschritt i { display:block; height:100%; width:0; background:linear-gradient(90deg,var(--akz1),var(--akz3)); transition:width .2s; }
.dreher { width:34px; height:34px; border-radius:50%; border:4px solid var(--rand); border-top-color:var(--akz1); animation:dreh 0.9s linear infinite; }
@keyframes dreh { to { transform:rotate(360deg); } }
.dialog .nur-bausatz, .dialog .nur-plan { }
#dLaser.l-plan .nur-bausatz, #dLaser.l-bausatz .nur-plan { display:none; }

@media (max-width:1250px) { body:not(.handy) .kopfknopf .kt { display:none; } body:not(.handy) .mitte { grid-template-columns:58px 1fr 310px; } }
@media (max-width:1500px) { body:not(.handy) .nur-breit .kt { display:none; } body:not(.handy) .umschalter .ut { display:none; } }

/* ------------------------------------------------------------------ Handy und Tablet */
.unten, .blatt { display:none; }
body.handy #app { padding:6px 6px calc(4px + env(safe-area-inset-bottom)); gap:5px; }
body.handy .kopf { min-height:46px; padding:4px 8px; border-radius:12px; }
body.handy .kopf h1 { font-size:18px; }
body.handy .kopf p { display:none; }
body.handy .logo { width:34px; height:34px; }
body.handy .nur-handy { display:inline-flex; }
body.handy .nur-handy-t { display:block; }
body.handy .nicht-handy { display:none !important; }
body.handy #kopfKnoepfe { display:none; }
body.handy .mitte { grid-template-columns:1fr; }
body.handy .werkzeuge, body.handy .seite { display:none; }
body.handy .buehne-panel { border-radius:12px; }
body.handy .ansichtleiste { padding:4px 5px; gap:5px; }
body.handy .umschalter button { padding:3px 8px; font-size:12.5px; }
body.handy .status { font-size:11.5px; }
body.handy .unten { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; flex:none; background:var(--panel); border:1px solid var(--rand); border-radius:14px; padding:5px; }
body.handy .unten button { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:52px; padding:3px 0; border-radius:11px; min-width:0; }
body.handy .unten button > span { font-size:20px; line-height:1; }
body.handy .unten button > small { font-size:11px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
body.handy .unten button.an { background:linear-gradient(135deg,var(--akz1),var(--akz2)); color:#fff; border-color:transparent; }
body.handy .unten .u-zahl { position:absolute; top:3px; right:calc(50% - 22px); min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--akz3); color:#111; font-size:11px; line-height:18px; font-weight:800; }
body.handy .fuss { font-size:10px; gap:6px; padding:0 4px; flex-wrap:nowrap; overflow:hidden; white-space:nowrap; }
body.handy .fuss .werbung { overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1; }
body.handy .fuss .luecke { display:none; }
body.handy .blatt { display:flex; flex-direction:column; position:fixed; left:6px; right:6px; bottom:calc(86px + env(safe-area-inset-bottom)); max-height:58%; z-index:20; background:var(--panel);
  border:1px solid var(--akz1); border-radius:18px 18px 12px 12px; box-shadow:0 -12px 40px var(--schatten); animation:blattHoch .18s ease-out; }
body.handy .blatt[hidden] { display:none !important; }
@keyframes blattHoch { from { transform:translateY(30px); opacity:0; } to { transform:none; opacity:1; } }
@keyframes blattRein { from { transform:translateX(30px); opacity:0; } to { transform:none; opacity:1; } }
.blatt-kopf { display:flex; align-items:center; gap:8px; padding:8px 8px 4px 14px; flex:none; }
.blatt-kopf b { flex:1; font-size:15px; }
.blatt-kopf button { width:40px; height:36px; padding:0; border-radius:10px; font-size:16px; }
.blatt-inhalt { overflow-y:auto; overscroll-behavior:contain; padding:2px 10px 12px; min-height:0; }
.blatt-teil { display:none; }
.blatt-teil.an { display:flex; flex-direction:column; gap:8px; }
body.handy .blatt .werkzeuge { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; padding:0; background:none; border:none; overflow:visible; }
body.handy .blatt .wz-trenn { display:none; }
body.handy .blatt .wz { width:auto; height:62px; font-size:22px; border-radius:12px; }
body.handy .blatt .wz .wz-t { font-size:11px; }
body.handy .blatt .seite { display:flex; border:none; background:none; overflow:visible; }
body.handy .blatt .seite .reiter { display:none; }
body.handy .blatt .tafel { padding:0; overflow:visible; }
body.handy .blatt .knopfgruppe { display:grid !important; grid-template-columns:1fr 1fr; gap:6px; }
body.handy .blatt .knopfgruppe .kopfknopf { color:var(--text) !important; background:var(--knopf) !important; border:1px solid var(--rand) !important; justify-content:flex-start; min-height:48px; font-size:15px; }
body.handy .blatt .knopfgruppe .nur-breit { grid-column:1 / -1; }
body.handy .blatt .knopfgruppe .kt { display:inline; }
body.handy .kacheln { grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); }
body.handy .feld input, body.handy .feld select { min-height:40px; font-size:16px; }
body.handy input, body.handy select { font-size:16px; }
body.handy .zeichenleiste { top:auto; bottom:8px; }
body.handy .stick { display:block; }
body.handy .dialog { padding:6px; align-items:flex-end; }
body.handy .dialog-box { width:100% !important; max-height:92dvh; border-radius:18px 18px 12px 12px; padding:14px; }
body.handy .formular.zwei, body.handy .start-wahl, body.handy .haken.zwei { grid-template-columns:1fr; }
/* quer */
body.handy.quer #app { display:grid; grid-template-columns:1fr 74px; grid-template-rows:auto 1fr auto; }
body.handy.quer .kopf { grid-column:1 / -1; min-height:40px; }
body.handy.quer .mitte { grid-column:1; grid-row:2; }
body.handy.quer .unten { grid-column:2; grid-row:2; grid-template-columns:1fr; grid-auto-rows:minmax(0,1fr); padding:4px; }
body.handy.quer .unten button { min-height:0; }
body.handy.quer .fuss { grid-column:1 / -1; }
body.handy.quer .blatt { left:auto; right:86px; top:56px; bottom:30px; width:min(420px,60%); max-height:none; border-radius:16px; animation:blattRein .18s ease-out; }

/* Bild-Möbel und Texturen */
.foto-knopf { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:8px; text-align:left; justify-content:stretch; padding:8px 12px; border:1px dashed var(--akz1); background:var(--panel2); border-radius:12px; font-size:20px; }
.foto-knopf b { font-size:13.5px; } .foto-knopf small { grid-column:2; font-size:11.5px; color:var(--leise); font-weight:500; }
.foto-zeile { display:grid; grid-template-columns:200px 1fr; gap:14px; margin-top:12px; }
.foto-ablage { border:2px dashed var(--akz1); border-radius:14px; min-height:200px; display:flex; align-items:center; justify-content:center; text-align:center; cursor:pointer; color:var(--leise);
  background:repeating-conic-gradient(var(--panel2) 0 25%, var(--panel) 0 50%) 0 0/18px 18px; overflow:hidden; }
.foto-ablage img { max-width:100%; max-height:240px; object-fit:contain; }
.foto-ablage.ueber { background-color:rgba(20,184,166,.18); }
.tex-wahl { display:grid; grid-template-columns:repeat(auto-fill,minmax(54px,1fr)); gap:6px; }
.tex-wahl button { height:54px; padding:0; border-radius:10px; background-size:cover; background-position:center; border:2px solid var(--rand); position:relative; overflow:hidden; font-size:10px; align-items:flex-end; color:#fff; text-shadow:0 1px 2px #000; }
.tex-wahl button.an { border-color:var(--akz1); box-shadow:0 0 0 2px var(--akz1); }
.tex-wahl button.ohne { background:var(--knopf); color:var(--text); text-shadow:none; align-items:center; font-size:12px; }
.tex-wahl button.plus { background:var(--panel2); color:var(--akz1); text-shadow:none; align-items:center; font-size:22px; border-style:dashed; }
body.handy .foto-zeile { grid-template-columns:1fr; }
body.handy .meldung { bottom:calc(96px + env(safe-area-inset-bottom)); }
body.handy.quer .meldung { bottom:40px; }
@media (max-width:1560px) { body:not(.handy) :is(#kNeu, #kOeffnen, #kBild, #kHandbuch, #kThema) .kt { display:none; } }
@media (max-width:1400px) { body:not(.handy) .kopf p { display:none; } body:not(.handy) :is(#kSpeichern, #kDrucken) .kt { display:none; } }
