.workflow-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; margin:10px 0 14px; }
#editorPanel {--survey-accent:#1769b0;--survey-tint:#edf5ff;--survey-border:#b8d5ee;--text:#203047;--muted:#526579;--line:#cbd5df;--line-soft:#dce3eb;--border:#b7c5d2;color:#203047;background:#f8fafc;border:1px solid var(--survey-border);border-radius:8px;box-shadow:0 12px 32px #14223333;color-scheme:light;}
#editorPanel[data-survey-kind="land"] {--survey-accent:#087b56;--survey-tint:#edf9f2;--survey-border:#b3d9c3;}
#editorPanel[data-survey-kind="sign"] {--survey-accent:#af3457;--survey-tint:#fff0f4;--survey-border:#e9b8c7;}
#editorPanel>.panel-head {background:var(--survey-accent);color:white;padding:14px;gap:10px;border:0;}
.survey-window-heading {display:flex;align-items:center;gap:10px;min-width:0;}
.survey-window-heading>div {min-width:0;}
#editorPanel #formTitle {font-size:18px;line-height:1.45;color:white;overflow-wrap:anywhere;margin:0;}
.survey-window-icon {width:28px;height:28px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#surveyWindowMode {font-size:12px;line-height:1.5;color:#fff;opacity:.9;}
#editorPanel #closeEditorBtn {color:white;background:#ffffff18;border:1px solid #ffffff66;width:40px;height:40px;flex:none;}
#editorPanel #surveyForm {background:var(--survey-tint);}
#editorPanel label,#editorPanel summary,#editorPanel legend,#editorPanel h3,#editorPanel strong {color:#203047;}
#editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select,#editorPanel textarea {color:#203047;background:#fff;border:1px solid #b7c5d2;border-radius:6px;box-shadow:none;}
#editorPanel input::placeholder,#editorPanel textarea::placeholder {color:#69788a;opacity:1;}
#editorPanel input:read-only {background:#edf1f5;color:#526579;}
#editorPanel input:focus,#editorPanel select:focus,#editorPanel textarea:focus {outline:2px solid var(--survey-accent);outline-offset:1px;}
#editorPanel button {border-radius:6px;}
#editorPanel .secondary,#editorPanel .icon-btn.light,#editorPanel .geometry-draw-btn,#editorPanel #pickDraftLocationBtn {background:white;color:#294058;border:1px solid #b7c5d2;box-shadow:none;}
#editorPanel .primary {background:var(--survey-accent);color:#fff;border:1px solid var(--survey-accent);box-shadow:none;}
#editorPanel .workflow-tabs button {background:#fff;color:#415569;border:1px solid #c6d3df;border-bottom:3px solid #c6d3df;}
#editorPanel .workflow-tabs button[aria-selected="true"] {background:var(--survey-accent);border-color:var(--survey-accent);color:white;}
#editorPanel .workflow-missing-link {color:var(--survey-accent);}
#editorPanel .building-page-tabs button {background:white;color:#294058;border-color:#b7c5d2;}
#editorPanel .building-page-tabs [aria-selected="true"] {background:var(--survey-accent);color:white;border-color:var(--survey-accent);}
#editorPanel #buildingBodyPage,#editorPanel #buildingUsesPage {border-top-color:var(--survey-border);}
#editorPanel #buildingFloorWarning,#editorPanel #ltax-error {color:#ad2445;}
#editorPanel #ltax-check-note {color:#765119;}
#editorPanel .linked-parcel-context,#editorPanel .geometry-info {background:#fff;color:#203047;border-color:var(--survey-border);}
#editorPanel #archiveBtn {color:#a92643;background:#fff4f5;border-color:#e3b6c2;}
#editorPanel button:disabled {opacity:.5;cursor:not-allowed;}
#surveyTypeMenu {background:#f8fafc;color:#203047;border:1px solid #cbd5df;}
#surveyTypeMenu h2 {color:#203047;}
#surveyTypeMenu .menu-head {display:flex;align-items:center;justify-content:space-between;gap:10px;}
#surveyTypeMenu .menu-head h2 {font-size:17px;min-width:0;}
#surveyTypeMenu .menu-head button {flex:none;color:#294058;background:#fff;border:1px solid #b7c5d2;}
#surveyTypeMenu .menu-item {order:4;}
#surveyTypeMenu [data-survey-kind="land"] {order:1;}
#surveyTypeMenu [data-survey-kind="building"] {order:2;}
#surveyTypeMenu [data-survey-kind="sign"] {order:3;}
#editorPanel svg {fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#surveyTypeMenu .menu-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
#surveyTypeMenu .menu-item {background:#fff;color:#294058;border:1px solid #cbd5df;border-radius:6px;min-height:84px;padding:12px 8px;min-width:0;white-space:normal;}
#surveyTypeMenu .menu-item>span:last-child {font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
#surveyTypeMenu [data-survey-kind="building"] {color:#1769b0;background:#edf5ff;border-color:#b8d5ee;}
#surveyTypeMenu [data-survey-kind="land"] {color:#087b56;background:#edf9f2;border-color:#b3d9c3;}
#surveyTypeMenu [data-survey-kind="sign"] {color:#af3457;background:#fff0f4;border-color:#e9b8c7;}
#surveyTypeMenu .menu-icon svg {width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.workflow-tabs button { min-width:0; padding:10px 2px; background:#eef2f5; color:#344351; border:0; border-bottom:3px solid transparent; border-radius:4px; font:inherit; font-size:13px; overflow-wrap:anywhere; cursor:pointer; }
.workflow-tabs [aria-selected="true"] { border-bottom-color:#067a72; background:#ddf4ef; color:#07564f; font-weight:700; }
.workflow-tabs button {min-height:54px;padding:10px 0;}
.workflow-tabs button span {display:block;white-space:nowrap;font-size:12px;line-height:1.5;}
#workflowSavedState { display:block; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.guided-survey [role="tabpanel"] { min-width:0; }
#surveyForm.guided-survey { padding:0 14px 14px; }
#surveyForm.guided-survey [role="tabpanel"] > * { margin-left:0; margin-right:0; max-width:100%; }
#surveyForm.guided-survey .field-grid { margin-left:0; margin-right:0; }
#surveyForm.guided-survey .form-actions { margin-left:0; margin-right:0; }
#surveyForm.guided-survey input,#surveyForm.guided-survey select,#surveyForm.guided-survey textarea,#surveyForm.guided-survey label { margin-left:0; margin-right:0; max-width:100%; }
.guided-survey [role="tabpanel"] > label { display:block; margin-top:10px; }
.guided-survey [role="tabpanel"] > input,.guided-survey [role="tabpanel"] > textarea { width:100%; box-sizing:border-box; }
.workflow-navigation { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-top:1px solid #dce3e8; margin-top:12px; }
.workflow-navigation .icon-btn { width:40px; height:40px; flex-shrink:0; }
#workflowReview { border-top:1px solid #dce3e8; margin-top:16px; padding-top:8px; }
#workflowReview h3 { font-size:15px; }
.workflow-missing-link { display:block; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line-soft); padding:10px 4px; background:transparent; color:#7ed5ed; cursor:pointer; font:inherit; overflow-wrap:anywhere; }
.workflow-missing-link:focus-visible,.workflow-tabs button:focus-visible { outline:2px solid #075f80; outline-offset:2px; }
.guided-survey .form-actions { display:flex; flex-wrap:wrap; gap:8px; }
.guided-survey #landWorkflowActions { display:contents; }
.guided-survey #landWorkflowActions[hidden] { display:none; }
.guided-survey #saveBtn,.guided-survey #landSubmitBtn { flex:1 1 120px; min-height:44px; }
.guided-survey #newBtn,.guided-survey #archiveBtn { flex:1 1 120px; }
.guided-survey:not(.is-land) [data-land-owner],.guided-survey:not(.is-land) label[for="landOwnerAddress"],.guided-survey:not(.is-land) label[for="landOccupier"] { display:none; }
.guided-survey .ltax-check { margin-top:14px; }
@media(max-width:760px) {
  .guided-survey .field-grid,.guided-survey .ltax-grid { grid-template-columns:minmax(0,1fr); }
  .guided-survey input,.guided-survey select,.guided-survey textarea { font-size:16px; min-width:0; }
  .guided-survey .ltax-wide { grid-column:auto; }
  .workflow-tabs { gap:2px; }
}
#editorPanel #photoPanel { margin: 12px 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
#editorPanel .photo-drop-zone { margin: 0; padding: 12px; border: 0; background: transparent; }
#editorPanel .photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#editorPanel .photo-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 8px; border: 1px solid var(--survey-accent, #1769b0); border-radius: 8px; background: #fff; color: var(--survey-accent, #1769b0); font-size: 14px; font-weight: 700; }
#editorPanel .photo-action-primary { background: var(--survey-accent, #1769b0); color: #fff; }
#editorPanel .photo-action svg { width: 24px; height: 24px; margin: 0; flex: 0 0 24px; opacity: 1; color: inherit; }
#editorPanel #photoGallery:empty,#editorPanel #photoList:empty { display: none; }
#editorPanel .photo-action:disabled { opacity: .55; cursor: wait; }
#editorPanel .photo-drop-zone small { display: block; margin-top: 10px; color: #526070; font-size: 12px; }
#editorPanel #photoProgress { font-size: 12px; color: #36566e; min-height: 18px; margin-top: 4px; }
#editorPanel .photo-drop-zone.dragover { background: #e7f4ee; outline: 2px dashed #087b56; }
#editorPanel .photo-thumb { background: #fff; border-color: #d7dfe7; }
#editorPanel .photo-preview-button { display: block; width: 100%; min-height: 44px; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
#photoPreviewDialog { width: min(92vw, 900px); max-height: 90dvh; padding: 48px 8px 8px; border: 0; border-radius: 8px; background: #fff; }
#photoPreviewDialog::backdrop { background: #000b; }
#photoPreviewDialog img { display: block; width: 100%; max-height: 75dvh; object-fit: contain; }
#closePhotoPreview { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: #edf1f5; color: #203047; }

/* Readable translucent survey windows, with the existing per-type accents. */
#editorPanel #fieldBookNumber { font-size:17px; line-height:1.4; }
#editorPanel .field-book-panel { padding:8px 0; margin-bottom:10px; gap:8px; }
#editorPanel { background:rgba(248,250,252,.9); font-size:13px; }
#editorPanel #surveyForm { background:transparent; }
#editorPanel>.panel-head { padding:9px 12px; gap:8px; background:color-mix(in srgb,var(--survey-accent) 90%,transparent); }
#editorPanel #formTitle { font-size:15px; }
.survey-window-icon { width:22px; height:22px; }
#editorPanel #closeEditorBtn { width:32px; height:32px; min-width:32px; min-height:32px; }
#surveyForm.guided-survey { padding:0 10px 10px; }
#editorPanel .workflow-tabs { margin:8px 0 10px; }
#editorPanel .workflow-tabs button { min-height:42px; padding:6px 2px; font-size:12px; }
#editorPanel .workflow-tabs button span { font-size:11px; }
#editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select { min-height:36px; padding:7px 8px; font-size:13px; }
#editorPanel textarea { font-size:13px; padding:8px; }
#editorPanel .ltax-grid,#editorPanel .field-grid { gap:8px; }
#editorPanel .workflow-navigation { padding:8px 0; margin-top:8px; }
#editorPanel .photo-action { min-height:40px; font-size:13px; padding:7px; }
#editorPanel .photo-action svg { width:20px; height:20px; }
#surveyTypeMenu { background:rgba(248,250,252,.9); backdrop-filter:blur(12px); }
#surveyTypeMenu .menu-head h2 { font-size:14px; }
#surveyTypeMenu .menu-item { min-height:64px; padding:8px; }
#surveyTypeMenu .menu-icon svg { width:22px; height:22px; }
@media(max-width:760px) {
  #editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select,#editorPanel textarea { font-size:16px; min-height:40px; }
  #editorPanel #closeEditorBtn { width:36px; height:36px; }
  #editorPanel .photo-action { min-height:44px; }
}
@media(prefers-reduced-transparency:reduce) {
  #editorPanel,#surveyTypeMenu { background:#f8fafc; }
}
