/* Mobileri Room Planner 3D – v3. Vollbild-Raum mit schwebenden Panels. */
.mk-planner {
	--mk-bg: #e9e6e1;
	--mk-panel: rgba(255, 255, 255, 0.94);
	--mk-ink: #1f2421;
	--mk-muted: #6b716d;
	--mk-line: rgba(31, 36, 33, 0.1);
	--mk-accent: #2f6f5e;
	--mk-accent-ink: #fff;
	--mk-radius: 16px;
	--mk-shadow: 0 10px 40px rgba(20, 24, 22, 0.16), 0 2px 8px rgba(20, 24, 22, 0.08);
	position: fixed; inset: 0; overflow: hidden;
	background: var(--mk-bg); color: var(--mk-ink);
	font: 14px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased; touch-action: none;
}
.mk-planner *, .mk-planner *::before, .mk-planner *::after { box-sizing: border-box; }
.mk-view { position: absolute; inset: 0; }
.mk-view canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.mk-overlay { position: absolute; inset: 0; pointer-events: none; }
.mk-overlay > * { pointer-events: auto; }
.mk-planner button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.mk-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Marke */
.mk-brand { position: absolute; top: 18px; left: 22px; font-size: 15px; letter-spacing: .02em; pointer-events: none; color: var(--mk-ink); }
.mk-brand b { font-weight: 700; }
.mk-brand span { margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: var(--mk-ink); color: #fff; font-size: 11px; font-weight: 600; }

.has-drawer .mk-brand { opacity: 0; }
.mk-brand { transition: opacity .2s; }

/* Symbolleiste */
.mk-rail { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 22px; background: var(--mk-panel); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); z-index: 4; }
.mk-rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 10px 4px 8px; border-radius: 14px; font-size: 11px; color: var(--mk-muted); transition: background .15s, color .15s; }
.mk-rail-btn:hover { background: rgba(31, 36, 33, .05); color: var(--mk-ink); }
.mk-rail-btn.is-on { background: var(--mk-ink); color: #fff; }

/* Schublade */
.mk-drawer { position: absolute; left: 104px; top: 16px; bottom: 16px; width: min(380px, calc(100vw - 130px)); background: var(--mk-panel); border-radius: var(--mk-radius); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); transform: translateX(calc(-100% - 140px)); opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s; z-index: 3; display: flex; flex-direction: column; }
.mk-drawer.is-open { transform: none; opacity: 1; }
.mk-drawer-body { overflow-y: auto; padding: 22px 22px 28px; overscroll-behavior: contain; }
.mk-drawer-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--mk-muted); }
.mk-drawer-close:hover { background: rgba(31,36,33,.06); color: var(--mk-ink); }
.mk-drawer h2 { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.mk-drawer h3 { margin: 22px 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--mk-muted); }
.mk-muted { margin: 0 0 6px; color: var(--mk-muted); }

/* Möbelkarten */
.mk-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mk-card { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 8px 10px; border-radius: 12px; background: #f5f3ef; text-align: left; transition: transform .15s, box-shadow .15s; }
.mk-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.mk-thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: linear-gradient(#fbfaf8, #efece7); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.mk-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mk-thumb img:not([src]) { visibility: hidden; }
.mk-card b { font-size: 13px; letter-spacing: .06em; }
.mk-card small { color: var(--mk-muted); font-size: 11.5px; }

/* Boden-Kacheln */
.mk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.mk-tile i { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--mk-line); margin-bottom: 4px; transition: box-shadow .15s; }
.mk-tile b { font-size: 11.5px; letter-spacing: .06em; }
.mk-tile small { color: var(--mk-muted); font-size: 11px; }
.mk-tile.is-on i, .mk-tile:hover i { box-shadow: 0 0 0 2px var(--mk-ink); }

/* Werkzeuge oben rechts */
.mk-tools { position: absolute; top: 14px; right: 16px; display: flex; gap: 4px; padding: 6px; border-radius: 16px; background: var(--mk-panel); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); z-index: 4; }
.mk-tool { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--mk-ink); }
.mk-tool:hover { background: rgba(31,36,33,.07); }
.mk-lang { margin-left: 2px; border: 0; background: rgba(31,36,33,.06); border-radius: 10px; padding: 0 8px; font: 600 12px/40px inherit; color: var(--mk-ink); }

