:root {
    color-scheme: dark;
    --forest-950: #06110d;
    --forest-900: #081712;
    --forest-850: #0b1f17;
    --forest-800: #10271d;
    --leaf-500: #28d17c;
    --leaf-400: #4be793;
    --lime-300: #b7ef6d;
    --mist-50: #f3f8f4;
    --mist-100: #e4eee7;
    --mist-300: #b1c3b7;
    --mist-500: #7d9587;
    --atmosphere: #87b7c6;
    --danger: #ff8c84;
    --glass: rgba(12, 29, 21, 0.72);
    --glass-strong: rgba(8, 23, 17, 0.91);
    --glass-border: rgba(226, 255, 235, 0.16);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 22px 70px rgba(0, 0, 0, 0.34);
    --shadow-sm: 0 10px 32px rgba(0, 0, 0, 0.24);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background:
        radial-gradient(circle at 72% 28%, rgba(36, 106, 91, 0.28), transparent 32%),
        radial-gradient(circle at 24% 74%, rgba(82, 124, 152, 0.18), transparent 32%),
        var(--forest-950);
    color: var(--mist-50);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.maplibregl-canvas:focus-visible {
    outline: 3px solid var(--lime-300);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    transform: translateY(-160%);
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--mist-50);
    color: var(--forest-950);
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.map-canvas {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 72% 22%, rgba(135, 183, 198, 0.22), transparent 24%),
        radial-gradient(circle at 20% 86%, rgba(40, 209, 124, 0.12), transparent 26%),
        var(--forest-950);
}

.map-canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 12% 21%, white 0 1px, transparent 1.5px),
        radial-gradient(circle at 71% 12%, white 0 0.7px, transparent 1.3px),
        radial-gradient(circle at 89% 69%, white 0 0.8px, transparent 1.4px),
        radial-gradient(circle at 28% 72%, white 0 0.7px, transparent 1.3px);
    background-size: 230px 230px, 310px 310px, 420px 420px, 270px 270px;
    pointer-events: none;
}

.maplibregl-canvas {
    cursor: grab;
}

.maplibregl-canvas:active {
    cursor: grabbing;
}

.map-shade {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(2, 12, 8, 0.42) 0%, transparent 24%, transparent 66%, rgba(2, 12, 8, 0.32) 100%),
        radial-gradient(ellipse at center, transparent 54%, rgba(1, 10, 7, 0.25) 100%);
    pointer-events: none;
}

.glass-panel,
.glass-button {
    border: 1px solid var(--glass-border);
    background: var(--glass);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-sm);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
    backdrop-filter: blur(24px) saturate(135%);
}

.topbar {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: max(22px, env(safe-area-inset-top)) 24px 0;
    pointer-events: none;
}

.brand-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: min(390px, calc(100vw - 112px));
    padding: 15px 54px 15px 15px;
    border-radius: var(--radius-lg);
    pointer-events: auto;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.brand-card:hover,
.brand-card:focus-within {
    border-color: rgba(183, 239, 109, 0.44);
    background: rgba(16, 45, 32, 0.88);
}

.brand-dropdown-toggle {
    position: absolute;
    z-index: 2;
    inset: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--leaf-400);
    cursor: pointer;
}

.brand-dropdown-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 21px;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 220ms var(--ease-out);
}

.brand-dropdown-toggle[aria-expanded="true"]::after {
    transform: translateY(-20%) rotate(225deg);
}

.brand-dropdown-toggle:focus-visible {
    outline: 2px solid var(--lime-300);
    outline-offset: 3px;
}

