/* ExaGuards Floor Plans: the plans list (fpl-*) and the editor (fpe-*). Colours follow the app's theme (html[data-theme=dark]); the editor can also be switched on its own. */

.fpl-root, .fpl-modal, .fpe-host, .fpl-msg {
    --fp-bg: #f4f6f9; --fp-panel: #ffffff; --fp-panel2: #f8fafc; --fp-line: #d9dee7; --fp-text: #1e293b; --fp-muted: #64748b; --fp-accent: #2563eb; --fp-accent-t: #ffffff;
    --fp-accent-soft: rgba(37, 99, 235, .12); --fp-danger: #dc2626; --fp-warn: #b45309; --fp-ok: #15803d;
    --fp-canvas: #ffffff; --fp-grid: rgba(100, 116, 139, .22); --fp-grid2: rgba(100, 116, 139, .42); --fp-wall: #334155; --fp-ink: #1e293b; --fp-shadow: 0 8px 28px rgba(15, 23, 42, .18);
    font-family: Roboto, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; font-size: 13px; color: var(--fp-text); line-height: 1.35;
}
html[data-theme=dark] .fpl-root:not([data-fpt=light]), html[data-theme=dark] .fpl-modal, html[data-theme=dark] .fpe-host:not([data-fpt=light]), html[data-theme=dark] .fpl-msg, .fpe-host[data-fpt=dark] {
    --fp-bg: #11161d; --fp-panel: #1a212b; --fp-panel2: #202936; --fp-line: #2c3646; --fp-text: #e5eaf1; --fp-muted: #94a3b8; --fp-accent: #6ea0ff; --fp-accent-t: #0b1220;
    --fp-accent-soft: rgba(110, 160, 255, .18); --fp-danger: #ff8a80; --fp-warn: #f5c04e; --fp-ok: #6ee7a0;
    --fp-canvas: #0f141b; --fp-grid: rgba(148, 163, 184, .16); --fp-grid2: rgba(148, 163, 184, .34); --fp-wall: #cbd5e1; --fp-ink: #e5eaf1; --fp-shadow: 0 8px 28px rgba(0, 0, 0, .5);
}

