:root {
    --ui-asphalt: #061118;
    --ui-panel: rgba(10, 23, 31, 0.92);
    --ui-panel-strong: rgba(7, 18, 24, 0.96);
    --ui-glass: rgba(16, 41, 53, 0.76);
    --ui-ink: #f4f7f1;
    --ui-muted: #9fc5c1;
    --ui-line: rgba(201, 255, 241, 0.24);
    --ui-signal: #ffcf40;
    --ui-alert: #ff7b54;
    --ui-accent: #8ef7de;
    --ui-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
    --ui-font: 'Bahnschrift SemiCondensed', 'Arial Narrow', 'Segoe UI', sans-serif;
    --ui-mono: 'Consolas', 'Lucida Console', monospace;
}

html {
    font-family: var(--ui-font);
    font-size: 15px;
    color: var(--ui-ink);
    background: #02070a;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(31, 83, 91, 0.24), transparent 36%),
        linear-gradient(180deg, #081219 0%, #04090d 100%);
    color: var(--ui-ink);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 38px 38px;
    opacity: 0.45;
}

body::after {
    background: linear-gradient(135deg, rgba(255, 207, 64, 0.08), transparent 34%, transparent 66%, rgba(142, 247, 222, 0.06));
}

img {
    max-width: 100%;
    max-height: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

#panorama,
#window-searching {
    background-color: #0a0e32;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    height: 100%;
    width: 100%;
}

#panorama::before,
#window-searching::before,
#window-searching::after {
    pointer-events: none;
}

#panorama::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.26));
    z-index: 1;
}

#panorama.is-mapsSafetyBlocked {
    background:
        radial-gradient(circle at top, rgba(255, 123, 84, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(8, 16, 20, 0.98), rgba(4, 8, 12, 0.98));
}

#overlay-mapsSafety {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(4, 10, 14, 0.78), rgba(4, 10, 14, 0.9)),
        radial-gradient(circle at center, rgba(255, 123, 84, 0.14), transparent 52%);
}

.mapsSafety-panel {
    width: min(560px, calc(100% - 24px));
    padding: 24px 28px;
    border: 1px solid rgba(255, 123, 84, 0.42);
    border-radius: 24px;
    background: rgba(7, 18, 24, 0.95);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
    text-align: center;
}

.mapsSafety-kicker {
    color: var(--ui-alert);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

#mapsSafety-title {
    margin-top: 10px;
    color: var(--ui-ink);
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#mapsSafety-message {
    margin-top: 14px;
    color: var(--ui-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.mapsSafety-supportCopy {
    margin-top: 18px;
    text-align: left;
}

.mapsSafety-supportCopy p {
    margin: 0;
    color: var(--ui-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.mapsSafety-supportCopy p + p {
    margin-top: 12px;
}

.mapsSafety-actionRow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
}

.mapsSafety-cta {
    min-width: 170px;
    min-height: 54px;
    padding: 0 20px;
    border-radius: 18px;
    border: 1px solid rgba(201, 255, 241, 0.2);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.mapsSafety-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.26);
    filter: brightness(1.04);
}

.mapsSafety-cta-primary {
    background: linear-gradient(180deg, rgba(255, 207, 64, 0.94), rgba(215, 156, 36, 0.96));
    color: #071015;
}

.mapsSafety-cta-secondary {
    background: linear-gradient(180deg, rgba(142, 247, 222, 0.18), rgba(80, 192, 171, 0.14));
    color: var(--ui-accent);
}

.mapsSafety-miniNote {
    margin-top: 14px;
    color: rgba(159, 197, 193, 0.78);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.button,
.action-button,
.capture-button,
.binocular-button {
    appearance: none;
    cursor: pointer;
}

.button {
    width: 64px;
    height: 64px;
    border: 1px solid rgba(164, 127, 28, 0.62);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(13, 34, 43, 0.98), rgba(7, 18, 24, 0.98));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.action-button:hover,
.capture-button:hover,
.binocular-button:hover,
input.button[type='image']:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 207, 64, 0.7);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 207, 64, 0.24);
}

input.button[type='image'] {
    padding: 8px;
}

#button-pinConsole,
#button-pinMap,
#button-pinButtons {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: 14px;
    border: 1px solid rgba(164, 127, 28, 0.62);
    background: linear-gradient(180deg, rgba(255, 232, 140, 0.98), rgba(216, 183, 73, 0.98));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 248, 215, 0.28);
    filter: none;
    z-index: 12;
}

.action-button,
.capture-button,
.binocular-button,
#button-marbleGallery {
    position: absolute;
    border: 1px solid rgba(201, 255, 241, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: var(--ui-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: visible;
}

.action-button,
.capture-button,
.binocular-button {
    width: 68px;
    height: 68px;
    background-size: 54%;
}

#button-newLocation {
    background-image: url('../img/icon-searchConsistent.svg');
}

#button-useBinoculars {
    background-image: url('../img/icon-binocularsConsistent.svg');
}

#button-birdCall {
    background-image: url('../img/icon-birdcall.png');
}

#button-offerFood {
    background-image: url('../img/icon-feedConsistent.svg');
}


#button-birdCall,
#button-openScreenCapture,
#button-logout2,
#button-useFlashlight,
#button-newLocation,
#button-useBinoculars,
#button-offerFood,
#button-birdGallery,
#button-marbleGallery {
    background-size: 58%;
}

#button-useFlashlight {
    background-image: url('../img/icon-flashlight.png');
}

#button-birdCall,
#button-openScreenCapture,
#button-logout2,
#button-useFlashlight {
    background-size: 58%;
    background: linear-gradient(180deg, rgba(255, 232, 140, 0.98), rgba(216, 183, 73, 0.98));
    border-color: rgba(164, 127, 28, 0.62);
}

#button-useFlashlight.is-available {
    border-color: rgba(255, 207, 64, 0.82);
    box-shadow: 0 0 0 2px rgba(255, 207, 64, 0.16), 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 248, 215, 0.28);
}

#button-useFlashlight.is-active {
    background-image: url('../img/icon-flashlight.png');
    background: linear-gradient(180deg, rgba(181, 194, 103, 0.98), rgba(112, 124, 56, 0.98));
    border-color: rgba(119, 132, 58, 0.92);
    box-shadow: 0 0 0 2px rgba(143, 157, 74, 0.18), 0 16px 32px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(229, 233, 198, 0.26);
}

#button-logout2 {
    background-image: url('../img/icon-logout.png');
}

#button-birdCall::after,
#button-openScreenCapture::after,
#button-logout2::after,
#button-useFlashlight::after {
    position: absolute;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(3, 10, 14, 0.9);
    border: 1px solid rgba(255, 207, 64, 0.18);
    color: var(--ui-signal);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

#button-birdCall::after {
    content: 'Call';
}

#button-openScreenCapture::after {
    content: 'Cam';
}

#button-logout2::after {
    content: 'Exit';
}

#button-useFlashlight::after {
    content: 'Light';
}

#button-birdGallery {
    background-image: url('../img/icon-galleryConsistent.svg');
}

#button-openScreenCapture {
    background-image: url('../img/icon-captureScreenshot.png');
}

#button-marbleGallery {
    width: 68px;
    height: 68px;
    padding: 0;
    overflow: hidden;
}

#button-marbleGallery::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.12) 18%, transparent 20%),
        radial-gradient(circle at 55% 60%, #57a9ff, #173653 72%);
    box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.22);
}

#overlay-hudSearching,
#overlay-hudMapsFrame,
#overlay-hudButtonsFrame,
#overlay-hudConsole,
#overlay-birdGallery,
.marblePanel,
.marbleScratchPanel {
    backdrop-filter: blur(12px);
}

#overlay-hudMapsFrame,
#overlay-hudButtonsFrame {
    width: 272px;
    height: 580px;
    position: absolute;
    top: 18px;
    z-index: 6;
    display: block;
    border: 1px solid rgba(201, 255, 241, 0.22);
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(12, 30, 39, 0.97), rgba(7, 17, 22, 0.97)),
        linear-gradient(135deg, rgba(255, 207, 64, 0.08), transparent 40%);
    box-shadow: var(--ui-shadow);
}

#overlay-hudMapsFrame::before,
#overlay-hudButtonsFrame::before,
#overlay-hudConsole::before,
#overlay-birdGallery::before,
.marblePanel::before,
.marbleScratchPanel::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: inherit;
    pointer-events: none;
}

#overlay-hudMapsFrame::after,
#overlay-hudButtonsFrame::after,
#overlay-hudConsole::after {
    position: absolute;
    top: 18px;
    left: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 207, 64, 0.92);
    color: #8f9d4a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    z-index: 9;
}