/* Auswahl-Feld */
.mk-sel { position: absolute; right: 16px; top: 74px; bottom: 86px; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; background: var(--mk-panel); border-radius: var(--mk-radius); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); transform: translateX(calc(100% + 30px)); opacity: 0; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s; z-index: 3; }
.mk-sel.is-open { transform: none; opacity: 1; }
.mk-sel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 8px 18px; }
.mk-sel-head b { display: block; font-size: 18px; letter-spacing: .08em; }
.mk-sel-head small { color: var(--mk-muted); }
.mk-sel-act { display: flex; gap: 0; }
.mk-sel-act .mk-tool { width: 36px; height: 36px; }
.mk-tabs { display: flex; gap: 4px; margin: 0 14px; padding: 4px; background: rgba(31,36,33,.06); border-radius: 12px; }
.mk-tab { flex: 1; padding: 8px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--mk-muted); }
.mk-tab.is-on { background: #fff; color: var(--mk-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.mk-sel-body { overflow-y: auto; padding: 12px 18px 22px; overscroll-behavior: contain; }

.mk-label { display: block; margin: 16px 0 8px; font-size: 12.5px; font-weight: 600; }
.mk-label span { font-weight: 400; color: var(--mk-muted); margin-left: 4px; }
.mk-slider { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin: 14px 0; }
.mk-slider label { font-size: 12.5px; font-weight: 600; }
.mk-slider output { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--mk-muted); }
.mk-slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--mk-ink); height: 24px; }
.mk-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-seg-btn { padding: 7px 12px; border-radius: 99px; background: rgba(31,36,33,.06); font-size: 12.5px; }
.mk-seg-btn.is-on { background: var(--mk-ink); color: #fff; }
.mk-slot { padding-bottom: 6px; border-bottom: 1px solid var(--mk-line); }
.mk-slot:last-child { border-bottom: 0; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mk-chip { padding: 6px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; box-shadow: inset 0 0 0 1px var(--mk-line); }
.mk-chip.is-on { background: var(--mk-ink); color: #fff; box-shadow: none; }
.mk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; margin-bottom: 12px; }
.mk-swatch { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .12s, box-shadow .12s; }
.mk-swatch:hover { transform: scale(1.08); }
.mk-swatch.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mk-ink); }

