/* add-on: Privacy, the fifth mode of the Home plan (js/plus/privacy.js, Sightlines part B). The Home level's quiet language: paper white pill, ink text, solid dark capsule for the chosen room,
   soft shadow, no glass rim. The picture is SVG in the plan drawing's own pixels, moved by one camera transform that the plan drawing shares (js sets it; will-change only during a flight).
   Lines and names keep their size on the screen from --pv-u (metres per screen pixel, set by js). Light: one warm tone for open and wide, deeper for moderate, one clear cool tone for close. No red.
   No filter or backdrop-filter anywhere. */
.u-plan { --pv-d: 150px; --pv-ink: 22, 22, 27;
  --pv-open: 244, 184, 72; --pv-mod: 226, 128, 44; --pv-close: 52, 96, 176;
  --pv-open-k: 168, 112, 14; --pv-mod-k: 178, 86, 18; --pv-close-k: 36, 70, 150; }
.pv-top, .pv-dock, .pv-beads { display: none; }
.u-plan.pv-on :is(.pv-top, .pv-dock, .pv-beads) { display: flex; }
.u-plan.pv-on .pv-beads { display: block; }
.u-plan.pv-on .u-z { will-change: auto; }   /* the plan layer is re-rastered as it is zoomed, so the drawing stays sharp at every zoom (it is a fixed-scale bitmap otherwise) */

/* the two layers of the picture, one under the plan drawing and one over it, in the zoomed layer */
.pv-lay { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; }
.pv-svg { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; --pv-u: .03; fill: none; stroke: none; }
.pv-svg .pv-s .pv-wedge { pointer-events: all; cursor: pointer; }