#overlay-hudMapsFrame {
    left: -253px;
}

#overlay-hudMapsFrame:hover {
    transition: left 0.5s !important;
    left: 0 !important;
}

#overlay-hudMapsFrame:not(:hover) {
    transition: left 0.5s;
    left: -253px;
}

#overlay-hudMapsFrame::after {
    display: none;
    content: '';
}

#overlay-hudButtonsFrame {
    right: -253px;
}

#overlay-hudButtonsFrame:hover {
    transition: right 0.5s !important;
    right: 0 !important;
}

#overlay-hudButtonsFrame:not(:hover) {
    transition: right 0.5s;
    right: -253px;
}

#overlay-hudButtonsFrame::after {
    content: 'TOOLS';
}

#overlay-hudMapsFrame > img:first-child,
#overlay-hudButtonsFrame > img:first-child,
#overlay-hudConsole > img:first-child,
#overlay-hudSearching > img:first-child,
#hud-birdGallery {
    display: none;
}

#mapLabel,
#terrainMapLabel {
    position: absolute;
    left: 18px;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(3, 10, 14, 0.82);
    border: 1px solid rgba(201, 255, 241, 0.16);
    color: var(--ui-signal);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 4;
}

#mapLabel {
    top: 66px;
}

#terrainMapLabel {
    top: 306px;
}

#map,
#terrainMap {
    position: absolute;
    left: 18px;
    width: 216px;
    height: 214px;
    z-index: 3;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.28);
}

#map {
    top: 102px;
}

#terrainMap {
    top: 342px;
}

#window-actionButtonsLeft,
#window-actionButtonsRight {
    position: absolute;
    top: 82px;
    width: 92px;
    height: 394px;
}

#window-actionButtonsLeft {
    left: 24px;
}

#window-actionButtonsRight {
    left: 144px;
}

#button-newLocation,
#button-useBinoculars,
#button-birdCall,
#button-offerFood,
#button-useFlashlight,
#button-birdGallery,
#button-marbleGallery,
#button-openScreenCapture,
#button-logout2 {
    left: 0;
    z-index: 5;
}

#button-newLocation,
#button-birdGallery {
    top: 0;
}

#button-useBinoculars,
#button-marbleGallery {
    top: 78px;
}

#button-birdCall,
#button-openScreenCapture {
    top: 156px;
}

#button-offerFood {
    top: 234px;
}

#button-useFlashlight,
#button-logout2 {
    top: 312px;
}

#window-statusLightsBirdCall,
#window-statusLightsOfferFood {
    position: absolute;
    left: 78px;
    height: 54px;
    width: 16px;
}

#window-statusLightsBirdCall {
    top: 164px;
}

#window-statusLightsOfferFood {
    top: 242px;
}

#birdCall1,
#birdCall2,
#birdCall3,
#offerFood1,
#offerFood2,
#offerFood3 {
    position: absolute;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

#birdCall1,
#offerFood1 {
    top: 0;
}

#birdCall2,
#offerFood2 {
    top: 19px;
}

#birdCall3,
#offerFood3 {
    top: 38px;
}

#birdCall1 img,
#birdCall2 img,
#birdCall3 img,
#offerFood1 img,
#offerFood2 img,
#offerFood3 img {
    width: 100%;
    height: 100%;
    filter: hue-rotate(28deg) saturate(0.55) brightness(0.84);
}

.switch {
    position: absolute;
    display: block;
    width: 48px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(201, 255, 241, 0.18);
    transition: 0.3s ease;
}

.slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #f4f7f1;
    transition: 0.3s ease;
}

input:checked + .slider {
    background: rgba(255, 207, 64, 0.82);
}

input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(255, 207, 64, 0.2);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background: #061118;
}

.slider.round {
    border-radius: 999px;
}

.slider.round:before {
    border-radius: 50%;
}

#toggle-weather {
    left: 104px;
    bottom: 84px;
}

#toggle-mute {
    left: 104px;
    bottom: 34px;
}

#icon-weatherOff,
#icon-weatherOn,
#icon-audioOff,
#icon-audioOn,
#icon-overgrowthOff,
#icon-overgrowthOn {
    left: 164px;
    bottom: 34px;
    width: 28px;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 10, 14, 0.78);
    border: 1px solid rgba(201, 255, 241, 0.16);
}

#icon-weatherOff {
    left: 70px;
    bottom: 84px;
}

#icon-weatherOn {
    left: 158px;
    bottom: 84px;
}

#icon-audioOff {
    left: 70px;
    bottom: 34px;
}

#icon-audioOn {
    left: 158px;
    bottom: 34px;
}

#toggle-overgrowth {
    left: 104px;
    bottom: 12px;
}

#icon-overgrowthOff {
    left: 70px;
    bottom: 12px;
}

#icon-overgrowthOn {
    left: 152px;
    bottom: 12px;
}

#overlay-hudConsole {
    width: min(1060px, calc(100% - 32px));
    height: 248px;
    position: absolute;
    bottom: -229px;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: 4;
    opacity: 1;
    display: block;
    border: 1px solid rgba(201, 255, 241, 0.22);
    border-radius: 28px 28px 0 0;
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    overflow: hidden;
}

#overlay-hudConsole:hover {
    transition: bottom 0.5s !important;
    bottom: 0 !important;
}

#overlay-hudConsole:not(:hover) {
    transition: bottom 0.5s;
    bottom: -229px;
}

#overlay-hudConsole::after {
    content: '';
    display: none;
}

#console {
    position: absolute;
    left: 18px;
    top: 42px;
    height: 188px;
    width: calc(100% - 36px);
    padding: 8px 18px 52px;
    box-sizing: border-box;
    text-align: left;
    font-size: 1rem;
    line-height: 16px;
    display: block;
    z-index: 5;
    background: transparent;
}

#table-birdDetails,
#table-marbleDetails {
    border-collapse: separate;
    border-spacing: 0 8px;
}

#consoleReadouts {
    position: relative;
    z-index: 2;
    width: min(940px, calc(100% - 20px));
}

.consoleMetricRow,
.consoleMetaRow {
    display: grid;
    gap: 10px;
}

.consoleMetricRow {
    grid-template-columns: minmax(96px, 0.9fr) minmax(96px, 0.9fr) minmax(88px, 0.8fr) minmax(220px, 2.6fr) minmax(88px, 0.8fr) minmax(88px, 0.8fr) 92px;
    margin-bottom: 10px;
    align-items: stretch;
}

.consoleMetaRow {
    display: none;
}

.consoleMetric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(6, 14, 19, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.consoleMetricLabel,
#table-birdDetails td:first-child,
#table-marbleDetails td:first-child {
    color: var(--ui-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.76rem;
}

.consoleMetricValue {
    color: var(--ui-ink);
    font-family: var(--ui-mono);
    font-size: 0.84rem;
    line-height: 1.35;
    word-break: break-word;
}

.consoleMetric-address {
    min-width: 0;
}

.consoleMetric-address .consoleMetricValue {
    font-family: var(--ui-font);
    letter-spacing: 0.02em;
}

.consoleMetric-alt {
    min-width: 0;
}

.compass1 {
    position: relative;
    top: auto;
    left: auto;
    width: 78px;
    height: 78px;
    z-index: 5;
    justify-self: end;
    align-self: stretch;
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 0 17px, rgba(201, 255, 241, 0.16) 17px 18px, transparent 18px 27px, rgba(201, 255, 241, 0.16) 27px 28px, transparent 28px),
        rgba(3, 10, 14, 0.9);
    border: 1px solid rgba(201, 255, 241, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.compass1::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(201, 255, 241, 0.12);
    pointer-events: none;
}

.compassDial1 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center center;
    filter: hue-rotate(24deg) saturate(0.52) brightness(0.82);
}

#table-birdDetails td,
#table-marbleDetails td {
    padding: 11px 14px;
    background: rgba(6, 14, 19, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#distanceDisplay-1,
#distanceDisplay-2,
#distanceDisplay-3,
#distanceDisplay-4,
#distanceDisplay-5,
#distanceDisplay-6,
#distanceDisplay-7,
#distanceDisplay-8,
#distanceDisplay-9,
#distanceDisplay-10 {
    position: absolute;
    bottom: 0;
    width: 8.3%;
    padding: 8px 10px;
    background: rgba(3, 10, 14, 0.88);
    border: 1px solid rgba(201, 255, 241, 0.14);
    border-radius: 14px 14px 0 0;
    text-align: center;
    color: var(--ui-accent);
    font-family: var(--ui-mono);
    font-size: 0.78rem;
    line-height: 1.3;
    white-space: normal;
}