.brand-mark {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(183, 239, 109, 0.38);
    border-radius: 16px 16px 16px 6px;
    background: linear-gradient(145deg, var(--leaf-400), #17a965);
    box-shadow: 0 8px 24px rgba(40, 209, 124, 0.24);
    color: #062215;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.brand-copy {
    min-width: 0;
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-card h1 {
    margin: 0;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 780;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.source-badge {
    border: 1px solid rgba(183, 239, 109, 0.3);
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(183, 239, 109, 0.12);
    color: var(--lime-300);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0 0;
    color: var(--mist-300);
    font-size: 13px;
    font-weight: 600;
}

.top-actions {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.action-button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 18px;
    padding: 0 17px;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.action-button:hover {
    border-color: rgba(183, 239, 109, 0.44);
    background: rgba(16, 45, 32, 0.88);
    transform: translateY(-1px);
}

.action-label {
    font-size: 13px;
    font-weight: 700;
}

.share-symbol {
    color: var(--leaf-400);
    font-size: 23px;
    font-weight: 500;
    line-height: 1;
}

.sightings-panel {
    position: fixed;
    z-index: 30;
    top: 104px;
    left: 24px;
    display: flex;
    width: min(430px, calc(100vw - 48px));
    height: min(68vh, 680px);
    max-height: calc(100vh - 128px);
    flex-direction: column;
    border-radius: var(--radius-xl);
    padding: 24px;
    background: var(--glass-strong);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top left;
    transition: transform 280ms var(--ease-out), opacity 200ms ease;
}

body.panel-open .sightings-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--leaf-400);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.panel-heading h2,
.map-error h2,
.share-error h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.03em;
}

.icon-button {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--mist-300);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.11);
    color: white;
}

.search-field {
    position: relative;
    display: block;
    margin-top: 22px;
}

.search-field input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(228, 238, 231, 0.14);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--mist-50);
    padding: 0 14px 0 43px;
    outline: none;
    transition: border-color 180ms ease, background 180ms ease;
}

.search-field input::placeholder {
    color: var(--mist-500);
}

.search-field input:focus {
    border-color: rgba(75, 231, 147, 0.6);
    background: rgba(0, 0, 0, 0.27);
}

.search-symbol {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 13px;
    height: 13px;
    border: 2px solid var(--mist-500);
    border-radius: 50%;
    transform: translateY(-60%);
    pointer-events: none;
}

.search-symbol::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--mist-500);
    transform: rotate(45deg);
}

.panel-summary {
    margin: 14px 2px 8px;
    color: var(--mist-500);
    font-size: 12px;
}

.sightings-list {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0 -8px;
    padding: 2px 8px 18px;
    scrollbar-color: rgba(75, 231, 147, 0.42) transparent;
    scrollbar-width: thin;
}

.sighting-list-item {
    display: grid;
    width: 100%;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 17px;
    padding: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sighting-list-item + .sighting-list-item {
    margin-top: 4px;
}

.sighting-list-item:hover,
.sighting-list-item.is-selected {
    border-color: rgba(75, 231, 147, 0.16);
    background: rgba(75, 231, 147, 0.08);
}

.sighting-list-item:hover {
    transform: translateX(2px);
}

.list-photo,
.list-photo-fallback {
    width: 54px;
    height: 54px;
    grid-column: 1;
    grid-row: 1;
    border: 2px solid rgba(75, 231, 147, 0.4);
    border-radius: 16px;
}

.list-photo {
    position: relative;
    z-index: 1;
    object-fit: cover;
    background: var(--forest-800);
}

.list-photo-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #1c5b40, #113525);
    color: var(--lime-300);
    font-size: 18px;
    font-weight: 850;
}

.list-bird-copy {
    min-width: 0;
}

.list-bird-copy strong,
.list-bird-copy em,
.list-bird-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-bird-copy strong {
    color: var(--mist-50);
    font-size: 14px;
    font-weight: 730;
}

.list-bird-copy em {
    margin-top: 2px;
    color: var(--mist-300);
    font-size: 11px;
}

.list-bird-copy small {
    margin-top: 5px;
    color: var(--mist-500);
    font-size: 10px;
}

.list-chevron {
    color: var(--leaf-400);
    font-size: 19px;
}

.empty-state {
    flex: 1;
    align-content: center;
    padding: 36px 22px;
    text-align: center;
}

.empty-orbit {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    margin: 0 auto 18px;
    border: 1px solid rgba(75, 231, 147, 0.32);
    border-radius: 50%;
    box-shadow: inset 0 0 24px rgba(40, 209, 124, 0.12);
}