/* Zahlenfelder (cm-genau) */
.mk-numgrid { display: grid; grid-template-columns: 1fr; gap: 2px; }
.mk-num { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--mk-line); }
.mk-num label { font-size: 12.5px; font-weight: 600; }
.mk-num-box { display: flex; align-items: center; gap: 2px; background: rgba(31,36,33,.06); border-radius: 10px; padding: 2px; }
.mk-num-box input { width: 64px; border: 0; background: #fff; border-radius: 8px; padding: 7px 6px; font: 600 14px/1 inherit; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.mk-num-box input::-webkit-inner-spin-button, .mk-num-box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mk-num-unit { font-size: 12px; color: var(--mk-muted); padding: 0 4px 0 2px; }
.mk-num-step { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; line-height: 1; color: var(--mk-ink); }
.mk-num-step:hover { background: rgba(31,36,33,.08); }

/* Maßlinien im Raum */
.mk-dims { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.mk-dims line { stroke: var(--mk-accent); stroke-width: 1.6; }
.mk-dims .mk-dim-ext { stroke-dasharray: 3 3; stroke-width: 1; }
.mk-dims g.mk-dim-label rect { fill: var(--mk-accent); rx: 6; }
.mk-dims g.mk-dim-label text { fill: #fff; font: 600 12px/1 Inter, system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; }

/* Projekt */
.mk-list { list-style: none; margin: 0 0 14px; padding: 0; }
.mk-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--mk-line); cursor: pointer; }
.mk-list li b { letter-spacing: .06em; }
.mk-list li span { color: var(--mk-muted); font-size: 12.5px; }
.mk-row { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.mk-planner .mk-btn { padding: 11px 16px; border-radius: 12px; background: rgba(31,36,33,.07); font-weight: 600; }
.mk-planner .mk-btn:hover { background: rgba(31,36,33,.12); }
.mk-planner .mk-btn-ghost { background: none; box-shadow: inset 0 0 0 1px var(--mk-line); }
.mk-planner .mk-btn-main { background: var(--mk-accent); color: var(--mk-accent-ink) !important; width: 100%; margin-top: 6px; }
.mk-planner .mk-btn-main:hover { background: #255a4c; }
.mk-btn:disabled { opacity: .5; cursor: default; }

/* Angebot */
.mk-cta { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 4; }
.mk-offer-btn { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 99px; background: var(--mk-accent) !important; color: #fff !important; font-weight: 650; box-shadow: var(--mk-shadow); z-index: 4; }
.mk-offer-btn .mk-ico { width: 18px; height: 18px; }
.mk-modal { position: absolute; inset: 0; background: rgba(20, 24, 22, .35); display: grid; place-items: center; padding: 16px; z-index: 10; backdrop-filter: blur(3px); }
.mk-modal-box { width: min(440px, 100%); background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--mk-shadow); }
.mk-modal-box h2 { margin: 0 0 14px; font-size: 19px; }
.mk-modal-box label { display: block; margin: 10px 0; font-size: 12.5px; font-weight: 600; }
.mk-modal-box input, .mk-modal-box textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--mk-line); border-radius: 10px; font: inherit; background: #faf9f7; }
.mk-modal-msg { min-height: 1.4em; color: var(--mk-accent); font-weight: 600; }
.mk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Hinweise */
.mk-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.75); color: var(--mk-muted); font-size: 12px; pointer-events: none; animation: mk-fade 1s 6s forwards; }
@keyframes mk-fade { to { opacity: 0; } }
.mk-toast { position: absolute; left: 50%; top: 18px; transform: translate(-50%, -80px); padding: 10px 18px; border-radius: 99px; background: var(--mk-ink); color: #fff; font-weight: 600; transition: transform .3s; z-index: 6; pointer-events: none; }
.mk-toast.is-on { transform: translate(-50%, 0); }
.mk-error { margin: 40vh auto 0; max-width: 420px; text-align: center; background: #fff; padding: 20px; border-radius: 14px; }

/* Ladezustand */
.mk-planner:not(.is-ready) .mk-overlay { opacity: 0; }
.mk-overlay { transition: opacity .4s; }

/* Handy: Menüs als Bottom-Sheet */
@media (max-width: 760px) {
	.mk-brand { top: 14px; left: 16px; font-size: 13px; }
	.mk-rail { left: 50%; top: auto; bottom: 12px; transform: translateX(-50%); flex-direction: row; padding: 6px; border-radius: 20px; }
	.mk-rail-btn { width: 58px; padding: 8px 2px 6px; font-size: 10px; }
	.mk-drawer { left: 8px; right: 8px; top: auto; bottom: 88px; width: auto; max-height: 62vh; transform: translateY(calc(100% + 120px)); }
	.mk-sel { left: 8px; right: 8px; top: auto; bottom: 88px; width: auto; max-height: 58vh; transform: translateY(calc(100% + 120px)); }
	.mk-tools { top: 46px; right: 10px; flex-direction: column; }
	.mk-tool { width: 38px; height: 38px; }
	.mk-lang { line-height: 32px; }
	.mk-cta { top: 10px; right: 10px; bottom: auto; gap: 6px; }
	.mk-offer-btn, .mk-planner .mk-save-btn { padding: 8px 14px; font-size: 12.5px; }
	.mk-offer-btn span, .mk-save-btn span { display: none; }
	.mk-hint { display: none; }
	.mk-tools, .mk-cta { transition: opacity .2s; }
	.has-drawer .mk-tools, .has-drawer .mk-cta, .has-sel .mk-tools, .has-sel .mk-cta { opacity: 0; pointer-events: none; }
	.mk-tiles { grid-template-columns: repeat(4, 1fr); }
	.mk-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Ab 3.1: Grundriss-Editor, Werkzeuge, Rundgang ===== */
.mk-tool-sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--mk-line); }
.mk-tool.is-on { background: var(--mk-ink); color: #fff; }
.mk-tool:disabled { opacity: .3; cursor: default; background: none; }
.mk-btn .mk-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 2px; }
.mk-plan-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; }