#distanceDisplay-1 {
    left: 0;
}

#distanceDisplay-2 {
    left: 10%;
}

#distanceDisplay-3 {
    left: 20%;
}

#distanceDisplay-4 {
    left: 30%;
}

#distanceDisplay-5 {
    left: 40%;
}

#distanceDisplay-6 {
    left: 50%;
}

#distanceDisplay-7 {
    left: 60%;
}

#distanceDisplay-8 {
    left: 70%;
}

#distanceDisplay-9 {
    left: 80%;
}

#distanceDisplay-10 {
    left: 90%;
}

#overlay-hudSearching {
    width: min(560px, calc(100% - 32px));
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: 7;
    display: block;
    padding: 16px 20px 16px 68px;
    border: 1px solid rgba(201, 255, 241, 0.18);
    border-radius: 999px;
    background: rgba(8, 20, 26, 0.9);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.searching-signal {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
}

.searching-signalMark {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 207, 64, 0.9);
    border-radius: 50%;
    animation: signalPulse 2s ease-out infinite;
}

.searching-signalMark-alt {
    animation-delay: 1s;
}

#window-searchingCoordinates {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    text-align: left;
    z-index: 5;
    color: var(--ui-ink);
    font-family: var(--ui-mono);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.4;
    display: block;
}

#window-searchingCoordinates:empty::before {
    content: 'SCAN';
    color: var(--ui-signal);
}

#window-searching {
    display: none;
    background:
        radial-gradient(circle at center, rgba(255, 207, 64, 0.08), transparent 18%),
        linear-gradient(180deg, rgba(6, 20, 25, 0.96), rgba(4, 10, 14, 0.98));
}

#window-searching img {
    display: none;
}

#window-searching::before,
#window-searching::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(52vw, 420px);
    height: min(52vw, 420px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

#window-searching::before {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle, transparent 0 18%, rgba(255, 255, 255, 0.06) 18.4%, transparent 19%),
        radial-gradient(circle, transparent 0 38%, rgba(255, 255, 255, 0.06) 38.4%, transparent 39%),
        radial-gradient(circle, transparent 0 58%, rgba(255, 255, 255, 0.06) 58.4%, transparent 59%),
        radial-gradient(circle, transparent 0 78%, rgba(255, 255, 255, 0.06) 78.4%, transparent 79%),
        linear-gradient(90deg, transparent 49.6%, rgba(255, 255, 255, 0.08) 49.8%, rgba(255, 255, 255, 0.08) 50.2%, transparent 50.4%),
        linear-gradient(transparent 49.6%, rgba(255, 255, 255, 0.08) 49.8%, rgba(255, 255, 255, 0.08) 50.2%, transparent 50.4%);
    box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.015), 0 0 70px rgba(0, 0, 0, 0.24);
}

#window-searching::after {
    background: conic-gradient(from 0deg, rgba(255, 207, 64, 0.88), rgba(255, 207, 64, 0) 56deg, transparent 360deg);
    mix-blend-mode: screen;
    animation: radarSweep 3s linear infinite;
}

#overlay-binoculars {
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-image: url('../img/headset0h.png');
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    filter: hue-rotate(24deg) saturate(0.52) brightness(0.82);
    opacity: 1;
    display: none;
}

#window-binocularButtons {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    z-index: 9;
    display: none;
    gap: 8px;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

#button-hideBinoculars {
    background-image: url('../img/icon-binoculars_hide.png');
    display: none;
}

#button-zoomIncrease {
    background-image: url('../img/icon-zoomIncrease.png');
    display: none;
}

#button-zoomDecrease {
    background-image: url('../img/icon-zoomDecrease.png');
    display: none;
}

#birdFood {
    position: absolute;
    top: -100px;
    left: -100px;
    z-index: 2;
    display: 'none';
}

#birdFoodOnGround {
    position: absolute;
    top: -100px;
    left: -100px;
    z-index: 2;
    display: none;
}

#birdOutOfRange,
#birdIsNotInterested,
#noBirdsInPanorama {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    min-width: 280px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border: 1px solid rgba(164, 127, 28, 0.62);
    border-radius: 18px;
    background: rgba(8, 15, 24, 0.92);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
    text-align: center;
    color: #ffe9ac;
    font-size: 1rem;
    letter-spacing: 0.12em;
    display: none;
}

#marbleStatusMessage,
#ingredientStatusMessage {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    min-width: 280px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border: 1px solid rgba(164, 127, 28, 0.62);
    border-radius: 18px;
    background: rgba(8, 15, 24, 0.92);
    color: #ffe9ac;
    text-align: center;
    letter-spacing: 0.12em;
    display: none;
}

#flashlight {
    width: 200px;
    height: 200px;
    border: 2px solid #000000;
    position: fixed;
    z-index: 5;
    border-radius: 50%;
    filter: blur(40px);
    box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.9);
    display: none;
    pointer-events: none;
}

#window-region {
    font-size: 1rem;
    position: absolute;
    bottom: 20px;
    right: 80px;
    width: 370px;
    z-index: 5;
    border: 3px solid #0019fd;
    text-align: center;
    color: #8f9d4a;
    padding: 8px 15px;
    display: none;
}

#birdElement1,
#birdElement2,
#birdElement3,
#birdElement4,
#birdElement5,
#birdElement6,
#birdElement7,
#birdElement8,
#birdElement9,
#birdElement10 {
    position: absolute;
    z-index: 3;
    display: block;
    width: 50%;
    height: auto;
}

#overlay-overgrowth {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
    pointer-events: none;
    opacity: 1;
    mix-blend-mode: multiply;
}

.compass2 {
    position: absolute;
    top: 132px;
    right: 26px;
    width: 56px;
    height: 56px;
    z-index: 7;
    display: none;
    padding: 8px;
    border-radius: 50%;
    background: rgba(3, 10, 14, 0.76);
    border: 1px solid rgba(201, 255, 241, 0.16);
}

.compass2 img {
    filter: hue-rotate(24deg) saturate(0.52) brightness(0.82);
}

#overlay-birdGallery {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1120px, calc(100% - 40px));
    height: min(760px, calc(100% - 40px));
    transform: translate(-50%, -50%);
    display: none;
    z-index: 7;
    border: 1px solid rgba(201, 255, 241, 0.22);
    border-radius: 32px;
    background: rgba(6, 15, 20, 0.96);
    box-shadow: var(--ui-shadow);
    overflow: auto;
}

#table-birdGallery {
    position: absolute;
    top: 82px;
    left: 50%;
    width: calc(100% - 56px);
    transform: translate(-50%, 0);
    text-align: center;
    border-collapse: separate;
    border-spacing: 10px;
    color: var(--ui-ink);
}

#table-birdGallery td {
    padding: 10px 12px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

#table-birdGallery tr:first-child td {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--ui-signal);
    background: transparent;
    border: 0;
}

#table-birdGallery tr:nth-child(2) td {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ui-muted);
}

#button-viewBird1,
#button-viewBird2,
#button-viewBird3,
#button-viewBird4,
#button-viewBird5,
#button-viewBird6,
#button-viewBird7,
#button-viewBird8,
#button-viewBird9,
#button-viewBird10,
#button-viewBird11,
#button-viewBird12 {
    width: 86px;
    height: 86px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid rgba(201, 255, 241, 0.16);
    background: linear-gradient(180deg, rgba(15, 36, 46, 0.96), rgba(8, 18, 25, 0.98));
}

.panel-close {
    position: absolute;
    top: 18px;
    right: 18px;
    min-width: 96px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(201, 255, 241, 0.22);
    border-radius: 14px;
    background: rgba(10, 25, 33, 0.95);
    color: var(--ui-ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 8;
}

#overlay-birdDetails {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 7;
    padding: 24px;
    overflow: auto;
    align-items: flex-start;
    justify-content: center;
    background: rgba(4, 10, 16, 0.72);
}

#birdDetailPanel {
    position: relative;
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 32px 28px;
    border: 1px solid rgba(201, 255, 241, 0.2);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 24, 33, 0.98), rgba(5, 12, 18, 0.99));
    box-shadow: var(--ui-shadow);
}

#birdDetailName {
    position: relative;
    margin: 0 64px 0 0;
    width: auto;
    font-size: clamp(2.2rem, 4.4vw, 4.8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.14em;
    color: var(--ui-signal);
}

#birdDetailLayout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(420px, 1fr);
    gap: 28px;
    align-items: stretch;
    margin-top: 28px;
}