.empty-orbit::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--leaf-400);
    box-shadow: 0 0 14px var(--leaf-400);
    transform: translate(31px, -8px);
}

.empty-orbit span {
    font-size: 40px;
}

.empty-state h3 {
    margin: 0;
    font-size: 18px;
}

.empty-state p {
    max-width: 270px;
    margin: 8px auto 0;
    color: var(--mist-500);
    font-size: 13px;
    line-height: 1.55;
}

.map-controls {
    position: fixed;
    z-index: 15;
    top: 50%;
    right: 24px;
    display: grid;
    overflow: hidden;
    width: 46px;
    border-radius: 16px;
    transform: translateY(-50%);
}

.map-controls button {
    width: 46px;
    height: 43px;
    border: 0;
    border-bottom: 1px solid var(--glass-border);
    background: transparent;
    color: var(--mist-100);
    cursor: pointer;
    font-size: 22px;
    font-weight: 500;
    transition: background 160ms ease, color 160ms ease;
}

.map-controls button:last-child {
    border-bottom: 0;
}

.map-controls button:hover {
    background: rgba(75, 231, 147, 0.13);
    color: var(--leaf-400);
}

.map-controls .reset-button {
    font-size: 20px;
}

.bird-card {
    position: fixed;
    z-index: 18;
    right: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    display: grid;
    width: min(720px, calc(100vw - 150px));
    min-height: 126px;
    grid-template-columns: 34px 92px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 18px;
    border-radius: 28px;
    padding: 16px 17px;
    background: rgba(238, 247, 241, 0.9);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    color: var(--forest-950);
    opacity: 0;
    transform: translate(50%, 20px);
    transition: opacity 300ms ease, transform 420ms var(--ease-out), right 360ms var(--ease-out);
}

.bird-card.is-visible {
    opacity: 1;
    transform: translate(50%, 0);
}

.bird-photo-wrap {
    position: relative;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
}

.bird-photo,
.photo-fallback {
    width: 92px;
    height: 92px;
    border: 3px solid rgba(40, 209, 124, 0.72);
    border-radius: 22px;
}

.bird-photo {
    position: relative;
    z-index: 1;
    object-fit: cover;
    background: #dce9df;
}

.bird-photo:not([src]),
.bird-photo[src=""] {
    visibility: hidden;
}

.photo-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #216c4a, #0f3b28);
    color: var(--lime-300);
    font-size: 29px;
    font-weight: 900;
}

.bird-details {
    min-width: 0;
}

.bird-details .eyebrow {
    color: #168552;
}

