.sightings-page {
  max-width: 1500px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  color: #17191d;
  background: #fff;
}

.sightings-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 2rem; }
.sightings-eyebrow { margin: 0 0 0.6rem; color: #8f3c1c; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.sightings-intro h1 { max-width: 20ch; font-size: clamp(2rem, 3.5vw, 3.4rem); line-height: 1.12; letter-spacing: -0.035em; }
.sightings-intro-copy p { color: #000; }
.sightings-intro-copy > p:last-child { max-width: 55ch; margin: 1rem 0 0; }
.hoshi-photo { display: block; width: 100%; max-width: 520px; height: auto; justify-self: end; border: 1px solid #dfe2e5; border-radius: 16px; }
.hoshi-timeline { margin-bottom: 1.5rem; padding: 1.3rem; border: 1px solid #e7d9cd; border-radius: 16px; background: #fff; }
.hoshi-timeline-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1rem; }
.hoshi-timeline-heading p { margin: 0.4rem 0 0; color: #666d75; font-size: 0.8rem; }
.hoshi-table-wrap { max-width: 100%; max-height: 550px; overflow: auto; border: 1px solid #e2e5e9; border-radius: 10px; }
.hoshi-table-wrap:focus-visible { outline: 3px solid #166b68; outline-offset: 3px; }
.hoshi-sightings-table { width: 100%; min-width: 1060px; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.hoshi-sightings-table th, .hoshi-sightings-table td { padding: 1rem; border-bottom: 1px solid #e2e5e9; vertical-align: top; }
.hoshi-sightings-table thead th { position: sticky; top: 0; z-index: 1; background: #f7f8fa; color: #47515b; font-size: 0.8rem; font-weight: 750; }
.hoshi-sightings-table thead th:nth-child(1) { width: 8%; }
.hoshi-sightings-table thead th:nth-child(2) { width: 13%; }
.hoshi-sightings-table thead th:nth-child(3) { width: 14%; }
.hoshi-sightings-table thead th:nth-child(4) { width: 20%; }
.hoshi-sightings-table thead th:nth-child(5) { width: 32%; }
.hoshi-sightings-table thead th:nth-child(6) { width: 13%; }
.hoshi-sightings-table tbody tr:last-child > * { border-bottom: 0; }
.hoshi-sightings-table .sighting-location { color: #17191d; font-weight: 700; overflow-wrap: anywhere; }
.hoshi-sightings-table .sighting-details { color: #595e65; white-space: pre-wrap; overflow-wrap: anywhere; }
.hoshi-sightings-table .hoshi-sighting-date { color: #47515b; white-space: nowrap; }
.hoshi-sightings-table .hoshi-sighting-time { color: #8f3c1c; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.hoshi-table-map-actions { display: grid; justify-items: start; gap: 0.5rem; }
.hoshi-table-map-actions button { min-width: 44px; min-height: 44px; font-variant-numeric: tabular-nums; }
.sightings-observer { overflow-wrap: anywhere; }
.hoshi-table-scroll-hint { margin: 0 0 0.75rem; color: #666d75; font-size: 0.8rem; }
.sightings-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr); align-items: start; gap: 1.5rem; }
.sightings-page h2, .sightings-page h3 { margin: 0; font-size: 1.2rem; line-height: 1.35; letter-spacing: -0.02em; }
.sightings-map-panel, .sightings-form-panel { min-width: 0; border: 1px solid #dfe2e5; border-radius: 16px; background: #fff; }
.sightings-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; padding: 1.2rem; }
.sightings-location-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.8rem; }
.sightings-location-actions button { min-width: 0; }
#enter-address { grid-column: 1 / -1; }
.sightings-secondary { min-height: 40px; padding: 0.45rem 0.7rem; border: 1px solid #d4d8dc; border-radius: 8px; background: #fff; color: #353a42; font-size: 0.8rem; font-weight: 650; }
.sightings-secondary:hover { background: #f4f5f6; border-color: #747a83; }
.sightings-pin-primary, .sightings-location-actions [aria-pressed="true"] { border-color: #166b68; background: #166b68; color: #fff; }
.sightings-pin-primary:hover, .sightings-location-actions [aria-pressed="true"]:hover { border-color: #10514e; background: #10514e; }
.sightings-location-actions .sightings-secondary, .sightings-pin-actions .sightings-secondary { min-height: 44px; }
.sightings-pin-actions { gap: 0.5rem; margin: 0.8rem 0; }
.sightings-pin-actions:not([hidden]) { display: flex; flex-wrap: wrap; }
.sightings-map-wrap { position: relative; scroll-margin-top: 1rem; }
.sightings-pin-target { position: absolute; z-index: 1; top: 50%; left: 50%; width: 28px; height: 36px; transform: translate(-14px, -34px); pointer-events: none; }
.sightings-map-wrap.is-placing-pin .leaflet-marker-icon { pointer-events: none; }
.sightings-page button:focus-visible, .sightings-page a:focus-visible, .sightings-page input:focus-visible, .sightings-page textarea:focus-visible { outline: 3px solid #166b68; outline-offset: 3px; }
.sightings-page button:disabled { opacity: 0.6; cursor: wait; }
#sightings-map { z-index: 0; height: 440px; width: 100%; background: #f0f3f4; font-family: inherit; }
.leaflet-bottom .sightings-scale { margin-bottom: 24px; }
.sightings-scale-bar { box-sizing: border-box; padding: 2px; border: 2px solid #353a42; border-top: 0; background: #fffffff0; color: #17191d; font-size: 11px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center; }
#sightings-map.map-unavailable { display: flex; align-items: center; justify-content: center; height: 260px; padding: 2rem; text-align: center; color: #595e65; }
.sightings-map-caption { padding: 0.8rem 1.2rem 1.1rem; font-size: 0.8rem; color: #595e65; }
.sightings-map-caption p { margin: 0 0 0.65rem; }
.sightings-legend { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
.sightings-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sightings-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #a84822; }
.sightings-dot-selected { background: #166b68; }
.sightings-home-swatch { display: inline-block; width: 12px; height: 12px; flex-shrink: 0; border: 1px solid #1d4ed8; border-radius: 2px; background: #3b82f659; }
.leaflet-tooltip.sightings-home-label { padding: 3px 7px; border: 1px solid #1d4ed8; border-radius: 5px; background: #eff6ff; color: #1e3a8a; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px #0002; pointer-events: none; }
.leaflet-tooltip.sightings-home-label::before { display: none; }
.sighting-pin { border: 0; background: transparent; }
.sighting-pin > span, .sightings-pin-target > span { display: block; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #a84822; box-shadow: 0 2px 5px #0005; }
.sighting-pin > span:empty::after, .sightings-pin-target > span::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; top: 7px; left: 7px; background: #fff; }
.sighting-pin-numbered > span { display: grid; place-items: center; width: 100%; height: auto; aspect-ratio: 1; }
.sighting-pin-number { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sighting-pin-selected > span, .sightings-pin-target > span { background: #166b68; }
.sightings-popup { max-width: 250px; overflow-wrap: anywhere; }
.sightings-popup strong { display: block; }
.sightings-popup p { margin: 0.5rem 0; white-space: pre-wrap; }
.sightings-popup time { color: #595e65; font-size: 0.8rem; }
.sightings-popup .sightings-observer { color: #595e65; font-size: 0.8rem; }
#sightings-load-status { margin: 0 0 0.8rem; color: #595e65; font-size: 0.85rem; }
#sightings-load-status:empty { display: none; }
.sightings-form-panel { padding: 1.5rem; }
.sightings-form-intro { margin: 0.6rem 0 1.4rem; color: #595e65; font-size: 0.9rem; }
#sighting-form { display: flex; flex-direction: column; gap: 1rem; }
#sighting-form label, #sighting-form legend { display: block; font-size: 0.85rem; font-weight: 700; }
#sighting-form label > span { font-weight: 400; color: #666d75; }
#sighting-form input, #sighting-form textarea { display: block; width: 100%; min-width: 0; margin-top: 0.4rem; padding: 0.7rem 0.75rem; border: 1px solid #bfc5cc; border-radius: 8px; background: #fff; color: #17191d; font: inherit; font-size: 16px; font-weight: 400; }
#sighting-form input::placeholder, #sighting-form textarea::placeholder { color: #6b727a; opacity: 1; }
#sighting-form textarea { resize: vertical; }
.sightings-location-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.sightings-address-search { position: relative; margin-top: 0.8rem; }
.sightings-address-suggestions { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0.3rem 0 0; padding: 0.3rem; border: 1px solid #bfc5cc; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px #172b2a22; }
.sightings-address-suggestions [role="option"] { min-height: 44px; padding: 0.7rem; border-radius: 5px; color: #17191d; font-size: 0.85rem; line-height: 1.4; overflow-wrap: anywhere; cursor: pointer; }
.sightings-address-suggestions [role="option"] + [role="option"] { border-top: 1px solid #e5e7eb; }
.sightings-address-suggestions [role="option"]:hover, .sightings-address-suggestions [aria-selected="true"] { background: #e7f3f1; color: #164a47; }
.sightings-address-help, .sightings-address-status, .sightings-address-attribution { margin: 0.55rem 0 0; color: #666d75; font-size: 0.75rem; line-height: 1.5; }
.sightings-address-status { color: #295b58; }
.sightings-address-status:empty { display: none; }
.sightings-address-status[data-error="true"] { color: #a32620; }
.sightings-address-attribution a { color: #166b68; text-underline-offset: 2px; }
.sightings-selected-location { margin: 0.8rem 0 0; padding: 0.8rem; border: 1px dashed #a8bebb; border-radius: 8px; background: #f5f9f8; color: #295b58; font-size: 0.85rem; }
.sightings-field-help { margin: -0.65rem 0 0; color: #666d75; font-size: 0.75rem; }
.sightings-sharing-note { margin: 0; color: #666d75; font-size: 0.8rem; }
.sightings-submit { width: 100%; min-height: 48px; padding: 0.7rem 1rem; border: 1px solid #8f3c1c; border-radius: 8px; background: #8f3c1c; color: #fff; font-size: 1rem; font-weight: 750; }
.sightings-submit:hover { background: #713017; }
.sightings-form-status { margin: 0; font-size: 0.9rem; color: #166b68; }
.sightings-form-status:empty { display: none; }
.sightings-form-status[data-error="true"] { color: #a32620; }

.sightings-result-open { overflow: hidden; }
.sightings-result-dialog { width: min(26rem, calc(100% - 2rem)); max-width: calc(100% - 2rem); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.5rem; border: 1px solid #dfe2e5; border-top: 4px solid #166b68; border-radius: 14px; background: #fff; color: #17191d; box-shadow: 0 16px 60px #0004; overflow-y: auto; }
.sightings-result-dialog::backdrop { background: #172b2acc; }
.sightings-result-dialog p { margin: 0.85rem 0 1.25rem; color: #595e65; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.sightings-result-dialog button { width: 100%; min-height: 44px; }
.sightings-result-dialog[data-error="true"] { border-top-color: #a32620; }
.sightings-result-dialog[data-error="true"] h2 { color: #a32620; }

.sightings-image-upload { min-width: 0; }
.sightings-image-help, .sightings-image-status { margin: 0.5rem 0 0; color: #666d75; font-size: 0.75rem; line-height: 1.5; }
.sightings-image-status[data-error="true"] { color: #a32620; }
.sightings-image-status:empty { display: none; }
#sighting-images { font-size: 0.85rem; }
#sighting-images::file-selector-button { margin-right: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid #d4d8dc; border-radius: 6px; background: #f4f5f6; color: #353a42; font: inherit; cursor: pointer; }
.sightings-image-previews { list-style: none; margin: 0.8rem 0 0; padding: 0; gap: 0.7rem; }
.sightings-image-previews:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sightings-image-previews li { min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.sightings-image-previews img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: #f0f3f4; }
.sightings-image-previews span { color: #595e65; font-size: 0.7rem; overflow-wrap: anywhere; }
.sightings-image-previews button { align-self: start; min-height: 44px; margin-top: auto; }
.sightings-image-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.65rem; max-width: 260px; white-space: normal; }
.sightings-image-gallery a { display: block; min-width: 0; }
.sightings-image-gallery img { display: block; width: 100%; height: 80px; object-fit: cover; border: 1px solid #dfe2e5; border-radius: 6px; background: #f0f3f4; }
.sightings-photo-button { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; white-space: nowrap; }
.sightings-photo-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.sightings-no-photos { color: #666d75; font-size: 0.8rem; white-space: nowrap; }
.sightings-photo-open { overflow: hidden; }
.sightings-photo-dialog { width: min(52rem, calc(100% - 2rem)); max-width: calc(100% - 2rem); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 1px solid #dfe2e5; border-radius: 14px; background: #fff; color: #17191d; box-shadow: 0 16px 60px #0004; overflow: hidden; }
.sightings-photo-dialog[open] { display: flex; flex-direction: column; }
.sightings-photo-dialog::backdrop { background: #172b2acc; }
.sightings-photo-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid #dfe2e5; flex-shrink: 0; }
.sightings-photo-heading > div { min-width: 0; }
.sightings-photo-heading p { margin: 0.4rem 0 0; color: #595e65; font-size: 0.85rem; }
.sightings-photo-heading button { min-height: 44px; flex-shrink: 0; }
.sightings-photo-gallery { display: grid; gap: 1.25rem; min-height: 0; padding: 1rem; overflow-y: auto; overscroll-behavior: contain; }
.sightings-photo-gallery figure { min-width: 0; margin: 0; }
.sightings-photo-gallery img { display: block; width: 100%; height: auto; max-height: 65vh; object-fit: contain; border-radius: 8px; background: #f0f3f4; }
.sightings-photo-gallery img[hidden] { display: none; }
.sightings-photo-gallery figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; margin-top: 0.6rem; color: #595e65; font-size: 0.8rem; }
.sightings-photo-gallery a { color: #166b68; text-underline-offset: 2px; }
.sightings-photo-error { margin: 0; padding: 1.5rem; border-radius: 8px; background: #f0f3f4; color: #595e65; font-size: 0.9rem; }

@media (max-width: 900px) {
  .sightings-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .sightings-page { padding: 1.5rem 1rem 2rem; }
  .sightings-intro { grid-template-columns: minmax(0, 1fr); margin-bottom: 1.5rem; }
  .hoshi-photo { justify-self: start; }
  .sightings-intro h1 { font-size: clamp(2rem, 7.5vw, 3rem); }
  .hoshi-sightings-table th, .hoshi-sightings-table td { padding: 0.85rem; }
  .sightings-panel-heading { padding: 1rem; }
  #sightings-map { height: 360px; }
  .sightings-form-panel { padding: 1.2rem; }
}