#birdDetailImageFrame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 520px;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.06), transparent 34%), rgba(255, 255, 255, 0.03);
}

#birdDetailImage {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: contain;
}

#table-birdDetails {
    position: relative;
    width: 100%;
    margin: 0;
}

#button-closeBirdDetails {
    top: 22px;
    right: 22px;
    z-index: 12;
}

#overlay-marbleGallery,
#overlay-craftingInventory,
#overlay-marbleTrade,
#overlay-craftingStation,
#overlay-marbleScratch,
#overlay-marbleDetails {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 7;
    background: rgba(3, 8, 12, 0.94);
}

#overlay-marbleGallery,
#overlay-craftingInventory {
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.marblePanel,
.marbleScratchPanel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(960px, calc(100% - 40px));
    min-height: 540px;
    padding: 32px;
    border: 1px solid rgba(201, 255, 241, 0.2);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 24, 33, 0.98), rgba(5, 12, 18, 0.98));
    box-shadow: var(--ui-shadow);
}

#overlay-marbleGallery .marblePanel,
#overlay-craftingInventory .marblePanel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    margin: 0 auto;
    overflow: auto;
    box-sizing: border-box;
}

.marblePanelTitle,
#marbleScratchName,
#marbleDetailName {
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--ui-signal);
}

.marblePanelTitle,
#marbleScratchName {
    margin-right: 120px;
}

.marblePanelActions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 18px;
}

.archiveActionButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(201, 255, 241, 0.18);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18, 44, 56, 0.98), rgba(9, 21, 29, 0.98));
    color: var(--ui-ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#marbleInventoryEmpty {
    margin-top: 50px;
    font-size: 1.35rem;
    color: var(--ui-muted);
}

#marbleInventoryGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.marbleInventoryItem {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 198px;
    padding: 16px;
    border: 1px solid rgba(201, 255, 241, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-ink);
    text-align: center;
}

.marbleInventoryItem img {
    width: 98px;
    height: 98px;
    object-fit: contain;
    margin-right: 5px;
    margin-bottom: 5px;
}

.marbleInventoryName,
.marbleInventoryStatus {
    display: block;
    margin-top: 8px;
}

.marbleInventoryStatus {
    color: var(--ui-muted);
    font-size: 0.84rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.marbleInventoryCount {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(6, 15, 34, 0.92);
    border: 1px solid rgba(168, 214, 235, 0.45);
    color: #f4f8ff;
    font-size: 0.8rem;
    font-weight: 700;
}

#button-closeMarbleGallery {
    top: 24px;
    right: 24px;
}

#button-closeCraftingInventory {
    top: 24px;
    right: 24px;
}

#overlay-marbleTrade,
#overlay-craftingStation {
    padding: 24px;
    background: rgba(4, 10, 16, 0.74);
    overflow: auto;
    align-items: flex-start;
    justify-content: center;
}

#marbleTradePanel,
#craftingStationPanel {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 32px 28px;
    border: 1px solid rgba(201, 255, 241, 0.2);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 24, 33, 0.98), rgba(5, 12, 18, 0.99));
    box-shadow: var(--ui-shadow);
}

#marbleTradeIntro,
#marbleTradeStatus,
#craftingStationIntro,
#craftingInventoryIntro,
#craftingStationStatus,
.marbleTradeHelper,
#marbleTradePartnerSummary,
.tradeRequestMeta,
.tradeMarbleMeta,
.privacyItemMeta {
    color: var(--ui-muted);
}

#marbleTradeIntro {
    margin-top: 16px;
    margin-right: 120px;
    line-height: 1.5;
}

#marbleTradeStatus {
    min-height: 24px;
    margin-top: 14px;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

#marbleTradeStatus.is-error {
    color: #e4aca3;
}

#marbleTradeStatus.is-success {
    color: #b8dacd;
}

#craftingStationIntro {
    margin-top: 16px;
    margin-right: 120px;
    line-height: 1.5;
}

#craftingInventoryIntro {
    margin-top: 16px;
    margin-right: 120px;
    line-height: 1.5;
}

#craftingStationStatus {
    min-height: 24px;
    margin-top: 14px;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

#craftingStationStatus.is-error {
    color: #e4aca3;
}

#craftingStationStatus.is-success {
    color: #b8dacd;
}

#craftingStationWorkspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.craftingFormGrid {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.craftingFormGrid label {
    color: var(--ui-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.craftingFormGrid select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid rgba(201, 255, 241, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-ink);
}

.craftRequirementList,
.craftInventoryList {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.craftRequirementRow,
.craftInventoryCard {
    padding: 14px;
    border: 1px solid rgba(201, 255, 241, 0.12);
    border-radius: 18px;
    background: rgba(8, 18, 25, 0.72);
}

.craftRequirementRow.is-ready {
    border-color: rgba(130, 198, 174, 0.28);
}

.craftRequirementRow.is-missing {
    border-color: rgba(205, 127, 116, 0.28);
}

.craftRequirementRow,
.craftInventoryCard {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.craftRequirementRow img,
.craftInventoryCard img,
.craftInventoryImageFallback {
    width: 64px;
    height: 64px;
}

.craftRequirementRow img,
.craftInventoryCard img {
    object-fit: contain;
}

.craftInventoryImageFallback {
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 205, 64, 0.18), rgba(148, 238, 224, 0.12));
    border: 1px solid rgba(201, 255, 241, 0.12);
}

.craftInventoryText {
    min-width: 0;
}

.craftInventoryName {
    color: var(--ui-ink);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.craftInventoryMeta,
.craftInventoryEmpty {
    color: var(--ui-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

#craftingInventoryWorkspace {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.craftingInventorySection {
    padding: 20px 22px;
    border: 1px solid rgba(201, 255, 241, 0.12);
    border-radius: 24px;
    background: rgba(8, 18, 25, 0.72);
}

.craftingSubmitButton {
    min-height: 48px;
    padding-inline: 22px;
    margin-top: 18px;
}

#marbleTradeWorkspace,
#marbleTradeRequestColumns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

#marbleTradeRequestColumns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marbleTradeSection {
    padding: 20px 22px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
}

.marbleTradePartnerRow {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.marbleTradePartnerRow label {
    color: var(--ui-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.marbleTradePartnerRow input,
#marbleTradeMessage {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid rgba(201, 255, 241, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-ink);
}

#birdArchiveIntro {
    margin: 16px 120px 0 0;
    color: var(--ui-muted);
    line-height: 1.5;
}

#marbleTradeMessage {
    margin-top: 14px;
    min-height: 88px;
    resize: vertical;
}

#marbleTradePartnerSummary {
    margin-top: 12px;
    min-height: 22px;
    line-height: 1.45;
}

.marbleTradeModeRow {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.marbleTradeModeButton.is-active {
    border-color: rgba(255, 212, 92, 0.52);
    background: linear-gradient(180deg, rgba(107, 84, 25, 0.98), rgba(63, 48, 11, 0.98));
    color: #fff0b6;
}

.marbleTradeHelper {
    margin-top: 10px;
    line-height: 1.45;
}

.tradeMarbleList,
.tradeRequestList,
.tradePrivacyList {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.tradeMarbleList {
    max-height: 420px;
    overflow: auto;
}

.tradeMarbleOption,
.tradeRequestCard,
.tradePrivacyItem {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(201, 255, 241, 0.12);
    border-radius: 18px;
    background: rgba(8, 18, 25, 0.72);
}

.tradeMarbleOption {
    grid-template-columns: auto 72px minmax(0, 1fr);
    align-items: center;
}

.tradeMarbleOption input[type='checkbox'] {
    width: 20px;
    height: 20px;
}

.tradeMarbleOption img,
.tradePrivacyItem img,
.tradeRequestMarble img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.tradeMarbleName,
.tradeRequestSectionTitle {
    color: var(--ui-ink);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.tradeMarbleMeta,
.privacyItemMeta,
.tradeRequestMeta {
    font-size: 0.76rem;
    line-height: 1.45;
}

#marbleTradeActionRow {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.marbleTradeSubmitButton {
    min-height: 48px;
    padding-inline: 22px;
}

.tradeRequestCard {
    gap: 14px;
}

.tradeRequestHeader {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.tradeRequestMarbleGrid {
    display: grid;
    gap: 10px;
}

.tradeRequestMarble {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.tradeRequestMarble.is-unavailable {
    border: 1px solid rgba(226, 138, 129, 0.22);
}

.tradeRequestActions,
.privacyItemActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tradePrivacyItem {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
}

.privacyActionButton.is-private {
    border-color: rgba(255, 212, 92, 0.46);
    color: #ffe9a2;
}

.tradeEmptyState {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ui-muted);
}

#marbleScratchPrompt,
#marbleScratchResult,
#marbleDetailDescription1,
#marbleDetailDescription2 {
    margin-top: 12px;
    color: var(--ui-muted);
}

#marbleScratchLayout {
    display: grid;
    grid-template-columns: 320px minmax(220px, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 26px;
}

#marbleScratchRevealFrame {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    background: #5c84a3;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

#marbleScratchRevealImage {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    z-index: 1;
}

#marbleScratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    z-index: 2;
}

