/* Add Place is the single visual source for manual, voice and photo drafts. */
.place-form, #voice-modal-content, #photo-review-content {
    --place-font: 'Noto Sans TC', sans-serif;
    --place-ink: #26312f;
    --place-heading: #1f2937;
    --place-muted: #6b7280;
    --place-accent: #2563eb;
    --place-line: rgba(38,49,47,.12);
    --place-panel: #fffdf8;
    --place-body: #fdfcf9;
    --place-radius: var(--radius-panel, 1rem);
    --place-control-radius: var(--radius-control, .65rem);
    --place-card-radius: var(--radius-control, .65rem);
    --place-title-size: 18px;
    --place-label-size: 10px;
    --place-button-size: 12px;
    --place-input-size: 14px;
    --place-section-size: 14px;
    --place-helper-size: 12px;
    --place-visit-size: 10px;
    --place-visit-height: 40px;
    --place-compact-size: 10px;
    --place-compact-padding: 4px 8px;
    --place-space: 16px;
}
.place-form {
    font-family: var(--place-font);
    font-size: 16px; line-height: 1.5; font-weight: 400; color: var(--place-ink);
    background: var(--place-panel); border: 1px solid rgba(38,49,47,.10);
    border-radius: var(--place-radius); box-shadow: var(--surface-shadow, 0 10px 28px rgba(15,23,42,.10));
}
#form-modal-content > div:first-child, .place-form .photo-review-header, #photo-import-content > header {
    padding: 12px var(--place-space); background: rgba(249,250,251,.8); border-bottom: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
}
#form-modal-content h2, .place-form h2 { font-size: var(--place-title-size); line-height: 28px; font-weight: 900; color: var(--place-heading); margin: 0; }
#form-modal-content label:not(.cursor-pointer), .place-form .photo-confirm-editor label, .place-form .photo-review-select-label {
    font-size: var(--place-label-size); font-weight: 900; line-height: 1.5; letter-spacing: .05em; color: var(--place-muted);
}
.place-form p, .place-form small, .place-form .photo-review-muted, .place-form .photo-review-meta,
.place-form .photo-review-facts, .place-form .photo-review-progress, .place-form .photo-review-state,
.place-form .photo-review-footer-status, .place-form .photo-execution-notice { color: var(--place-muted); }
.place-form h3, .place-form h4 { font-size: 14px; line-height: 1.5; font-weight: 700; color: var(--place-heading); margin: 0 0 6px; }
.place-form p { margin: 6px 0; }
.place-form small, .photo-review-header p, .photo-confirm-editor p { font-size: 12px; line-height: 1.5; font-weight: 400; }
#form-modal-content input:not([type=hidden]):not([type=file]), #form-modal-content select,
.place-form :is(.photo-confirmation input, .photo-confirmation select, .photo-review-select-label select) {
    background: white; border: 2px solid var(--place-line); border-radius: var(--place-control-radius);
    padding: 10px; font-family: inherit; font-size: var(--place-input-size); line-height: 20px; font-weight: 700;
    color: var(--place-ink); min-width: 0; max-width: 100%; box-sizing: border-box; box-shadow: none;
}
#form-modal-content #form-visits-container :is(select, input[type=date]) { font-size: var(--place-visit-size); height: var(--place-visit-height); min-height: var(--place-visit-height); padding-block: 8px; }
#form-modal-content #form-visits-container input[type=date]::-webkit-date-and-time-value { font: inherit; text-align: left; }
.place-form input:focus, .place-form select:focus { outline: none; border-color: #89cbf7; box-shadow: 0 0 0 3px rgba(137,203,247,.18); }
#form-modal-content > div:last-child button, .place-form:where(:not(#form-modal-content)) button, .place-form .photo-coordinate-advanced summary {
    min-height: 44px; box-sizing: border-box; max-width: 100%; font-family: inherit;
    font-size: var(--place-button-size); font-weight: 700; line-height: 1.5; cursor: pointer;
    border-radius: var(--place-control-radius); padding: 8px 12px;
}
.place-form:where(:not(#form-modal-content)) button { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.place-form:where(:not(#form-modal-content)) button:hover { background: #e5e7eb; }
#form-modal-content > div:last-child button[onclick="submitSpotForm()"], .place-form .is-primary,
.place-form #photo-review-next, .place-form .photo-split-complete, .place-form button[type=submit] {
    background: var(--place-accent); color: white; font-weight: 900; border-color: var(--place-accent);
}
.place-form button:disabled { opacity: .42; cursor: not-allowed; }
.place-form button:focus-visible { outline: 2px solid var(--place-accent); outline-offset: 2px; }
.place-form .place-compact-action, #voice-modal-content .voice-capture-actions .place-compact-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    width: auto; min-height: 0; height: auto; padding: var(--place-compact-padding);
    font-family: var(--place-font); font-size: var(--place-compact-size); font-weight: 700; line-height: 1.5;
    border-radius: var(--place-control-radius); border-width: 1px; box-sizing: border-box;
}
#form-modal-content > div:first-child button[onclick="closeSpotForm()"],
.place-form .photo-review-close, #photo-import-content header button {
    border-radius: 999px; min-width: 44px; width: 44px; height: 44px; padding: 6px;
    background: rgba(229,231,235,.5); color: #9ca3af; border: 0; flex: none;
}
#form-modal-content > div:nth-child(2), .place-form #photo-review-body, #photo-import-content > div {
    background: var(--place-body); padding: var(--place-space);
}
.place-form :is(.photo-review-card, .photo-confirm-card, .photo-execution-card, .photo-split-target, .representative-selection-capacity) {
    padding: 12px; border: 1px solid #e5e7eb; border-radius: var(--place-card-radius); background: #f9fafb;
    box-shadow: 0 1px 2px rgba(0,0,0,.05); min-width: 0;
}
.place-form .photo-review-final-group { border-top: 1px solid #e5e7eb; margin-top: 12px; padding-top: 12px; }
.place-form :is(.photo-review-eyebrow, .photo-review-match-list, .photo-review-facts, .photo-review-progress, .photo-review-state, .photo-review-meta, .photo-review-muted) { font-size: 12px; line-height: 1.5; font-weight: 400; }
.place-form .photo-review-eyebrow { display: none; }
.place-form .place-text-action { background: transparent; border: 0; color: var(--place-muted); padding-left: 0; }
.place-form .photo-review-sticky, #form-modal-content > div:last-child, #photo-import-content footer {
    background: white; border-top: 1px solid #f3f4f6; padding: 12px var(--place-space) max(12px, env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none;
}
.place-form .photo-review-sticky span { font-size: 12px; color: var(--place-muted); }
.place-form .photo-review-sticky #photo-review-next { min-width: 88px; flex: none; }
.place-form .photo-confirm-errors, .place-form .photo-execution-error { color: #b91c1c; }
.place-form .photo-confirm-errors { padding: 8px 0; border: 0; border-bottom: 1px solid #fecaca; background: transparent; }
.place-form .photo-confirm-errors button, .place-form #photo-review-issue-count { background: transparent; border: 0; color: #b91c1c; text-align: left; }
.place-form .photo-issue-panel { padding: 12px; border: 1px solid #e5e7eb; border-radius: var(--place-card-radius); background: white; }
.place-form .photo-review-warning { color: #92400e; font-size: 12px; }
.place-form .photo-confirm-summary strong { font-size: 14px; font-weight: 700; }
.place-form .photo-selection-handoff { border-top: 1px solid #e5e7eb; padding-top: 8px; font-size: 12px; }
.place-form .representative-photo-order, .place-form .photo-split-photo.is-selected::after { background: var(--place-accent); color: white; }
.place-form .is-selected :is(.representative-photo-toggle), .place-form .photo-split-photo.is-selected { border-color: var(--place-accent); }
.photo-local-preview { display: grid; position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--place-control-radius, .65rem); background: #f3f4f6; }
.photo-local-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-local-preview > span { place-self: center; font-size: 10px; line-height: 1.5; padding: 4px; text-align: center; color: #6b7280; }
.photo-local-preview [hidden] { display: none !important; }
#image-viewer.is-photo-selection .photo-selection-viewer-panel { background: #fffdf8; color: #26312f; border: 1px solid #e5e7eb; border-radius: var(--radius-panel, 1rem); }
#image-viewer.is-photo-selection .photo-selection-viewer-panel span { color: #6b7280; }
#image-viewer.is-photo-selection .photo-selection-viewer-panel button { background: #2563eb; color: white; border-radius: var(--radius-control, .65rem); font: 700 12px/1.5 'Noto Sans TC', sans-serif; min-height: 44px; }
#photo-import-content #photo-import-bar { background: var(--place-accent); }
#photo-import-content > header > div > p:first-child { display: none; }
@media (min-width: 768px) {
    .place-form, #voice-modal-content, #photo-review-content { --place-title-size: 20px; --place-label-size: 12px; --place-button-size: 14px; --place-space: 24px; --place-compact-size: 12px; --place-compact-padding: 4px 10px; }
    #form-modal-content > div:first-child, .place-form .photo-review-header { padding-top: 16px; padding-bottom: 16px; }
    #form-modal-content input:not([type=hidden]):not([type=file]), .place-form .photo-confirmation input { padding: 12px; }
}
