/* Floor plan editor */
.pe { border: 1px solid var(--border); border-radius: 12px 12px 12px var(--swing); overflow: hidden; background: var(--surface); }
.pe-tools { padding: 10px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.pe-shapes { display: flex; gap: 6px; }
.pe-shapes button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.pe-shapes button:hover { border-color: var(--control); background: var(--raised); }
.pe-shapes svg { width: 24px; height: 20px; }
.pe-shapes polygon { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.pe-stage { position: relative; height: 420px; background: var(--well); }
.pe-svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.pe-grid { stroke: var(--text); stroke-opacity: .06; stroke-width: 1; fill: none; }
.pe-grid.major { stroke-opacity: .13; }
.pe-floor { fill: var(--surface); fill-opacity: .85; }
.pe-wall { stroke: var(--text); stroke-width: 6; stroke-linecap: square; cursor: pointer; transition: stroke .15s; }
.pe-wall:hover { stroke: var(--muted); }
.pe-wall.on { stroke: var(--accent); }
.pe-door .gap { stroke: var(--surface); stroke-width: 8; }
.pe-door line:not(.gap), .pe-door path { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 3; }
.pe-win line { stroke: var(--accent); stroke-width: 8; stroke-linecap: butt; }
.pe-len { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.pe-area { font-size: 15px; font-weight: 600; fill: var(--muted); pointer-events: none; }
.pe-pt { fill: var(--surface); stroke: var(--text); stroke-width: 2.5; cursor: grab; transition: r .15s; }
.pe-pt:hover, .pe-pt:focus { r: 9; outline: none; stroke: var(--accent); }
.pe-pt.on { fill: var(--accent); stroke: var(--accent); }
.pe-add { cursor: pointer; opacity: .55; transition: opacity .15s; }
.pe-add:hover { opacity: 1; }
.pe-add circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.pe-add path { stroke: var(--accent); stroke-width: 1.5; }
.pe-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 6px 6px 6px 12px; pointer-events: none; max-width: calc(100% - 24px); }
.pe-bar { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pe-sel { font-variant-numeric: tabular-nums; color: var(--muted); }
.pe-actions { margin-left: auto; display: flex; gap: 6px; }
.pe-trace { border-top: 1px solid var(--rule); }
.pe-trace summary { padding: 10px 12px; cursor: pointer; color: var(--muted); }
.pe-tracebody { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; padding: 0 12px 14px; }
.pe-tracebody .field { width: 160px; }
.mini3d { position: relative; height: 240px; border-radius: 8px 8px 8px 24px; overflow: hidden; background: var(--well); }
.mini3d > canvas { position: absolute; inset: 0; }
@media (max-width: 900px) { .pe-stage { height: 320px; } }

/* project type and room tabs */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modes button { display: grid; gap: 4px; text-align: left; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px 12px 12px var(--swing); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.modes button b { font-size: 16px; }
.modes button span { color: var(--muted); }
.modes button:hover { border-color: var(--control); }
.modes button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.rtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rtabs button { display: grid; text-align: left; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px 8px 8px 16px; background: var(--surface); cursor: pointer; transition: background .2s, border-color .2s; }
.rtabs button span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rtabs button[aria-selected="true"] { background: var(--text); color: var(--on-ink); border-color: var(--text); }
.rtabs button[aria-selected="true"] span { color: inherit; opacity: .7; }
.rtabs .addroom { border-style: dashed; color: var(--muted); place-items: center; }
.small-tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: 8px; max-width: 46vw; }
.small-tabs button { padding: 5px 12px; white-space: nowrap; }
.seats { margin-top: 12px; font-size: 14px; color: var(--muted); }
.seats b { color: var(--text); font-size: 18px; font-weight: 600; }
.seats.short b { color: var(--negative); }
.roomhead { display: flex; justify-content: space-between; padding: 12px 16px 4px; }
.strip span.other { opacity: .35; }
.list tr.grp td { font-weight: 600; padding-top: 18px; border-top: 0; }
@media (max-width: 700px) { .modes { grid-template-columns: 1fr; } .small-tabs { max-width: 100%; } }