#marbleScratchCanvas {
    cursor: crosshair;
}

#marbleScratchNote {
    padding: 22px 24px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-muted);
    line-height: 1.55;
}

.fieldNoteTitle,
#marbleScratchNoteTitle {
    margin-bottom: 12px;
    color: var(--ui-signal);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#marbleScratchNoteBody {
    font-size: 0.98rem;
}

#overlay-marbleDetails {
    padding: 24px;
    background: rgba(4, 10, 16, 0.72);
    overflow: auto;
    align-items: flex-start;
    justify-content: center;
}

#marbleDetailPanel {
    position: relative;
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 32px 28px;
    border: 1px solid rgba(201, 255, 241, 0.2);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 24, 33, 0.98), rgba(5, 12, 18, 0.99));
    box-shadow: var(--ui-shadow);
}

#marbleDetailName {
    margin: 0 64px 0 0;
}

#marbleDetailLayout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(360px, 1fr);
    gap: 28px;
    align-items: stretch;
    margin-top: 28px;
}

#button-closeMarbleDetails {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 12;
}

#button-closeMarbleScratch {
    top: 22px;
    right: 22px;
    z-index: 12;
}

#button-closeMarbleTrade {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 12;
}

#button-closeBirdGallery,
#button-closeMarbleGallery,
#button-closePlayerStats {
    top: 24px;
    right: 24px;
}

#marbleDetailImageFrame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 420px;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.06), transparent 34%), rgba(255, 255, 255, 0.03);
}

#marbleDetailImage {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: contain;
}

#table-marbleDetails {
    position: relative;
    width: 100%;
    margin: 0;
    border-spacing: 0 4px;
}

#table-marbleDetails td {
    padding: 7px 10px;
    font-size: 0.82rem;
    line-height: 1.12;
}

#table-marbleDetails td:first-child {
    width: 42%;
    font-size: 0.68rem;
}

.marbleStatLabel,
.marbleStatUnit {
    display: block;
}

.marbleStatLabel {
    color: var(--ui-ink);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marbleStatUnit {
    margin-top: 3px;
    color: var(--ui-muted);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: none;
}

#marbleDetailNotes {
    position: relative;
    width: 100%;
    margin-top: 24px;
    padding: 22px 24px 24px;
    border: 1px solid rgba(201, 255, 241, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
}

#marbleDetailDescription1,
#marbleDetailDescription2 {
    position: static;
    width: auto;
    margin-top: 0;
}

#marbleDetailDescription2 {
    margin-top: 12px;
}

@media (max-width: 1100px) {
    #marbleTradeWorkspace,
    #marbleTradeRequestColumns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .marbleTradePartnerRow,
    .tradePrivacyItem,
    .tradeMarbleOption {
        grid-template-columns: 1fr;
    }

    #marbleTradeActionRow,
    .marbleTradeModeRow,
    .tradeRequestActions,
    .privacyItemActions {
        flex-direction: column;
    }

    #overlay-birdGallery,
    #overlay-marbleGallery,
    #overlay-craftingInventory,
    #overlay-marbleTrade,
    #overlay-craftingStation,
    #overlay-marbleScratch,
    #overlay-marbleDetails {
        padding: 12px;
    }

    #overlay-marbleScratch {
        overflow: auto;
        box-sizing: border-box;
    }

    #overlay-marbleScratch .marbleScratchPanel {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: min(960px, 100%);
        min-height: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }
}

#overlay-fog,
#overlay-rain,
#overlay-snow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

#overlay-cameraViewfinder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: none;
    pointer-events: none;
}

#overlay-cameraViewfinder img {
    width: 100%;
    height: 100%;
    filter: hue-rotate(24deg) saturate(0.52) brightness(0.82);
}

.capture-button {
    top: 18px;
    z-index: 9;
    display: none;
    min-width: 86px;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
}

#button-takePhoto {
    left: calc(50% - 56px);
    transform: translateX(-50%);
    background-image: url('../img/icon-captureScreenshot.png');
}

#button-closeScreenCapture {
    left: calc(50% + 56px);
    transform: translateX(-50%);
    background-image: url('../img/icon-No.png');
}

@keyframes radarSweep {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes signalPulse {
    0% {
        transform: scale(0.55);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(720deg);
    }
}

.rotate-animation {
    animation: rotate 3s linear forwards;
}

@media (max-width: 1100px) {
    #overlay-hudConsole {
        width: calc(100% - 16px);
    }

    #birdDetailName,
    #table-birdDetails {
        left: 50%;
        width: calc(50% - 36px);
    }

    #marbleDetailLayout {
        grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
        gap: 24px;
    }
}

@media (max-width: 900px) {
    #overlay-hudMapsFrame,
    #overlay-hudButtonsFrame {
        top: 12px;
        transform: scale(0.94);
        transform-origin: top left;
    }

    #overlay-hudButtonsFrame {
        transform-origin: top right;
    }

    #overlay-hudConsole {
        height: 272px;
        bottom: -252px;
    }

    #console {
        top: 48px;
        height: 198px;
    }

    #consoleReadouts {
        width: calc(100% - 10px);
    }

    .consoleMetricRow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .consoleMetaRow {
        display: none;
    }

    .compass1 {
        display: none;
    }

    #overlay-birdGallery {
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }

    #table-birdGallery {
        position: relative;
        top: 70px;
        width: calc(100% - 24px);
        left: 12px;
        transform: none;
        margin-bottom: 90px;
    }

    .birdArchivePanel {
        width: 100%;
        max-height: calc(100vh - 24px);
    }
}

