/* Cedar Lawn. Warm drafting paper, ink, and one cedar green. */

:root {
	--paper: #f3efe6;
	--paper-2: #ece6d9;
	--card: #fffdf9;
	--ink: #1d2826;
	--ink-2: #4c5a56;
	--ink-3: #7c8783;
	--line: rgba(29, 40, 38, .11);
	--line-2: rgba(29, 40, 38, .2);
	--cedar: #2c6655;
	--cedar-deep: #1f4c3f;
	--cedar-soft: #dcebe4;
	--heat: #d0683f;
	--heat-ink: #a84a26;
	--heat-soft: #f8e4d9;
	--amber: #b98a2f;
	--danger: #b3402f;
	--note: #5d4e94;
	--good: #2c6655;
	--shadow-1: 0 1px 2px rgba(30, 30, 20, .06), 0 2px 8px rgba(30, 30, 20, .05);
	--shadow-2: 0 2px 6px rgba(30, 30, 20, .07), 0 14px 40px rgba(30, 30, 20, .13);
	--shadow-3: 0 6px 18px rgba(30, 30, 20, .1), 0 30px 80px rgba(30, 30, 20, .2);
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--nav-w: 76px;
	--nav-h: 60px;
	--spring: cubic-bezier(.2, .85, .25, 1);
	--ease: cubic-bezier(.3, .7, .2, 1);
	color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 15px/1.5 var(--sans);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.2; }