.bird-details h2 {
    overflow: hidden;
    margin: 0;
    color: #07140e;
    font-size: clamp(19px, 2.2vw, 26px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.14;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scientific-name {
    overflow: hidden;
    margin: 4px 0 0;
    color: #5a7063;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-style: italic;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coordinate {
    margin: 8px 0 0;
    color: #61766a;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.025em;
}

.card-nav {
    display: grid;
    width: 34px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: rgba(10, 64, 41, 0.08);
    color: #176841;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 31px;
    line-height: 1;
    transition: background 160ms ease, transform 160ms ease;
}

.card-nav:hover {
    background: rgba(10, 64, 41, 0.15);
    transform: scale(1.04);
}

.card-nav:disabled {
    visibility: hidden;
    pointer-events: none;
}

.map-hint {
    position: fixed;
    z-index: 10;
    left: 24px;
    bottom: 24px;
    margin: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--mist-300);
    font-size: 10px;
    font-weight: 650;
    pointer-events: none;
    transition: opacity 400ms ease;
}

.map-hint.is-hidden {
    opacity: 0;
}

.map-credit {
    position: fixed;
    z-index: 9;
    right: 24px;
    bottom: 8px;
    margin: 0;
    color: rgba(228, 238, 231, 0.65);
    font-size: 8px;
    pointer-events: auto;
}

.map-credit a {
    color: inherit;
}

.bird-marker {
    position: relative;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 4px solid var(--leaf-400);
    border-radius: 50%;
    padding: 0;
    background: linear-gradient(145deg, #1e6948, #0c3321);
    box-shadow:
        0 0 0 4px rgba(12, 38, 27, 0.7),
        0 8px 24px rgba(0, 0, 0, 0.44),
        0 0 24px rgba(40, 209, 124, 0.26);
    color: var(--lime-300);
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
    transform-origin: 50% 100%;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.bird-marker::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -8px;
    left: 50%;
    width: 15px;
    height: 15px;
    border-right: 4px solid var(--leaf-400);
    border-bottom: 4px solid var(--leaf-400);
    border-radius: 0 0 4px;
    background: #113f2c;
    transform: translateX(-50%) rotate(45deg);
}

.bird-marker:hover,
.bird-marker.is-selected,
.bird-marker:focus-visible {
    z-index: 4;
    border-color: var(--lime-300);
    box-shadow:
        0 0 0 5px rgba(183, 239, 109, 0.2),
        0 12px 28px rgba(0, 0, 0, 0.48),
        0 0 30px rgba(183, 239, 109, 0.38);
    transform: translateY(-4px) scale(1.08);
}

.bird-marker:hover::after,
.bird-marker.is-selected::after,
.bird-marker:focus-visible::after {
    border-color: var(--lime-300);
}

.bird-marker img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
}

.loading-state {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 16px;
    background:
        radial-gradient(circle at center, rgba(33, 91, 66, 0.44), transparent 24%),
        var(--forest-950);
    color: var(--mist-300);
    font-size: 13px;
    font-weight: 650;
    transition: opacity 500ms ease, visibility 500ms ease;
}

.loading-state.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.loading-mark {
    position: relative;
    width: 74px;
    height: 74px;
    border: 1px solid rgba(75, 231, 147, 0.2);
    border-radius: 50%;
    box-shadow: inset 0 0 26px rgba(40, 209, 124, 0.11);
    animation: loading-orbit 2.8s linear infinite;
}

.loading-mark::before,
.loading-mark::after,
.loading-mark span {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.loading-mark::before {
    inset: 14px;
    border: 1px solid rgba(135, 183, 198, 0.32);
}

.loading-mark::after {
    top: 7px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--leaf-400);
    box-shadow: 0 0 18px var(--leaf-400);
}

.loading-mark span {
    inset: 25px;
    background: linear-gradient(145deg, var(--leaf-400), #16764a);
}

@keyframes loading-orbit {
    to { transform: rotate(1turn); }
}

.map-error,
.share-error {
    position: fixed;
    z-index: 19;
    top: 50%;
    left: 50%;
    width: min(410px, calc(100vw - 32px));
    border-radius: 24px;
    padding: 26px;
    text-align: center;
    transform: translate(-50%, -50%);
}

.map-error p:last-child,
.share-error p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--mist-300);
    font-size: 13px;
    line-height: 1.55;
}

.share-error a {
    display: inline-flex;
    margin-top: 18px;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--leaf-500);
    color: #062215;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.share-error a:hover {
    background: var(--lime-300);
}