@media (max-width: 720px) {
    #overlay-hudSearching {
        padding-left: 58px;
    }

    #window-searchingCoordinates {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
    }

    #birdDetailName,
    #marbleDetailName {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        max-width: none;
        margin: 0 56px 0 0;
    }

    #birdArchiveIntro {
        margin-right: 56px;
    }

    #birdDetailImage,
    #marbleDetailImage {
        height: auto;
    }

    #birdDetailPanel,
    #marbleDetailPanel {
        width: 100%;
        max-height: none;
        padding: 24px 18px 22px;
    }

    #birdDetailLayout,
    #marbleDetailLayout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 22px;
    }

    #birdDetailImageFrame,
    #table-birdDetails,
    #marbleDetailImageFrame,
    #table-marbleDetails,
    #marbleDetailNotes {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    #birdDetailImageFrame,
    #marbleDetailImageFrame {
        height: auto;
        min-height: 0;
    }

    #birdDetailImage,
    #marbleDetailImage {
        min-height: 0;
    }

    #marbleDetailDescription1,
    #marbleDetailDescription2 {
        width: auto;
    }

    #overlay-birdDetails,
    #overlay-marbleDetails {
        padding: 12px;
    }

    .marblePanel,
    .marbleScratchPanel {
        padding: 24px 18px;
    }

    #marbleScratchLayout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #marbleScratchRevealFrame {
        width: min(320px, calc(100vw - 76px));
        height: min(320px, calc(100vw - 76px));
        margin: 0 auto;
    }

    #table-birdGallery {
        border-spacing: 6px;
    }

    #table-birdGallery td {
        padding: 8px;
    }

    #button-viewBird1,
    #button-viewBird2,
    #button-viewBird3,
    #button-viewBird4,
    #button-viewBird5,
    #button-viewBird6,
    #button-viewBird7,
    #button-viewBird8,
    #button-viewBird9,
    #button-viewBird10,
    #button-viewBird11,
    #button-viewBird12 {
        width: 72px;
        height: 72px;
        padding: 8px;
        border-radius: 18px;
    }

    #marbleScratchRevealImage,
    #marbleScratchCanvas {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 820px) {
    #window-topActionBar {
        width: calc(100% - 112px);
        gap: 6px;
    }

    #window-topActionBar .action-button {
        min-width: 72px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    #window-topActionBar #button-useBinoculars {
        min-width: 94px;
    }

    #button-openMapsDrawer,
    #button-openToolsDrawer {
        top: 12px;
        width: 40px;
        height: 40px;
    }

    #button-openMapsDrawer {
        min-width: 72px;
        padding: 0 12px;
    }

    #overlay-hudMapsFrame,
    #overlay-hudButtonsFrame {
        top: 58px;
        max-height: calc(100vh - 70px);
    }

    #overlay-hudButtonsFrame {
        width: min(220px, calc(100vw - 24px));
        overflow: auto;
    }

    #overlay-hudMapsFrame {
        width: min(220px, calc(100vw - 24px));
        height: min(654px, calc(100vh - 70px));
        overflow: auto;
    }

    #mapsReadouts {
        top: 14px;
        left: 14px;
        right: 14px;
    }

    #mapLabel,
    #terrainMapLabel,
    #map,
    #terrainMap {
        left: 14px;
        width: calc(100% - 28px);
    }

    #mapLabel {
        top: 54px;
    }

    #map {
        top: 88px;
        height: 170px;
    }

    #terrainMapLabel {
        top: 276px;
    }

    #terrainMap {
        top: 310px;
        height: 170px;
    }

    #overlay-hudConsole {
        width: calc(100% - 20px);
    }

    .consoleMetricRow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .panel-close {
        top: 14px;
        right: 14px;
        min-width: 82px;
        height: 36px;
        padding: 0 12px;
        font-size: 0.66rem;
        letter-spacing: 0.14em;
    }

    .marblePanelTitle,
    #marbleScratchName,
    #marbleDetailName,
    #birdDetailName {
        margin-right: 92px;
        letter-spacing: 0.1em;
    }

    #birdArchiveIntro {
        margin-right: 0;
        font-size: 0.92rem;
    }

    #birdDetailPanel,
    #marbleDetailPanel,
    #marbleTradePanel,
    #craftingStationPanel,
    .birdArchivePanel,
    #overlay-craftingInventory .marblePanel,
    #overlay-marbleGallery .marblePanel,
    #overlay-marbleScratch .marbleScratchPanel {
        padding: 20px 14px 16px;
        border-radius: 22px;
    }

    #craftingStationWorkspace {
        grid-template-columns: 1fr;
    }

    #craftingStationIntro {
        margin-right: 0;
        font-size: 0.92rem;
    }

    #craftingInventoryIntro {
        margin-right: 0;
        font-size: 0.92rem;
    }

    #craftingInventoryWorkspace {
        grid-template-columns: 1fr;
    }

    #table-birdDetails td,
    #table-marbleDetails td {
        padding: 6px 8px;
        font-size: 0.76rem;
    }

    #table-birdDetails td:first-child,
    #table-marbleDetails td:first-child,
    .consoleMetricLabel,
    .marbleStatLabel {
        font-size: 0.62rem;
    }

    .marbleStatUnit {
        font-size: 0.54rem;
    }

    #window-topActionBar {
        width: calc(100% - 96px);
        gap: 5px;
    }

    #window-topActionBar .action-button {
        min-width: 64px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.58rem;
    }

    #window-topActionBar #button-useBinoculars {
        min-width: 82px;
    }

    #button-openMapsDrawer,
    #button-openToolsDrawer {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    #button-openMapsDrawer {
        min-width: 64px;
        padding: 0 10px;
    }

    #button-openBirdPanel {
        min-width: 68px;
        height: 34px;
        padding: 0 10px;
        font-size: 0.58rem;
    }

    .tradeMarbleOption,
    .tradePrivacyItem {
        gap: 10px;
        padding: 12px;
    }

    .tradeMarbleOption img,
    .tradePrivacyItem img,
    .tradeRequestMarble img {
        width: 60px;
        height: 60px;
    }

    #overlay-hudConsole {
        width: calc(100% - 12px);
    }

    #console {
        left: 10px;
        width: calc(100% - 20px);
        padding: 0 8px 34px;
    }
}

@media (max-height: 820px) {
    #overlay-birdGallery,
    #overlay-marbleGallery,
    #overlay-craftingInventory,
    #overlay-marbleTrade,
    #overlay-marbleScratch,
    #overlay-birdDetails,
    #overlay-marbleDetails,
    #overlay-playerStats {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .birdArchivePanel,
    #overlay-craftingInventory .marblePanel,
    #overlay-marbleGallery .marblePanel,
    #marbleTradePanel,
    #birdDetailPanel,
    #marbleDetailPanel,
    #overlay-marbleScratch .marbleScratchPanel,
    .statsPanel {
        max-height: calc(100vh - 24px);
    }
}











/* Text-only HUD controls: pins remain image-based, all other control icons are suppressed. */
.action-button,
.capture-button,
.binocular-button,
#button-marbleGallery {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background-image: none !important;
    color: #ffe9ac;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.05;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}

.capture-button,
.binocular-button {
    color: #ffe9ac;
}

#button-marbleGallery {
    overflow: visible;
}

#button-birdCall::after,
#button-openScreenCapture::after,
#button-logout2::after,
#button-useFlashlight::after,
#button-marbleGallery::before {
    display: none;
}

#button-newLocation,
#button-useBinoculars,
#button-birdCall,
#button-offerFood,
#button-useFlashlight,
#button-logout2,
#button-birdGallery,
#button-openScreenCapture,
#button-marbleGallery,
#button-takePhoto,
#button-closeScreenCapture,
#button-hideBinoculars,
#button-zoomIncrease,
#button-zoomDecrease {
    background-image: none !important;
}

/* Preserve hidden-by-default state for camera controls until screen capture is opened. */
#button-takePhoto,
#button-closeScreenCapture {
    display: none;
}






/* Top action strip + hamburger tools drawer */
#window-topActionBar {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    width: min(760px, calc(100% - 180px));
    z-index: 8;
}

#window-topActionBar .topActionCluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#window-topActionBar .action-button {
    position: relative;
    top: auto !important;
    left: auto !important;
    width: auto;
    min-width: 84px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
}

#window-topActionBar #button-useBinoculars {
    min-width: 112px;
}

#window-topActionBar #window-statusLightsBirdCall,
#window-topActionBar #window-statusLightsOfferFood {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    display: flex;
    gap: 4px;
}

#window-topActionBar #birdCall1,
#window-topActionBar #birdCall2,
#window-topActionBar #birdCall3,
#window-topActionBar #offerFood1,
#window-topActionBar #offerFood2,
#window-topActionBar #offerFood3 {
    position: relative;
    top: auto;
    left: auto;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
}

#button-openToolsDrawer {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    z-index: 10;
    color: transparent;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#button-openToolsDrawer::before {
    content: '';
    width: 18px;
    height: 14px;
    background:
        linear-gradient(#8f9d4a 0 0) top / 100% 2px no-repeat,
        linear-gradient(#8f9d4a 0 0) center / 100% 2px no-repeat,
        linear-gradient(#8f9d4a 0 0) bottom / 100% 2px no-repeat;
}

#overlay-hudButtonsFrame {
    left: auto !important;
    right: 18px !important;
    top: 70px;
    width: 220px;
    height: auto;
    min-height: 0;
    padding: 56px 14px 14px;
    display: none;
    z-index: 9;
    overflow: visible;
}

#overlay-hudButtonsFrame:hover,
#overlay-hudButtonsFrame:not(:hover) {
    right: 18px !important;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#overlay-hudButtonsFrame.is-open {
    display: block !important;
}

#overlay-hudButtonsFrame::after {
    content: 'TOOLS';
    top: 14px;
    left: 16px;
}

#button-pinButtons {
    display: none !important;
}

#window-toolsDrawer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#window-toolsDrawer .action-button,
#window-toolsDrawer #button-marbleGallery {
    position: relative;
    top: auto !important;
    left: auto !important;
    width: 100%;
    height: 42px;
    min-height: 42px;
    border-radius: 14px;
}

#overlay-hudButtonsFrame .toolsToggleRow {
    display: grid;
    grid-template-columns: 28px 48px 28px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

#overlay-hudButtonsFrame .switch {
    position: relative;
    left: auto !important;
    bottom: auto !important;
}

#overlay-hudButtonsFrame #icon-weatherOff,
#overlay-hudButtonsFrame #icon-weatherOn,
#overlay-hudButtonsFrame #icon-audioOff,
#overlay-hudButtonsFrame #icon-audioOn,
#overlay-hudButtonsFrame #icon-overgrowthOff,
#overlay-hudButtonsFrame #icon-overgrowthOn {
    position: relative;
    left: auto !important;
    bottom: auto !important;
    width: 28px;
    height: 28px;
}