/* neighbours: the floor in quiet paper tones */
.pv-mass { fill: rgba(var(--pv-ink), .04); stroke: rgba(var(--pv-ink), .22); stroke-width: calc(var(--pv-u) * 1px); stroke-linejoin: round; }
.pv-mass.pv-own { fill: rgba(var(--pv-ink), .045); stroke: rgba(var(--pv-ink), .28); }
.pv-mass.pv-future { fill: none; stroke: rgba(var(--pv-ink), .3); stroke-dasharray: calc(var(--pv-u) * 5px) calc(var(--pv-u) * 4px); stroke-linecap: round; }
.pv-u { fill: none; stroke: rgba(var(--pv-ink), .2); stroke-width: calc(var(--pv-u) * .9px); stroke-linejoin: round; }
.pv-u.pv-flr { fill: rgba(var(--pv-ink), .055); stroke: rgba(var(--pv-ink), .4); stroke-width: calc(var(--pv-u) * 1px); }
.pv-u.pv-me { fill: #fff; stroke: rgba(var(--pv-ink), .55); stroke-width: calc(var(--pv-u) * 1.4px); }
.pv-name { font: 650 calc(var(--pv-u) * 10.5px)/1 var(--sans); letter-spacing: calc(var(--pv-u) * 1.4px); text-transform: uppercase; text-anchor: middle; dominant-baseline: middle; fill: rgba(var(--pv-ink), .4); stroke: none; }
.pv-name.pv-plan { fill: rgba(var(--pv-ink), .46); font-weight: 600; }
.pv-no { font: 600 calc(var(--pv-u) * 10px)/1 var(--sans); text-anchor: middle; dominant-baseline: middle; fill: rgba(var(--pv-ink), .5); stroke: none; transition: opacity .4s var(--e-x, ease); }
.pv-tno { opacity: 0; fill: rgb(var(--pv-ink)); font-weight: 700; }
.pv-s.sel .pv-tno { opacity: 1; }

/* the beams of light */
.pv-s { transition: opacity .5s var(--e-x, ease); }
.pv-wedge { stroke: none; }
.pv-gs { stop-color: rgb(var(--pv-open)); }   /* the opacity along each beam is set in js (a facing beam keeps a little light at its wall; an open one dissolves to nothing) */
.pv-gs.b-moderate { stop-color: rgb(var(--pv-mod)); }
.pv-gs.b-close { stop-color: rgb(var(--pv-close)); }
.pv-dim { fill: none; stroke: rgba(var(--pv-open-k), .85); stroke-width: calc(var(--pv-u) * 1.2px); stroke-linecap: butt; transition: opacity .4s var(--e-x, ease); }
.pv-wall { fill: none; stroke: rgb(var(--pv-open)); stroke-width: calc(var(--pv-u) * 3.4px); stroke-linecap: round; transition: opacity .4s var(--e-x, ease); }
.pv-tick { fill: none; stroke: rgba(var(--pv-open-k), .9); stroke-width: calc(var(--pv-u) * 1.2px); stroke-linecap: round; transition: opacity .4s var(--e-x, ease); }
/* a result outside the nearest few is only a soft beam at rest (a faint lit wall, no line); choosing its room brings the rest */
.pv-s.pv-q:not(.sel) :is(.pv-dim, .pv-tick) { opacity: 0; }
.pv-s.pv-q:not(.sel) .pv-wall { opacity: .45; }
.pv-tgt { fill: rgba(var(--pv-open), .0); stroke: rgba(var(--pv-open-k), 0); stroke-width: calc(var(--pv-u) * 1.1px); stroke-linejoin: round; transition: fill .6s var(--e-x, ease), stroke .6s var(--e-x, ease); }
.pv-s.sel .pv-tgt { fill: rgba(var(--pv-open), .26); stroke: rgba(var(--pv-open-k), .8); }
.pv-s[data-b="moderate"] .pv-dim, .pv-s[data-b="moderate"] .pv-tick { stroke: rgba(var(--pv-mod-k), .9); }
.pv-s[data-b="moderate"] .pv-wall { stroke: rgb(var(--pv-mod)); }
.pv-s[data-b="moderate"].sel .pv-tgt { fill: rgba(var(--pv-mod), .24); stroke: rgba(var(--pv-mod-k), .8); }
.pv-s[data-b="close"] .pv-dim, .pv-s[data-b="close"] .pv-tick { stroke: rgba(var(--pv-close-k), .9); }
.pv-s[data-b="close"] .pv-wall { stroke: rgb(var(--pv-close)); }
.pv-s[data-b="close"].sel .pv-tgt { fill: rgba(var(--pv-close), .2); stroke: rgba(var(--pv-close-k), .8); }
.has-sel .pv-s:not(.sel) { opacity: .2; }
/* a soft dissolve above the pill: the picture fades to the card's own white just before it, so no beam runs under the pill (the beads stay above it) */
.pv-fog { display: none; }
.u-plan.pv-on .pv-fog { display: block; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: calc(var(--pv-d) + 32px); pointer-events: none; background: linear-gradient(to top, #fff 0, #fff calc(var(--pv-d) + 2px), rgba(255, 255, 255, .55) calc(var(--pv-d) + 14px), rgba(255, 255, 255, 0) 100%); }
.has-sel .pv-s:not(.sel) .pv-wedge { pointer-events: all; }

/* top: the compass, a small white pill like Airflow's */
.pv-top { position: absolute; z-index: 3; top: calc(var(--s4, 1rem) - 2px); right: var(--s4, 1rem); align-items: center; padding: 7px 8px 3px; border-radius: var(--r-pill, 999px); background: #fff; box-shadow: var(--mf-sh-float, 0 1px 3px rgba(22, 22, 27, .16)); color: #16161b; }
.u-plan[data-pvw="mid"] .pv-top { top: calc(var(--s4, 1rem) + var(--q-ctl, 44px) + 6px); right: auto; left: var(--s4, 1rem); }
.pv-compass { width: calc(48px * min(var(--ui-scale, 1), 1.2)); height: calc(48px * min(var(--ui-scale, 1), 1.2)); flex: none; overflow: visible; margin: 0; }
.pv-compass .c-t { font: 700 14px var(--sans); }
.pv-compass .c-ring { stroke-width: 1.6; }

/* bottom: one pill (the sentence, the room chips) and the label under it */
.pv-dock { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; flex-direction: column; gap: 0; color: #16161b; }   /* the pill floats on the picture; the label sits on a plain white band, so no line runs under its words */
.pv-ui { margin: 0 var(--s4, 1rem) 6px; display: grid; gap: 1px; padding: .55rem 1.1rem .15rem; border-radius: calc(24px * var(--ui-scale, 1)); background: #fff; box-shadow: var(--mf-sh-float, 0 1px 3px rgba(22, 22, 27, .16)); min-width: 0; }
.pv-ui p { margin: 0; }
.pv-line { font: var(--ty-callout, 500 15px/1.33 var(--sans)); font-weight: 600; letter-spacing: var(--tr-callout, 0); text-wrap: balance; }
.pv-sub { font: var(--ty-cap, 500 12px/1.33 var(--sans)); letter-spacing: var(--tr-cap, .01em); color: rgba(22, 22, 27, .66); }
.pv-sub:empty, .u-plan.pv-plain .pv-sub { display: none; }
.u-plan.pv-plain .pv-line { font-weight: 500; }
.u-plan.pv-plain .pv-ui { padding-bottom: .6rem; }
.u-plan.pv-block :is(.pv-chips, .pv-foot, .pv-top) { display: none; }
.pv-retry { justify-self: start; margin-top: 6px; min-height: var(--q-ctl, 44px); padding: 0 1.2rem; border-radius: var(--r-pill, 999px); background: #16161b; color: #fff; font: 600 max(.9rem, 14px)/1 var(--sans); }
.pv-retry[hidden] { display: none; }
.pv-retry:disabled { opacity: .5; }
.pv-chips { --pv-fl: 0px; --pv-fr: 0px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--pv-fl), #000 calc(100% - var(--pv-fr)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--pv-fl), #000 calc(100% - var(--pv-fr)), transparent 100%); display: flex; gap: 2px; margin: 2px -.7rem 0; padding: 0 .7rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.pv-chips::-webkit-scrollbar { display: none; }
.pv-chips[data-fade*="l"] { --pv-fl: 34px; } .pv-chips[data-fade*="r"] { --pv-fr: 34px; }   /* a soft edge only on the side where the row runs on, so no word is ever cut hard */
.pv-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: var(--q-ctl, 44px); padding: 0 .95rem 0 .85rem; background: none; color: #16161b; font: 600 max(.86rem, 13.5px)/1 var(--sans); white-space: nowrap; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; transition: color .2s var(--e-x, ease), scale .18s var(--e-in, ease); }
.pv-chip::before { content: ""; position: absolute; inset: calc((var(--q-ctl, 44px) - 36px * var(--ui-scale, 1)) / 2) 0; border-radius: var(--r-pill, 999px); background: rgba(22, 22, 27, .055); transition: background-color .22s var(--e-x, ease); }
.pv-chip > * { position: relative; }
.pv-chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--pv-open)); box-shadow: inset 0 0 0 1px rgba(22, 22, 27, .18); }
.pv-chip[data-b="moderate"] i { background: rgb(var(--pv-mod)); }
.pv-chip[data-b="close"] i { background: rgb(var(--pv-close)); }
.pv-chip .d { font-weight: 500; color: rgba(22, 22, 27, .62); margin-left: -.2rem; transition: color .2s var(--e-x, ease); }
.pv-chip.on { color: #fff; }
.pv-chip.on::before { background: #16161b; }
.pv-chip.on .d { color: rgba(255, 255, 255, .72); }
.pv-chip:active { scale: .97; }
.pv-chip:focus-visible { outline: none; } .pv-chip:focus-visible::before { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #16161b; }
.pv-foot { display: block; margin: 0; padding: 6px calc(var(--s4, 1rem) + 1.1rem) 11px; background: #fff; font: var(--ty-cap, 500 12px/1.33 var(--sans)); letter-spacing: var(--tr-cap, .01em); color: rgba(22, 22, 27, .62); }
.pv-ind { font-weight: 650; color: #16161b; }
.pv-why::before, .pv-north:not(:empty)::before { content: "\00b7"; margin: 0 .5em; }

/* the beads: a small white capsule on each dimension line, reading its distance */
.pv-beads { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; border-radius: inherit; }
.pv-bead { position: absolute; left: 0; top: 0; translate: -50% -50%; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-pill, 999px); background: #fff; color: #16161b; box-shadow: 0 0 0 1px rgba(22, 22, 27, .08), 0 1px 2px rgba(22, 22, 27, .08), 0 6px 14px -8px rgba(22, 22, 27, .3); font: 650 max(12.5px, .8rem)/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .28s var(--e-x, ease); -webkit-tap-highlight-color: transparent; }
.pv-bead.on { opacity: 1; pointer-events: auto; }
.pv-bead::before { content: ""; position: absolute; inset: -9px -4px; }   /* a 44px target */
.pv-bead i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--pv-open)); }
.pv-bead[data-b="moderate"] i { background: rgb(var(--pv-mod)); }
.pv-bead[data-b="close"] i { background: rgb(var(--pv-close)); }
.pv-bead b { font: inherit; }

/* a narrow card: the pill gets a little tighter */
.u-plan[data-pvw="mid"] .pv-ui { padding: .5rem .95rem .25rem; }
@media (prefers-reduced-motion: reduce) {
  .pv-s, .pv-no, .pv-dim, .pv-wall, .pv-tick, .pv-tgt, .pv-bead, .pv-chip, .pv-chip::before, .pv-chip .d { transition: none; }
}
/* the mode bar is a quiet grey capsule on the white card; the picture runs beneath it, so it is solid while Privacy is on (the same grey, no line shows through) */
:root body #lv-home .u-plan.pv-on .pm-seg { background: #f0f0f1; }
/* the Key plan inset (js/ux/keyplan.js) hides itself in this mode; while the picture is flying back to the plan it stays hidden too, and arrives with its own fade once the plan is plain again */
html body #lv-home .u-plan.pv-on .kp-inset { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
/* the Privacy button is not offered for a home with no drawing: the plan bar's own rule makes every button a flex box, which would keep a hidden one on show */
html body #lv-home .u-plan .pm-seg [data-pm=privacy][hidden], .pm-seg [data-pm=privacy][hidden] { display: none !important; }
