/* #693: part remains over its list while the draft is edited. */
.ph-element-overlay { position: fixed; z-index: 30; inset: max(12px, env(safe-area-inset-top)) 0 0; overflow-y: auto; overscroll-behavior: contain; background: var(--sn-card, white); padding: 16px 16px max(24px, env(safe-area-inset-bottom)); box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.ph-overlay-grabber { width: 48px; height: 24px; margin: 0 auto; touch-action: pan-y; }
.ph-overlay-grabber:after { content: ''; display:block; width:36px; height:4px; background:#738481; margin:auto; }
.ph-overlay-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ph-overlay-heading h2 { margin:0; }
.ph-overlay-heading button { min-width:48px; min-height:48px; border:0; border-radius:999px; background:transparent; font-size:28px; }
#element-breadcrumb { display:flex; align-items:center; gap:4px; overflow:hidden; }
#element-breadcrumb > * { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#element-breadcrumb > * + *:before { content:'› '; }
#element-breadcrumb button { min-height:48px; border:0; border-radius:999px; background:transparent; text-decoration:underline; }

.ph-item-sheet { z-index: 40; }
.ph-breadcrumb { display:flex; align-items:center; gap:4px; overflow:hidden; }
.ph-breadcrumb > * { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ph-breadcrumb > * + *:before { content:'› '; }
.ph-breadcrumb button { min-height:48px; border:0; border-radius:999px; background:transparent; text-decoration:underline; }

/* Keep navigation and the close action reachable while editing a long sheet. */
#element-sheet-header, .ph-overlay-header { position: sticky; top: -16px; z-index: 2; background: var(--sn-card, #fff); }
.ph-capture-breadcrumb { position: sticky; top: var(--ph-chrome-height, 104px); z-index: 3; background: var(--sn-card, #fff); }
.ph-element-overlay button { border-radius: 9999px !important; }
@media (prefers-reduced-motion: reduce) { .ph-element-overlay { animation: none; scroll-behavior: auto; } }

.ph-element-overlay :is(.ph-block, input, textarea, select) { border-radius: 0 !important; }
.photo-plan-surface { position:relative; width:100%; background:var(--sn-mist, #e8efed); touch-action:none; }
.photo-plan-surface img { display:block; width:100%; height:auto; pointer-events:none; }
.photo-plan-map, .photo-plan-outlines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.photo-plan-outlines polygon { fill:rgba(0, 120, 100, .18); stroke:var(--sn-teal, #155e56); stroke-width:.5; vector-effect:non-scaling-stroke; }
.photo-plan-marker { position:absolute; transform:translate(-50%, -50%); min-width:44px; min-height:44px; }
.photo-plan-premium { inset:0; background:var(--sn-mist, #e8efed); padding:0 16px max(24px, env(safe-area-inset-bottom)); }
.photo-plan-premium .ph-overlay-header { top:0; background:var(--sn-mist, #e8efed); }
.photo-plan-premium .ph-overlay-grabber, .photo-plan-premium .ph-breadcrumb { display:none; }
.photo-plan-premium .ph-overlay-heading { min-height:64px; position:relative; justify-content:center; }
.photo-plan-premium .ph-overlay-heading h2 { font:700 1.1rem var(--sn-font-text, sans-serif); }
.photo-plan-premium .ph-overlay-heading button { position:absolute; left:0; font-size:1rem; color:var(--sn-teal, #155e56); }
.photo-plan-premium .ph-form { display:flex; flex-direction:column; gap:16px; min-height:calc(100dvh - 100px); }
.photo-plan-premium .ph-form > button { min-height:48px; }
.photo-plan-premium .photo-plan-surface { width:calc(100% - 58px); margin:80px 29px 0; }
.photo-plan-premium .photo-plan-marker { width:58px; height:80px; padding:0; border:0; background:transparent; transform:translate(-50%, calc(-100% + 7px)); }
.photo-plan-premium .photo-plan-marker img { width:58px; height:58px; object-fit:cover; border:3px solid white; }
.photo-plan-premium .photo-plan-marker:after { content:''; display:block; width:10px; height:10px; margin:8px auto 0; border:2px solid white; border-radius:50%; background:var(--sn-signal, #16b6a4); }
.photo-plan-premium .photo-plan-hint { padding:12px; background:var(--sn-card, white); }
.photo-plan-premium .photo-plan-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; font-size:1.2rem; line-height:1.5; }
.photo-plan-premium .photo-plan-empty h3 { font-size:1.5rem; margin:16px 0 0; }
.photo-plan-premium .photo-plan-empty p { color:var(--sn-ink-muted, #556b72); }
.photo-plan-premium .photo-plan-empty-icon { width:120px; height:90px; display:grid; place-items:center; border:1px dashed var(--sn-ink-muted, #91a29c); color:var(--sn-teal, #155e56); font-size:2rem; }
.photo-plan-premium .photo-plan-actions { position:sticky; bottom:0; z-index:2; display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; padding:12px 0 max(12px, env(safe-area-inset-bottom)); background:var(--sn-mist, #e8efed); }
.photo-plan-premium .photo-plan-actions button { min-height:48px; flex:1 1 auto; }
.photo-plan-premium .photo-plan-actions .ph-primary { flex:2 1 180px; }
.photo-plan-premium .photo-plan-actions .photo-plan-not-now { flex-basis:100%; border:0; background:transparent; }
/* Leave room inside the curved ends for the rating text at phone widths. */
.ph-element-overlay .ph-rating button { padding: 24px 28px; text-align: center; }
.ph-capture-save { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; }
.ph-capture-save button { min-height:48px; border-radius:9999px; }
.ph-defect-next:not([hidden]) { display:grid; gap:8px; margin:16px 0; }
.ph-defect-next button { min-height:48px; border-radius:9999px; }
.ph-element-overlay.ph-save-feedback-on:not(.ph-item-sheet) { bottom:var(--ph-keyboard-inset, 0px); }
html[data-phone-premium="on"] #elements { background: var(--phone-premium-mist); color: var(--phone-premium-ink); }
html[data-phone-premium="on"] .ph-premium-roof-details { background: var(--phone-premium-card); border: 1px solid var(--phone-premium-line); }
html[data-phone-premium="on"] .ph-premium-roof-details > summary { min-height: 60px; padding: 12px 16px; cursor: pointer; }
html[data-phone-premium="on"] .ph-premium-roof-details > summary small { display: block; color: var(--phone-premium-muted); }
html[data-phone-premium="on"] #elements .ph-section h2 { color: var(--phone-premium-muted); font: 700 12px var(--sn-font-text); text-transform: uppercase; letter-spacing: .08em; }
html[data-phone-premium="on"] #elements .ph-roof-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; background: var(--phone-premium-card); }
html[data-phone-premium="on"] #elements .ph-roof-item .ph-chip { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
html[data-phone-premium="on"] #elements .ph-roof-item :is(b, small) { grid-column: 2; }
html[data-phone-premium="on"] #elements .ph-roof-item::after { grid-column: 3; }
html[data-phone-premium="on"] #element { background: var(--phone-premium-mist); color: var(--phone-premium-ink); }
html[data-phone-premium="on"] #element-sheet-header { background: var(--phone-premium-mist); }
html[data-phone-premium="on"] #element > .ph-form { display: flex; flex-direction: column; gap: 12px; }
html[data-phone-premium="on"] #rating { order: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html[data-phone-premium="on"] #rating legend { grid-column: 1 / -1; }
html[data-phone-premium="on"] #rating button { min-height: 48px; padding: 8px 12px; border-radius: 9999px; background: var(--phone-premium-card); color: var(--phone-premium-ink); border: 1px solid var(--phone-premium-line); box-shadow: none; text-align: left; }
html[data-phone-premium="on"] #rating button[aria-pressed="true"] { border: 2px solid var(--phone-premium-teal); }
html[data-phone-premium="on"] #rating button[aria-pressed="true"]::after { content: none; }
html[data-phone-premium="on"] #rating button small { display: none; }
html[data-phone-premium="on"] .ph-premium-rating-help { grid-column: 1 / -1; margin: 0; color: var(--phone-premium-muted); }
html[data-phone-premium="on"] #element-photos { order: 1; }
html[data-phone-premium="on"] #element-items { order: 2; }
html[data-phone-premium="on"] #defect-group { display: block; order: 3; }
html[data-phone-premium="on"] #element .ph-form > :not(#rating):not(#element-photos):not(#element-items):not(#defect-group):not(.ph-capture-actions) { order: 4; }
html[data-phone-premium="on"] .ph-premium-notes > summary { min-height: 48px; padding: 12px 16px; cursor: pointer; background: var(--phone-premium-card); border: 1px solid var(--phone-premium-line); }
html[data-phone-premium="on"] #element .ph-capture-actions { order: 5; position: static; background: transparent; padding: 12px 0; }
html[data-phone-premium="on"] #element .ph-defect { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--phone-premium-line); background: var(--phone-premium-card); padding: 16px; }
html[data-phone-premium="on"] #element .ph-defect h3 { font-family: var(--sn-font-text); font-size: 16px; margin: 0; }
html[data-phone-premium="on"] #element .ph-defect .ph-photos { order: 1; margin: 0; }
html[data-phone-premium="on"] #element .ph-defect .ph-photo-btn { order: 2; min-height: 48px; border-radius: 9999px; }
html[data-phone-premium="on"] #element .ph-defect > :not(h3):not(.ph-photos):not(.ph-photo-btn) { order: 3; }
html[data-phone-premium="on"] #element .ph-defect .ph-defect-next { position: static; }
html[data-phone-premium="on"] #element-photos { padding: 0; }
html[data-phone-premium="on"] :is(.ph-premium-photo-row, .ph-premium-defect-row) { background: var(--phone-premium-card); border: 1px solid var(--phone-premium-line); }
html[data-phone-premium="on"] :is(.ph-premium-photo-row, .ph-premium-defect-row) > summary { min-height: 56px; padding: 12px 16px; cursor: pointer; }
html[data-phone-premium="on"] .ph-premium-defect-row > summary small { display: block; color: var(--phone-premium-muted); }
html[data-phone-premium="on"] .ph-premium-photo-row > :not(summary) { margin: 8px; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen { position: fixed; inset: 0; z-index: 35; overflow-y: auto; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); background: var(--phone-premium-mist); }
html[data-phone-premium="on"] #element.ph-premium-defect-screen > #element-sheet-header > :not(.ph-capture-save), html[data-phone-premium="on"] #element.ph-premium-defect-screen > .ph-form > :not(#defect-group):not(.ph-capture-save), html[data-phone-premium="on"] #element.ph-premium-defect-screen #defect-group > :not(#defects), html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-premium-defect-row:not(.is-selected), html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-premium-defect-row > summary { display: none; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen > .ph-form > .ph-capture-save { position: sticky; top: -16px; z-index: 2; background: var(--phone-premium-mist); }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-premium-defect-row { border: 0; background: transparent; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-defect { border: 0; padding: 0; background: transparent; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-defect > .ph-premium-defect-header { order: -1 !important; display: flex; justify-content: space-between; gap: 8px; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-premium-defect-header button { min-height: 48px; padding: 0 12px; border: 0; background: transparent; color: var(--phone-premium-teal); font: 600 16px var(--sn-font-text); }
html[data-phone-premium="on"] .ph-premium-priorities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
html[data-phone-premium="on"] .ph-premium-priorities legend { padding: 0 0 8px; font-weight: 600; }
html[data-phone-premium="on"] .ph-premium-priorities label { position: relative; margin: 0; }
html[data-phone-premium="on"] .ph-premium-priorities input { position: absolute; opacity: 0; }
html[data-phone-premium="on"] .ph-premium-priorities label span { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--phone-premium-line); border-radius: 9999px; background: var(--phone-premium-card); }
html[data-phone-premium="on"] .ph-premium-priorities input:checked + span { border: 2px solid var(--phone-premium-teal); }
html[data-phone-premium="on"] .ph-premium-priorities input:focus-visible + span { outline: 2px solid var(--phone-premium-teal); outline-offset: 2px; }
html[data-phone-premium="on"] .ph-premium-priorities button { grid-column: 1 / -1; }
html[data-phone-premium="on"] #element .ph-photo { grid-template-columns: minmax(0, 1fr); padding: 12px; background: var(--phone-premium-card); }
html[data-phone-premium="on"] #element .ph-photo img { width: 100%; height: auto; max-height: 45vh; object-fit: contain; }
html[data-phone-premium="on"] #element .ph-photo :is(input, textarea) { width: 100%; min-height: 48px; font-size: 16px; }
html[data-phone-premium="on"] #element .ph-photo .ph-danger { min-height: 48px; padding: 0 16px; justify-content: center; border: 1px solid var(--sn-urgent); border-radius: 9999px; color: var(--sn-urgent); text-decoration: none; }
html[data-phone-premium="on"] #element .ph-premium-photo-card { padding: 0; }
html[data-phone-premium="on"] #element .ph-premium-photo-open { padding: 0; border: 0; background: transparent; }
html[data-phone-premium="on"] #element .ph-premium-photo-open img { height: 150px; object-fit: cover; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-finding-suggestions { order: 3 !important; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-premium-priorities { order: 4 !important; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-defect-note { order: 5 !important; }
html[data-phone-premium="on"] #element.ph-premium-defect-screen .ph-defect-next { order: 6 !important; }
html[data-phone-premium="on"] .ph-premium-photo-detail { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); border: 0; background: var(--phone-premium-mist); color: var(--phone-premium-ink); }
html[data-phone-premium="on"] .ph-premium-photo-detail header { display: flex; align-items: center; justify-content: space-between; }
html[data-phone-premium="on"] .ph-premium-photo-detail h2 { font: 600 20px var(--sn-font-text); }
html[data-phone-premium="on"] .ph-premium-photo-detail img { width: 100%; height: 40vh; object-fit: contain; background: var(--phone-premium-card); }
html[data-phone-premium="on"] .ph-premium-photo-detail .ph-photo-fields { display: grid; gap: 12px; padding: 16px 0; }
html[data-phone-premium="on"] .ph-premium-photo-detail :is(input, textarea) { width: 100%; min-height: 48px; font-size: 16px; }
html[data-phone-premium="on"] .ph-premium-photo-detail button { min-height: 48px; border-radius: 9999px; }
html[data-phone-premium="on"] .ph-premium-photo-detail header button { width: auto; padding: 0 20px; }
html[data-phone-premium="on"] .ph-premium-photo-detail .ph-danger { border: 1px solid var(--sn-urgent); color: var(--sn-urgent); text-decoration: none; }

/* #845: the send question is a short bottom sheet on a phone and a centred dialog on a tablet or computer (Studio). */
.ph-send-confirm.ph-element-overlay { inset: auto 0 0 0; max-height: calc(100dvh - 24px); z-index: 45; }
.ph-send-confirm .ph-overlay-heading h2 { overflow-wrap: anywhere; }
.ph-send-confirm .ph-overlay-heading h2:focus { outline: none; }
.ph-send-confirm .ph-overlay-heading h2:focus-visible { outline: 2px solid var(--sn-teal, #155e56); outline-offset: 2px; }
.ph-send-confirm-line { margin: 0 0 12px; line-height: 1.45; overflow-wrap: anywhere; }
.ph-send-confirm-actions { display: grid; gap: 8px; margin-top: 16px; }
.ph-send-confirm-actions button { width: 100%; min-height: 48px; height: auto; white-space: normal; border-radius: 9999px; }
/* E6 part 1 (phone_gaps_list): the "Still to fill in (N)" list. Rows are whole-width buttons (48 px or more to tap); the
   list scrolls inside the sheet so the two buttons stay in reach. Pills 999 px, everything else 2 px (the Nest look). */
.ph-gaps .ph-gaps-body { display: flex; flex-direction: column; min-height: 0; }
.ph-gaps .ph-gaps-list { max-height: min(46vh, 420px); overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; border: 1px solid var(--nest-line, #d9dedb); border-radius: 2px; background: var(--nest-card, #fff); }
.ph-gaps .ph-gaps-group-name { margin: 0; padding: 10px 14px 6px; font: 700 13px/1.3 var(--nest-text, inherit); letter-spacing: .02em; color: var(--nest-muted, #5d6763); background: var(--nest-wash, #f2f4f3); overflow-wrap: anywhere; }
.ph-gaps .ph-gaps-rows { list-style: none; margin: 0; padding: 0; }
.ph-gaps .ph-gaps-rows > li { margin: 0; padding: 0; border-top: 1px solid var(--nest-line, #d9dedb); }
.ph-gaps button.ph-gaps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px !important; height: auto; margin: 0; padding: 10px 14px; border: 0; border-radius: 0; background: transparent; color: var(--nest-ink, #1d2422); font: 500 15px/1.35 var(--nest-text, inherit); text-align: left; white-space: normal; cursor: pointer; }
.ph-gaps button.ph-gaps-row:focus-visible { outline: 2px solid var(--sn-teal, #155e56); outline-offset: -2px; }
.ph-gaps .ph-gaps-row-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ph-gaps .ph-gaps-row-gap { flex: 0 0 auto; max-width: 48%; font-weight: 400; color: var(--nest-muted, #5d6763); text-align: right; }
.ph-gaps .ph-gaps-row-gap::after { content: '\203A'; margin-left: 8px; font-weight: 700; color: var(--sn-teal, #155e56); }
.ph-gaps .ph-gaps-note { margin: 0; font-size: 14px; color: var(--nest-muted, #5d6763); }
@media (min-width: 768px) {
  .ph-send-confirm.ph-element-overlay { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); border-radius: 20px; }
  .ph-send-confirm .ph-overlay-grabber { display: none; }
}

/* ---------- #975 P2 (pins plan, 10 Nov): the zooming pin page (assets/phone-photo-plan.js openZoom). Only drawn while
   phone_item_pins is on, so with the switch off nothing here matches. Full screen: a top bar (Cancel, what is being pinned),
   one help line, the picture filling everything between, and a bottom bar (zoom out, zoom in, Confirm; Remove pin as a small
   link). Nothing is drawn on the picture but the pin. Nest look: pills 999 px, every other edge 2 px; the values fall back
   to Nest's own when its tokens are not set. ---------- */
dialog.pin-page-layer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.pin-page {
  position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; box-sizing: border-box; margin: 0;
  padding: env(safe-area-inset-top) 0 0; background: var(--nest-mist, #EAEEEC); color: var(--nest-ink, #1F2A33);
  font: 400 15px/1.4 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif); overscroll-behavior: none;
  touch-action: none;   /* Z1d: no finger on this page scrolls or zooms the app behind it (taps on its buttons still work) */
}
.pin-page * { box-sizing: border-box; }
.pin-page [hidden] { display: none !important; }
.pin-page .pin-page-top { flex: none; display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr) minmax(72px, auto); align-items: center; min-height: 52px; padding: 4px 8px; }
.pin-page .pin-page-titles { min-width: 0; text-align: center; }
.pin-page .pin-page-titles h2 { margin: 0; font: 700 17px/1.2 var(--nest-disp, "Archivo", system-ui, sans-serif); letter-spacing: -.01em; color: var(--nest-ink, #1F2A33); }
.pin-page .pin-page-where { margin: 1px 0 0; font: 400 13px/1.3 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif); color: var(--nest-muted, #5D6A70); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-page button.pin-page-cancel {
  justify-self: start; width: auto; min-width: 44px !important; min-height: 44px !important; height: 44px; margin: 0; padding: 0 10px; border: 0; border-radius: 999px !important;
  background: none; box-shadow: none; color: var(--nest-teal, #1F5C5B); font: 600 16px/1 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif);
}
.pin-page .pin-page-help { flex: none; margin: 0; padding: 0 16px 8px; text-align: center; font: 400 14px/1.35 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif); color: var(--nest-soft, #3B4A47); }
.pin-page .pin-page-view {
  position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: #DDE3DF; border-top: 1px solid var(--nest-line, #C9CFC9); border-bottom: 1px solid var(--nest-line, #C9CFC9);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab;
}
.pin-page .pin-page-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pin-page .pin-page-stage img { display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; -webkit-user-drag: none; }
/* the pin: its tip is the saved point; a 44 px numbered head in the item's priority colour, bigger while it is dragged */
.pin-page button.pin-page-pin {
  --pin-colour: var(--nest-teal, #1F5C5B);
  position: absolute; z-index: 2; width: 48px; height: 60px; min-width: 0 !important; min-height: 0 !important; margin: 0; padding: 0; border: 0; border-radius: 0 !important; background: none; box-shadow: none;
  /* Z1d: placed by a transform the page writes in the same pass as the picture's (assets/phone-photo-plan.js paint): no
     transition on it, or the pin would trail the picture */
  left: 0; top: 0; transform: translate(-50%, -100%); transform-origin: 50% 100%; will-change: transform; touch-action: none; cursor: grab;
}
.pin-page button.pin-page-pin.is-dragging { cursor: grabbing; }
.pin-page .pin-page-pin-head {
  position: absolute; left: 2px; top: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 999px;
  background: var(--pin-colour); color: #fff; font: 700 17px/1 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); pointer-events: none;
}
.pin-page .pin-page-pin-head:empty::before { content: ""; width: 12px; height: 12px; border-radius: 999px; background: #fff; }
/* Z1: the pins already on a plan, when the page is only looked at (View plan): numbered, in their own colours, centred on their spot */
.pin-page .pin-page-mark { position: absolute; z-index: 2; box-sizing: border-box; min-width: 30px; height: 30px; left: 0; top: 0; margin: 0; will-change: transform; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff; border-radius: 999px; background: var(--pin-colour, #6E7A78); color: #fff; font: 500 14px/1 var(--nest-mono, "IBM Plex Mono", ui-monospace, monospace); box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.pin-page[data-pin-mode="view"] button.pin-page-pin[hidden], .pin-page[data-pin-mode="view"] button.pin-page-remove[hidden] { display: none !important; }
.pin-page button.pin-page-pin::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 20px; margin-left: -2px; border-radius: 0 0 2px 2px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); pointer-events: none; }
.pin-page button.pin-page-pin::before { content: ""; position: absolute; z-index: 1; left: 50%; bottom: 1px; width: 2px; height: 18px; margin-left: -1px; background: var(--pin-colour); pointer-events: none; }
.pin-page button.pin-page-pin:focus-visible .pin-page-pin-head { outline: 3px solid var(--nest-deep, #0F2E2D); outline-offset: 2px; }
.pin-page .pin-page-said { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pin-page .pin-page-bottom { flex: none; padding: 10px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--nest-mist, #EAEEEC); }
.pin-page .pin-page-row { display: flex; align-items: center; gap: 8px; }
.pin-page button.pin-page-zoom {
  flex: none; width: 52px; height: 52px; min-width: 52px !important; min-height: 52px !important; margin: 0; padding: 0; border: 1px solid var(--nest-line, #C9CFC9); border-radius: 999px !important;
  background: var(--nest-card, #F8F9F6); box-shadow: none; color: var(--nest-teal, #1F5C5B); font: 500 26px/1 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif);
}
.pin-page button.pin-page-confirm {
  flex: 1 1 auto; min-width: 0; height: 52px; min-height: 52px !important; margin: 0; padding: 0 18px; border: 1px solid var(--nest-teal, #1F5C5B); border-radius: 999px !important;
  background: var(--nest-teal, #1F5C5B); box-shadow: none; color: #fff; font: 600 17px/1 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif);
}
.pin-page button.pin-page-confirm:disabled { opacity: .45; }
.pin-page button.pin-page-remove {
  display: block; width: auto; min-width: 0 !important; min-height: 44px !important; height: 44px; margin: 2px auto 0; padding: 0 12px; border: 0; border-radius: 999px !important;
  background: none; box-shadow: none; color: var(--nest-danger, #A83232); font: 600 14px/1 var(--nest-text, "IBM Plex Sans", system-ui, sans-serif); text-decoration: underline; text-underline-offset: 3px;
}
.pin-page button:focus-visible { outline: 2px solid var(--nest-deep, #0F2E2D); outline-offset: 2px; }
/* N1 (#1014, switch phone_generate_tidy): the one Generate sheet. Two headed sections in the one scrolling list. */
.ph-gaps[data-generate] .ph-gaps-list { max-height: min(36vh, 340px); }
.ph-gaps[data-generate] .ph-send-confirm-line { font-size: 15px; line-height: 1.35; }
.ph-gaps .ph-gaps-heading { margin: 0; padding: 12px 14px 4px; font: 700 15px/1.3 var(--nest-text, inherit); color: var(--nest-ink, #1d2422); background: var(--nest-card, #fff); }
.ph-gaps .ph-gaps-heading:not(:first-child) { border-top: 1px solid var(--nest-line, #d9dedb); margin-top: 6px; padding-top: 14px; }
.ph-gaps .ph-gaps-sub { margin: 0; padding: 0 14px 10px; font-size: 14px; color: var(--nest-muted, #5d6763); }
.ph-gaps .ph-gaps-row-quote { font-style: italic; }
.ph-gaps div.ph-gaps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; font: 500 15px/1.35 var(--nest-text, inherit); color: var(--nest-ink, #1d2422); }
.ph-gaps div.ph-gaps-row .ph-gaps-row-gap::after { content: none; }
.ph-gaps[data-generate] .ph-send-confirm-line { margin: 0 0 6px; }