@media (max-width: 900px) {
    #window-topActionBar {
        width: min(620px, calc(100% - 120px));
        gap: 6px;
    }

    #window-topActionBar .action-button {
        min-width: 74px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.64rem;
    }

    #window-topActionBar #button-useBinoculars {
        min-width: 96px;
    }
}


/* Binocular mode: block panorama interaction and strengthen zoom-button readability */
#window-binocularButtons .binocular-button {
    background: linear-gradient(180deg, rgba(4, 10, 14, 0.94), rgba(2, 6, 9, 0.96));
    border-color: rgba(255, 207, 64, 0.42);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}


#button-playerStats {
    background-image: none !important;
}

#button-depthDebug {
    background-image: none !important;
}

#overlay-playerStats {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 122;
    padding: 34px 24px 24px;
    background: linear-gradient(180deg, rgba(1, 10, 20, 0.92), rgba(1, 7, 15, 0.97));
}

.statsPanel {
    position: relative;
    width: min(960px, calc(100vw - 48px));
    max-height: calc(100vh - 58px);
    margin: 0 auto;
    padding: 26px 26px 22px;
    overflow-y: auto;
    border: 1px solid rgba(240, 197, 49, 0.35);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(5, 19, 34, 0.96), rgba(1, 8, 18, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.statsProfileRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(240, 197, 49, 0.24);
    border-radius: 16px;
    background: rgba(4, 15, 28, 0.88);
}

.statsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.statsCardMetric {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
    padding: 14px;
    border: 1px solid rgba(143, 157, 74, 0.26);
    border-radius: 18px;
    background: rgba(2, 13, 25, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.statsKey {
    color: #f0c531;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.statsValue {
    color: #8f9d4a;
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

@media (max-width: 720px) {
    #overlay-playerStats {
        padding: 18px 12px 14px;
    }

    .statsPanel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 32px);
        padding: 18px 16px 16px;
        border-radius: 22px;
    }

    .statsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .statsCardMetric {
        min-height: 82px;
        padding: 12px;
    }

    .statsValue {
        font-size: 20px;
    }
}


#overlay-birdGallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 7;
    transform: none;
    border: 0;
    border-radius: 0;
    background: rgba(3, 8, 12, 0.94);
    box-shadow: none;
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
}

#overlay-birdGallery > img,
#hud-birdGallery {
    display: none !important;
}

.birdArchivePanel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(1120px, calc(100% - 40px));
    min-height: 0;
    max-height: calc(100vh - 48px);
    margin: 0 auto;
    overflow-y: auto;
    box-sizing: border-box;
}

#table-birdGallery {
    position: static;
    width: 100%;
    margin-top: 28px;
    transform: none;
    text-align: center;
    border-collapse: separate;
    border-spacing: 10px;
    color: var(--ui-ink);
}

#table-birdGallery tr:first-child td {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ui-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 255, 241, 0.14);
}

#button-openToolsDrawer {
    left: 18px;
    right: auto;
    border-color: rgba(201, 255, 241, 0.22);
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#button-openToolsDrawer::before {
    background:
        linear-gradient(#ffe9ac 0 0) top / 100% 2px no-repeat,
        linear-gradient(#ffe9ac 0 0) center / 100% 2px no-repeat,
        linear-gradient(#ffe9ac 0 0) bottom / 100% 2px no-repeat;
}

#overlay-hudButtonsFrame {
    left: 18px !important;
    right: auto !important;
}

#overlay-hudButtonsFrame:hover,
#overlay-hudButtonsFrame:not(:hover) {
    left: 18px !important;
    right: auto !important;
}

#window-topActionBar .action-button,
#window-toolsDrawer .action-button,
#window-toolsDrawer #button-marbleGallery {
    border-color: rgba(201, 255, 241, 0.22);
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    color: #ffe9ac !important;
}

#window-topActionBar .action-button:hover,
#window-toolsDrawer .action-button:hover,
#window-toolsDrawer #button-marbleGallery:hover,
#button-openToolsDrawer:hover {
    border-color: rgba(201, 255, 241, 0.34);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

#overlay-hudButtonsFrame::after {
    color: #ffe9ac;
}

#overlay-hudButtonsFrame .toolsToggleRow {
    grid-template-columns: minmax(42px, auto) 48px minmax(46px, auto);
    gap: 12px;
}

#overlay-hudButtonsFrame #icon-weatherOff,
#overlay-hudButtonsFrame #icon-weatherOn,
#overlay-hudButtonsFrame #icon-audioOff,
#overlay-hudButtonsFrame #icon-audioOn,
#overlay-hudButtonsFrame #icon-overgrowthOff,
#overlay-hudButtonsFrame #icon-overgrowthOn {
    width: auto;
    height: auto;
}

.toolsToggleLabel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 6px;
    color: #ffe9ac;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#birdOutOfRange,
#birdIsNotInterested,
#noBirdsInPanorama,
#marbleStatusMessage,
#ingredientStatusMessage {
    border: 1px solid rgba(164, 127, 28, 0.62);
    border-radius: 18px;
    background: rgba(8, 15, 24, 0.92);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
    color: #ffe9ac;
    text-align: center;
    letter-spacing: 0.12em;
}

#button-openMapsDrawer {
    position: absolute;
    top: 18px;
    left: 18px;
    width: auto;
    min-width: 78px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 255, 241, 0.22);
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    color: #ffe9ac;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#button-openMapsDrawer:hover {
    border-color: rgba(201, 255, 241, 0.34);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

#button-openToolsDrawer {
    left: auto;
    right: 18px;
}

#overlay-hudMapsFrame {
    left: 18px !important;
    right: auto !important;
    top: 70px;
    display: none;
    transform: none;
}

#overlay-hudMapsFrame:hover,
#overlay-hudMapsFrame:not(:hover) {
    left: 18px !important;
    right: auto !important;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#overlay-hudMapsFrame.is-open {
    display: block !important;
}

#button-pinMap {
    display: none !important;
}

#overlay-hudButtonsFrame {
    left: auto !important;
    right: 18px !important;
}

#overlay-hudButtonsFrame:hover,
#overlay-hudButtonsFrame:not(:hover) {
    left: auto !important;
    right: 18px !important;
}


#window-binocularButtons .binocular-button {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    border-color: rgba(201, 255, 241, 0.22);
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    color: #ffe9ac;
    min-width: 86px;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#window-binocularButtons .binocular-button:hover {
    border-color: rgba(201, 255, 241, 0.34);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

#window-binocularButtons .binocular-zoomSymbol {
    display: inline-block;
    font-size: 1.55em;
    line-height: 0.9;
    font-weight: 900;
    vertical-align: -0.08em;
    margin-left: 2px;
}




/* Maps/data layout refresh */
#overlay-hudMapsFrame {
    height: 654px;
}

#mapsReadouts {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 216px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    z-index: 4;
}

.mapMetric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 54px;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(6, 14, 19, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mapMetricLabel {
    color: var(--ui-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.mapMetricValue {
    color: var(--ui-ink);
    font-family: var(--ui-mono);
    font-size: 0.8rem;
    line-height: 1.2;
}

#mapLabel {
    top: 90px;
}

#map {
    top: 126px;
}

#terrainMapLabel {
    top: 364px;
}

#terrainMap {
    top: 400px;
}

#freeplayMapsDisabledNote {
    display: none;
    position: absolute;
    top: 116px;
    left: 18px;
    width: 216px;
    min-height: 488px;
    padding: 18px 16px;
    box-sizing: border-box;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(6, 14, 19, 0.96), rgba(9, 22, 30, 0.94));
    border: 1px solid rgba(201, 255, 241, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.28);
    z-index: 4;
}

.freeplayMapsDisabledTitle {
    color: var(--ui-signal);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.4;
}

#freeplayMapsDisabledNote p {
    margin: 14px 0 0;
    color: var(--ui-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

#overlay-hudMapsFrame.is-freeplay-disabled #mapLabel,
#overlay-hudMapsFrame.is-freeplay-disabled #terrainMapLabel,
#overlay-hudMapsFrame.is-freeplay-disabled #map,
#overlay-hudMapsFrame.is-freeplay-disabled #terrainMap {
    display: none;
}

#overlay-hudMapsFrame.is-freeplay-disabled #freeplayMapsDisabledNote {
    display: block;
}

#consoleReadouts {
    width: min(540px, calc(100% - 20px));
}

.consoleMetricRow {
    grid-template-columns: minmax(96px, 0.85fr) minmax(260px, 2.8fr);
    margin-bottom: 8px;
}