/* ---------------------------------------------------------------- the plans list */
.fpl-root { padding: 14px 18px 30px; }
.fpl-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fpl-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; }
.fpl-ico { width: 22px; height: 22px; color: var(--fp-accent); }
.fpl-count { font-size: 12px; font-weight: 400; color: var(--fp-muted); }
.fpl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fpl-input { height: 32px; padding: 0 10px; border: 1px solid var(--fp-line); border-radius: 6px; background: var(--fp-panel); color: var(--fp-text); font: inherit; min-width: 120px; }
.fpl-input:focus, .fpl-btn:focus-visible, .fpl-link:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 1px; }
.fpl-btn { height: 32px; padding: 0 12px; border: 1px solid var(--fp-line); border-radius: 6px; background: var(--fp-panel); color: var(--fp-text); font: inherit; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.fpl-btn:hover { background: var(--fp-panel2); }
.fpl-btn.fpl-primary { background: var(--fp-accent); border-color: var(--fp-accent); color: var(--fp-accent-t); }
.fpl-btn.fpl-primary:hover { filter: brightness(1.08); }
.fpl-btn.fpl-danger, .fpl-link.fpl-danger { color: var(--fp-danger); }
.fpl-btn[disabled] { opacity: .5; cursor: default; }
.fpl-seg { display: inline-flex; border: 1px solid var(--fp-line); border-radius: 6px; overflow: hidden; }
.fpl-seg button { height: 30px; padding: 0 12px; border: 0; background: var(--fp-panel); color: var(--fp-muted); font: inherit; cursor: pointer; }
.fpl-seg button.on { background: var(--fp-accent-soft); color: var(--fp-accent); font-weight: 600; }
.fpl-notice { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; margin-bottom: 12px; border: 1px solid var(--fp-line); border-left: 3px solid var(--fp-accent); border-radius: 6px; background: var(--fp-panel); }
.fpl-x { border: 0; background: none; color: var(--fp-muted); cursor: pointer; font: inherit; }
.fpl-empty { padding: 48px 20px; text-align: center; color: var(--fp-muted); border: 1px dashed var(--fp-line); border-radius: 10px; background: var(--fp-panel); }
.fpl-empty p { margin: 0 0 10px; }
.fpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fpl-card { display: flex; flex-direction: column; border: 1px solid var(--fp-line); border-radius: 10px; background: var(--fp-panel); overflow: hidden; }
.fpl-card.arch { opacity: .72; }
.fpl-thumb { position: relative; display: flex; align-items: center; justify-content: center; height: 110px; background: var(--fp-panel2); color: var(--fp-muted); border-bottom: 1px solid var(--fp-line); }
.fpl-thumb svg { width: 64px; height: 64px; }
.fpl-tag { position: absolute; top: 8px; right: 8px; padding: 1px 8px; border-radius: 10px; background: var(--fp-warn); color: #fff; font-size: 11px; }
.fpl-tag.inl { position: static; margin-left: 8px; }
.fpl-body { padding: 10px 12px 6px; flex: 1; }
.fpl-name { font-size: 15px; font-weight: 600; color: var(--fp-text); text-decoration: none; word-break: break-word; }
.fpl-name:hover { color: var(--fp-accent); }
.fpl-sub { min-height: 18px; color: var(--fp-muted); margin-top: 2px; }
.fpl-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--fp-muted); font-size: 12px; }
.fpl-when { margin-top: 6px; font-size: 11px; color: var(--fp-muted); }
.fpl-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
.fpl-acts .fpl-btn { height: 28px; padding: 0 10px; font-size: 12px; }
.fpl-tablewrap { overflow-x: auto; border: 1px solid var(--fp-line); border-radius: 10px; background: var(--fp-panel); }
.fpl-table { width: 100%; border-collapse: collapse; }
.fpl-table th, .fpl-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--fp-line); white-space: nowrap; }
.fpl-table th.r, .fpl-table td.r { text-align: right; }
.fpl-table th { font-size: 12px; color: var(--fp-muted); font-weight: 600; background: var(--fp-panel2); }
.fpl-table tr.arch td { opacity: .7; }
.fpl-table a { color: var(--fp-accent); text-decoration: none; }
.fpl-link { border: 0; background: none; padding: 0 6px; color: var(--fp-accent); font: inherit; cursor: pointer; }
a.fpl-link { text-decoration: none; } a.fpl-link:hover { text-decoration: underline; }
.fpl-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 1990; }
.fpl-modal { position: fixed; z-index: 2000; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; padding: 18px 20px; border-radius: 12px; background: var(--fp-panel); border: 1px solid var(--fp-line); box-shadow: var(--fp-shadow); }
.fpl-modal h3 { margin: 0 0 12px; font-size: 16px; }
.fpl-modal label { display: block; margin-bottom: 10px; color: var(--fp-muted); font-size: 12px; }
.fpl-modal label .fpl-input { display: block; width: 100%; margin-top: 4px; color: var(--fp-text); font-size: 13px; }
.fpl-modal-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.fpl-err { color: var(--fp-danger); margin-top: 4px; }
.fpl-msg { margin: 24px; padding: 14px 18px; border: 1px solid var(--fp-line); border-radius: 8px; background: var(--fp-panel); }
.fpl-msg-i { display: inline-block; width: 20px; height: 20px; line-height: 20px; margin-right: 8px; text-align: center; border-radius: 50%; background: var(--fp-warn); color: #fff; font-style: normal; font-weight: 700; }

/* ---------------------------------------------------------------- the editor */
.fpe-host { position: relative; display: flex; flex-direction: column; width: 100%; height: calc(100vh - 8px); min-height: 420px; background: var(--fp-bg); overflow: hidden; user-select: none; -webkit-user-select: none; }
.fpe-host *, .fpe-host *::before, .fpe-host *::after { box-sizing: border-box; }
.fpe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 5px 8px; background: var(--fp-panel); border-bottom: 1px solid var(--fp-line); flex: 0 0 auto; z-index: 5; }
.fpe-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--fp-line); }
.fpe-b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--fp-text); font: inherit; cursor: pointer; white-space: nowrap; }
.fpe-b:hover { background: var(--fp-panel2); border-color: var(--fp-line); }
.fpe-b:focus-visible, .fpe-in:focus-visible, .fpe-sel:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 1px; }
.fpe-b.on { background: var(--fp-accent-soft); border-color: var(--fp-accent); color: var(--fp-accent); }
.fpe-b[disabled] { opacity: .4; cursor: default; background: transparent; border-color: transparent; }
.fpe-b.pri { background: var(--fp-accent); color: var(--fp-accent-t); border-color: var(--fp-accent); }
.fpe-b.dng { color: var(--fp-danger); }
.fpe-b .t { font-size: 12px; }
.fpe-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.fpe-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; padding: 0 6px; }
.fpe-status { margin-left: auto; padding: 0 8px; font-size: 12px; color: var(--fp-muted); white-space: nowrap; }
.fpe-status.bad { color: var(--fp-danger); font-weight: 600; }
.fpe-sel, .fpe-in { height: 30px; padding: 0 8px; border: 1px solid var(--fp-line); border-radius: 6px; background: var(--fp-panel); color: var(--fp-text); font: inherit; min-width: 0; }
textarea.fpe-in { height: auto; min-height: 60px; padding: 6px 8px; resize: vertical; width: 100%; }
.fpe-main { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.fpe-side { flex: 0 0 auto; width: 232px; background: var(--fp-panel); border-right: 1px solid var(--fp-line); overflow-y: auto; z-index: 3; transition: margin .15s; }
.fpe-side.r { border-right: 0; border-left: 1px solid var(--fp-line); width: 300px; display: flex; flex-direction: column; }
.fpe-side.off { margin-left: -232px; } .fpe-side.r.off { margin-left: 0; margin-right: -300px; }
.fpe-sec { border-bottom: 1px solid var(--fp-line); }
.fpe-sec > summary { list-style: none; cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--fp-muted); display: flex; align-items: center; gap: 6px; }
.fpe-sec > summary::-webkit-details-marker { display: none; }
.fpe-sec > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .12s; }
.fpe-sec[open] > summary::before { transform: rotate(45deg); }
.fpe-sec > .in { padding: 4px 10px 12px; }
.fpe-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.fpe-tools .fpe-b { flex-direction: column; height: 52px; gap: 2px; padding: 4px 2px; }
.fpe-tools .fpe-b .t { font-size: 10.5px; }
.fpe-syms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fpe-sym { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid var(--fp-line); border-radius: 6px; background: var(--fp-panel2); color: var(--fp-text); font: inherit; font-size: 10.5px; text-align: center; cursor: pointer; line-height: 1.15; }
.fpe-sym:hover { border-color: var(--fp-accent); }
.fpe-sym.on { background: var(--fp-accent-soft); border-color: var(--fp-accent); }
.fpe-sym svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fpe-cat { margin: 8px 0 4px; font-size: 11px; color: var(--fp-muted); }
.fpe-tabs { display: flex; border-bottom: 1px solid var(--fp-line); flex: 0 0 auto; }
.fpe-tabs button { flex: 1; height: 34px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--fp-muted); font: inherit; cursor: pointer; }
.fpe-tabs button.on { color: var(--fp-accent); border-bottom-color: var(--fp-accent); font-weight: 600; }
.fpe-pane { padding: 10px 12px 16px; overflow-y: auto; flex: 1 1 auto; }
.fpe-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fpe-row > label { flex: 0 0 82px; color: var(--fp-muted); font-size: 12px; }
.fpe-row > .fpe-in, .fpe-row > .fpe-sel { flex: 1 1 auto; width: 100%; }
.fpe-row.chk > label { flex: 1; color: var(--fp-text); }
.fpe-h { margin: 12px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--fp-muted); font-weight: 600; }
.fpe-list { list-style: none; margin: 0; padding: 0; }
.fpe-list li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.fpe-list li:hover { background: var(--fp-panel2); } .fpe-list li.on { background: var(--fp-accent-soft); }
.fpe-dot { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; border: 1px solid var(--fp-line); }
.fpe-muted { color: var(--fp-muted); font-size: 12px; }
.fpe-sev { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.fpe-sev.error { background: var(--fp-danger); } .fpe-sev.warn { background: var(--fp-warn); } .fpe-sev.info { background: var(--fp-muted); }
.fpe-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fpe-table td, .fpe-table th { padding: 4px 6px; border-bottom: 1px solid var(--fp-line); text-align: left; }
.fpe-table td.r, .fpe-table th.r { text-align: right; }
.fpe-stage { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: var(--fp-canvas); touch-action: none; }
.fpe-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.fpe-svg.pan { cursor: grab; } .fpe-svg.panning { cursor: grabbing; } .fpe-svg.cross { cursor: crosshair; }
.fpe-world [data-k] { pointer-events: all; cursor: pointer; }
.fpe-world .nopick, .fpe-world .nopick * { pointer-events: none !important; }
.fpe-svg.drawing .fpe-world [data-k] { cursor: crosshair; }
.fpe-glyph, .fpe-glyph * { vector-effect: non-scaling-stroke; }
.fpe-hud { position: absolute; z-index: 4; pointer-events: none; padding: 3px 8px; border-radius: 6px; background: rgba(15, 23, 42, .88); color: #fff; font-size: 12px; white-space: nowrap; }
.fpe-hint { position: absolute; z-index: 4; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 12px; border-radius: 16px; background: var(--fp-panel); border: 1px solid var(--fp-line); box-shadow: var(--fp-shadow); color: var(--fp-muted); font-size: 12px; max-width: calc(100% - 24px); text-align: center; }
.fpe-mini { position: absolute; z-index: 4; right: 10px; bottom: 10px; width: 176px; height: 118px; border: 1px solid var(--fp-line); border-radius: 8px; background: var(--fp-panel); box-shadow: var(--fp-shadow); overflow: hidden; cursor: pointer; }
.fpe-mini svg { width: 100%; height: 100%; display: block; }
.fpe-zoom { position: absolute; z-index: 4; left: 10px; bottom: 10px; display: flex; gap: 2px; align-items: center; border: 1px solid var(--fp-line); border-radius: 8px; background: var(--fp-panel); box-shadow: var(--fp-shadow); padding: 2px; }
.fpe-zoom .fpe-b { height: 28px; min-width: 28px; }
.fpe-banner { position: absolute; z-index: 6; top: 8px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 8px; background: var(--fp-panel); border: 1px solid var(--fp-warn); box-shadow: var(--fp-shadow); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fpe-banner.bad { border-color: var(--fp-danger); }
.fpe-dlgscrim { position: absolute; z-index: 20; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 12px; }
.fpe-dlg { width: min(520px, 100%); max-height: 100%; overflow: auto; padding: 16px 18px; border-radius: 12px; background: var(--fp-panel); border: 1px solid var(--fp-line); box-shadow: var(--fp-shadow); }
.fpe-dlg.wide { width: min(1100px, 100%); height: min(760px, 100%); display: flex; flex-direction: column; }
.fpe-dlg h3 { margin: 0 0 10px; font-size: 16px; }
.fpe-dlg p { margin: 0 0 10px; }
.fpe-dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; padding: 10px 0 16px; margin-bottom: -16px; flex-wrap: wrap; position: sticky; bottom: -16px; background: var(--fp-panel); }   /* stays in view when a tall dialog scrolls on a phone */
.fpe-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--fp-line); border-radius: 10px; color: var(--fp-muted); text-align: center; cursor: pointer; }
.fpe-drop.over, .fpe-drop:hover { border-color: var(--fp-accent); color: var(--fp-accent); background: var(--fp-accent-soft); }
.fpe-pages { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.fpe-pg { flex: 0 0 auto; width: 96px; padding: 4px; border: 2px solid var(--fp-line); border-radius: 6px; background: var(--fp-panel2); cursor: pointer; text-align: center; font-size: 11px; color: var(--fp-muted); }
.fpe-pg.on { border-color: var(--fp-accent); color: var(--fp-accent); }
.fpe-pg canvas { width: 100%; height: auto; display: block; background: #fff; }
.fpe-pv { position: relative; flex: 1 1 auto; min-height: clamp(240px, 56vh, 560px); border: 1px solid var(--fp-line); border-radius: 8px; overflow: hidden; background: var(--fp-canvas); }
.fpe-pv svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fpe-step { color: var(--fp-muted); font-size: 12px; margin-bottom: 6px; }
.fpe-warnl { margin: 6px 0; padding-left: 18px; font-size: 12px; color: var(--fp-warn); }
.fpe-prog { height: 6px; border-radius: 3px; background: var(--fp-panel2); overflow: hidden; margin: 10px 0; }
.fpe-prog > i { display: block; height: 100%; width: 40%; background: var(--fp-accent); animation: fpeprog 1.2s ease-in-out infinite; }
@keyframes fpeprog { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
/* the assistant box (exa-fp-assist.js) */
.fpe-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fpe-chip { border: 1px solid var(--fp-line); background: var(--fp-panel2); color: var(--fp-ink); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.fpe-chip:hover, .fpe-chip:focus-visible { border-color: var(--fp-accent); color: var(--fp-accent); outline: none; }
.fpe-asrow { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.fpe-asrow > .fpe-pv { flex: 2 1 340px; }
.fpe-asinfo { flex: 1 1 250px; min-width: 0; overflow: auto; max-height: 100%; }
.fpe-asmsg { white-space: pre-wrap; overflow-wrap: anywhere; }
.fpe-asl { margin: 6px 0; padding-left: 18px; font-size: 12px; }
.fpe-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin-top: 6px; }
.fpe-leg > span { display: inline-flex; align-items: center; gap: 5px; }
.fpe-leg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
/* record-linked symbols */
.fpe-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: transparent; border: 2px solid var(--fp-muted); box-sizing: border-box; }
.fpe-dot.up { background: var(--fp-ok); border-color: var(--fp-ok); } .fpe-dot.down { background: var(--fp-danger); border-color: var(--fp-danger); } .fpe-dot.warn { background: var(--fp-warn); border-color: var(--fp-warn); }
.fpe-lnk { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--fp-line); }
.fpe-lnkname { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; margin: 2px 0; }
.fpe-lnkst { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 4px 0 6px; }
.fpe-rov { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; padding: 6px 0; min-width: 0; }
.fpe-find { margin-bottom: 8px; } .fpe-find .fpe-list li.fpe-muted { cursor: default; }
.fpe-b.pri { text-decoration: none; }
.fpe-pick { min-width: min(420px, 78vw); }
.fpe-pickres { max-height: min(46vh, 360px); overflow: auto; margin: 6px 0; border: 1px solid var(--fp-line); border-radius: 8px; }
.fpe-pickrow { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--fp-line); padding: 7px 10px; color: var(--fp-text); cursor: pointer; font: inherit; }
.fpe-pickrow:last-child { border-bottom: 0; } .fpe-pickrow:hover, .fpe-pickrow:focus-visible { background: var(--fp-accent-soft); outline: none; }
.fpe-pickrow .n { display: flex; align-items: center; gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.fpe-pickres > .fpe-muted { padding: 8px 10px; }
.fpe-ruler { position: absolute; z-index: 2; background: var(--fp-panel); pointer-events: none; overflow: hidden; color: var(--fp-muted); font-size: 10px; }
.fpe-ruler.h { left: 18px; right: 0; top: 0; height: 18px; border-bottom: 1px solid var(--fp-line); }
.fpe-ruler.v { top: 18px; bottom: 0; left: 0; width: 18px; border-right: 1px solid var(--fp-line); }
.fpe-ruler.c { left: 0; top: 0; width: 18px; height: 18px; border-right: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); }
.fpe-ruler svg { width: 100%; height: 100%; display: block; }
.fpe-inline { position: absolute; z-index: 7; }
.fpe-toast { position: absolute; z-index: 30; left: 50%; bottom: 52px; transform: translateX(-50%); padding: 7px 14px; border-radius: 8px; background: rgba(15, 23, 42, .92); color: #fff; font-size: 12px; max-width: calc(100% - 24px); }

@media (max-width: 1000px) {
    .fpe-side { position: absolute; top: 0; bottom: 0; left: 0; box-shadow: var(--fp-shadow); }
    .fpe-side.r { left: auto; right: 0; }
    .fpe-mini { display: none; }
    .fpe-bar .fpe-b .t { display: none; }      /* only the toolbar drops its words on a narrow screen: the buttons in dialogs, banners and panels must keep theirs (Cancel, Accept...) */
}
@media (max-width: 640px) { .fpe-name { max-width: 110px; } .fpe-status { display: none; } .fpe-side { width: 200px; } .fpe-side.r { width: 260px; } .fpe-side.off { margin-left: -200px; } .fpe-side.r.off { margin-right: -260px; } }
@media (pointer: coarse) { .fpe-b { min-width: 40px; height: 40px; } .fpe-sel, .fpe-in { height: 38px; } .fpe-row > label { flex-basis: 74px; } }
@media print { .fpe-bar, .fpe-side, .fpe-mini, .fpe-zoom, .fpe-hint, .fpe-ruler, .fpe-banner { display: none !important; } }

/* ---- round 3: the professional extras (right-click menu, command palette, keyboard sheet, print sheet) ---- */
.fpe-ctx { position: absolute; z-index: 12; min-width: 210px; max-width: calc(100% - 8px); padding: 5px; border-radius: 10px; background: var(--fp-panel); border: 1px solid var(--fp-line); box-shadow: var(--fp-shadow); display: flex; flex-direction: column; }
.fpe-ctx button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fp-text); font: inherit; text-align: left; cursor: pointer; }
.fpe-ctx button:hover:not(:disabled), .fpe-ctx button:focus-visible { background: var(--fp-panel2); outline: 0; box-shadow: inset 0 0 0 1px var(--fp-accent); }
.fpe-ctx button:disabled { color: var(--fp-muted); opacity: .55; cursor: default; }
.fpe-ctx button.dng { color: var(--fp-bad, #dc2626); }
.fpe-ctx kbd, .fpe-pal kbd { font: 11px/1 ui-monospace, Consolas, monospace; color: var(--fp-muted); background: var(--fp-panel2); border: 1px solid var(--fp-line); border-radius: 4px; padding: 3px 5px; white-space: nowrap; }
.fpe-ctx .sep { height: 1px; margin: 4px 6px; background: var(--fp-line); }
.fpe-palscrim { position: absolute; z-index: 25; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 70px 12px 12px; }
.fpe-pal { width: min(620px, 100%); max-height: calc(100% - 20px); display: flex; flex-direction: column; border-radius: 14px; background: var(--fp-panel); border: 1px solid var(--fp-line); box-shadow: var(--fp-shadow); overflow: hidden; }
.fpe-pal-in { width: 100%; box-sizing: border-box; height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--fp-line); background: transparent; color: var(--fp-text); font: inherit; font-size: 15px; outline: 0; }
.fpe-pal-list { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.fpe-pal-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.fpe-pal-list li.on { background: var(--fp-panel2); box-shadow: inset 0 0 0 1px var(--fp-accent); }
.fpe-pal-list li .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpe-pal-list li .h { flex: 0 1 38%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fp-muted); font-size: 12px; }
.fpe-pal-list li.none { color: var(--fp-muted); cursor: default; }
.fpe-pal-foot { padding: 7px 14px; border-top: 1px solid var(--fp-line); color: var(--fp-muted); font-size: 11px; }
.fpe-kbd { font: 12px/1 ui-monospace, Consolas, monospace; background: var(--fp-panel2); border: 1px solid var(--fp-line); border-radius: 4px; padding: 3px 6px; white-space: nowrap; }
.fpe-keys .fpe-table td:first-child { width: 190px; white-space: nowrap; }
.fpe-sheet { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.fpe-sheet-form { min-width: 0; }
.fpe-sheet-prev { min-width: 0; align-self: start; padding: 14px; border-radius: 8px; background: #e2e8f0; border: 1px solid var(--fp-line); }
.fpe-sheet-prev svg { box-shadow: 0 2px 12px rgba(15, 23, 42, .25); }
.fpe-check { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; cursor: pointer; }
@media (max-width: 760px) { .fpe-sheet { grid-template-columns: 1fr; } .fpe-palscrim { padding-top: 20px; } }

/* Round 5: survey pins with photos, the share dialog, the "ok" dot */
.fpe-sev.ok { background: var(--fp-ok); }
.fpe-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin: 6px 0; }
.fpe-ph .cell { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--fp-panel2); border: 1px solid var(--fp-line); }
.fpe-ph .cell img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.fpe-ph .cell.bad::after { content: "?"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--fp-muted); }
.fpe-ph .cell .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .7); color: #fff; font-size: 13px; line-height: 22px; cursor: pointer; }
.fpe-ph .cell .x:hover { background: var(--fp-danger); }
.fpe-share .fpe-list li { cursor: default; align-items: flex-start; }
.fpe-share input[readonly] { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.fpe-banner.info { border-color: var(--fp-line); font-size: 12px; pointer-events: none; }