a { color: var(--cedar); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -5px; }
:focus-visible { outline: 2px solid var(--cedar); outline-offset: 2px; }
.eyebrow { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.empty { color: var(--ink-3); padding: 18px 0; margin: 0; }

/* ── Buttons, inputs, chips ────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	min-height: 40px; padding: 0 16px; border-radius: 11px;
	border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 550;
	transition: transform .12s var(--ease), background .15s, box-shadow .15s;
}
.btn:hover { background: #fff; text-decoration: none; box-shadow: var(--shadow-1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--cedar); border-color: var(--cedar); color: #fff; }
.btn-primary:hover { background: var(--cedar-deep); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #952f20; }
.btn-big { min-height: 52px; width: 100%; font-size: 16.5px; border-radius: 14px; }
.btn-small { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: rgba(29, 40, 38, .06); box-shadow: none; }
.icon-btn {
	width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
	transition: background .15s, color .15s, transform .12s var(--ease);
}
.icon-btn:hover { background: rgba(29, 40, 38, .07); color: var(--ink); }
.icon-btn:active { transform: scale(.93); }
.icon-btn[aria-pressed="true"] { background: var(--cedar); color: #fff; }
.input, .field input, .field select, .field textarea {
	width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: inherit;
	background: #fff; border: 1px solid var(--line-2); border-radius: 11px;
	transition: border-color .15s, box-shadow .15s;
}
textarea.input, .field textarea { resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--cedar); box-shadow: 0 0 0 3px rgba(44, 102, 85, .16); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 7px; }
.field .check input { width: auto; min-height: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
	flex: none; display: inline-flex; align-items: center; gap: 5px;
	min-height: 34px; padding: 0 13px; border-radius: 99px; font-size: 13.5px;
	border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer;
	transition: background .15s, color .15s, border-color .15s, transform .12s var(--ease);
}
.chip:hover { border-color: var(--ink-3); }
.chip:active { transform: scale(.95); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip b { font-weight: 700; color: var(--heat-ink); }
.chip.is-on b { color: #ffc9ad; }
.tag {
	display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; line-height: 1;
	color: var(--ink-2); background: rgba(29, 40, 38, .06); padding: 3px 6px; border-radius: 5px; white-space: nowrap;
}
.tag .ic { width: 12px; height: 12px; vertical-align: 0; }
.tag.is-heat { background: var(--heat-soft); color: var(--heat-ink); }
.tag.is-cedar { background: var(--cedar-soft); color: var(--cedar-deep); }

/* ── Navigation ────────────────────────────────────────────────────────── */
.nav {
	position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: var(--nav-w);
	display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px;
	background: rgba(255, 253, 249, .78); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
	border-right: 1px solid var(--line);
}
.nav-brand {
	width: 42px; height: 42px; border-radius: 13px; background: var(--cedar); color: #fff; margin-bottom: 12px;
	display: flex; align-items: center; justify-content: center; font: 500 16px var(--serif); letter-spacing: .03em;
}
.nav-brand:hover { text-decoration: none; background: var(--cedar-deep); }
.nav-link {
	width: 64px; padding: 8px 2px 6px; border: 0; background: transparent; border-radius: 12px; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 550; color: var(--ink-3);
	transition: background .15s, color .15s;
}
.nav-link:hover { text-decoration: none; color: var(--ink); background: rgba(29, 40, 38, .05); }
.nav-link.is-on { color: var(--cedar-deep); background: var(--cedar-soft); }
.nav-out { margin-top: auto; }
.nav { overflow-y: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-more, .nav-sheet { display: none; }
body.is-page { padding-left: var(--nav-w); }

/* ── Sign in ───────────────────────────────────────────────────────────── */
.auth-page { display: flex; min-height: 100%; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
	position: relative; overflow: hidden; width: min(400px, 100%);
	padding: 150px 28px 28px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow-3);
}
.auth-art { position: absolute; top: 14px; left: 50%; width: 118px; transform: translateX(-50%); opacity: .8; pointer-events: none; }
.auth-card h1 { text-align: center; font-size: 32px; }
.auth-sub { text-align: center; color: var(--ink-3); margin: 3px 0 20px; font-family: var(--serif); font-style: italic; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 13px; }
.auth-card input { display: block; width: 100%; margin-top: 5px; min-height: 46px; padding: 9px 13px; font: 16px var(--sans); border: 1px solid var(--line-2); border-radius: 11px; background: #fff; }
.auth-card input:focus { outline: 0; border-color: var(--cedar); box-shadow: 0 0 0 3px rgba(44, 102, 85, .16); }
.auth-error { background: var(--heat-soft); color: var(--heat-ink); padding: 9px 12px; border-radius: 10px; font-size: 13.5px; }

/* ── The explorer frame ────────────────────────────────────────────────── */
body.is-explore { overflow: hidden; }
.ex {
	position: fixed; inset: 0 0 0 var(--nav-w); overflow: hidden;
	background:
		radial-gradient(1200px 700px at 58% 42%, #faf7f0 0%, rgba(250, 247, 240, 0) 72%),
		var(--paper);
}
.ex::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(44, 102, 85, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(44, 102, 85, .045) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
}
.ex-stage { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.ex.is-ready .ex-stage { opacity: 1; }

.ex-top {
	position: absolute; z-index: 20; top: 14px; left: 18px; right: 18px; pointer-events: none;
	display: flex; align-items: center; gap: 10px;
}
.ex-top > * { pointer-events: auto; }
.ex-back {
	width: 0; opacity: 0; overflow: hidden; background: var(--card); box-shadow: var(--shadow-1);
	transition: width .35s var(--spring), opacity .25s; pointer-events: none;
}
.ex[data-mode="floor"] .ex-back, .ex[data-mode="elevation"] .ex-back { width: 40px; opacity: 1; pointer-events: auto; }
.ex-title { min-width: 0; line-height: 1.15; flex: 0 1 auto; }
.ex-title strong { display: block; font: 500 23px/1.15 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.ex-title span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs {
	position: relative; margin-left: auto; display: flex; padding: 3px; border-radius: 13px;
	background: rgba(255, 253, 249, .85); box-shadow: var(--shadow-1); border: 1px solid var(--line);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabs a {
	position: relative; z-index: 1; padding: 7px 15px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); border-radius: 10px;
	transition: color .25s;
}
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.is-on { color: #fff; }
.tabs-thumb {
	position: absolute; left: 0; top: 3px; bottom: 3px; width: 0; background: var(--ink); border-radius: 10px;
	transition: transform .42s var(--spring), width .42s var(--spring);
}

/* ── The exploded stack ────────────────────────────────────────────────── */
.stack-wrap {
	position: absolute; inset: 0; perspective: 3200px; perspective-origin: 50% 30%;
	opacity: 0; pointer-events: none; transition: opacity .25s;
}
.stack-wrap.is-visible { opacity: 1; pointer-events: auto; }
.stack {
	position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d;
	transform: translate3d(0, var(--stack-y, 0px), 0) scale(1) rotateX(58deg) rotateZ(-34deg);
	transition: transform .76s var(--spring);
}
.plane {
	position: absolute; display: block; padding: 0; border: 0; cursor: pointer; transform-style: preserve-3d;
	transform: translate3d(0, 0, var(--z, 0));
	background: rgba(255, 253, 248, .9);
	box-shadow: 0 0 0 1px rgba(29, 40, 38, .1), -14px 22px 46px rgba(40, 40, 25, .17);
	border-radius: 3px;
	transition: transform .55s var(--spring), opacity .4s, background .4s, box-shadow .4s;
}
.plane img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.plane-fills { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.plane-room { fill: var(--heat); fill-opacity: 0; transition: fill-opacity .3s; }
.plane-room.has-heat { fill-opacity: calc(.12 + var(--h, 0) * .4); }
.plane.is-lifted { transform: translate3d(0, 0, calc(var(--z, 0) + var(--lift, 40px))); background: #fffef9; box-shadow: 0 0 0 1.5px var(--cedar), -18px 30px 60px rgba(40, 40, 25, .24); }
.plane.is-above { transform: translate3d(0, 0, calc(var(--z, 0) + var(--lift, 40px) * 2.2)); opacity: .45; }
.plane.is-quiet:not(.is-above) { opacity: .68; }
.plane:focus-visible { outline: 2px solid var(--cedar); }
.stack.is-flying .plane { background: #fffdf8; box-shadow: 0 0 0 1px rgba(29, 40, 38, .08); pointer-events: none; }
.stack.is-flying .plane.is-target { transform: translate3d(0, 0, 0); }
.stack.is-flying .plane.is-away-up { transform: translate3d(0, 0, 1400px); opacity: 0; }
.stack.is-flying .plane.is-away-down { transform: translate3d(0, 0, -1100px); opacity: 0; }

.stack-legend {
	position: absolute; z-index: 15; left: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 1px; width: 216px;
	transition: opacity .3s, transform .4s var(--spring);
}
.ex:not([data-mode="stack"]) .stack-legend { opacity: 0; transform: translateX(-16px); pointer-events: none; }
.legend-row {
	display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink);
	transition: background .18s;
}
.legend-row:hover, .legend-row.is-on { background: rgba(255, 253, 249, .9); box-shadow: var(--shadow-1); text-decoration: none; }
.legend-name { font: 500 16px var(--serif); }
.legend-count { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.legend-count.has { color: var(--heat-ink); font-weight: 600; }

/* ── Floor rail ────────────────────────────────────────────────────────── */
.floor-rail {
	position: absolute; z-index: 18; left: 18px; top: 50%; transform: translate(-90px, -50%);
	display: flex; flex-direction: column; padding: 4px; border-radius: 15px;
	background: rgba(255, 253, 249, .9); box-shadow: var(--shadow-2); border: 1px solid var(--line);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	transition: transform .5s var(--spring);
}
.ex[data-mode="floor"] .floor-rail { transform: translate(0, -50%); }
.floor-rail button {
	position: relative; z-index: 1; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 11px; cursor: pointer;
	font: 500 17px var(--serif); color: var(--ink-2); transition: color .25s;
}
.floor-rail button.is-on { color: #fff; }
.rail-thumb {
	position: absolute; left: 4px; top: 4px; width: 44px; height: 44px; border-radius: 11px; background: var(--cedar);
	transition: transform .45s var(--spring); pointer-events: none;
}

.ex-tools {
	position: absolute; z-index: 18; right: 18px; bottom: 18px; display: flex; flex-direction: column; padding: 4px; border-radius: 14px;
	background: rgba(255, 253, 249, .9); box-shadow: var(--shadow-2); border: 1px solid var(--line);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	transition: right .5s var(--spring), opacity .3s, transform .4s var(--spring);
}
.ex[data-mode="stack"] .ex-tools, .ex[data-mode="ring"] .ex-tools { opacity: 0; transform: translateY(16px); pointer-events: none; }
.ex.has-panel .ex-tools { right: 412px; }
.ex:not([data-mode="floor"]) [data-wipe] { display: none; }

/* ── The drawing viewer ────────────────────────────────────────────────── */
.ex-viewer { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.ex-viewer.is-visible { opacity: 1; pointer-events: auto; }
.vw { overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.vw.is-grabbing { cursor: grabbing; }
.vw-slide { position: absolute; inset: 0; }
.vw-world {
	position: absolute; left: 0; top: 0; transform-origin: 0 0; --inv: 1;
	background: #fffdf8; box-shadow: 0 0 0 1px rgba(29, 40, 38, .08), 0 18px 50px rgba(40, 40, 25, .12);
}
.vw-world.is-moving { will-change: transform; }
.vw-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vw-img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vw-img { transition: opacity .28s; }
.vw-img.is-off { opacity: 0; }
.vw-img-clean { opacity: 0; }
.vw-img-clean.is-on { opacity: 1; }
.vw-img-then { display: none; }
.vw-img-then.is-on { display: block; }
.vw-enter-up { animation: vwEnterUp .46s var(--spring); }
.vw-enter-down { animation: vwEnterDown .46s var(--spring); }
.vw-leave-up { animation: vwLeaveUp .34s var(--ease) forwards; pointer-events: none; }
.vw-leave-down { animation: vwLeaveDown .34s var(--ease) forwards; pointer-events: none; }
@keyframes vwEnterUp { from { opacity: 0; transform: translateY(46px) scale(.985); } }
@keyframes vwEnterDown { from { opacity: 0; transform: translateY(-46px) scale(.985); } }
@keyframes vwLeaveUp { to { opacity: 0; transform: translateY(-46px) scale(1.012); } }
@keyframes vwLeaveDown { to { opacity: 0; transform: translateY(46px) scale(1.012); } }

.vw-room {
	fill: var(--heat); fill-opacity: 0;
	transition: fill-opacity .22s;
}
.vw-room.has-heat { fill-opacity: calc(.07 + var(--h, 0) * .28); }
.vw-room.is-hover { fill: var(--cedar); fill-opacity: .17; }
.vw-room.is-selected { fill: var(--cedar); fill-opacity: .1; }
.vw-dim { fill: var(--paper); fill-opacity: 0; transition: fill-opacity .42s; }
.has-selection .vw-dim { fill-opacity: .68; }
.vw-outline {
	fill: none; stroke: var(--cedar); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round;
	filter: drop-shadow(0 0 7px rgba(44, 102, 85, .38));
}
.vw-hoverline { fill: none; stroke: var(--cedar); stroke-opacity: .55; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* Markers keep their size on screen whatever the zoom. */
.vw-marks { position: absolute; inset: 0; pointer-events: none; }
.vw-mark {
	position: absolute; padding: 0; border: 0; background: none; pointer-events: none;
	transform: translate(-50%, -50%) scale(var(--inv));
}
.vw-mark.is-new { animation: markIn .4s var(--spring); }
@keyframes markIn { from { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--inv) * .4)); } }
.mark-count span {
	display: flex; align-items: center; justify-content: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 99px;
	background: var(--heat); color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 7px rgba(150, 70, 30, .4), 0 0 0 2px rgba(255, 253, 249, .85);
}
.mark-element { width: 15px; height: 15px; border-radius: 50%; background: var(--cedar); box-shadow: 0 0 0 3px rgba(255, 253, 249, .95), 0 3px 9px rgba(0, 0, 0, .28); }
.mark-element.has-open { background: var(--heat); }
.mark-element.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.mark-label {
	position: absolute; left: 21px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; font-weight: 600;
	color: var(--ink); background: rgba(255, 253, 249, .95); padding: 2px 8px; border-radius: 7px; box-shadow: var(--shadow-1);
}
.mark-label b { color: var(--heat-ink); }
.mark-window span {
	display: flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; font-size: 11px; font-weight: 700;
	color: var(--ink-2); background: rgba(255, 253, 249, .92); box-shadow: 0 0 0 1px var(--line-2);
}
.mark-window.has-open span { background: var(--heat); color: #fff; box-shadow: 0 2px 6px rgba(150, 70, 30, .35); }
.mark-pin { width: 26px; height: 35px; transform: translate(-50%, -100%) scale(var(--inv)); transform-origin: 50% 100%; }
.mark-pin.is-new { animation: pinDrop .52s var(--spring); }
@keyframes pinDrop {
	0% { opacity: 0; transform: translate(-50%, calc(-100% - 46px)) scale(var(--inv)); }
	60% { opacity: 1; transform: translate(-50%, -100%) scale(var(--inv)); }
	78% { transform: translate(-50%, calc(-100% - 7px)) scale(var(--inv)); }
}
.pin-shape { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .32)); }
.pin-shape path { fill: var(--heat); stroke: #fff; stroke-width: 1.4; }
.pin-shape circle { fill: #fff; }
.mark-pin.kind-buy .pin-shape path { fill: var(--amber); }
.mark-pin.kind-decision .pin-shape path { fill: #4c6fa8; }
.mark-pin.is-pending .pin-shape path { fill: var(--cedar); }

.ex-tip {
	position: absolute; z-index: 12; left: 0; top: 0; pointer-events: none; opacity: 0; display: flex; flex-direction: column; gap: 0;
	padding: 7px 11px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-2); max-width: 230px;
	transition: opacity .13s;
}
.ex-tip.is-on { opacity: 1; }
.ex-tip strong { font: 500 15px var(--serif); }
.ex-tip em { color: #bcc7c3; font-style: normal; }
.ex-tip span { color: #ffc9ad; font-weight: 600; }

/* Typed names on the clean drawings. They wrap to the room's width on screen. */
.mark-room { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; width: max-content; }
.room-name {
	display: block; font: 500 14.5px/1.15 var(--serif); color: var(--ink);
	max-width: max(68px, calc(var(--rw) / var(--inv) * .92px));
}
.room-count {
	display: flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 99px;
	background: var(--heat); color: #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 2px 6px rgba(150, 70, 30, .35);
}
.plane-name { font: 500 36px var(--serif); text-anchor: middle; fill: var(--ink-2); }

/* The architect's notes, pinned. */
.mark-note span {
	display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50% 50% 50% 4px; background: var(--note); color: #fff;
	box-shadow: 0 0 0 2px rgba(255, 253, 249, .9), 0 3px 8px rgba(50, 40, 90, .35);
}
.mark-note .ic { width: 13px; height: 13px; }
.mark-note.is-on span { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--note); }
.view-switch {
	position: absolute; z-index: 19; top: 58px; right: 18px; display: flex; gap: 6px; align-items: center;
	transition: right .5s var(--spring), opacity .2s;
}
.ex.has-panel .view-switch { right: 412px; top: 16px; }
.ex.has-panel .tabs { visibility: visible; }
.ex[data-mode="site"] .view-switch { display: none; }
.has-wipe .view-switch { opacity: .35; pointer-events: none; }
.view-switch .seg, .note-toggle {
	background: rgba(255, 253, 249, .92); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-1);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.view-switch .seg { display: flex; padding: 3px; gap: 2px; }
.view-switch .seg button { border: 0; background: none; padding: 4px 10px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.view-switch .seg button.is-on { background: var(--cedar); color: #fff; }
.note-toggle { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; font-size: 12.5px; font-weight: 550; color: var(--ink-3); cursor: pointer; }
.note-toggle .ic { width: 14px; height: 14px; }
.note-toggle[aria-pressed="true"] { color: var(--note); border-color: var(--note); }
.ex.is-original .note-toggle { display: none; }
.note-card {
	position: absolute; z-index: 30; left: 50%; bottom: 22px; width: min(400px, calc(100% - 24px)); padding: 12px 12px 12px 16px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-3); border: 1px solid var(--line);
	transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform .38s var(--spring), opacity .2s;
}
.note-card.is-open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.note-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.note-head .eyebrow { color: var(--note); padding-top: 6px; }
.note-head .icon-btn { width: 32px; height: 32px; margin: -2px 0; }
.note-where { margin: 0 0 3px; font-size: 12.5px; color: var(--ink-3); }
.note-text { margin: 2px 4px 10px 0; font: 500 17px/1.3 var(--serif); }
.note-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.panel-sub { margin: 14px 8px 2px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--note); font-weight: 600; }
.note-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.row-note { flex: none; width: 19px; height: 19px; margin-top: 1px; display: flex; align-items: center; justify-content: center; border-radius: 50% 50% 50% 3px; background: var(--note); color: #fff; }
.row-note .ic { width: 11px; height: 11px; }

/* The before and approved wipe. */
.wipe { position: absolute; z-index: 16; top: 0; bottom: 0; width: 44px; margin-left: -22px; display: none; cursor: ew-resize; touch-action: none; }
.has-wipe .wipe { display: block; }
.wipe::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--cedar); box-shadow: 0 0 10px rgba(44, 102, 85, .4); }
.wipe-grip {
	position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; background: var(--cedar); color: #fff;
	display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-2);
}
.wipe-tag {
	position: absolute; top: 72px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 7px; white-space: nowrap; background: var(--ink); color: #fff;
}
.wipe-then { right: 30px; }
.wipe-now { left: 30px; background: var(--cedar); }

/* ── Outside: walking round the house ──────────────────────────────────── */
.ring-wrap {
	position: absolute; inset: 0; perspective: 1700px; perspective-origin: 50% 44%; opacity: 0; pointer-events: none; touch-action: pan-y;
	transition: opacity .35s; user-select: none; -webkit-user-select: none;
}
.ring-wrap.is-visible { opacity: 1; pointer-events: auto; }
.ring { position: absolute; left: 50%; top: 49%; width: 0; height: 0; transform-style: preserve-3d; }
.face {
	position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
	transition: transform .72s var(--spring), opacity .55s;
}
.ring.is-dragging .face { transition: none; }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.face .plane-fills { position: absolute; inset: 0; }
.face-label {
	position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; font: 500 19px var(--serif); color: var(--ink);
	opacity: 0; transition: opacity .35s;
}
.face.is-front .face-label { opacity: 1; }
.ring-nav {
	position: absolute; z-index: 20; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 253, 249, .92);
	box-shadow: var(--shadow-1); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-2);
	transition: transform .15s var(--ease), background .15s;
}
.ring-nav:hover { background: #fff; color: var(--ink); }
.ring-nav:active { transform: scale(.93); }
.ring-prev { left: 22px; }
.ring-next { right: 22px; }
.compass {
	position: absolute; z-index: 18; left: 22px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px;
	background: rgba(255, 253, 249, .92); box-shadow: var(--shadow-2); border: 1px solid var(--line);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .4s var(--spring);
}
.ex[data-mode="ring"] .compass, .ex[data-mode="elevation"] .compass { opacity: 1; transform: none; pointer-events: auto; }
.compass-dial { position: relative; width: 50px; height: 50px; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-2); flex: none; }
.compass-n { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font: 500 11px var(--serif); color: var(--ink-3); }
.compass-needle {
	position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform .7s var(--spring);
}
.compass-needle::before {
	content: ""; position: absolute; left: -7px; top: -19px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 19px solid var(--cedar);
}
.compass-needle::after { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.compass-name { display: block; font: 500 15px/1.2 var(--serif); margin-bottom: 3px; }
.compass-faces { display: flex; gap: 2px; margin-left: -6px; }
.compass-faces button {
	border: 0; background: none; padding: 3px 7px; font-size: 12px; color: var(--ink-3); cursor: pointer; border-radius: 7px; font-weight: 550;
}
.compass-faces button:hover { color: var(--ink); background: rgba(29, 40, 38, .05); }
.compass-faces button.is-on { color: var(--cedar-deep); background: var(--cedar-soft); }

/* ── Panel ─────────────────────────────────────────────────────────────── */
.panel {
	position: absolute; z-index: 25; top: 72px; right: 14px; bottom: 14px; width: 384px; display: flex; flex-direction: column;
	background: var(--card); border-radius: 20px; box-shadow: var(--shadow-3); border: 1px solid var(--line); overflow: hidden;
	transform: translateX(calc(100% + 30px)); opacity: 0; pointer-events: none;
	transition: transform .52s var(--spring), opacity .3s;
}
.panel.is-open { transform: none; opacity: 1; pointer-events: auto; }
.panel > * { flex: none; }
.panel-handle { display: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px 12px 8px 18px; }
.panel-head h2 { font-size: 25px; margin-top: 1px; }
.panel-head .ref { margin-left: 4px; color: var(--cedar); }
.was { margin: 2px 0 0; font: italic 14px var(--serif); color: var(--ink-3); }
.panel-els { padding-bottom: 8px; margin: 0; padding: 2px 18px 8px; }
.panel-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 7px; padding: 4px 18px 2px; }
.action {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; border-radius: 15px; cursor: pointer;
	background: var(--paper); border: 1px solid transparent; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
	transition: transform .12s var(--ease), background .15s, color .15s;
}
.action:hover { background: var(--paper-2); color: var(--ink); }
.action:active { transform: scale(.96); }
.action .ic { width: 24px; height: 24px; }
.action-primary { background: var(--cedar); color: #fff; }
.action-primary:hover { background: var(--cedar-deep); color: #fff; }
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.lib-tools select.input { width: auto; min-width: 180px; }
.lib-tools input[type="search"] { flex: 1 1 200px; min-width: 170px; }
.lib-tools .seg-links button { border: 0; background: none; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); border-radius: 8px; cursor: pointer; }
.lib-tools .seg-links button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lib-tile { display: block; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.lib-tile img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.lib-tile.is-picked img { outline: 3px solid var(--cedar); outline-offset: 2px; }
.lib-meta { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.lib-meta strong { display: block; font-weight: 550; color: var(--ink-2); font-size: 13px; }
.lib-large { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 10px; background: var(--paper-2); cursor: zoom-in; }
.photopick .parentpick-list { padding-top: 6px; }
.photopick-foot { flex: none; display: flex; justify-content: flex-end; padding: 10px 18px; border-top: 1px solid var(--line); }
button.photo-add { border: 0; font: inherit; cursor: pointer; }
.tidy-btn { position: fixed; z-index: 200; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; font: 600 11.5px var(--sans); color: var(--cedar-deep); background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--shadow-1); cursor: pointer; }
.tidy-btn .ic { width: 12px; height: 12px; }
.tidy-btn.is-busy { opacity: .65; cursor: progress; }
.done-on { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.done-date { padding: 3px 6px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); border-radius: 7px; }
.step-done .done-date { padding: 1px 4px; font-size: 11.5px; }
.step-notes { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.sch-step-notes { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.sch-step.is-done .sch-step-notes { text-decoration: none; }
.tag-menu { position: fixed; z-index: 210; max-height: 260px; overflow-y: auto; padding: 4px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-3); }
.tag-option { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 9px; font: inherit; font-size: 13.5px; text-align: left; color: var(--ink); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.tag-option strong { font-weight: 600; white-space: nowrap; }
.tag-option span { min-width: 0; overflow: hidden; font-size: 12px; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.tag-option:hover, .tag-option.is-on { background: var(--paper-2); }
.mention { padding: 0 3px; font-weight: 550; color: var(--cedar-deep); background: rgba(44, 102, 85, .1); border-radius: 4px; text-decoration: none; white-space: nowrap; }
.mention:hover { background: rgba(44, 102, 85, .2); }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; font-size: 13px; }
.tag-row:empty { display: none; }
.tag-back { position: absolute; z-index: 0; overflow: hidden; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; pointer-events: none; border: 0 solid transparent; background: #fff; box-sizing: border-box; }
.tag-back mark { color: transparent; background: rgba(44, 102, 85, .16); border-radius: 3px; }
textarea.has-tags { position: relative; z-index: 1; background: transparent !important; }
.row-count { font-weight: 500; color: var(--ink-3); }
.panel-settings { margin: 2px 18px 8px; padding: 10px 12px 6px; background: var(--paper-2); border-radius: 12px; }
.panel-settings-wide { grid-column: 1 / -1; }
.mark-opening { z-index: 2; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--cedar), 0 2px 5px rgba(0, 0, 0, .25); cursor: pointer; }
.panel-settings-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 0 0 8px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
.panel-settings-head a { font-weight: 500; }
.panel-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 8px; }
.panel-settings .field { margin-bottom: 6px; }
.panel-settings .field > span { font-size: 12px; margin-bottom: 3px; }
.panel-settings .field select { font-size: 13.5px; padding: 6px 8px; min-height: 0; }
.panel-tip { margin: 8px 18px 0; font-size: 12px; color: var(--ink-3); min-height: 0; }
.panel-tip:empty { display: none; }
.panel > .panel-list { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 8px 10px 10px; -webkit-overflow-scrolling: touch; }
.panel-done { color: var(--ink-3); font-size: 12.5px; padding: 8px 8px 0; margin: 0; }
.panel-list .empty { padding: 14px 8px; }
.panel-foot { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 550; }
.panel-foot a { display: flex; align-items: center; justify-content: space-between; }
.panel-foot .ic { width: 16px; height: 16px; }
.row {
	display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; border-radius: 12px; color: var(--ink);
	transition: background .14s;
}
.row:hover { background: var(--paper); text-decoration: none; }
.row-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--heat); }
.row-dot.kind-buy { background: var(--amber); }
.row-dot.kind-decision { background: #4c6fa8; }
.row-dot.kind-note { background: var(--ink-3); }
.row-dot.kind-enquiry { background: var(--cedar); }
.status-done .row-dot { background: var(--line-2); }
.status-done .row-title { color: var(--ink-3); text-decoration: line-through; }
.row-body { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 14px; line-height: 1.33; font-weight: 500; }
.row-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.row-thumb { flex: none; width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }

/* ── Capture sheet ─────────────────────────────────────────────────────── */
.cap { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; transition: visibility .4s; }
.cap.is-open { visibility: visible; }
.cap-scrim { position: absolute; inset: 0; background: rgba(25, 30, 25, .38); opacity: 0; transition: opacity .3s; }
.cap.is-open .cap-scrim { opacity: 1; }
.cap-card {
	position: relative; width: min(560px, 100%); max-height: min(92dvh, 860px); overflow-y: auto; overscroll-behavior: contain;
	background: var(--card); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-3); padding: 0 18px calc(14px + env(safe-area-inset-bottom));
	transform: translateY(102%); transition: transform .48s var(--spring);
}
.cap.is-open .cap-card { transform: none; }
@media (min-width: 720px) {
	.cap { align-items: center; }
	.cap-card { border-radius: 24px; }
}
.cap-handle { width: 100%; padding: 9px 0; touch-action: none; cursor: grab; }
.cap-handle::before { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--line-2); }
.cap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cap-where strong { display: block; font: 500 22px/1.2 var(--serif); }
.cap-elements { margin-bottom: 10px; }
.cap-elements .opt-label { display: block; margin-bottom: 5px; }
.cap-note { display: flex; gap: 10px; align-items: flex-start; }
.cap-field { position: relative; flex: 1; min-width: 0; }
.cap-field textarea {
	display: block; width: 100%; min-height: 112px; max-height: 42dvh; padding: 12px 13px; font: 16px/1.45 var(--sans); color: var(--ink);
	background: var(--paper); border: 1px solid transparent; border-radius: 15px; resize: none; transition: border-color .15s, background .15s;
}
.cap-field textarea:focus { outline: 0; background: #fff; border-color: var(--cedar); }
.dict-ghost {
	position: absolute; inset: 0; display: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; border-radius: 15px;
}
.ait-ghost-live { color: var(--ink-3); }
.mic {
	position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; background: var(--cedar); color: #fff;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(44, 102, 85, .34);
	transition: background .18s, transform .14s var(--ease);
}
.mic:active { transform: scale(.94); }
.mic .ic { position: relative; width: 28px; height: 28px; }
.mic.rec { background: var(--heat); box-shadow: 0 4px 16px rgba(200, 90, 50, .4); }
.mic-rings { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.mic.rec .mic-rings::before, .mic.rec .mic-rings::after {
	content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--heat); animation: micRing 1.7s ease-out infinite;
}
.mic.rec .mic-rings::after { animation-delay: .6s; }
@keyframes micRing { from { transform: scale(1); opacity: .75; } to { transform: scale(1.75); opacity: 0; } }
.cap-hint { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.cap-photos { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.cap-photos::-webkit-scrollbar { display: none; }
.photo-add {
	flex: none; width: 82px; height: 82px; border-radius: 15px; background: var(--paper); cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 600;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: background .15s, transform .12s var(--ease);
}
.photo-add:hover { background: var(--paper-2); }
.photo-add:active { transform: scale(.96); }
.photo-add .ic { width: 25px; height: 25px; }
.photo-thumb { position: relative; flex: none; width: 82px; height: 82px; border-radius: 15px; overflow: hidden; animation: markIn2 .3s var(--spring); }
@keyframes markIn2 { from { opacity: 0; transform: scale(.7); } }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-x {
	position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20, 25, 22, .68); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.photo-x .ic { width: 13px; height: 13px; }
.opt { margin-top: 12px; }
.opt-label { display: block; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 5px; }
.cap-foot { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); margin: 14px -18px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255, 253, 249, 0), var(--card) 28%); }

.uploads {
	position: fixed; z-index: 90; left: 50%; top: 12px; transform: translate(-50%, -60px); padding: 7px 14px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600;
	box-shadow: var(--shadow-2); transition: transform .4s var(--spring);
}
.uploads.is-on { transform: translate(-50%, 0); }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; width: max-content; max-width: 90vw; }
.toast {
	padding: 10px 16px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-2);
	opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .22s, transform .32s var(--spring);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.good { background: var(--cedar-deep); }
.toast.bad { background: var(--danger); }
.confirm { position: fixed; z-index: 150; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(25, 30, 25, .4); opacity: 0; transition: opacity .18s; }
.confirm.is-in { opacity: 1; }
.confirm-card { width: min(360px, 100%); background: var(--card); padding: 20px; border-radius: 18px; box-shadow: var(--shadow-3); }
.confirm-card p { margin: 0 0 16px; font-size: 15.5px; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.lightbox { position: fixed; z-index: 170; inset: 0; background: rgba(15, 18, 16, .93); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.lightbox.is-in { opacity: 1; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 6px; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; margin-top: -23px; }
.lb-next { right: 14px; top: 50%; margin-top: -23px; }
.is-single .lb-nav { display: none; }
.lb-caption { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #d6dbd8; font-size: 13px; }

/* ── Ordinary pages ────────────────────────────────────────────────────── */
.page { max-width: 820px; margin: 0 auto; padding: 26px 22px 60px; }
.page-wide { max-width: 1240px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sub { color: var(--ink-3); margin: 3px 0 0; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 7px; }
.crumbs a { color: var(--ink-2); }
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); border: 1px solid var(--line); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 18px; margin-bottom: 10px; }
.search-box { max-width: 300px; }
.prose { line-height: 1.6; }
.prose h1 { font-size: 21px; margin: 1em 0 .3em; }
.prose h2 { font-size: 18px; margin: 1.1em 0 .3em; }
.prose h3 { font-size: 15.5px; margin: 1em 0 .2em; font-family: var(--sans); font-weight: 650; }
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 19px; }
.prose li { margin: 3px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }

/* Lollipop's table controller, restyled. */
.table-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); border: 1px solid var(--line); overflow: hidden; }
.table-note { margin: 0; padding: 8px 14px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.td-none { padding: 18px 14px; color: var(--ink-3); }
.td-none .btn { margin-left: 6px; }
/* A filter menu has to be able to reach past the card when few rows show. */
.table-card:has(> .table-toolbar) { overflow: visible; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; border-bottom: 1px solid var(--line); }
.segmented-control { display: flex; padding: 3px; background: var(--paper); border-radius: 11px; overflow-x: auto; scrollbar-width: none; }
.segmented-control::-webkit-scrollbar { display: none; }
.segmented-control button { flex: none; border: 0; background: none; padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.segmented-control button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.tab-count { color: var(--ink-3); font-weight: 500; font-size: 12px; margin-left: 2px; }
.table-search { position: relative; flex: 1 1 200px; min-width: 170px; }
.table-search input { width: 100%; height: 36px; padding: 0 32px 0 12px; font: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.table-search input:focus { outline: 0; border-color: var(--cedar); box-shadow: 0 0 0 3px rgba(44, 102, 85, .14); }
.table-search input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; display: none; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.search-clear .ic { width: 14px; height: 14px; }
.table-search.has-value .search-clear { display: inline-flex; }
.table-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbar-btn { height: 36px; padding: 0 11px; font-size: 13px; font-weight: 550; color: var(--ink-2); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.toolbar-btn:hover { border-color: var(--ink-3); }
.toolbar-btn.has-filter { background: var(--cedar-soft); border-color: var(--cedar); color: var(--cedar-deep); }
.toolbar-btn.is-quiet { border-color: transparent; background: none; color: var(--ink-3); }
.filter-dropdown { position: relative; }
.filter-dropdown-menu { position: absolute; z-index: 30; left: 0; top: 41px; min-width: 170px; display: none; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-2); }
.filter-dropdown-menu.show { display: block; }
.filter-option { padding: 7px 10px; border-radius: 8px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.filter-option:hover { background: var(--paper); }
.filter-option.active { font-weight: 650; color: var(--cedar-deep); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--ink); }
.sort-icon i { font-style: normal; }
.sort-icon .fa-sort-up::before { content: "\2191"; }
.sort-icon .fa-sort-down::before { content: "\2193"; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover td { background: #faf7f0; }
.td-title { font-weight: 550; }
.td-title a { color: var(--ink); }
.td-where { color: var(--ink-2); font-size: 13px; }
.progress { display: inline-block; width: 66px; height: 5px; border-radius: 3px; background: var(--paper-2); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.progress span { display: block; height: 100%; background: var(--cedar); border-radius: 3px; }
.td-progress { white-space: nowrap; font-size: 12.5px; color: var(--ink-3); }
.table-pagination { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.rows-per-page { display: flex; align-items: center; gap: 5px; }
.rows-per-page select { padding: 3px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; font: inherit; }
.btn-page { height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; }
.btn-page:disabled { opacity: .4; cursor: default; }

/* Task page */
.task-title { font: 500 28px/1.2 var(--serif); width: 100%; padding: 2px 6px; margin: 0 -6px; border: 1px solid transparent; background: none; border-radius: 9px; color: var(--ink); resize: none; overflow: hidden; display: block; }
.task-title:hover { border-color: var(--line); }
.task-title:focus { outline: 0; background: #fff; border-color: var(--cedar); }
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; margin-top: 14px; }
.task-side .opt:first-child { margin-top: 0; }
.task-side select { width: 100%; }
.body-view { min-height: 30px; }
.note-box { position: relative; }
.note-mic { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; }
.note-mic .ic { width: 19px; height: 19px; }
.note-box textarea { padding-right: 56px; padding-bottom: 14px; min-height: 130px; resize: none; overflow: hidden; }
.link-btn { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 550; color: var(--cedar); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.note-versions { margin-top: 9px; }
.note-versions:empty { display: none; }
.versions-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 4px; }
.version { border-top: 1px solid var(--line); padding: 7px 0; font-size: 13.5px; }
.version summary { cursor: pointer; color: var(--ink-2); }
.version summary b { color: var(--cedar-deep); }
.version-body { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; margin: 7px 0; background: var(--paper); border-radius: 9px; }
.checks { list-style: none; margin: 0; padding: 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row input[type="checkbox"] { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--cedar); cursor: pointer; }
.check-row label { flex: 1; font-size: 14.5px; cursor: pointer; }
.check-row.is-done label { color: var(--ink-3); text-decoration: line-through; }
.check-x { opacity: 0; width: 26px; height: 26px; border-radius: 7px; }
.check-x .ic { width: 13px; height: 13px; }
.check-row:hover .check-x, .check-x:focus-visible { opacity: 1; }
@media (hover: none) { .check-x { opacity: .55; } }
.add-line { display: flex; gap: 7px; margin-top: 9px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.photo-tile .photo-x { opacity: 0; transition: opacity .15s; }
.photo-tile:hover .photo-x, .photo-x:focus-visible { opacity: 1; }
@media (hover: none) { .photo-tile .photo-x { opacity: .85; } }
.photo-grid .photo-add { width: auto; height: auto; aspect-ratio: 1; }
.mini-plan { position: relative; height: 210px; border-radius: 12px; overflow: hidden; background: var(--paper); margin-bottom: 8px; }
.mini-plan .vw { position: absolute; inset: 0; cursor: pointer; }
.linked a { display: block; padding: 5px 0; font-size: 14px; }
.comment { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.comment:last-of-type { border-bottom: 0; }
.comment small { display: block; color: var(--ink-3); font-size: 12px; margin-bottom: 2px; }
.activity { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--ink-3); }
.activity li { padding: 4px 0; }
.task-danger { margin-top: 8px; text-align: right; }

.pin-btn { width: 100%; margin-bottom: 4px; }
.pinpick { position: fixed; z-index: 110; inset: 0; display: flex; flex-direction: column; background: var(--paper); animation: pinpickIn .28s var(--ease); }
@keyframes pinpickIn { from { opacity: 0; transform: translateY(14px); } }
.pinpick-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 12px 6px 18px; }
.pinpick-title { min-width: 0; }
.pinpick-title strong { display: block; font: 500 18px/1.25 var(--serif); }
.pinpick-title span { display: block; font-size: 13px; color: var(--cedar-deep); font-weight: 600; margin-top: 2px; }
.pinpick-sheets { flex: none; margin: 0; padding: 2px 18px 8px; }
.pinpick-plan { position: relative; flex: 1; min-height: 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pinpick-plan .vw { cursor: crosshair; }
.pinpick-foot { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card); }
.pinpick-foot .btn-primary { min-width: 130px; }

.el-quick { display: flex; gap: 6px; margin-top: 8px; }

/* Steps: child tasks */
.step-row { align-items: center; }
.step-row input[type="checkbox"] { margin-top: 0; }
.step-main { flex: 1; min-width: 0; }
.step-main .check-text { color: var(--ink); font-size: 14.5px; }
.step-main .check-text:hover { color: var(--cedar-deep); }
.check-row.is-done .check-text { color: var(--ink-3); text-decoration: line-through; }
.step-marks { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--ink-3); font-size: 11.5px; vertical-align: 1px; }
.step-marks .ic { width: 13px; height: 13px; vertical-align: 0; }
.step-who { flex: none; max-width: 104px; height: 30px; padding: 0 4px; font: inherit; font-size: 12.5px; color: var(--ink-2); background: var(--paper); border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.step-who:hover, .step-who:focus { border-color: var(--line-2); outline: 0; }
.check-x .ic { width: 14px; height: 14px; }
/* On a phone the step gets the whole line, with its Who and tools underneath. */
@media (max-width: 600px) {
	.step-row { flex-wrap: wrap; align-items: flex-start; row-gap: 2px; }
	.step-main { flex-basis: calc(100% - 29px); }
	.step-row .step-who { margin: 0 auto 0 29px; }
}
.part-of a { display: block; font: 500 16px/1.3 var(--serif); color: var(--ink); margin-bottom: 8px; }
.task-danger { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.row-caret { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: -2px 3px -2px -5px; padding: 0; vertical-align: -5px; border: 0; background: none; border-radius: 6px; color: var(--ink-3); cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.row-caret:hover { background: var(--paper-2); color: var(--ink); }
.row-caret .ic { width: 13px; height: 13px; vertical-align: 0; }
.row-caret.is-open { transform: rotate(90deg); }
.row-parent { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }
.step-tr td { background: #fbf9f4; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.step-tr .td-title { padding-left: 34px; font-weight: 400; }
.step-tr.is-done a { color: var(--ink-3); text-decoration: line-through; }
.step-tick { display: inline-block; margin-right: 8px; vertical-align: -3px; }
.step-tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--cedar); cursor: pointer; }
.step-tr .td-progress .ic { width: 14px; height: 14px; color: var(--ink-3); }
.parentpick-search { flex: none; padding: 4px 18px 10px; }
.parentpick-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 16px; background: var(--paper); }
.parentpick-row { display: block; width: 100%; text-align: left; padding: 10px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; border-radius: 8px; }
.parentpick-row:hover { background: var(--card); }
.parentpick-row strong { display: block; font-weight: 550; font-size: 14.5px; }
.parentpick-row span { font-size: 12.5px; color: var(--ink-3); }
.sch-no.is-inline { display: inline; }
@media (max-width: 859px) {
	.step-who { max-width: 82px; }
	.step-tr, .step-tr td { display: block; }
	.step-tr .td-title { padding-left: 6px; }
	.step-tr .td-doer { display: inline-block; margin: 2px 0 0 24px; }
	.step-tr .td-priority, .step-tr .td-progress { display: none; }
	.task-table tr.step-tr { padding: 8px 13px 8px 22px; background: #fbf9f4; }
	.step-tr td { background: none; }
}

/* 3D room view */
body.is-3d { overflow: hidden; }
.r3d { position: fixed; inset: 0 0 0 var(--nav-w); overflow: hidden; background: radial-gradient(1000px 640px at 50% 44%, #faf7f0, #e9e3d6); }
.r3d-canvas { position: absolute; inset: 0; }
.r3d-canvas canvas { display: block; cursor: grab; }
.r3d-canvas canvas:active { cursor: grabbing; }
.r3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.r3d-label { position: absolute; left: 0; top: 0; padding: 2px 7px; border-radius: 6px; background: rgba(29, 40, 38, .85); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.r3d-label.is-feature { background: var(--cedar-deep); }
.r3d-head { position: absolute; top: 14px; left: 20px; right: 76px; pointer-events: none; }
.r3d-title h1 { font-size: 26px; }
.r3d-title p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.r3d-head .page-close { pointer-events: auto; }
.r3d-bar { position: absolute; left: 20px; bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 12px; max-width: calc(100% - 30px); }
.r3d-bar .seg-links { background: rgba(255, 253, 249, .9); box-shadow: var(--shadow-1); }
.r3d-bar .seg-links button { border: 0; background: none; padding: 5px 11px; font-size: 13px; font-weight: 550; color: var(--ink-2); border-radius: 8px; cursor: pointer; }
.r3d-bar .seg-links button.is-on { background: var(--cedar); color: #fff; }
.r3d-height { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px; font-size: 13px; font-weight: 550; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; }
.r3d-height input { width: 54px; border: 0; background: none; font: inherit; color: var(--ink); text-align: right; padding: 0; }
.r3d-height input:focus { outline: 0; }
.r3d-height select { border: 0; background: none; font: inherit; color: var(--ink); padding: 0; min-height: 0; }
.r3d-height select:focus { outline: 0; }
.r3d-sizes { position: absolute; right: 18px; top: 72px; width: 300px; max-height: calc(100% - 150px); overflow-y: auto; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); }
.r3d-sizes h2 { font-size: 17px; margin-bottom: 8px; }
.r3d-size { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.r3d-size span { display: block; color: var(--ink-2); }
.r3d-size b { font-weight: 600; margin-right: 6px; }
.r3d-size em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.r3d-sizes .sub { font-size: 12px; margin: 8px 0 0; }
.r3d-card { bottom: 70px; }
.r3d[data-mode="inside"] .r3d-hint { display: none; }
.r3d[data-mode="inside"] .r3d-title { padding: 6px 10px; margin: -6px -10px; background: rgba(255, 253, 249, .82); border-radius: 10px; width: fit-content; }
.r3d-card .note-actions { flex-wrap: wrap; }
.r3d-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r3d-fields .field { margin: 6px 0 0; }
.r3d-hint { position: absolute; right: 18px; bottom: 24px; margin: 0; font-size: 12px; color: var(--ink-3); text-align: right; pointer-events: none; }
@media (max-width: 1320px) { .r3d-hint { display: none; } }
.panel-head-tools { display: flex; flex: none; align-items: center; gap: 2px; }
@media (max-width: 859px) {
	.r3d { inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; }
	.r3d-head { left: 12px; top: 10px; right: 60px; }
	.r3d-title h1 { font-size: 21px; }
	.r3d-bar { left: 8px; bottom: 8px; }
	.r3d-hint { display: none; }
	.r3d-sizes { right: 8px; left: 8px; width: auto; top: 96px; }
	.r3d-card { bottom: 96px; }
}

/* Schedule of works */
.page-schedule { max-width: 880px; }
.schedule-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-filter select { height: 32px; padding: 0 8px; font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; }
.schedule-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seg-links { display: flex; padding: 3px; background: var(--paper-2); border-radius: 10px; }
.seg-links a { padding: 4px 10px; font-size: 13px; font-weight: 550; color: var(--ink-2); border-radius: 8px; }
.seg-links a:hover { text-decoration: none; color: var(--ink); }
.seg-links a.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.sch-floor { margin-top: 26px; }
.sch-floor > h2 { font-size: 24px; padding-bottom: 5px; border-bottom: 2px solid var(--ink); }
.sch-room { margin-top: 18px; }
.sch-room-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.sch-room-head h3 { font-size: 18px; }
.sch-ref { font: 600 12px var(--sans); color: var(--cedar); margin-left: 3px; }
.sch-size { font-size: 12.5px; color: var(--ink-3); }
.sch-table { width: 100%; border-collapse: collapse; }
.sch-table th { padding: 6px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); text-align: left; border-bottom: 1px solid var(--line); }
.sch-table td { vertical-align: top; }
.sch-table .sch-who { width: 74px; padding-left: 6px; padding-right: 6px; text-align: center; }
.sch-who .is-short { display: none; }
td.sch-who { font-size: 13px; color: var(--cedar); }
.sch-job td { padding-top: 10px; padding-bottom: 3px; }
.sch-step td { padding-top: 2px; padding-bottom: 2px; font-size: 13.5px; color: var(--ink-2); }
.sch-step td:first-child { position: relative; padding-left: 18px; }
.sch-step td:first-child::before { content: '\2022'; position: absolute; left: 6px; color: var(--ink-3); }
.sch-step.is-done td:first-child { color: var(--ink-3); text-decoration: line-through; }
.sch-item tr:last-child td { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
@media screen and (max-width: 859px) {
	.sch-table .sch-who { width: 24px; padding-left: 2px; padding-right: 2px; }
	.sch-who .is-long { display: none; }
	.sch-who .is-short { display: inline; }
}
.sch-item h4 { margin: 0; font: 600 14.5px/1.35 var(--sans); }
.sch-item h4 a { color: var(--ink); }
.sch-no { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.sch-body { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-2); }
.sch-item.is-done h4 a { color: var(--ink-3); text-decoration: line-through; }
.field-hint { display: block; margin-top: 3px; font-size: 12px; }
/* The door and window schedule */
.admin-switch { flex-wrap: wrap; margin-bottom: 10px; }
.schedule-tools .admin-switch { margin-bottom: 0; }
.admin-switch a { text-align: center; white-space: nowrap; }
.set-sec { margin-bottom: 26px; }
.set-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.set-head h2 { margin: 0; }
.set-head .sub { margin: 3px 0 0; }
.set-head .btn { flex: none; }
/* Wider than a phone, so these scroll sideways to reach the last columns. */
.table-card:has(> .set-table) { overflow-x: auto; }
.set-table td { vertical-align: middle; }
.set-table tbody tr { cursor: default; }
.set-table .input { width: 100%; }
.set-table .set-name { min-width: 180px; width: 30%; }
.set-table .set-size { width: 92px; min-width: 76px; }
.set-table .set-text { min-width: 130px; width: 20%; }
.set-table .set-check { width: 110px; text-align: center; }
.set-table .set-tools { white-space: nowrap; text-align: right; width: 1%; }
.set-table .icon-btn[disabled] { opacity: 0.25; }
.set-table .set-grade { width: 56px; font-weight: 600; }
.hist-day { margin: 22px 2px 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.hist-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.hist-time { flex: none; width: 40px; padding-top: 1px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hist-text { min-width: 0; overflow-wrap: anywhere; }
.hist-who { font-weight: 600; }
.hist-count { color: var(--ink-3); }
.hist-detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-2); }
.hist-more { margin: 16px 2px; }
.account-form { max-width: 420px; }
.account-form .input { width: 100%; }
.account-show { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-2); }
.account-note { margin: 10px 0 0; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.device-row small { display: block; margin-top: 1px; }
#signOutOthers { margin-top: 12px; }

/* ── Log time and plans ─────────────────────────────── */
.ws-sheet { z-index: 105; align-items: flex-end; }
.ws-card { width: min(480px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; }
@media (min-width: 720px) { .ws-sheet { align-items: center; } }
.ws-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ws-head h2 { margin: 0; font-size: 20px; }
.ws-head .sub { margin: 2px 0 0; }
.ws-form .note-box textarea { min-height: 76px; }
.ws-other { margin-top: 8px; width: 100%; }
.ws-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 14px; }
.ws-photos .photo-add, .ws-photos .photo-tile { width: auto; height: auto; min-height: 0; aspect-ratio: 1; }
.ws-photos .photo-add span { font-size: 11.5px; }
button.photo-add { font: inherit; border: 0; cursor: pointer; }
.ws-finish { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.ws-finish input { width: 19px; height: 19px; accent-color: var(--cedar); }
.ws-foot { position: sticky; bottom: -20px; display: flex; justify-content: flex-end; gap: 8px; margin: 6px -20px -20px; padding: 10px 20px 16px; background: var(--card); }
.ws-foot [data-remove], .ws-foot [data-delete] { margin-right: auto; }
.ws-plans { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ws-plan { display: block; width: 100%; padding: 11px 13px; text-align: left; font: inherit; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); cursor: pointer; }
.ws-plan:hover { border-color: var(--cedar); }
.ws-plan strong, .ws-plan span { display: block; }
.ws-plan span { margin-top: 1px; font-size: 12.5px; color: var(--ink-2); }
.ws-quick { position: fixed; z-index: 90; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: translateX(-50%); width: min(520px, calc(100% - 24px)); padding: 13px 15px; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-1); }
.ws-quick p { margin: 0 0 9px; font-size: 14px; }
.time-plans { margin-bottom: 10px; }
.time-plans .chip .ic { width: 14px; height: 14px; margin-right: 4px; }
.time-list { margin-bottom: 12px; }
.time-row { display: grid; grid-template-columns: 82px 118px 1fr; gap: 8px; width: 100%; padding: 8px 2px; text-align: left; font: inherit; font-size: 14px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.time-row:hover { background: var(--paper); }
.time-day { color: var(--ink-2); }
.time-long { font-weight: 600; }
.time-who small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--ink-2); }
.plan-card { display: block; margin-bottom: 12px; color: inherit; }
.plan-card:hover { text-decoration: none; border-color: var(--line-2); }
.plan-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-card h2 { margin: 0; }
.plan-card .sub { margin: 3px 0 8px; }
.plan-count { flex: none; font-size: 13px; color: var(--ink-2); }
.plan-list, .plan-steps { margin: 0; padding: 0; list-style: none; }
.plan-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-item:last-child { border-bottom: 0; }
.plan-row { display: flex; align-items: flex-start; gap: 11px; }
.plan-tick { flex: none; width: 21px; height: 21px; margin: 1px 0 0; accent-color: var(--cedar); cursor: pointer; }
.plan-main { flex: 1; min-width: 0; }
.plan-title { font-weight: 550; color: var(--ink); }
.plan-part, .plan-time { display: block; margin-top: 1px; font-size: 12.5px; color: var(--ink-3); }
.plan-time { color: var(--cedar-deep); font-weight: 600; }
.plan-notes { display: -webkit-box; margin-top: 2px; font-size: 13px; color: var(--ink-2); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plan-tools { flex: none; display: flex; align-items: center; gap: 2px; }
.plan-tools .icon-btn { width: 28px; height: 28px; }
.plan-tools .icon-btn .ic { width: 13px; height: 13px; }
.plan-steps { margin: 7px 0 0 32px; }
.plan-step { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; font-size: 14px; }
.plan-step .plan-tick { width: 18px; height: 18px; }
.plan-step a { color: var(--ink); }
.plan-item.is-done .plan-title, .plan-step.is-done a { color: var(--ink-3); text-decoration: line-through; }
.plan-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.plan-search { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 720px) { .plan-search { grid-template-columns: 2fr 1fr 1fr; } }
.plan-pick { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.plan-pick input { flex: none; width: 19px; height: 19px; margin-top: 1px; accent-color: var(--cedar); }
.td-pick { width: 34px; }
.td-pick input { width: 18px; height: 18px; accent-color: var(--cedar); cursor: pointer; }
.pick-bar { position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 15px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-1); font-size: 14px; white-space: nowrap; }
.pick-bar[hidden] { display: none; }
.work-filter { margin-bottom: 12px; }
.work-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.work-tile { flex: 1 1 130px; padding: 11px 13px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; }
.work-tile span { display: block; font-size: 12.5px; color: var(--ink-2); }
.work-tile strong { display: block; margin-top: 2px; font: 500 19px/1.2 var(--serif); }
.work-day { display: flex; justify-content: space-between; gap: 10px; }
.work-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.work-time { flex: none; width: 118px; font-weight: 600; }
.work-main { flex: 1; min-width: 0; }
.work-what, .work-task, .work-note { display: block; }
.work-task { margin-top: 1px; }
.work-note { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.work-photos { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.work-photos img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; cursor: pointer; }
@media (max-width: 859px) {
	.ws-quick, .pick-bar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); }
}
.cn-used { font-size: 13px; color: var(--ink-2); }
.td-no { font-weight: 600; white-space: nowrap; }
.op-table .td-where small, .op-table .td-quiet { color: var(--ink-3); font-size: 12.5px; }
.op-table .td-where small { display: block; }
.op-key { margin: 14px 2px 0; font-size: 12.5px; color: var(--ink-3); }
.op-sheet-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(40, 36, 28, .28); }
.op-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); padding: 18px 20px 28px; overflow-y: auto; background: var(--paper); box-shadow: var(--shadow-3); }
.op-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.op-sheet-head h2 { margin: 0; font: 500 24px/1.2 var(--serif); }
.op-sheet-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 13.5px; }
.op-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.op-grid .is-wide { grid-column: 1 / -1; }
.op-sheet h3 { margin: 18px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.op-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.op-line a.op-task { flex: 1 1 200px; }
.op-line.is-done a.op-task { color: var(--ink-3); text-decoration: line-through; }
.op-line-tools { display: flex; flex-wrap: wrap; gap: 5px; }
.op-source, .op-history { font-size: 12.5px; color: var(--ink-3); }
.op-source { margin: 2px 0 0; }
.op-history { margin: 0; padding: 0; list-style: none; }
.op-history li { padding: 3px 0; }
.op-save { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
@media screen and (max-width: 859px) {
	.op-table thead { display: none; }
	.op-table, .op-table tbody, .op-table tr, .op-table td { display: block; width: 100%; }
	.op-table tr { padding: 11px 13px; border-bottom: 1px solid var(--line); }
	.op-table td { padding: 0; border: 0; }
	.op-table .td-no, .op-table .td-where { display: inline; }
	.op-table .td-where small { display: inline; margin-left: 5px; }
	.op-table .td-no { margin-right: 7px; }
	.op-table .td-type { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
	.op-table .td-cond, .op-table .td-work, .op-table .td-tasks { display: inline-block; width: auto; margin: 3px 10px 0 0; font-size: 13px; color: var(--ink-2); }
	.op-table .td-historic, .op-table .td-size, .op-table .td-arch { display: none; }
}

@media print {
	@page { margin: 16mm; }
	@page wide { size: A4 landscape; margin: 12mm; }
	body.is-page { padding: 0; background: #fff; font-size: 10.5pt; }
	.nav, .schedule-tools, .toasts, .table-toolbar, .table-pagination, .op-sheet-wrap { display: none !important; }
	.table-card { border: 0; box-shadow: none; }
	.page-wide { max-width: none; padding: 0; }
	.op-table td, .op-table th { padding: 5px 7px; font-size: 9.5pt; }
	/* Nine columns need the sheet on its side. */
	#openings { page: wide; }
	.op-table .sort-icon { display: none; }
	.page-schedule { max-width: none; padding: 0; }
	.sch-step { break-inside: avoid; }
	.sch-job h4 { break-after: avoid; }
	.sch-room-head, .sch-floor > h2 { break-after: avoid; }
	.sch-item h4 a { text-decoration: none; }
}

/* Back out of a task or room */
.page-close {
	position: fixed; z-index: 50; top: 14px; right: 18px; width: 44px; height: 44px; background: var(--card); box-shadow: var(--shadow-2); border: 1px solid var(--line); color: var(--ink);
}
.page-close:hover { background: #fff; }
.crumbs, #taskPage .task-title { padding-right: 50px; }
.check-meta { display: block; font-size: 12px; color: var(--ink-3); text-decoration: none; margin-top: 1px; }
.check-row.is-done label { text-decoration: none; }
.check-row.is-done .check-text { color: var(--ink-3); text-decoration: line-through; }
.activity { max-height: 280px; overflow-y: auto; }

/* Pin details on hover */
.ex-tip img { display: block; width: 100%; height: 92px; object-fit: cover; border-radius: 6px; margin: 2px 0 5px; }
.ex-tip .tip-meta { color: #bcc7c3; font-weight: 500; }
.note-date { margin: 0 0 3px; font-size: 12.5px; color: var(--ink-3); }
.note-versions-list { margin-top: 8px; max-height: 190px; overflow-y: auto; border-top: 1px solid var(--line); }
.note-version { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.note-version small { display: block; color: var(--ink-3); font-size: 11.5px; margin-bottom: 2px; }
.note-version .btn { margin-top: 5px; }
.note-card label.field { margin: 8px 0 0; }
.note-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.note-foot .note-actions { margin: 0 0 0 auto; }

/* Same job in several rooms */
.cap-draft { margin-bottom: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); background: var(--paper); border-radius: 12px; }
.cap-draft[hidden] { display: none; }
.cap-draft p { margin: 0 0 8px; }
.cap-draft .chip-row { gap: 6px; }
.cap-also { margin-bottom: 10px; }
.cap-also .chip .ic { width: 15px; height: 15px; }
.chip[data-also-remove] .ic { width: 11px; height: 11px; opacity: .75; }
.group-card .pin-btn { margin-top: 10px; }
.group-empty { margin: 0; font-size: 13.5px; }
.group-progress { display: flex; align-items: center; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.group-progress .progress { flex: 1; max-width: none; height: 6px; margin-right: 10px; }
.group-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.group-row:hover { background: var(--paper); text-decoration: none; }
.group-row.is-here { font-weight: 600; }
.group-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--heat); }
.group-row.status-in_progress .group-dot { background: var(--amber); }
.group-row.status-waiting .group-dot { background: var(--ink-3); }
.group-row.status-done .group-dot { background: var(--cedar); }
.group-row.status-done .group-name { color: var(--ink-3); text-decoration: line-through; }
.group-name { flex: 1; min-width: 0; }
.group-state { flex: none; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.group-separate { display: block; margin: 9px auto 0; color: var(--ink-3); font-size: 12.5px; }
.roompick { z-index: 120; }
.roompick-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.roompick-body .pinpick-plan { border-bottom: 0; }
.roompick-list { overflow-y: auto; padding: 4px 14px 14px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--card); }
.roompick-group h3 { font: 600 11.5px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 13px 0 3px; }
.roompick-row { display: flex; align-items: center; gap: 9px; padding: 7px 4px; font-size: 14.5px; cursor: pointer; border-radius: 8px; }
.roompick-row:hover { background: var(--paper); }
.roompick-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--cedar); flex: none; }
.roompick-row span { flex: 1; min-width: 0; }
.roompick-row small { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.roompick-row.is-off { color: var(--ink-3); cursor: default; }
.roompick-row.is-off:hover { background: none; }
.roompick-count { margin-right: auto; align-self: center; font-size: 13.5px; color: var(--ink-2); font-weight: 550; }
.roompick .pinpick-foot { align-items: center; border-top: 1px solid var(--line); }
.roompick .vw { cursor: pointer; }
.vw-room.is-picked { fill: var(--cedar); fill-opacity: .3; }
.vw-room.is-taken { fill: var(--ink); fill-opacity: .1; }
.mark-tick { margin-top: 26px; }
.mark-tick span { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cedar); color: #fff; box-shadow: 0 0 0 2px #fff, 0 3px 7px rgba(0, 0, 0, .25); animation: markIn2 .25s var(--spring); }
.mark-tick .ic { width: 14px; height: 14px; }

/* Rooms */
.room-floor { margin-bottom: 20px; }
.room-floor > h2 { margin: 0 0 8px; }
.room-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 9px; }
.room-card { display: block; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; color: var(--ink); transition: transform .16s var(--ease), box-shadow .16s; }
.room-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.room-card strong { display: block; font: 500 17px/1.2 var(--serif); }
.room-card .was { font-size: 13px; }
.room-meta { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.doc-group { margin-bottom: 20px; }
.doc-group h2 { margin-bottom: 8px; }
.doc-list { background: var(--card); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.doc { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc:hover { background: #faf7f0; text-decoration: none; }
.doc .ic { color: var(--ink-3); }
.doc-name { flex: 1; min-width: 0; }
.doc-ref { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

/* Room admin */
body.is-admin { overflow: hidden; }
.admin { position: fixed; inset: 0 0 0 var(--nav-w); display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.admin-side { display: flex; flex-direction: column; gap: 9px; min-height: 0; padding: 16px 12px 12px; border-right: 1px solid var(--line); background: rgba(255, 253, 249, .55); }
.admin-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.admin-side-head h1 { font-size: 20px; }
#adminTree { flex: 1; min-height: 0; overflow-y: auto; }
.tree-group { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); padding: 12px 8px 3px; }
.tree-item { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 7px 9px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-size: 14px; }
.tree-item:hover { background: rgba(29, 40, 38, .05); }
.tree-item.is-on { background: var(--ink); color: #fff; }
.tree-item .ref { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.tree-item.is-on .ref { color: #c5cfcb; }
.tree-item.no-outline::after { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); order: 3; }
.admin-main { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 0; min-width: 0; }
.admin-main > .empty { grid-column: 1 / -1; padding: 40px; text-align: center; }
.admin-form { min-height: 0; overflow-y: auto; padding: 16px 18px 30px; border-right: 1px solid var(--line); }
.admin-form h2 { margin-bottom: 12px; }
.admin-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-sec h3 { font: 650 13.5px var(--sans); margin-bottom: 8px; }
.alias-row, .el-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; }
.alias-row span, .el-row button.el-name { flex: 1; min-width: 0; }
.el-name { border: 0; background: none; text-align: left; padding: 3px 5px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.el-name:hover { background: rgba(29, 40, 38, .05); }
.el-name.is-on { background: var(--cedar-soft); color: var(--cedar-deep); font-weight: 600; }
.el-row .icon-btn, .alias-row .icon-btn { width: 28px; height: 28px; }
.el-row .ic, .alias-row .ic { width: 14px; height: 14px; }
.admin-plan { position: relative; min-width: 0; min-height: 0; background: var(--paper); overflow: hidden; }
.admin-plan .vw { position: absolute; inset: 0; }
.plan-bar { position: absolute; z-index: 5; left: 12px; right: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.plan-bar > * { pointer-events: auto; }
.plan-bar .seg { display: flex; padding: 3px; gap: 2px; background: rgba(255, 253, 249, .95); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-1); }
.plan-bar .seg button { border: 0; background: none; padding: 4px 9px; font-size: 12.5px; font-weight: 550; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.plan-bar .seg button.is-on { background: var(--ink); color: #fff; }
.plan-hint { position: absolute; z-index: 5; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 7px 12px; background: var(--ink); color: #fff; font-size: 12.5px; border-radius: 10px; box-shadow: var(--shadow-2); pointer-events: none; }
.vw-edit .e-poly { fill: var(--cedar); fill-opacity: .16; stroke: var(--cedar); stroke-width: 2; vector-effect: non-scaling-stroke; }
.vw-edit .e-other { fill: var(--ink); fill-opacity: .04; stroke: var(--ink-3); stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.vw-edit .e-line { fill: none; stroke: var(--cedar); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.mark-vertex { width: 13px; height: 13px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px var(--cedar), 0 2px 5px rgba(0, 0, 0, .25); }
.mark-vertex.is-first { background: var(--cedar); }
.mark-vertex.is-active { background: var(--heat); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--heat); }
.vw-edit + .e-preview, .e-preview { stroke: var(--cedar); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.btn.is-pressed { background: var(--cedar-soft); border-color: var(--cedar); color: var(--cedar-deep); }
.mark-mid { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--cedar); opacity: .85; }
.mark-point { width: 20px; height: 20px; border-radius: 50%; background: var(--heat); box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0, 0, 0, .3); }

/* ── Phones ────────────────────────────────────────────────────────────── */
@media (max-width: 859px) {
	body.is-page { padding-left: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
	.nav {
		top: auto; right: 0; bottom: 0; width: auto; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
		flex-direction: row; justify-content: space-around; padding: 4px 6px env(safe-area-inset-bottom);
		border-right: 0; border-top: 1px solid var(--line);
	}
	.nav-brand, .nav-out { display: none; }
	.nav { overflow: visible; }
	.nav-link { flex: 1 1 0; width: auto; min-width: 0; max-width: 90px; }
	.nav-link.nav-extra { display: none; }
	.nav-more { display: flex; }
	.nav-sheet {
		position: fixed; z-index: 59; right: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); display: block; width: min(240px, calc(100vw - 16px)); padding: 6px;
		background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2);
	}
	.nav-sheet form { margin: 0; }
	.nav-sheet-link {
		display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; background: none; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
	}
	.nav-sheet-link:hover { text-decoration: none; background: var(--paper-2); }
	.nav-sheet-link.is-on { color: var(--cedar-deep); background: var(--cedar-soft); }
	.task-table tr { position: relative; }
	.task-table .td-pick { position: absolute; top: 10px; right: 12px; width: auto; }
	.task-table .td-title { padding-right: 28px; }
	.ex { inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; }
	.ex-top { top: 10px; left: 10px; right: 10px; gap: 6px; flex-wrap: wrap; }
	.ex-title strong { font-size: 19px; }
	.ex-title span { display: none; }
	.tabs a { padding: 6px 11px; font-size: 13px; }
	.floor-rail { left: 8px; }
	.view-switch, .ex.has-panel .view-switch { top: 56px; right: 8px; }
	.ex.has-panel .view-switch { opacity: 0; pointer-events: none; }
	.room-name { font-size: 12px; }
	.roompick-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr); }
	.roompick-list { border-left: 0; }
	.mark-note span { width: 18px; height: 18px; box-shadow: 0 0 0 1.5px rgba(255, 253, 249, .9), 0 2px 5px rgba(50, 40, 90, .3); }
	.mark-note .ic { width: 10px; height: 10px; }
	.note-card { bottom: 8px; }
	.floor-rail button, .rail-thumb { width: 38px; height: 40px; }
	.ex-tools { right: 8px; bottom: 8px; flex-direction: column; }
	.ex.has-panel .ex-tools { right: 8px; opacity: 0; pointer-events: none; }
	.ex-tools [data-zoom] { display: none; }
	.ex-tools [data-wipe] { display: inline-flex; }
	.stack-legend { left: 8px; right: 8px; bottom: 8px; width: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: rgba(255, 253, 249, .82); border-radius: 14px; padding: 3px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
	.legend-row { flex-direction: column; gap: 0; padding: 6px 10px; align-items: flex-start; }
	.legend-name { font-size: 14px; }
	.legend-count { font-size: 11px; }
	.compass { left: 8px; right: 8px; bottom: 8px; }
	.ring-nav { display: none; }
	.panel {
		top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 56%; min-height: 44%; border-radius: 22px 22px 0 0; border-width: 1px 0 0;
		transform: translateY(103%);
	}
	.panel.is-open { transform: none; }
	.panel-handle { display: block; flex: none; padding: 8px 0 2px; touch-action: none; cursor: grab; }
	.panel-handle::before { content: ""; display: block; width: 40px; height: 4.5px; margin: 0 auto; border-radius: 3px; background: var(--line-2); }
	.panel-head { padding: 2px 8px 5px 16px; }
	.panel-head h2 { font-size: 22px; }
	.panel-actions { padding: 2px 14px; }
	.panel-els { padding: 2px 14px 6px; }
	.action { min-height: 58px; }
	.panel-tip { display: none; }
	/* Labels collide on a small screen. The chips in the panel name everything. */
	.mark-element:not(.is-on) .mark-label { display: none; }
	.mark-element { width: 19px; height: 19px; }
	.panel-foot { display: none; }
	.page { padding: 18px 14px 40px; }
	h1 { font-size: 26px; }
	.toasts { bottom: calc(var(--nav-h) + 16px); }
	.task-grid { grid-template-columns: minmax(0, 1fr); }
	.task-title { font-size: 24px; }
	.table-toolbar { padding: 10px; }
	.segmented-control { width: 100%; }
	.table-search { flex-basis: 100%; }
	.task-table thead { display: none; }
	.task-table, .task-table tbody, .task-table tr, .task-table td { display: block; width: 100%; }
	.task-table tr { padding: 11px 13px; border-bottom: 1px solid var(--line); }
	.task-table td { padding: 0; border: 0; }
	.task-table .td-kind, .task-table .td-doer, .task-table .td-priority, .task-table .td-progress { display: inline-block; width: auto; margin: 5px 5px 0 0; }
	.task-table .td-title { font-size: 15px; }
	.pagination-info { width: 100%; }
	/* The room admin is a desktop job, but still has to work on a tablet or phone. */
	body.is-admin { overflow: auto; }
	.admin { position: static; display: block; }
	.admin-side { border-right: 0; }
	#adminTree { max-height: 40vh; }
	.admin-main { display: block; }
	.admin-form { border-right: 0; }
	.admin-plan { height: 62vh; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Buy ───────────────────────────────────────────────────────────────── */
.buy-spent { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 20px; margin-bottom: 12px; }
.buy-spent-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.buy-spent-sum { display: block; font: 500 34px/1.15 var(--serif); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.buy-spent small { display: block; font-size: 12.5px; color: var(--ink-3); }
.buy-spent-all { text-align: right; }
.buy-spent-all span { display: block; font-size: 12.5px; color: var(--ink-3); }
.buy-spent-all strong { font: 500 19px/1.25 var(--serif); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
	.buy-spent-all { text-align: left; }
}
.buy-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.buy-tab { min-width: 0; padding: 10px 12px; font: inherit; text-align: left; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); cursor: pointer; }
.buy-tab span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.buy-tab strong { display: block; font: 500 21px/1.25 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.buy-tab small { display: block; font-size: 12px; line-height: 1.3; color: var(--ink-3); }
.buy-tab.is-on { background: var(--cedar-soft); border-color: var(--cedar); }
.buy-tab.is-on span, .buy-tab.is-on small { color: var(--cedar-deep); }
.buy-tab.is-on strong { color: var(--cedar-deep); }
@media (max-width: 480px) {
	.buy-tab { padding: 9px 9px; }
	.buy-tab strong { font-size: 16.5px; }
}
.buy-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.buy-periods { flex: 1 1 auto; min-width: 0; }
.buy-tools input[type="search"] { flex: 1 1 200px; max-width: 300px; }
.buy-range { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 170px)); gap: 10px; }
.buy-range[hidden] { display: none; }
.buy-range .field { margin: 0; min-width: 0; }
@media (max-width: 480px) {
	.buy-tools input[type="search"] { max-width: none; flex-basis: 100%; }
	.buy-range { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.buy-group { padding: 12px 16px 4px; margin-bottom: 12px; }
.buy-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 2px; }
.buy-group-head h2 { margin: 0; font-size: 17px; }
.buy-group-head span { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.buy-list { margin: 0; padding: 0; list-style: none; }
.buy-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.buy-row:last-child { border-bottom: 0; }
.buy-open { width: 100%; display: flex; align-items: flex-start; gap: 11px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.buy-thumb { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--paper-2); border-radius: 10px; color: var(--ink-3); }
.buy-thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.buy-main strong { font-weight: 600; overflow-wrap: anywhere; }
.buy-main small { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); overflow-wrap: anywhere; }
.buy-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.buy-price { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.buy-price small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.buy-row-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.buy-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buy-pair .field { min-width: 0; }
.buy-trio { display: grid; grid-template-columns: 1.3fr .9fr 1fr; gap: 10px; }
.buy-trio .field { min-width: 0; }
.buy-comes { margin: -4px 0 12px; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--cedar-deep); }
.buy-what { margin-bottom: 10px; }
.ws-form .buy-what textarea { min-height: 64px; }
.buy-suggest { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.buy-suggest[hidden] { display: none; }
.buy-used { display: flex; flex-direction: column; gap: 1px; padding: 8px 11px; font: inherit; text-align: left; color: inherit; background: var(--paper-2); border: 0; border-radius: 10px; cursor: pointer; }
.buy-used strong { font-weight: 600; overflow-wrap: anywhere; }
.buy-used small { font-size: 12.5px; color: var(--ink-3); }
.buy-more { margin: 4px 0 12px; border-top: 1px solid var(--line); }
.buy-more summary { padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.buy-more summary small { margin-left: 8px; font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.buy-more-body { padding-bottom: 6px; }
.buy-status { margin-bottom: 14px; }
.buy-status .chip { flex: 1; justify-content: center; text-align: center; }
.buy-link-line { display: flex; align-items: flex-end; gap: 8px; }
.buy-link-line .field { flex: 1; min-width: 0; }
.buy-link-line .btn { margin-bottom: 14px; }
.buy-link-tools { margin-top: 10px; }
.buy-link-tools .btn .ic { width: 15px; height: 15px; }
.buy-note { margin: 0 0 10px; padding: 9px 11px; font-size: 13.5px; background: var(--cedar-soft); border-radius: 10px; color: var(--cedar-deep); }
.buy-pictures { grid-template-columns: repeat(3, 1fr); max-width: 255px; margin: 5px 0 12px; }
.buy-needs { margin: 0 0 8px; padding: 0; list-style: none; }
.buy-needs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.plan-thumb { width: 44px; height: 44px; }
.plan-buy { display: block; font-size: 13px; color: var(--ink-2); }
.plan-shop-name { margin: 10px 0 2px; font-size: 15px; color: var(--ink-2); }
.buy-summary { margin: 0 0 10px; }
.step-buy { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.step-buy .ic { width: 16px; height: 16px; }

/* ── Feedback ──────────────────────────────────────────────────────────── */
.nav-feedback { margin-top: auto; }
.nav-feedback + .nav-out { margin-top: 0; }
.fb-pill { position: fixed; z-index: 58; left: calc(var(--nav-w) + 14px); bottom: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-2); cursor: pointer; }
.fb-pill .ic { width: 17px; height: 17px; }
html.fb-picking, html.fb-picking body * { cursor: crosshair; -webkit-touch-callout: none; }
html.fb-picking .fb-bar, html.fb-picking .fb-bar * { cursor: pointer; }
.fb-outline { position: fixed; z-index: 119; pointer-events: none; border: 2px solid var(--heat); border-radius: 4px; background: rgba(208, 104, 63, .13); }
.fb-bar { position: fixed; z-index: 120; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 16px); padding: 7px 8px 7px 15px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); }
.fb-bar-text { margin-right: 4px; font-size: 14px; font-weight: 600; }
.fb-note { position: relative; margin-bottom: 12px; }
.fb-note textarea { display: block; width: 100%; padding-right: 66px; }
.fb-note .mic { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; }
.fb-shot { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.fb-thumb { flex: none; display: flex; align-items: flex-start; justify-content: center; width: 112px; min-height: 76px; max-height: 130px; overflow: hidden; border-radius: 10px; background: var(--paper); font-size: 12.5px; color: var(--ink-3); text-align: center; }
.fb-thumb span { align-self: center; }
.fb-thumb img { display: block; width: 100%; }
html.no-scroll .fb-pill, html.fb-picking .fb-pill { display: none; }
.fb-shot-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.fb-shot-tools .ic { width: 15px; height: 15px; }
.fb-more { margin: 0 0 12px; }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.fb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fb-row img, .fb-row-empty { flex: none; width: 52px; height: 40px; object-fit: cover; border-radius: 7px; background: var(--paper); }
.fb-row-text { flex: 1; min-width: 0; }
.fb-row-text strong { display: block; overflow: hidden; font-size: 14px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.fb-row-text small { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 859px) {
	.fb-pill { left: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); }
	.nav-feedback { margin-top: 0; }
	/* Within reach of a thumb, and clear of whatever is at the top of the page. */
	.fb-bar { top: auto; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); }
}
@media print { .fb-pill { display: none; } }