#viewPovHud {
    position: absolute;
    right: 22px;
    bottom: 24px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.viewCompass {
    width: 74px;
    height: 74px;
    justify-self: auto;
    align-self: auto;
    background:
        radial-gradient(circle, transparent 0 16px, rgba(201, 255, 241, 0.09) 16px 17px, transparent 17px 25px, rgba(201, 255, 241, 0.09) 25px 26px, transparent 26px),
        rgba(3, 10, 14, 0.72);
    border-color: rgba(201, 255, 241, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.viewCompass::before {
    border-color: rgba(201, 255, 241, 0.08);
}

.viewCompass .compassDial1 {
    width: 54px;
    height: 54px;
    opacity: 0.94;
    filter: hue-rotate(24deg) saturate(0.62) brightness(1.08) contrast(1.18) drop-shadow(0 0 6px rgba(173, 184, 96, 0.26));
}

.viewCompass::after {
    display: none;
}

.viewPovReadouts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.viewPovMetric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 74px;
    min-width: 74px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(3, 10, 14, 0.72);
    border: 1px solid rgba(201, 255, 241, 0.08);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    align-items: center;
    text-align: center;
}

.viewPovLabel {
    color: rgba(159, 197, 193, 0.72);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.viewPovValue {
    color: rgba(244, 247, 241, 0.84);
    font-family: var(--ui-mono);
    font-size: 0.78rem;
    line-height: 1.15;
}

@media (max-width: 900px) {
    #overlay-hudMapsFrame {
        height: 626px;
    }

    #viewPovHud {
        right: 14px;
        bottom: 16px;
        gap: 6px;
    }

    .viewCompass {
        width: 66px;
        height: 66px;
    }

    .viewCompass .compassDial1 {
    width: 54px;
    height: 54px;
    opacity: 0.94;
    filter: hue-rotate(24deg) saturate(0.62) brightness(1.08) contrast(1.18) drop-shadow(0 0 6px rgba(173, 184, 96, 0.26));
}

    .viewPovMetric {
        width: 66px;
        min-width: 66px;
        padding: 7px 9px;
    }

    .viewPovValue {
        font-size: 0.72rem;
    }
}



#button-pinConsole {
    width: 22px;
    height: 22px;
    padding: 4px;
    border-radius: 9px;
}

/* Compact data panel */
#overlay-hudConsole {
    height: 140px;
    bottom: -122px;
}

#overlay-hudConsole:not(:hover) {
    bottom: -122px;
}

#console {
    top: 18px;
    height: 84px;
    padding: 0 18px 40px;
}

#distanceDisplay-1,
#distanceDisplay-2,
#distanceDisplay-3,
#distanceDisplay-4,
#distanceDisplay-5,
#distanceDisplay-6,
#distanceDisplay-7,
#distanceDisplay-8,
#distanceDisplay-9,
#distanceDisplay-10 {
    padding: 6px 8px;
    font-size: 0.66rem;
}

@media (max-width: 900px) {
    #overlay-hudConsole {
        height: 132px;
        bottom: -116px;
    }

    #console {
        top: 18px;
        height: 78px;
        padding: 0 12px 38px;
    }
}



#button-openBirdPanel {
    position: absolute;
    left: 18px;
    bottom: 18px;
    width: auto;
    min-width: 82px;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 255, 241, 0.22);
    background: linear-gradient(180deg, rgba(12, 30, 39, 0.54), rgba(6, 15, 20, 0.2));
    box-shadow: var(--ui-shadow);
    color: #ffe9ac;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#button-openBirdPanel:hover {
    border-color: rgba(201, 255, 241, 0.34);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

#overlay-hudConsole {
    bottom: -122px;
    transition: bottom 0.32s ease;
}

#overlay-hudConsole:hover,
#overlay-hudConsole:not(:hover) {
    bottom: -122px;
    transition: bottom 0.32s ease;
}

#overlay-hudConsole.is-open {
    bottom: 0 !important;
}

#overlay-hudConsole:not(.is-open) {
    bottom: -122px !important;
}

@media (max-width: 900px) {
    #button-openBirdPanel {
        left: 12px;
        bottom: 12px;
        min-width: 74px;
        height: 36px;
        padding: 0 12px;
        font-size: 0.62rem;
    }

    #overlay-hudConsole {
        bottom: -116px;
    }

    #overlay-hudConsole:hover,
    #overlay-hudConsole:not(:hover),
    #overlay-hudConsole:not(.is-open) {
        bottom: -116px !important;
    }
}

@media (max-width: 820px) {
    #window-topActionBar {
        width: calc(100% - 112px);
        gap: 6px;
    }

    #window-topActionBar .action-button {
        min-width: 72px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    #window-topActionBar #button-useBinoculars {
        min-width: 94px;
    }

    #button-openMapsDrawer,
    #button-openToolsDrawer {
        top: 12px;
        width: 40px;
        height: 40px;
    }

    #button-openMapsDrawer {
        min-width: 72px;
        padding: 0 12px;
    }

    #overlay-hudMapsFrame,
    #overlay-hudButtonsFrame {
        top: 58px;
        max-height: calc(100vh - 70px);
    }

    #overlay-hudButtonsFrame {
        width: min(220px, calc(100vw - 24px));
        overflow: auto;
    }

    #overlay-hudMapsFrame {
        width: min(220px, calc(100vw - 24px));
        height: min(654px, calc(100vh - 70px));
        overflow: auto;
    }

    #mapsReadouts {
        top: 14px;
        left: 14px;
        right: 14px;
        width: calc(100% - 28px);
    }

    #mapLabel,
    #terrainMapLabel,
    #map,
    #terrainMap {
        left: 14px;
        width: calc(100% - 28px);
    }

    #mapLabel {
        top: 54px;
    }

    #map {
        top: 88px;
        height: 170px;
    }

    #terrainMapLabel {
        top: 276px;
    }

    #terrainMap {
        top: 310px;
        height: 170px;
    }

    #overlay-hudConsole {
        width: calc(100% - 20px);
    }

    .consoleMetricRow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .panel-close {
        top: 14px;
        right: 14px;
        min-width: 82px;
        height: 36px;
        padding: 0 12px;
        font-size: 0.66rem;
        letter-spacing: 0.14em;
    }

    .marblePanelTitle,
    #marbleScratchName,
    #marbleDetailName,
    #birdDetailName {
        margin-right: 92px;
        letter-spacing: 0.1em;
    }

    #birdDetailPanel,
    #marbleDetailPanel,
    #marbleTradePanel,
    #craftingStationPanel,
    .birdArchivePanel,
    #overlay-marbleGallery .marblePanel,
    #overlay-marbleScratch .marbleScratchPanel {
        padding: 20px 14px 16px;
        border-radius: 22px;
    }

    #table-birdDetails td,
    #table-marbleDetails td {
        padding: 6px 8px;
        font-size: 0.76rem;
    }

    #table-birdDetails td:first-child,
    #table-marbleDetails td:first-child,
    .consoleMetricLabel,
    .marbleStatLabel {
        font-size: 0.62rem;
    }

    .marbleStatUnit {
        font-size: 0.54rem;
    }

    #window-topActionBar {
        width: calc(100% - 96px);
        gap: 5px;
    }

    #window-topActionBar .action-button {
        min-width: 64px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.58rem;
    }

    #window-topActionBar #button-useBinoculars {
        min-width: 82px;
    }

    #button-openMapsDrawer,
    #button-openToolsDrawer {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    #button-openMapsDrawer {
        min-width: 64px;
        padding: 0 10px;
    }

    #button-openBirdPanel {
        min-width: 68px;
        height: 34px;
        padding: 0 10px;
        font-size: 0.58rem;
    }

    .tradeMarbleOption,
    .tradePrivacyItem {
        gap: 10px;
        padding: 12px;
    }

    .tradeMarbleOption img,
    .tradePrivacyItem img,
    .tradeRequestMarble img {
        width: 60px;
        height: 60px;
    }

    #overlay-hudConsole {
        width: calc(100% - 12px);
    }

    #console {
        left: 10px;
        width: calc(100% - 20px);
        padding: 0 8px 34px;
    }
}

@media (max-height: 820px) {
    #overlay-birdGallery,
    #overlay-marbleGallery,
    #overlay-marbleTrade,
    #overlay-craftingStation,
    #overlay-marbleScratch,
    #overlay-birdDetails,
    #overlay-marbleDetails,
    #overlay-playerStats {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .birdArchivePanel,
    #overlay-marbleGallery .marblePanel,
    #marbleTradePanel,
    #craftingStationPanel,
    #birdDetailPanel,
    #marbleDetailPanel,
    #overlay-marbleScratch .marbleScratchPanel,
    .statsPanel {
        max-height: calc(100vh - 24px);
    }
}