/* 2D-Grundriss */
.mk-plan { position: absolute; inset: 0; display: none; background: #f3f1ec; z-index: 1; touch-action: none; }
.mk-plan.is-on { display: block; }
.mk-plan svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.is-plan .mk-dims, .is-plan .mk-hint, .is-plan .mk-zoom { display: none; }
.pl-grid { stroke: rgba(31,36,33,.09); stroke-width: 1; }
.pl-grid-minor { stroke: rgba(31,36,33,.035); stroke-width: 1; }
.pl-floor { fill: #fff; }
.pl-wall { fill: #2b2f2c; }
.pl-edge { stroke: transparent; stroke-width: 22; stroke-linecap: butt; }
.pl-edge:hover { stroke: rgba(47,111,94,.28); }
.pl-edge.is-sel { stroke: rgba(47,111,94,.55); }
.pl-dim { cursor: pointer; }
.pl-dim line { stroke: #7a807c; stroke-width: 1; }
.pl-dim .pl-ext { stroke: #b3b7b4; }
.pl-dim rect { fill: #fff; stroke: rgba(31,36,33,.18); }
.pl-dim text { font: 600 12px/1 Inter, system-ui, sans-serif; fill: var(--mk-ink); text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.pl-dim.is-sel rect { fill: var(--mk-accent); stroke: var(--mk-accent); }
.pl-dim.is-sel text { fill: #fff; }
.pl-num { cursor: pointer; }
.pl-num circle { fill: #fff; stroke: rgba(31,36,33,.25); }
.pl-num text { font: 600 11px/1 Inter, system-ui, sans-serif; fill: var(--mk-muted); text-anchor: middle; dominant-baseline: central; }
.pl-num.is-sel circle { fill: var(--mk-accent); stroke: var(--mk-accent); }
.pl-num.is-sel text { fill: #fff; }
.pl-op { cursor: grab; }
.pl-op-gap { fill: #fff; stroke: #2b2f2c; stroke-width: 1; }
.pl-glass { stroke: #4f88ad; stroke-width: 2; }
.pl-door-leaf { stroke: #2b2f2c; stroke-width: 2.2; }
.pl-door-arc { fill: none; stroke: #2b2f2c; stroke-width: 1; stroke-dasharray: 4 3; }
.pl-op.is-sel .pl-op-gap { fill: #d7ece4; stroke: var(--mk-accent); stroke-width: 2; }
.pl-hit { fill: transparent; }
.pl-item { cursor: move; }
.pl-item rect { fill: rgba(47,111,94,.10); stroke: rgba(47,111,94,.75); stroke-width: 1.2; }
.pl-item.is-sel rect { fill: rgba(47,111,94,.24); stroke: var(--mk-accent); stroke-width: 2; }
.pl-item text { font: 600 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; fill: #1f4d41; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pl-area { font: 600 15px/1 Inter, system-ui, sans-serif; fill: #a29d93; text-anchor: middle; dominant-baseline: central; pointer-events: none; }

/* Raumformen + Wandliste */
.mk-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mk-shape { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; border-radius: 12px; background: rgba(31,36,33,.05); }
.mk-shape:hover { background: rgba(31,36,33,.1); }
.mk-shape svg { width: 30px; height: 30px; }
.mk-shape svg path { fill: #fff; stroke: var(--mk-ink); stroke-width: 1.6; stroke-linejoin: round; }
.mk-shape small { font-size: 10.5px; color: var(--mk-muted); text-align: center; line-height: 1.15; }
.mk-walls .mk-num { padding: 5px 6px; border-radius: 10px; }
.mk-walls .mk-num label { cursor: pointer; }
.mk-num.is-on { background: rgba(47,111,94,.12); }
.mk-wall-actions:empty { display: none; }
.mk-wall-actions { margin-top: 6px; padding: 2px 12px 4px; border-radius: 12px; background: rgba(47,111,94,.07); }
.mk-wall-actions h3 { margin-top: 12px; color: var(--mk-accent); }
.mk-wall-actions .mk-btn { padding: 9px 12px; font-size: 13px; }
.mk-seg-num { min-width: 36px; text-align: center; }

/* Suche */
.mk-search { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 0 12px; border-radius: 12px; background: rgba(31,36,33,.06); color: var(--mk-muted); }
.mk-search .mk-ico { width: 18px; height: 18px; }
.mk-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 0; font: inherit; color: var(--mk-ink); outline: none; }
.mk-cards[hidden], .mk-card[hidden], h3[hidden], p[hidden] { display: none !important; }

/* Zoom (nur Desktop) */
.mk-zoom { position: absolute; right: 16px; bottom: 82px; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 14px; background: var(--mk-panel); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); z-index: 2; }
.has-sel .mk-zoom { opacity: 0; pointer-events: none; }

/* Rundgang */
.mk-walkpad { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: 52px 52px auto; gap: 6px; z-index: 5; }
.mk-walkpad[aria-hidden="true"] { display: none; }
.mk-pad-btn { border-radius: 14px; background: var(--mk-panel) !important; box-shadow: var(--mk-shadow); font-size: 18px; color: var(--mk-ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.mk-pad-btn:active { background: var(--mk-ink) !important; color: #fff !important; }
.mk-pad-f { grid-column: 2; grid-row: 1; }
.mk-pad-l { grid-column: 1; grid-row: 2; }
.mk-pad-b { grid-column: 2; grid-row: 2; }
.mk-pad-r { grid-column: 3; grid-row: 2; }
.mk-walk-exit { grid-column: 1 / -1; grid-row: 3; background: var(--mk-ink) !important; color: #fff !important; box-shadow: var(--mk-shadow); }
.is-walk .mk-rail, .is-walk .mk-drawer, .is-walk .mk-sel, .is-walk .mk-cta, .is-walk .mk-zoom, .is-walk .mk-hint, .is-walk .mk-dims { display: none; }
.is-walk .mk-view canvas { cursor: grab; }

/* Nacht */
.mk-planner .mk-view { transition: background .3s; }

/* Einführung */
.mk-onb-steps { list-style: none; margin: 6px 0 16px; padding: 0; display: grid; gap: 12px; }
.mk-onb-steps li { display: flex; gap: 12px; align-items: center; }
.mk-onb-steps span { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(47,111,94,.1); color: var(--mk-accent); }
.mk-onb-steps p { margin: 0; }
.mk-onb .mk-row { flex-wrap: nowrap; }
.mk-onb .mk-btn-main { width: auto; flex: 1; margin-top: 0; }

@media (max-width: 760px) {
	.mk-zoom, .mk-tool-sep, .mk-tool[data-tool="front"] { display: none; }
	.mk-tools { max-height: calc(100vh - 160px); overflow-y: auto; }
	.mk-shapes { grid-template-columns: repeat(5, 1fr); }
	.mk-walkpad { bottom: 18px; }
	.is-plan .mk-drawer { max-height: 44vh; }
	.mk-rail-btn { width: 64px; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mk-rail-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
	.mk-onb .mk-row { flex-wrap: wrap; }
}

/* ===== Ab 3.2: Kundenkonto ===== */
.mk-planner .mk-save-btn { position: relative; display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-radius: 99px; background: var(--mk-panel); color: var(--mk-ink); font-weight: 650; box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); }
.mk-save-btn .mk-ico { width: 18px; height: 18px; }
.mk-save-btn.is-dirty::after { content: ""; position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #d9822b; box-shadow: 0 0 0 2px #fff; }
.mk-save-btn.is-saved { color: var(--mk-accent); }
.mk-save-btn.is-saving { opacity: .6; }
.mk-planner .mk-btn-danger { background: #b3261e; color: #fff; }
.mk-planner .mk-btn-danger:hover { background: #8f1e18; }
.mk-planner .mk-link { padding: 0; background: none; color: var(--mk-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.mk-planner .mk-link-danger { color: #b3261e; font-weight: 500; font-size: 12.5px; margin-left: auto; }

/* Anmelden / Registrieren */
.mk-auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: rgba(31,36,33,.06); border-radius: 12px; }
.mk-planner .mk-auth-tabs button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 650; color: var(--mk-muted); }
.mk-planner .mk-auth-tabs button.is-on { background: #fff; color: var(--mk-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.mk-auth small { display: block; margin-top: 4px; font-weight: 400; color: var(--mk-muted); }
.mk-auth [hidden] { display: none !important; }
.mk-pw { position: relative; display: block; }
.mk-pw input { padding-right: 84px !important; }
.mk-planner .mk-pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2px; padding: 6px 8px; border-radius: 8px; font-size: 12px; color: var(--mk-muted); }
.mk-auth-privacy { font-size: 12px; }
.mk-auth-privacy a, .mk-auth-forgot a { color: var(--mk-accent); }
.mk-auth-forgot { margin: 4px 0 0; font-size: 13px; }
.mk-modal-err { color: #b3261e; }
.mk-verify { text-align: center; }
.mk-verify-ico { font-size: 38px; line-height: 1; margin-bottom: 6px; color: var(--mk-accent); }
.mk-verify .mk-row { justify-content: center; }

/* Meine Räume */
.mk-acc-who { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.mk-acc-who i { font-style: normal; color: var(--mk-accent); font-weight: 700; }
.mk-rooms { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.mk-room { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 12px; background: #f5f3ef; }
.mk-room.is-on { box-shadow: inset 0 0 0 2px var(--mk-accent); }
.mk-planner .mk-room-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.mk-room-thumb { flex: none; width: 76px; height: 50px; border-radius: 8px; overflow: hidden; background: linear-gradient(#fbfaf8, #e9e5df); }
.mk-room-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-room-txt { min-width: 0; display: flex; flex-direction: column; }
.mk-room-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-room-txt small { color: var(--mk-muted); font-size: 11.5px; }
.mk-room-sent { color: var(--mk-accent) !important; font-weight: 600; }
.mk-room-act { display: flex; flex: none; }
.mk-room-act .mk-tool { width: 30px; height: 34px; font-size: 14px; }
.mk-room-act .mk-tool.is-armed { width: auto; padding: 0 10px; background: #b3261e; color: #fff; font-size: 12px; font-weight: 600; }

/* Hinweis „noch nicht gespeichert“ */
.mk-nudge { position: absolute; left: 50%; top: 80px; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s !important; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 99px; background: var(--mk-ink); color: #fff; box-shadow: var(--mk-shadow); z-index: 7; transition: transform .35s cubic-bezier(.2,.8,.2,1); max-width: calc(100vw - 24px); }
.mk-nudge.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.mk-nudge span { font-weight: 600; }
.mk-planner .mk-nudge .mk-btn-main { width: auto; margin: 0; padding: 8px 14px; white-space: nowrap; }
.mk-planner .mk-nudge-x { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 20px; line-height: 1; }
@media (max-width: 760px) {
	.mk-nudge { top: auto; bottom: 96px; transform: translate(-50%, 30px); font-size: 13px; width: max-content; }
	.mk-nudge.is-on { transform: translate(-50%, 0); }
}

/* ===== Ab 3.3: Möbelwerkstatt ===== */
.mk-planner .mk-create { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #2f6f5e, #3d8a74); color: #fff; text-align: left; box-shadow: 0 6px 18px rgba(47,111,94,.25); }
.mk-create-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.mk-create b { display: block; font-size: 14.5px; }
.mk-create small { display: block; opacity: .85; font-size: 12px; line-height: 1.35; }
.mk-thumb { position: relative; }
.mk-card-edit { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--mk-accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.mk-card-edit .mk-ico { width: 17px; height: 17px; }
.mk-card-edit:hover { background: var(--mk-accent); color: #fff; }

.mk-studio { position: absolute; left: 16px; top: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); display: flex; flex-direction: column; background: var(--mk-panel); border-radius: var(--mk-radius); box-shadow: var(--mk-shadow); backdrop-filter: blur(14px); z-index: 5; transform: translateX(calc(-100% - 40px)); opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.mk-studio.is-open { transform: none; opacity: 1; }
.mk-studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px 12px 8px 20px; }
.mk-studio-head small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-accent); }
.mk-studio-head b { display: block; font-size: 19px; letter-spacing: .04em; }
.mk-studio-dim { font-size: 12.5px; color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mk-studio-body { flex: 1; overflow-y: auto; padding: 0 20px 12px; overscroll-behavior: contain; }
.mk-studio-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mk-studio-row .mk-label { margin: 6px 0; }
.mk-tpl-grid { grid-template-columns: repeat(3, 1fr); margin: 6px 0 10px; }
.mk-tpl-grid .mk-card { padding: 6px; }
.mk-tpl-grid .mk-card b { font-size: 11.5px; }
.mk-tpl-grid .mk-card small { font-size: 10.5px; }
.mk-card.is-on { box-shadow: inset 0 0 0 2px var(--mk-accent); }
.mk-studio-field { display: block; margin: 6px 0 10px; }
.mk-studio-field .mk-label { margin: 10px 0 6px; }
.mk-studio-field input, .mk-studio-field textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--mk-line); border-radius: 10px; font: inherit; background: #fff; resize: vertical; }
.mk-studio-tabs { margin: 8px 0 4px; }
.mk-studio-pane { min-height: 120px; }
.mk-studio-range { width: 100%; margin: -2px 0 4px; accent-color: var(--mk-accent); height: 20px; }
.mk-studio-pane .mk-num { border-bottom: 0; padding-bottom: 2px; }
.mk-studio-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--mk-line); }
.mk-planner .mk-studio-foot .mk-btn-main { flex: 1; width: auto; margin: 0; }
.mk-studio-foot .mk-link-danger { flex-basis: 100%; margin: 2px 0 0; text-align: left; }
.mk-studio-foot .mk-link-danger.is-armed { color: #fff; background: #b3261e; padding: 6px 10px; border-radius: 8px; text-decoration: none; flex-basis: auto; }
.mk-parts { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.mk-parts th { text-align: left; font-size: 11px; color: var(--mk-muted); font-weight: 600; padding: 4px; border-bottom: 1px solid var(--mk-line); }
.mk-parts td { padding: 6px 4px; border-bottom: 1px solid var(--mk-line); vertical-align: top; font-variant-numeric: tabular-nums; }
.mk-parts td small { display: block; color: var(--mk-muted); }
.mk-parts td:last-child { white-space: nowrap; text-align: right; }
.is-studio .mk-rail, .is-studio .mk-drawer, .is-studio .mk-sel, .is-studio .mk-cta, .is-studio .mk-hint, .is-studio .mk-brand, .is-studio .mk-zoom { display: none; }
.is-studio .mk-tools [data-tool], .is-studio .mk-tools .mk-tool-sep, .is-studio .mk-tools .mk-tool:not([data-tool]) { display: none; }
.is-studio .mk-tools .mk-tool[aria-label] { display: none; }
.is-studio .mk-tools { display: none; }
@media (max-width: 760px) {
	.mk-studio { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 58vh; transform: translateY(calc(100% + 40px)); }
	.mk-tpl-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 3.4: Hinweise beim Planen */
.pl-item.is-warn rect { fill: rgba(214,69,65,.14); stroke: #d64541; stroke-width: 1.6; }
.pl-item.is-warn.is-sel rect { fill: rgba(214,69,65,.24); stroke-width: 2.2; }
.mk-issue-btn { display: flex; align-items: center; gap: 7px; padding: 0 15px; border-radius: 99px; background: #fff4e5 !important; color: #9a4a0c !important; font-weight: 650; font-size: 13.5px; box-shadow: var(--mk-shadow), inset 0 0 0 1px rgba(214,120,30,.35); }
.mk-issue-btn[hidden] { display: none; }
.mk-issue-btn .mk-ico { width: 17px; height: 17px; }
.mk-issues { position: absolute; right: 16px; bottom: 76px; width: min(380px, calc(100% - 32px)); max-height: min(60vh, 520px); overflow-y: auto; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: var(--mk-shadow); z-index: 6; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.mk-issues.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mk-issues header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mk-issues header b { display: flex; align-items: center; gap: 8px; color: #9a4a0c; }
.mk-issues header b .mk-ico { width: 18px; height: 18px; }
.mk-issues ul { list-style: none; margin: 0; padding: 0; }
.mk-issue { display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 10px 14px; margin: 6px 0; border-radius: 12px; background: #fbf6f1; border-left: 3px solid #e0892b; cursor: pointer; }
.mk-issue:hover { background: #f6ece2; }
.mk-issue-overlap, .mk-issue-door { border-left-color: #d64541; }
.mk-issue span { font-weight: 600; font-size: 13.5px; }
.mk-issue small { color: var(--mk-muted); font-size: 12px; }
.mk-issues-ok { color: var(--mk-accent); font-weight: 600; }
.mk-issues-legend { font-size: 11.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mk-issues-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.mk-issues-legend i.is-red { background: rgba(214,69,65,.5); }
.mk-issues-legend i.is-zone { background: rgba(240,160,32,.55); margin-left: 8px; }
.mk-sel-warn { margin: 0 14px 6px; padding: 8px 10px; border-radius: 12px; background: #fff4e5; color: #8a420b; font-size: 12.5px; }
.mk-sel-warn[hidden] { display: none; }
.mk-sel-warn p { display: flex; gap: 7px; margin: 3px 0; align-items: flex-start; }
.mk-sel-warn .mk-ico { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.mk-busy { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 14px; background: rgba(246,244,240,.92); z-index: 12; font-size: 15px; }
.mk-busy.is-on { display: grid; }
.mk-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(47,111,94,.2); border-top-color: var(--mk-accent); animation: mk-rot .8s linear infinite; }
@keyframes mk-rot { to { transform: rotate(360deg); } }

/* 3.4: Ideen-Galerie */
.mk-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-gal-sep, .mk-gallery + h3 { grid-column: 1 / -1; margin: 10px 0 0; }
.mk-gal { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 0 0 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.mk-gal:hover { box-shadow: inset 0 0 0 2px var(--mk-accent); transform: translateY(-1px); }
.mk-gal-img { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f3f1ec; overflow: hidden; }
.mk-gal-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-gal-img .mk-ico { width: 34px; height: 34px; color: var(--mk-muted); }
.mk-gal-img em { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 99px; background: var(--mk-accent); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.mk-gal b { padding: 4px 10px 0; font-size: 13px; line-height: 1.3; }
.mk-gal small { padding: 0 10px; color: var(--mk-muted); font-size: 11.5px; line-height: 1.35; }
.mk-onb .mk-row .mk-btn .mk-ico { width: 16px; height: 16px; vertical-align: -3px; }

/* 3.4: Wohnungen (mehrere Räume) */
.mk-group { display: flex; align-items: center; gap: 10px; padding: 12px 0 6px; margin-top: 6px; border-top: 1px solid var(--mk-line); }
.mk-rooms .mk-group:first-child { border-top: 0; margin-top: 0; }
.mk-group-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(47,111,94,.12); color: var(--mk-accent); font-size: 17px; }
.mk-group-txt { flex: 1; display: flex; flex-direction: column; }
.mk-group-txt small { color: var(--mk-muted); font-size: 11.5px; }
.mk-group.is-single b { font-size: 12px; color: var(--mk-muted); text-transform: uppercase; letter-spacing: .06em; }
.mk-planner .mk-group-add { flex: none; padding: 7px 10px; font-size: 12px; }
.mk-group-txt { min-width: 0; }
.mk-group-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-rooms > li { min-width: 0; }
.mk-modal-box select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--mk-line); border-radius: 10px; font: inherit; background: #faf9f7; }
.mk-modal-box label[hidden] { display: none; }
.mk-drawer .mk-muted .mk-ico { width: 14px; height: 14px; vertical-align: -2px; }

@media (max-width: 760px) {
	.mk-rail-btn { width: 54px; }
	.mk-rail { gap: 2px; }
	.mk-issues { top: 60px; bottom: auto; right: 10px; width: calc(100% - 20px); }
	.mk-issue-btn { padding: 0 11px; font-size: 12.5px; }
	.mk-gallery { gap: 10px; }
}

/* 3.5 Vorbild-Fotos + Farbe aus dem Foto */
.mk-photos .mk-muted { margin: 2px 0 8px; font-size: 12.5px; }
.mk-photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-photo { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--mk-line); background: #f3f1ec; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-photo > .mk-ico { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mk-photo-add { border-style: dashed; color: var(--mk-ink); text-align: center; align-content: center; gap: 2px; }
.mk-photo-add small { font-size: 10.5px; line-height: 1.15; padding: 0 4px; }
.mk-photo-add .mk-ico { position: static; width: 22px; height: 22px; }
.mk-photo:focus-within, .mk-photo:hover { border-color: var(--mk-ink); }
.mk-pp { z-index: 40; }
.mk-pp-box { width: min(720px, 100%); max-height: calc(100% - 8px); overflow: auto; padding: 18px 20px; }
.mk-pp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-pp-head h2 { margin: 0; }
.mk-pp-box > .mk-muted { margin: 6px 0 10px; }
.mk-pp-img { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.mk-pp-img canvas { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; border-radius: 10px; cursor: crosshair; touch-action: manipulation; }
.mk-pp-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.35); pointer-events: none; }
.mk-pp-res { margin-top: 12px; }
.mk-pp-picked { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.mk-pp-picked span { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.mk-pp-slot { margin-bottom: 6px; }
.mk-pp-sw { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mk-pp-sw .mk-swatch { width: 38px; height: 38px; }
.mk-pp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
@media (max-width: 760px) { .mk-pp { padding: 8px; } .mk-pp-box { padding: 14px; } .mk-pp-img canvas { max-height: 42vh; } }
.mk-photo-add input[type=file] { display: none !important; }
.mk-pp-foot { position: sticky; bottom: -18px; background: #fff; padding: 10px 0 4px; margin-bottom: -4px; }
.mk-pp-img canvas { max-height: 44vh; }
@media (max-width: 760px) { .mk-pp-foot { bottom: -14px; } .mk-pp-img canvas { max-height: 38vh; } }