.toast {
    position: fixed;
    z-index: 80;
    top: max(22px, env(safe-area-inset-top));
    left: 50%;
    max-width: min(430px, calc(100vw - 32px));
    border: 1px solid rgba(228, 238, 231, 0.2);
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(6, 17, 13, 0.92);
    box-shadow: var(--shadow-lg);
    color: var(--mist-100);
    font-size: 12px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity 200ms ease, transform 260ms var(--ease-out);
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.panel-scrim {
    position: fixed;
    z-index: 19;
    inset: 0;
    background: rgba(1, 8, 5, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
}

.noscript-message {
    position: fixed;
    z-index: 100;
    inset: 20px;
    display: grid;
    place-content: center;
    border-radius: 24px;
    background: var(--forest-900);
    color: var(--mist-50);
    text-align: center;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        gap: 8px;
        padding: max(12px, env(safe-area-inset-top)) 12px 0;
    }

    .brand-card {
        min-width: 0;
        flex: 1;
        gap: 10px;
        padding: 11px 46px 11px 12px;
        border-radius: 19px;
    }

    .brand-dropdown-toggle::after {
        right: 18px;
    }

    .brand-mark {
        flex-basis: 41px;
        width: 41px;
        height: 41px;
        border-radius: 14px 14px 14px 5px;
        font-size: 20px;
    }

    .brand-card h1 {
        font-size: 21px;
    }

    .map-stats {
        gap: 5px;
        margin-top: 5px;
        font-size: 11px;
    }

    .source-badge {
        padding: 2px 5px;
        font-size: 8px;
    }

    .top-actions {
        gap: 7px;
    }

    .action-button {
        width: 48px;
        min-height: 48px;
        border-radius: 16px;
        padding: 0;
    }

    .action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .sightings-panel {
        top: calc(max(12px, env(safe-area-inset-top)) + 72px);
        right: 12px;
        left: 12px;
        width: auto;
        height: min(68vh, 560px);
        max-height: calc(100vh - 104px);
        max-height: calc(100dvh - max(96px, calc(env(safe-area-inset-top) + 84px)));
        border-radius: 24px;
        padding: 20px 18px;
        transform: translateY(-9px) scale(0.98);
    }

    body.panel-open .sightings-panel {
        transform: translateY(0) scale(1);
    }

    body.panel-open .panel-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .search-field {
        margin-top: 16px;
    }

    .map-controls {
        top: auto;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: 43px;
        border-radius: 15px;
        transform: none;
        transition: bottom 320ms var(--ease-out);
    }

    body.bird-card-open .map-controls {
        bottom: 174px;
    }

    .map-controls button {
        width: 43px;
        height: 40px;
    }

    .bird-card {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 12px;
        width: auto;
        min-height: 136px;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 13px;
        border-radius: 24px;
        padding: 15px;
        transform: translateY(20px);
    }

    .bird-card.is-visible {
        transform: translateY(0);
    }

    .bird-photo-wrap,
    .bird-photo,
    .photo-fallback {
        width: 76px;
        height: 76px;
    }

    .bird-photo,
    .photo-fallback {
        border-radius: 19px;
    }

    .bird-details .eyebrow {
        margin-bottom: 4px;
        font-size: 8px;
    }

    .bird-details h2 {
        font-size: 18px;
    }

    .scientific-name {
        font-size: 12px;
    }

    .coordinate {
        margin-top: 7px;
        font-size: 9px;
    }

    .card-nav {
        position: absolute;
        bottom: 8px;
        width: 31px;
        height: 30px;
        font-size: 25px;
    }

    .card-nav.previous {
        right: 46px;
    }

    .card-nav.next {
        right: 10px;
    }

    .map-hint {
        display: none;
    }

    .map-credit {
        top: max(82px, calc(env(safe-area-inset-top) + 70px));
        right: 12px;
        bottom: auto;
        max-width: calc(100vw - 24px);
        font-size: 7px;
        text-align: right;
    }

    .map-credit span:not(:last-of-type) {
        display: none;
    }

    .bird-marker {
        width: 54px;
        height: 54px;
        border-width: 3px;
        box-shadow:
            0 0 0 3px rgba(12, 38, 27, 0.72),
            0 8px 22px rgba(0, 0, 0, 0.42),
            0 0 18px rgba(40, 209, 124, 0.22);
        font-size: 17px;
    }

    .bird-marker::after {
        bottom: -7px;
        width: 13px;
        height: 13px;
        border-right-width: 3px;
        border-bottom-width: 3px;
    }

    .toast {
        top: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    body.bird-card-open .toast {
        bottom: calc(max(12px, env(safe-area-inset-bottom)) + 148px);
    }
}

@media (max-width: 390px) {
    .brand-mark {
        display: none;
    }

    .brand-card {
        padding-left: 14px;
    }

    .map-stats {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass-panel,
    .glass-button {
        background: rgba(8, 23, 17, 0.95);
    }

    .bird-card {
        background: rgba(238, 247, 241, 0.98);
    }
}
