:root {
    color-scheme: light;
    --ink: #0b1f24;
    --muted: #60757c;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-solid: #ffffff;
    --line: rgba(17, 71, 80, 0.14);
    --sea: #0c8db3;
    --sea-dark: #075b73;
    --mint: #2fac79;
    --leaf: #7bb342;
    --sun: #f4b64a;
    --coral: #e86d4f;
    --danger: #bf3f34;
    --shadow: 0 24px 70px rgba(8, 56, 66, 0.14);
    --soft-shadow: 0 16px 42px rgba(8, 56, 66, 0.10);
    --radius: 8px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e8f3f4;
    --muted: #9bb6bc;
    --panel: rgba(13, 31, 37, 0.90);
    --panel-solid: #10262d;
    --line: rgba(174, 216, 222, 0.14);
    --sea: #63b6c8;
    --sea-dark: #a8dbe4;
    --mint: #5dbb84;
    --leaf: #9cc963;
    --sun: #d9aa45;
    --coral: #e47a63;
    --danger: #e0645b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --soft-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 0%, rgba(123, 179, 66, 0.18), transparent 30rem),
        linear-gradient(145deg, #eef7f4 0%, #f7fbfd 42%, #edf7fb 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.capi-tour-active {
    overscroll-behavior: contain;
    touch-action: none;
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at 20% 0%, rgba(72, 183, 210, 0.16), transparent 30rem),
        linear-gradient(145deg, #071317 0%, #0b1b20 46%, #10262d 100%);
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

[id] {
    scroll-margin-top: 112px;
}

.shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    margin: 12px 0 28px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(20px);
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .map-stage,
:root[data-theme="dark"] .detail-panel,
:root[data-theme="dark"] .section-block,
:root[data-theme="dark"] .submit-panel,
:root[data-theme="dark"] .admin-card,
:root[data-theme="dark"] .admin-locked,
:root[data-theme="dark"] .chart-panel,
:root[data-theme="dark"] .map-inspector,
:root[data-theme="dark"] .modal-card {
    background: var(--panel);
}

:root[data-theme="dark"] .nav a,
:root[data-theme="dark"] .nav-button {
    color: #bdd5da;
}

:root[data-theme="dark"] #openShopButton {
    color: #ffffff;
    background: linear-gradient(135deg, #166534, #2f9e62);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 220px;
    gap: 12px;
}

.brand img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 22px rgba(8, 86, 104, 0.18);
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.05;
}

.brand strong {
    font-size: 18px;
    letter-spacing: 0;
}

.brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.nav a,
.nav-button {
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius);
    color: #315059;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav-button:hover {
    color: var(--sea-dark);
    background: rgba(12, 141, 179, 0.09);
    transform: translateY(-1px);
}

.account-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(233, 247, 248, 0.72);
    backdrop-filter: blur(12px);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.account-loading-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.account-loading-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--sea-dark);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(12, 141, 179, 0.18);
    border-top-color: var(--sea);
    border-radius: 50%;
    animation: loadingSpin 700ms linear infinite;
}

@keyframes loadingSpin {
    to {
        transform: rotate(360deg);
    }
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.theme-toggle {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--sea-dark);
    background: rgba(12, 141, 179, 0.08);
    cursor: pointer;
    font-weight: 800;
}

.language-control {
    display: grid;
    grid-template-columns: auto 76px;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.language-control span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 820;
}

.language-control select {
    min-height: 30px;
    padding: 4px 8px;
}

.account-strip,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-profile-button {
    gap: 9px;
}

.account-profile-button .avatar-frame {
    flex: 0 0 auto;
}

.account-profile-copy {
    display: grid;
    text-align: left;
}

.account-profile-copy small {
    color: var(--muted);
    font-size: 11px;
}

.heading-with-help {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(7, 91, 115, 0.18);
    border-radius: 50%;
    color: var(--sea-dark);
    background: rgba(12, 141, 179, 0.10);
    cursor: pointer;
    font-weight: 900;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 760;
    letter-spacing: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sea), var(--mint));
    box-shadow: 0 16px 28px rgba(12, 141, 179, 0.24);
}

.secondary-button {
    color: #103f49;
    background: #ffffff;
    border: 1px solid var(--line);
}

.ghost-button {
    color: #17424c;
    background: rgba(12, 141, 179, 0.08);
}

#openShopButton {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.26);
}

#openShopButton::before {
    content: "🌿";
    margin-right: 6px;
}

.link-button {
    min-height: 34px;
    color: var(--sea-dark);
    background: transparent;
}

.danger-button {
    color: #ffffff;
    background: var(--danger);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
    transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active {
    transform: translateY(0);
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    min-height: 0;
    align-items: center;
    padding: 48px 64px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(120deg, rgba(2, 76, 94, 0.90), rgba(12, 141, 179, 0.72)),
        url("img/CaspianGuardiansLogo.png") center right 8% / min(55vw, 720px) no-repeat,
        #0d6f89;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 22%;
    background: linear-gradient(0deg, rgba(0, 47, 57, 0.38), transparent);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.eyebrow,
.section-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow {
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.86);
}

.hero-copy h1 {
    max-width: 920px;
    margin: 22px 0 18px;
    font-size: 56px;
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.6;
}

.mission-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mission-panel > div {
    min-width: 0;
    min-height: 134px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.mission-panel > div:nth-child(2) {
    animation-delay: 80ms;
}

.mission-panel > div:nth-child(3) {
    animation-delay: 160ms;
}

.mission-panel > div:nth-child(4) {
    animation-delay: 240ms;
}

.metric-value,
.metric-label {
    display: block;
}

.metric-value {
    max-width: 100%;
    white-space: nowrap;
    font-size: clamp(28px, 3.6vw, 46px);
    font-weight: 880;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.72fr);
    gap: 22px;
    margin-top: 28px;
}

.map-stage,
.detail-panel,
.section-block,
.submit-panel,
.admin-card,
.admin-locked,
.chart-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
}

.map-stage,
.section-block {
    padding: clamp(18px, 2vw, 28px);
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.section-heading span {
    align-self: flex-start;
    color: var(--sea-dark);
    background: rgba(12, 141, 179, 0.09);
}

.section-heading h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: 0;
}

.map-toolbar {
    display: grid;
    grid-template-columns: minmax(200px, 1.35fr) repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    color: #38585f;
    font-size: 13px;
    font-weight: 760;
}

.date-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    color: #38585f;
    font-size: 13px;
    font-weight: 760;
}

:root[data-theme="dark"] label {
    color: #bdd5da;
}

:root[data-theme="dark"] .date-field {
    color: #bdd5da;
}

:root[data-theme="dark"] .approximate-trash-field {
    border-color: rgba(59, 201, 140, 0.24);
    color: #d8eff2;
    background:
        linear-gradient(135deg, rgba(59, 201, 140, 0.14), rgba(244, 197, 91, 0.12)),
        rgba(8, 22, 27, 0.62);
}

:root[data-theme="dark"] .approximate-trash-field select,
:root[data-theme="dark"] .approximate-trash-field input {
    border-color: rgba(59, 201, 140, 0.28);
    background: rgba(12, 28, 34, 0.86);
}

:root[data-theme="dark"] .exact-trash-section,
:root[data-theme="dark"] .exact-trash-toggle {
    border-color: rgba(180, 226, 232, 0.14);
    background: rgba(8, 22, 27, 0.62);
}

:root[data-theme="dark"] .exact-trash-toggle {
    color: #9fe7f4;
}

.inline-check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.inline-check input {
    width: 16px;
    min-width: 16px;
    min-height: 16px;
    padding: 0;
}

.approximate-trash-field {
    padding: 12px;
    border: 1px solid rgba(47, 172, 121, 0.24);
    border-radius: var(--radius);
    color: #24514a;
    background:
        linear-gradient(135deg, rgba(47, 172, 121, 0.13), rgba(244, 182, 74, 0.15)),
        rgba(255, 255, 255, 0.72);
}

.approximate-trash-field select,
.approximate-trash-field input {
    border-color: rgba(47, 172, 121, 0.28);
    background: rgba(255, 255, 255, 0.94);
}

.exact-trash-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(12, 141, 179, 0.16);
    border-radius: var(--radius);
    background: rgba(235, 247, 249, 0.58);
}

.exact-trash-toggle {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(12, 141, 179, 0.16);
    border-radius: var(--radius);
    color: var(--sea-dark);
    background: rgba(255, 255, 255, 0.78);
}

.exact-trash-title {
    margin-bottom: 0;
}

.exact-trash-section:not(.is-open) .exact-trash-title {
    display: none;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid rgba(7, 91, 115, 0.16);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    outline: none;
    transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="file"] {
    min-height: 44px;
    padding: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    border: 0;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--sea);
    font-weight: 800;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    border-color: rgba(180, 226, 232, 0.18);
    color: var(--ink);
    background: rgba(8, 22, 27, 0.86);
}

select[multiple] {
    min-height: 128px;
}

textarea {
    resize: vertical;
    line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(12, 141, 179, 0.55);
    box-shadow: 0 0 0 4px rgba(12, 141, 179, 0.12);
    background: #ffffff;
}

:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
    background: #10262d;
}

.map-wrap {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(220px, 0.32fr);
    gap: 16px;
    align-items: stretch;
}

.map-canvas {
    position: relative;
    width: 100%;
    justify-self: stretch;
}

.map-canvas.google-active {
    width: 100%;
    max-width: 820px;
}

.map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
}

.map-controls button {
    min-width: 34px;
    min-height: 34px;
    border: 0;
    border-radius: var(--radius);
    color: var(--sea-dark);
    background: rgba(12, 141, 179, 0.10);
    cursor: pointer;
    font-weight: 880;
}

.caspian-map {
    display: block;
    width: 100%;
    aspect-ratio: 1672 / 941;
    min-height: 0;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: #b9dfeb;
    cursor: grab;
    overflow: hidden;
    touch-action: none;
}

.google-map {
    width: min(100%, 760px);
    height: clamp(560px, 64vw, 760px);
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    overflow: hidden;
    background: #b9dfeb;
}

.google-map .gm-style {
    font-family: inherit;
}

.google-map-marker {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 12px 24px rgba(6, 54, 64, 0.22);
}

.google-map-marker.watch {
    background: var(--sun);
}

.google-map-marker.danger {
    background: var(--coral);
}

.caspian-map:active {
    cursor: grabbing;
}

.map-raster {
    pointer-events: none;
    image-rendering: auto;
    transform: translateZ(0);
    filter: saturate(1.04) contrast(1.03);
}

.beach-feature {
    cursor: pointer;
    transition: opacity 160ms ease, transform 180ms ease, filter 180ms ease;
    transform-origin: center;
}

.beach-zone {
    fill: rgba(47, 172, 121, 0.16);
    stroke: rgba(47, 172, 121, 0.58);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    transition: fill 180ms ease, stroke 180ms ease, transform 180ms ease, opacity 180ms ease;
    transform-origin: center;
}

.beach-feature:hover,
.beach-feature.active {
    filter: drop-shadow(0 8px 12px rgba(7, 91, 115, 0.18));
}

.beach-feature:hover .beach-zone,
.beach-feature.active .beach-zone {
    fill: rgba(244, 182, 74, 0.28);
    stroke: rgba(232, 109, 79, 0.75);
}

.beach-feature.dimmed {
    opacity: 0.16;
}

.marker-outer {
    fill: rgba(255, 255, 255, 0.94);
    stroke: rgba(6, 56, 68, 0.18);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    transition: transform 180ms ease;
    transform-box: fill-box;
    transform-origin: center;
}

.marker-inner {
    fill: var(--mint);
    transition: transform 180ms ease;
    transform-box: fill-box;
    transform-origin: center;
}

.beach-feature[data-danger="danger"] .marker-inner {
    fill: var(--coral);
}

.beach-feature[data-danger="watch"] .marker-inner {
    fill: var(--sun);
}

.beach-feature:hover .marker-outer,
.beach-feature.active .marker-outer {
    transform: scale(1.16);
}

.beach-feature:hover .marker-inner,
.beach-feature.active .marker-inner {
    transform: scale(1.18);
}

.preview-marker .preview-area {
    fill: rgba(12, 141, 179, 0.14);
    stroke: rgba(12, 141, 179, 0.70);
    stroke-width: 2;
    stroke-dasharray: 7 6;
    vector-effect: non-scaling-stroke;
}

.preview-marker .preview-dot {
    fill: #ffffff;
    stroke: var(--sea-dark);
    stroke-width: 4;
    vector-effect: non-scaling-stroke;
}

.marker-label {
    font-size: 12px;
    font-weight: 850;
    fill: #0b3540;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.88);
    stroke-width: 4;
    pointer-events: none;
}

.alert-feature {
    cursor: pointer;
}

.alert-pulse {
    fill: rgba(232, 109, 79, 0.18);
    stroke: rgba(191, 63, 52, 0.78);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    animation: alertPulse 2.6s ease-in-out infinite;
}

.alert-dot {
    fill: var(--danger);
    stroke: #ffffff;
    stroke-width: 4;
    vector-effect: non-scaling-stroke;
}

.alert-feature[data-alert-type="oil"] .alert-dot,
.alert-feature[data-alert-type="oil"] .alert-pulse {
    fill: rgba(20, 28, 31, 0.28);
    stroke: rgba(20, 28, 31, 0.80);
}

.alert-feature[data-alert-type="algae"] .alert-dot,
.alert-feature[data-alert-type="algae"] .alert-pulse {
    fill: rgba(123, 179, 66, 0.28);
    stroke: rgba(93, 137, 42, 0.82);
}

.alert-feature[data-alert-type="water-level"] .alert-dot,
.alert-feature[data-alert-type="water-level"] .alert-pulse {
    fill: rgba(12, 141, 179, 0.28);
    stroke: rgba(7, 91, 115, 0.82);
}

.alert-label {
    font-size: 12px;
    font-weight: 880;
    fill: #751f19;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.90);
    stroke-width: 4;
    pointer-events: none;
}

@keyframes alertPulse {
    0%,
    100% {
        opacity: 0.70;
    }

    50% {
        opacity: 0.30;
    }
}

.map-inspector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.environment-panel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(231, 247, 246, 0.74)),
        radial-gradient(circle at 100% 0%, rgba(47, 172, 121, 0.12), transparent 18rem);
}

.environment-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.environment-head h3 {
    margin: 8px 0 0;
    font-size: 24px;
    line-height: 1.1;
}

.year-control {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.62);
}

.year-control strong {
    color: var(--sea-dark);
    font-size: 20px;
}

.year-control input {
    min-height: 28px;
    padding: 0;
}

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

.environment-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.environment-card h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.environment-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 9px;
    border-left: 3px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
}

.environment-row strong {
    display: grid;
    justify-items: end;
    gap: 3px;
    color: var(--ink);
    text-align: right;
}

.environment-row[data-tone="clean"] {
    border-left-color: #2fac79;
    background: rgba(47, 172, 121, 0.08);
}

.environment-row[data-tone="watch"] {
    border-left-color: #f2ad24;
    background: rgba(242, 173, 36, 0.10);
}

.environment-row[data-tone="warning"] {
    border-left-color: #f08a2a;
    background: rgba(240, 138, 42, 0.10);
}

.environment-row[data-tone="danger"] {
    border-left-color: #e15544;
    background: rgba(225, 85, 68, 0.10);
}

.metric-delta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
}

.metric-delta small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 760;
}

.metric-delta.up {
    color: #168457;
}

.metric-delta.down {
    color: #c23e35;
}

.metric-delta.neutral {
    color: var(--muted);
}

.source-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
}

.source-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: 999px;
    color: var(--sea-dark);
    background: rgba(255, 255, 255, 0.78);
}

.map-inspector h3,
.panel-empty h2,
.card-title h3,
.chart-head h3,
.beach-card h3,
.request-card h3,
.analysis-card h3 {
    margin: 0;
}

.map-inspector p,
.panel-empty p,
.analysis-card p,
.site-footer p,
.request-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.status-pill,
.mini-pill,
.source-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(47, 172, 121, 0.12);
    color: #126344;
    font-size: 12px;
    font-weight: 850;
}

.status-pill.watch,
.mini-pill.watch {
    background: rgba(244, 182, 74, 0.18);
    color: #8d5b00;
}

.status-pill.danger,
.mini-pill.danger {
    background: rgba(232, 109, 79, 0.16);
    color: #a1362a;
}

.detail-panel {
    min-height: 760px;
    padding: 20px;
    position: sticky;
    top: 104px;
}

.panel-empty {
    display: grid;
    place-content: center;
    min-height: 520px;
    gap: 12px;
    text-align: left;
}

.panel-empty span {
    color: var(--sea-dark);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.beach-detail {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.detail-head h2 {
    margin: 8px 0 4px;
    font-size: 32px;
    line-height: 1;
}

.detail-head p {
    margin: 0;
    color: var(--muted);
}

.detail-metrics,
.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.metric-card,
.mini-stat {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.metric-card strong,
.mini-stat strong {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.metric-card span,
.mini-stat span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: 999px;
    color: #214c55;
    background: #ffffff;
    font-size: 12px;
    font-weight: 760;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-section h3 {
    margin: 0;
    font-size: 17px;
}

.history-list,
.species-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-list li,
.species-list li {
    padding: 10px 12px;
    border-left: 3px solid var(--sea);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: rgba(12, 141, 179, 0.08);
    color: #315059;
    font-size: 13px;
}

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

.beach-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    object-fit: cover;
    background: rgba(7, 91, 115, 0.08);
}

.mini-chart {
    display: grid;
    gap: 10px;
}

.mini-chart-row {
    display: grid;
    grid-template-columns: minmax(86px, 112px) minmax(70px, 1fr) minmax(48px, auto);
    align-items: center;
    gap: 10px;
    color: #355b62;
    font-size: 12px;
    font-weight: 760;
}

.mini-chart-row span,
.mini-chart-row strong {
    min-width: 0;
}

.mini-chart-row strong {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mini-chart-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(7, 91, 115, 0.10);
}

.mini-chart-bar span {
    display: block;
    width: var(--width);
    height: 100%;
    border-radius: inherit;
    background: var(--chart-tone, var(--sea));
}

.mini-chart-row[data-tone="clean"] {
    --chart-tone: #2fac79;
}

.mini-chart-row[data-tone="watch"] {
    --chart-tone: #f2ad24;
}

.mini-chart-row[data-tone="warning"] {
    --chart-tone: #f08a2a;
}

.mini-chart-row[data-tone="danger"] {
    --chart-tone: #e15544;
}

.section-block {
    margin-top: 28px;
}

.cleanup-callout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(224, 245, 240, 0.88)),
        radial-gradient(circle at 92% 0%, rgba(244, 182, 74, 0.18), transparent 22rem);
}

.cleanup-callout .section-heading {
    margin-bottom: 0;
}

.row-heading {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.analysis-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.catalog-body {
    margin-top: 16px;
}

.beach-grid,
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.beach-card,
.analysis-card,
.request-card,
.user-row {
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
}

.beach-card,
.analysis-card,
.request-card {
    padding: 16px;
}

.beach-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border 180ms ease;
}

.beach-card:hover {
    transform: translateY(-4px);
    border-color: rgba(12, 141, 179, 0.32);
    box-shadow: 0 18px 36px rgba(8, 56, 66, 0.11);
}

.beach-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.beach-card p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.chart-panel {
    padding: 18px;
}

.wide-chart {
    grid-column: 1 / -1;
}

.ceri-layout {
    display: grid;
    grid-template-columns: 172px 180px 1fr;
    gap: 18px;
    align-items: center;
}

.ceri-ring {
    display: grid;
    place-items: center;
    width: 156px;
    height: 156px;
    border-radius: 50%;
    color: var(--ink);
    background:
        radial-gradient(circle at center, var(--panel-solid) 0 56%, transparent 57%),
        conic-gradient(var(--danger) var(--ceri), rgba(7, 91, 115, 0.10) 0);
    font-size: 42px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(7, 91, 115, 0.10);
}

.ceri-factor-list {
    display: grid;
    gap: 10px;
}

.ceri-capi-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 170px;
    padding: 10px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(232, 247, 248, 0.78));
}

.ceri-capi-card img {
    width: 132px;
    height: 122px;
    border-radius: 14px;
    object-fit: contain;
    background: #ffffff;
}

.ceri-capi-card strong {
    color: var(--sea-dark);
    font-size: 13px;
}

.ceri-factor {
    display: grid;
    grid-template-columns: 160px 1fr 44px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 780;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.forecast-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 190px;
    padding: 16px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
}

.forecast-card strong {
    color: var(--sea-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.forecast-card h3,
.forecast-card p {
    margin: 0;
}

.forecast-card p {
    color: var(--muted);
    line-height: 1.5;
}

.forecast-card span {
    align-self: end;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.forecast-card .forecast-link {
    justify-self: start;
    align-self: end;
    color: var(--sea);
    font-size: 13px;
    font-weight: 840;
    text-decoration: none;
}

.forecast-card .forecast-link:hover {
    text-decoration: underline;
}

.forecast-card.is-empty {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.46);
}

.chart-head,
.card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.chart-head span,
.card-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
}

.bar-chart,
.trash-types-chart {
    display: grid;
    gap: 12px;
}

.top-list {
    display: grid;
    gap: 10px;
}

.top-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
}

.top-row span:first-child {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--sea);
    font-weight: 860;
}

.top-row strong,
.top-row small {
    display: block;
}

.top-row small {
    color: var(--muted);
    font-size: 12px;
}

.top-row em {
    color: var(--sea-dark);
    font-style: normal;
    font-weight: 880;
}

.cg-beach-rating-section .section-heading p {
    max-width: 560px;
    margin: 6px 0 0;
    color: var(--sea-dark);
    font-weight: 780;
}

.cg-beach-rating-list {
    display: grid;
    gap: 12px;
}

.cg-beach-rating-card,
.cg-beach-rating-empty {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.76);
}

.cg-beach-rating-card {
    grid-template-columns: 48px 1fr minmax(132px, auto);
}

.cg-rating-rank {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sea), var(--mint));
    font-size: 18px;
    font-weight: 920;
}

.cg-rating-main {
    display: grid;
    gap: 6px;
}

.cg-rating-main strong,
.cg-rating-main span,
.cg-rating-main p,
.cg-rating-score strong,
.cg-rating-score span,
.cg-rating-score small {
    display: block;
}

.cg-rating-main span,
.cg-rating-main p,
.cg-rating-score span,
.cg-rating-score small,
.cg-beach-rating-empty span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.cg-rating-main p {
    margin: 0;
}

.cg-rating-score {
    display: grid;
    gap: 3px;
    justify-items: end;
    text-align: right;
}

.cg-rating-score strong {
    color: var(--sea-dark);
    font-size: 22px;
    font-weight: 920;
}

.chart-row,
.trash-type-row {
    display: grid;
    grid-template-columns: minmax(120px, 148px) minmax(80px, 1fr) minmax(86px, auto);
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 780;
}

.chart-row span,
.trash-type-row span,
.chart-row strong,
.trash-type-row strong {
    min-width: 0;
}

.chart-row strong,
.trash-type-row strong {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.chart-track,
.trash-track {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(7, 91, 115, 0.10);
}

.chart-track span,
.trash-track span {
    display: block;
    width: var(--width);
    height: 100%;
    border-radius: inherit;
    background: var(--chart-tone, #0c8db3);
}

.chart-row[data-tone="clean"],
.trash-type-row[data-tone="clean"] {
    --chart-tone: #2fac79;
}

.chart-row[data-tone="watch"],
.trash-type-row[data-tone="watch"] {
    --chart-tone: #f2ad24;
}

.chart-row[data-tone="warning"],
.trash-type-row[data-tone="warning"] {
    --chart-tone: #f08a2a;
}

.chart-row[data-tone="danger"],
.trash-type-row[data-tone="danger"] {
    --chart-tone: #e15544;
}

.chart-row[data-tone="neutral"],
.trash-type-row[data-tone="neutral"] {
    --chart-tone: var(--sea);
}

:root[data-theme="dark"] .chart-row[data-tone="clean"],
:root[data-theme="dark"] .trash-type-row[data-tone="clean"] {
    --chart-tone: #5dbb84;
}

:root[data-theme="dark"] .chart-row[data-tone="watch"],
:root[data-theme="dark"] .trash-type-row[data-tone="watch"] {
    --chart-tone: #d9aa45;
}

:root[data-theme="dark"] .chart-row[data-tone="warning"],
:root[data-theme="dark"] .trash-type-row[data-tone="warning"] {
    --chart-tone: #d9823f;
}

:root[data-theme="dark"] .chart-row[data-tone="danger"],
:root[data-theme="dark"] .trash-type-row[data-tone="danger"] {
    --chart-tone: #e0645b;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
    gap: 18px;
}

.ranking-list,
.request-list,
.user-list {
    display: grid;
    gap: 10px;
}

.ranking-expand-button {
    margin-top: 12px;
}

.mail-outbox {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(7, 91, 115, 0.12);
}

.mail-row {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(12, 141, 179, 0.07);
}

.mail-row strong,
.mail-row span {
    display: block;
}

.mail-row span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.mail-row a {
    justify-self: start;
    color: var(--sea-dark);
    font-size: 13px;
    font-weight: 840;
}

.beach-admin-tools {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(12, 141, 179, 0.06);
}

.admin-help {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.analysis-admin-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.analysis-admin-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.analysis-admin-row strong,
.analysis-admin-row span {
    display: block;
}

.analysis-admin-row span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.ranking-row {
    display: grid;
    grid-template-columns: 44px 46px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
}

.ranking-row-button {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.ranking-row-button:hover {
    border-color: rgba(12, 141, 179, 0.32);
    transform: translateY(-1px);
    box-shadow: var(--soft-shadow);
}

.ranking-tabs,
.shop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ranking-tab,
.shop-tab {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    font-weight: 760;
}

.ranking-tab.is-active,
.shop-tab.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--sea), var(--mint));
}

.ranking-avatar {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(7, 91, 115, 0.14);
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}

.avatar-frame {
    --frame-scale: 1;
    --frame-x: 0%;
    --frame-y: 0%;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    border-radius: 50%;
}

.avatar-frame-small {
    width: 34px;
    height: 34px;
}

.avatar-frame-ranking {
    width: 44px;
    height: 44px;
}

.avatar-frame-ranking .avatar-image {
    width: 100%;
    height: 100%;
}

.avatar-frame-large {
    width: 112px;
    height: 112px;
}

.avatar-image {
    width: 84%;
    height: 84%;
    aspect-ratio: 1 / 1;
    display: block;
    border: 2px solid rgba(7, 91, 115, 0.14);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: #ffffff;
}

.avatar-frame-image {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    transform: translate(
        calc(-50% + var(--frame-x)),
        calc(-50% + var(--frame-y))
    ) scale(var(--frame-scale));
    transform-origin: center;
}

.profile-identity {
    min-width: 0;
}

.profile-name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.profile-title-label {
    margin-top: 3px;
    color: var(--sea);
    font-size: 11px;
    font-weight: 820;
}

.nickname-style {
    display: inline-block;
    font-weight: 900;
}

.nickname-style-sea-blue {
    color: #0787c9;
}

.nickname-style-leaf-green {
    color: #27963c;
}

.nickname-style-coral-red {
    color: #e05854;
}

.nickname-style-royal-purple {
    color: #8158dd;
}

.nickname-style-amber-gold {
    color: #c98b12;
}

.nickname-style-deep-teal {
    color: #087f6b;
}

.nickname-style-soft-pink {
    color: #e45a9b;
}

.nickname-style-white-pearl {
    color: #f8fafc;
    text-shadow: 0 1px 5px rgba(7, 91, 115, 0.55);
}

.nickname-style-night-black {
    color: #111827;
}

.nickname-style-caspian-gradient,
.nickname-style-sunset-gradient,
.nickname-style-forest-gradient,
.nickname-style-neon-gradient,
.nickname-style-ice-gradient,
.nickname-style-royal-gradient,
.nickname-style-rainbow-flow,
.nickname-style-caspian-pulse,
.nickname-style-gold-shine,
.nickname-style-aurora-wave,
.nickname-style-toxic-pulse,
.nickname-style-azerbaijan-flag,
.nickname-style-kazakhstan-flag,
.nickname-style-caspian-flags {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.nickname-style-caspian-gradient {
    background-image: linear-gradient(90deg, #0077b6, #15c6a8);
}

.nickname-style-sunset-gradient {
    background-image: linear-gradient(90deg, #ff7a59, #ffcf5c);
}

.nickname-style-forest-gradient {
    background-image: linear-gradient(90deg, #1f8a4c, #9bd44a);
}

.nickname-style-neon-gradient {
    background-image: linear-gradient(90deg, #00d4ff, #7b2cff, #ff42d0);
}

.nickname-style-ice-gradient {
    background-image: linear-gradient(90deg, #e0f2fe, #38bdf8, #1d4ed8);
}

.nickname-style-royal-gradient {
    background-image: linear-gradient(90deg, #312e81, #7c3aed, #f0abfc);
}

.nickname-style-rainbow-flow {
    background-image: linear-gradient(90deg, #ff4d4d, #ffd166, #06d6a0, #118ab2, #9b5de5, #ff4d4d);
    background-size: 260% 100%;
    animation: nicknameRainbowFlow 3s linear infinite;
}

.nickname-style-caspian-pulse {
    background-image: linear-gradient(90deg, #034f84, #00c2a8, #034f84);
    background-size: 220% 100%;
    animation: nicknameCaspianPulse 2.6s ease-in-out infinite;
}

.nickname-style-gold-shine {
    background-image: linear-gradient(100deg, #8d5b00, #f7d774, #fff4b8, #d09014, #8d5b00);
    background-size: 240% 100%;
    animation: nicknameGoldShine 2.4s linear infinite;
}

.nickname-style-aurora-wave {
    background-image: linear-gradient(90deg, #22c55e, #06b6d4, #8b5cf6, #22c55e);
    background-size: 260% 100%;
    animation: nicknameRainbowFlow 3.4s linear infinite;
}

.nickname-style-toxic-pulse {
    background-image: linear-gradient(90deg, #84cc16, #22c55e, #052e16, #84cc16);
    background-size: 240% 100%;
    animation: nicknameCaspianPulse 2.1s ease-in-out infinite;
}

.nickname-style-azerbaijan-flag {
    background-image: linear-gradient(90deg, #00b5e2 0 33%, #ef3340 33% 66%, #509e2f 66% 100%);
    text-shadow: 0 0 7px rgba(0, 181, 226, 0.28);
}

.nickname-style-kazakhstan-flag {
    background-image: linear-gradient(90deg, #00abc9, #f7c948, #00abc9);
    background-size: 220% 100%;
    animation: nicknameGoldShine 3s linear infinite;
}

.nickname-style-caspian-flags {
    background-image: linear-gradient(90deg, #00b5e2, #ef3340, #509e2f, #00abc9, #f7c948, #00b5e2);
    background-size: 300% 100%;
    animation: nicknameRainbowFlow 3.2s linear infinite;
}

.active-badges {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    white-space: nowrap;
    vertical-align: middle;
}

.profile-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    font-size: 17px;
    line-height: 1;
    color: inherit;
    vertical-align: middle;
}

.profile-badge img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
}

.flag-badge {
    position: relative;
    display: inline-grid;
    width: 22px;
    height: 16px;
    overflow: hidden;
    border: 1px solid rgba(7, 91, 115, 0.18);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(7, 91, 115, 0.12);
}

.flag-badge-azerbaijan {
    background: linear-gradient(
        to bottom,
        #00b5e2 0 33.33%,
        #ef3340 33.33% 66.66%,
        #509e2f 66.66% 100%
    );
}

.flag-badge-azerbaijan::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 5px;
    height: 5px;
    border: 1.5px solid #ffffff;
    border-right-color: transparent;
    border-radius: 50%;
}

.flag-badge-azerbaijan::after {
    content: "✦";
    position: absolute;
    left: 12px;
    top: 4px;
    color: #ffffff;
    font-size: 5px;
    line-height: 1;
}

.flag-badge-kazakhstan {
    background: #00abc9;
}

.flag-badge-kazakhstan::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f7c948;
    box-shadow: 0 4px 0 -2px #f7c948;
}

.flag-badge-kazakhstan::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        #f7c948 0 2px,
        transparent 2px 4px
    );
}

.rank-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sea), var(--mint));
    font-weight: 880;
}

.ranking-row strong,
.ranking-row .profile-identity > span {
    display: block;
}

.ranking-row .profile-identity > span {
    color: var(--muted);
    font-size: 12px;
}

.ranking-points {
    color: var(--sea-dark);
    font-size: 18px;
    font-weight: 880;
}

.submit-panel {
    padding: 20px;
}

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

.full-field {
    grid-column: 1 / -1;
}

.beach-select-field {
    display: grid;
    align-content: start;
    gap: 6px;
}

.beach-select-field label {
    display: grid;
    gap: 6px;
}

.beach-suggestion-button {
    justify-self: start;
    padding: 0;
}

.rating-field {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.14);
    border-radius: var(--radius);
}

.rating-field legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    color: #c7d2d5;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    transition: color 140ms ease, transform 140ms ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f2ad24;
}

.star-rating label:hover {
    transform: translateY(-1px);
}

.approximate-data-note,
.safety-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 13px;
}

.approximate-data-note {
    color: #725408;
    background: rgba(242, 173, 36, 0.13);
}

.safety-note {
    color: #075b73;
    background: rgba(76, 169, 191, 0.13);
}

.chart-note {
    font-size: 12px;
    line-height: 1.45;
}

.admin-section {
    scroll-margin-top: 120px;
}

.admin-locked {
    padding: 22px;
}

.admin-locked h3 {
    margin: 0 0 8px;
}

.admin-locked p {
    margin: 0;
    color: var(--muted);
}

.admin-grid {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr) minmax(340px, 0.9fr);
    gap: 14px;
}

.admin-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 70;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, var(--sea-dark), var(--mint));
    box-shadow: 0 18px 36px rgba(8, 56, 66, 0.20);
    cursor: pointer;
    font-weight: 880;
}

.admin-drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 22px;
    overflow: auto;
    background: rgba(4, 28, 34, 0.58);
    backdrop-filter: blur(10px);
}

.admin-shell {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius);
    background: rgba(244, 250, 250, 0.96);
    box-shadow: var(--shadow);
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.admin-head .close-button {
    position: static;
    flex: 0 0 auto;
}

.admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.admin-save-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.admin-save-status.is-pending {
    color: #9a6200;
}

.admin-save-status.is-error {
    color: var(--danger);
}

.admin-drawer .admin-grid {
    display: grid;
}

.admin-card {
    padding: 18px;
}

.compact-form {
    gap: 10px;
}

.request-card {
    display: grid;
    gap: 12px;
}

.request-actions,
.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-actions button,
.user-actions button {
    min-height: 36px;
}

.approval-points-field {
    display: grid;
    grid-template-columns: auto 110px;
    align-items: center;
    gap: 8px;
}

.approval-points-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.trash-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.option-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.option-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.option-check input {
    width: 16px;
    min-width: 16px;
    min-height: 16px;
    padding: 0;
}

.field-title {
    margin-bottom: 8px;
    color: #38585f;
    font-size: 13px;
    font-weight: 760;
}

:root[data-theme="dark"] .field-title {
    color: #bdd5da;
}

.trash-weight-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
    min-height: 82px;
    padding: 8px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.trash-weight-row span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trash-weight-row input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    min-height: 16px;
    padding: 0;
}

.trash-weight-row input[type="number"] {
    min-height: 34px;
    padding: 6px 8px;
    background: #ffffff;
    opacity: 1;
}

.trash-weight-row input[type="number"]:disabled {
    color: transparent;
    background: rgba(255, 255, 255, 0.64);
}

.coordinate-sliders {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.62);
}

.coordinate-sliders input[type="range"] {
    padding: 0;
    min-height: 28px;
}

.coordinate-map-picker {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1672 / 941;
    justify-self: center;
    overflow: hidden;
    border: 1px solid rgba(7, 91, 115, 0.16);
    border-radius: var(--radius);
    background: #b9dfeb;
    cursor: crosshair;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    touch-action: none;
}

.coordinate-map-picker img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
}

.coordinate-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 8px 18px rgba(6, 54, 64, 0.22);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cleanup-user-picker {
    display: grid;
    gap: 10px;
}

.cleanup-user-results,
.selected-cleanup-users {
    display: grid;
    gap: 8px;
}

.cleanup-user-result,
.selected-cleanup-user {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.cleanup-user-result small,
.selected-cleanup-user b {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.cleanup-user-result b {
    color: var(--sea-dark);
    white-space: nowrap;
}

.selected-cleanup-user {
    border-color: rgba(47, 172, 121, 0.22);
    background: rgba(47, 172, 121, 0.10);
}

.user-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
}

.user-empty {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px dashed rgba(7, 91, 115, 0.20);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.56);
}

.user-empty strong,
.user-empty span {
    display: block;
}

.user-row h4 {
    margin: 0;
}

.user-row p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.user-name-editor {
    display: grid;
    gap: 6px;
}

.user-name-editor span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.analysis-card {
    display: grid;
    gap: 12px;
}

.analysis-card strong {
    color: var(--sea-dark);
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(280px, 0.55fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
    margin: 28px 0 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 248, 247, 0.90)),
        radial-gradient(circle at 0% 100%, rgba(47, 172, 121, 0.12), transparent 18rem);
    color: var(--ink);
    box-shadow: var(--soft-shadow);
}

.footer-main {
    display: grid;
    gap: 14px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
}

.footer-brand img {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    object-fit: cover;
    background: #01024c;
}

.footer-brand strong,
.footer-brand span {
    display: block;
}

.footer-brand span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.site-footer p {
    color: var(--muted);
}

:root[data-theme="dark"] .mini-stat,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .detail-metric,
:root[data-theme="dark"] .beach-card,
:root[data-theme="dark"] .request-card,
:root[data-theme="dark"] .analysis-card,
:root[data-theme="dark"] .forecast-card,
:root[data-theme="dark"] .environment-card,
:root[data-theme="dark"] .year-control,
:root[data-theme="dark"] .top-row,
:root[data-theme="dark"] .cg-beach-rating-card,
:root[data-theme="dark"] .cg-beach-rating-empty,
:root[data-theme="dark"] .ceri-capi-card,
:root[data-theme="dark"] .ranking-row,
:root[data-theme="dark"] .analysis-admin-row,
:root[data-theme="dark"] .user-empty,
:root[data-theme="dark"] .mail-row,
:root[data-theme="dark"] .user-row,
:root[data-theme="dark"] .trash-weight-row,
:root[data-theme="dark"] .profile-stat,
:root[data-theme="dark"] .profile-history,
:root[data-theme="dark"] .cleanup-user-result,
:root[data-theme="dark"] .selected-cleanup-user,
:root[data-theme="dark"] .coordinate-sliders {
    border-color: rgba(180, 226, 232, 0.14);
    background: rgba(8, 22, 27, 0.62);
}

:root[data-theme="dark"] .shop-card,
:root[data-theme="dark"] .customization-group,
:root[data-theme="dark"] .achievement-card,
:root[data-theme="dark"] .public-profile-stat,
:root[data-theme="dark"] .ranking-tab,
:root[data-theme="dark"] .shop-tab {
    border-color: rgba(180, 226, 232, 0.14);
    background: rgba(8, 22, 27, 0.62);
}

:root[data-theme="dark"] .account-loading-overlay {
    background: rgba(4, 17, 21, 0.78);
}

:root[data-theme="dark"] .account-loading-card {
    color: #d8eff2;
    background: rgba(8, 22, 27, 0.94);
}

:root[data-theme="dark"] .capi-help-button,
:root[data-theme="dark"] .capi-health-panel,
:root[data-theme="dark"] .capi-dialogue-card,
:root[data-theme="dark"] .capi-achievement-pop {
    color: var(--ink);
    border-color: rgba(180, 226, 232, 0.16);
    background: #0b1c22;
}

:root[data-theme="dark"] .capi-tour-mascot,
:root[data-theme="dark"] .capi-health-hero {
    background: #0a1a20;
}

:root[data-theme="dark"] .capi-tour-shell::before {
    border-color: rgba(180, 226, 232, 0.16);
    background: #0b1c22;
}

:root[data-theme="dark"] .nickname-style-night-black {
    color: #f8fafc;
    text-shadow: 0 0 6px rgba(248, 250, 252, 0.32);
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .language-control,
:root[data-theme="dark"] .map-controls,
:root[data-theme="dark"] .source-strip span,
:root[data-theme="dark"] .tag {
    border-color: rgba(180, 226, 232, 0.16);
    color: #d8eff2;
    background: rgba(10, 29, 35, 0.74);
}

:root[data-theme="dark"] .link-button,
:root[data-theme="dark"] .analysis-card strong,
:root[data-theme="dark"] .forecast-card strong,
:root[data-theme="dark"] .top-row em,
:root[data-theme="dark"] .ranking-points,
:root[data-theme="dark"] .year-control strong,
:root[data-theme="dark"] .source-strip span {
    color: #9fe7f4;
}

:root[data-theme="dark"] .environment-panel,
:root[data-theme="dark"] .cleanup-callout,
:root[data-theme="dark"] .beach-admin-tools {
    border-color: rgba(180, 226, 232, 0.14);
    background:
        linear-gradient(135deg, rgba(12, 28, 34, 0.88), rgba(14, 38, 45, 0.78)),
        radial-gradient(circle at 100% 0%, rgba(72, 183, 210, 0.10), transparent 18rem);
}

:root[data-theme="dark"] .admin-shell {
    border-color: rgba(180, 226, 232, 0.18);
    background: rgba(8, 20, 25, 0.96);
}

:root[data-theme="dark"] .site-footer {
    background:
        linear-gradient(135deg, rgba(9, 24, 29, 0.96), rgba(13, 36, 42, 0.92)),
        radial-gradient(circle at 0% 100%, rgba(72, 183, 210, 0.10), transparent 18rem);
    color: var(--ink);
}

:root[data-theme="dark"] .footer-brand img {
    background: #01024c;
}

:root[data-theme="dark"] .history-list li,
:root[data-theme="dark"] .species-list li {
    color: #c6dde2;
    background: rgba(72, 183, 210, 0.10);
}

:root[data-theme="dark"] .mini-chart-row,
:root[data-theme="dark"] .environment-row {
    color: #bdd5da;
}

:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .mini-pill,
:root[data-theme="dark"] .source-pill {
    color: #c8f7df;
    background: rgba(47, 172, 121, 0.16);
}

:root[data-theme="dark"] .status-pill.watch,
:root[data-theme="dark"] .mini-pill.watch {
    color: #ffe2a3;
    background: rgba(244, 182, 74, 0.16);
}

:root[data-theme="dark"] .status-pill.danger,
:root[data-theme="dark"] .mini-pill.danger {
    color: #ffb8ad;
    background: rgba(232, 109, 79, 0.17);
}

:root[data-theme="dark"] .profile-history li,
:root[data-theme="dark"] .trash-weight-row input[type="number"],
:root[data-theme="dark"] .trash-weight-row input[type="number"]:disabled {
    background: rgba(12, 28, 34, 0.82);
}

:root[data-theme="dark"] .marker-label {
    fill: #f2fbfb;
    stroke: rgba(3, 13, 16, 0.9);
}

:root[data-theme="dark"] .alert-label {
    fill: #ffd6d0;
    stroke: rgba(3, 13, 16, 0.92);
}

.footer-legal {
    display: grid;
    gap: 8px;
    padding-left: 20px;
    border-left: 1px solid var(--line);
}

.footer-legal p {
    font-size: 12px;
}

.modal {
    width: min(480px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
}

.modal::backdrop {
    background: rgba(4, 28, 34, 0.56);
    backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 28px);
    overflow: auto;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.profile-modal {
    width: min(700px, calc(100% - 28px));
}

.ranking-modal {
    width: min(860px, calc(100% - 28px));
}

.shop-modal {
    width: min(1120px, calc(100% - 28px));
}

.shop-modal-card {
    max-height: min(900px, calc(100vh - 30px));
    overflow: auto;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid rgba(49, 145, 62, 0.18);
    border-radius: var(--radius);
    color: #17682b;
    background: rgba(99, 190, 79, 0.10);
    font-weight: 880;
}

.eco-coin-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.shop-card {
    display: grid;
    align-content: start;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
}

.shop-card h3,
.shop-card p {
    margin: 0;
}

.shop-card p {
    color: var(--muted);
    font-size: 13px;
}

.shop-preview {
    display: grid;
    place-items: center;
    min-height: 152px;
    padding: 16px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 20%, rgba(71, 190, 204, 0.16), transparent 56%),
        linear-gradient(145deg, rgba(236, 248, 248, 0.94), rgba(220, 240, 237, 0.86));
    overflow: hidden;
}

.shop-preview-profile {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.shop-preview-profile strong {
    font-size: 15px;
}

.shop-preview-badge {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    font-size: 52px;
}

.shop-preview-badge img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.shop-price {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #17682b;
    font-weight: 880;
}

.shop-price img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-actions button {
    flex: 1 1 120px;
}

.profile-customizations {
    display: grid;
    gap: 12px;
}

.customization-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.62);
}

.customization-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.customization-option {
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    cursor: pointer;
}

.customization-option.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--sea), var(--mint));
}

.profile-achievements {
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
}

.profile-achievements summary {
    cursor: pointer;
    font-weight: 880;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.achievement-card {
    width: 100%;
    appearance: none;
    display: grid;
    justify-items: center;
    gap: 5px;
    min-height: 112px;
    padding: 10px 6px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    cursor: pointer;
}

.achievement-card.is-locked {
    filter: grayscale(1);
    opacity: 0.42;
}

.achievement-card:focus-visible {
    outline: 3px solid rgba(12, 141, 179, 0.36);
    outline-offset: 2px;
}

.achievement-icon {
    font-size: 30px;
}

.achievement-image {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.achievement-card strong {
    font-size: 11px;
}

.public-profile-modal {
    width: min(760px, calc(100% - 28px));
}

.public-profile-card {
    display: grid;
    gap: 16px;
}

.public-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.public-profile-stat {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.public-profile-stat strong,
.public-profile-stat span {
    display: block;
    max-width: 100%;
}

.public-profile-stat strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.public-profile-stat span {
    overflow-wrap: anywhere;
}

.public-profile-stat span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.ranking-modal-card {
    max-height: min(820px, calc(100vh - 40px));
}

.expanded-ranking-list {
    max-height: calc(100vh - 230px);
    padding-right: 4px;
    overflow: auto;
}

.profile-editor {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
}

.profile-editor .avatar-image {
    width: 84%;
    height: 84%;
    aspect-ratio: 1 / 1;
    display: block;
    border: 1px solid rgba(7, 91, 115, 0.12);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: rgba(12, 141, 179, 0.08);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-stat {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.profile-stat strong,
.profile-stat span {
    display: block;
    max-width: 100%;
}

.profile-stat strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.profile-stat span {
    overflow-wrap: anywhere;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.profile-history {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(7, 91, 115, 0.10);
    border-radius: var(--radius);
    background: rgba(235, 247, 249, 0.72);
}

.profile-history h3 {
    margin: 0;
    font-size: 15px;
    color: var(--sea-dark);
}

.profile-history ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-history li {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
}

.profile-history li strong,
.profile-history li span {
    display: block;
}

.profile-history li span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: rgba(7, 91, 115, 0.08);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.auth-note {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.capi-help-button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 6px 13px 6px 7px;
    border: 1px solid rgba(7, 91, 115, 0.16);
    border-radius: 999px;
    color: var(--sea-dark);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    font-weight: 900;
    transition: box-shadow 180ms ease, background 180ms ease;
}

.capi-help-button img {
    width: 40px;
    height: 34px;
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
}

.capi-health-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.capi-health-panel {
    position: fixed;
    left: 18px;
    bottom: 82px;
    z-index: 121;
    display: grid;
    gap: 12px;
    width: min(330px, calc(100vw - 36px));
    padding: 16px;
    border: 1px solid rgba(7, 91, 115, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    animation: riseIn 220ms ease both;
}

.points-help-layout,
.capi-advice-layout {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 16px;
}

.points-help-layout img,
.capi-advice-layout img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: var(--radius);
    background: rgba(235, 247, 249, 0.88);
}

.points-help-layout p,
.capi-advice-layout p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.capi-advice-layout {
    grid-template-columns: 150px 1fr;
}

.capi-advice-layout img {
    width: 150px;
    height: 150px;
}

.capi-advice-layout > div {
    display: grid;
    gap: 10px;
}

.capi-advice-layout span {
    color: var(--sea-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.capi-advice-layout h2 {
    margin: 0;
}

.capi-health-hero {
    display: grid;
    place-items: center;
    min-height: 148px;
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(235, 247, 249, 0.92), rgba(241, 250, 244, 0.86));
}

.capi-health-hero img {
    width: 170px;
    height: 140px;
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
}

.capi-health-panel strong,
.capi-health-panel p {
    display: block;
    margin: 0;
}

.capi-health-panel p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.capi-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: grid;
    place-items: end center;
    padding: 28px;
    background: transparent;
    max-height: 100vh;
    overflow: hidden;
    pointer-events: none;
}

body.capi-tour-active::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(4, 28, 34, 0.28);
    pointer-events: auto;
}

body.capi-tour-active .shell > header,
body.capi-tour-active .shell > main > section,
body.capi-tour-active .shell > footer,
body.capi-tour-active .admin-drawer,
body.capi-tour-active .modal[open] .modal-card {
    filter: blur(6px);
    opacity: 0.52;
    transition: filter 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

body.capi-tour-active .capi-tour-focus-container,
body.capi-tour-active .modal[open].capi-tour-focus-container .modal-card {
    position: relative;
    z-index: 520;
    filter: none !important;
    opacity: 1 !important;
}

body.capi-tour-active .capi-tour-focus {
    position: relative;
    z-index: 521;
    outline: 3px solid rgba(242, 173, 36, 0.94);
    outline-offset: 8px;
    box-shadow: 0 0 0 12px rgba(242, 173, 36, 0.16), 0 20px 50px rgba(4, 28, 34, 0.26);
    pointer-events: none;
}

.modal.capi-tour-preview-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 520;
    width: min(760px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    margin: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.shop-modal.capi-tour-preview-dialog[open] {
    width: min(1020px, calc(100% - 28px));
}

.capi-tour-shell {
    position: relative;
    z-index: 901;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(240px, 325px) minmax(420px, 700px);
    align-items: stretch;
    gap: 24px;
    width: min(1150px, calc(100vw - 56px));
    overflow: visible;
    pointer-events: auto;
}

.capi-tour-shell::before {
    content: "";
    position: absolute;
    inset: -12px;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 24px;
    background: rgba(244, 250, 250, 0.98);
    box-shadow: 0 24px 70px rgba(4, 28, 34, 0.30);
}

.capi-tour-mascot {
    display: grid;
    place-items: center;
    min-height: 302px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.capi-tour-mascot img {
    width: min(286px, 100%);
    max-height: 280px;
    object-fit: contain;
    border-radius: 18px;
    background: #ffffff;
}

.capi-dialogue-card {
    display: grid;
    gap: 12px;
    min-height: 350px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: var(--radius);
    color: var(--ink);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.capi-dialogue-card > span {
    color: var(--sea-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.capi-dialogue-card h2,
.capi-dialogue-card p {
    margin: 0;
}

.capi-dialogue-card p {
    min-height: 158px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.58;
}

.capi-tour-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.capi-tour-progress span {
    width: 22px;
    height: 5px;
    border-radius: 999px;
    background: rgba(7, 91, 115, 0.16);
}

.capi-tour-progress span.is-active {
    background: var(--sea);
}

.capi-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.capi-achievement-pop {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 130;
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 12px;
    width: min(410px, calc(100vw - 36px));
    padding: 14px;
    border: 1px solid rgba(7, 91, 115, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
    animation: capiAchievementIn 320ms ease both;
}

.capi-achievement-pop img {
    width: 96px;
    height: 78px;
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
}

.capi-achievement-pop span,
.capi-achievement-pop strong,
.capi-achievement-pop p {
    display: block;
}

.capi-achievement-pop span {
    color: var(--sea-dark);
    font-size: 12px;
    font-weight: 900;
}

.capi-achievement-pop p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.toast {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(6, 54, 64, 0.92);
    box-shadow: var(--soft-shadow);
    animation: toastIn 260ms ease both;
}

.toast strong,
.toast span {
    display: block;
}

.toast span {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fillBar {
    from {
        width: 0;
    }
    to {
        width: var(--width);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes capiTourIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes capiAchievementIn {
    from {
        opacity: 0;
        transform: translateX(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes nicknameRainbowFlow {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 260% 50%;
    }
}

@keyframes nicknameCaspianPulse {
    0%,
    100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 0 rgba(0, 194, 168, 0));
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 7px rgba(0, 194, 168, 0.42));
    }
}

@keyframes nicknameGoldShine {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 240% 50%;
    }
}

@media (max-width: 1180px) {
    .topbar,
    .hero-section,
    .workspace-grid,
    .split-section,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        position: sticky;
        top: 8px;
        max-height: calc(100vh - 16px);
        overflow: auto;
    }

    .nav {
        justify-content: flex-start;
    }

    .top-actions {
        justify-content: flex-start;
    }

    .account-strip {
        justify-content: flex-start;
    }

    .detail-panel {
        position: static;
        min-height: auto;
    }

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

    .ceri-layout {
        grid-template-columns: 172px 1fr;
    }

    .ceri-capi-card {
        grid-column: 1 / -1;
        grid-template-columns: 150px 1fr;
        justify-items: start;
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .shell {
        width: min(100% - 18px, 1480px);
    }

    .topbar {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .hero-section {
        min-height: auto;
        padding: 34px 18px;
        background:
            linear-gradient(120deg, rgba(2, 76, 94, 0.94), rgba(12, 141, 179, 0.82)),
            url("img/CaspianGuardiansLogo.png") center bottom / 86vw no-repeat,
            #0d6f89;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .metric-value {
        font-size: 34px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .detail-head h2 {
        font-size: 28px;
    }

    .mission-panel,
    .map-toolbar,
    .map-wrap,
    .analytics-grid,
    .environment-grid,
    .ceri-layout,
    .form-grid,
    .coordinate-sliders,
    .trash-breakdown,
    .option-check-grid,
    .beach-grid,
    .analysis-grid,
    .forecast-grid,
    .shop-grid {
        grid-template-columns: 1fr;
    }

    .cleanup-callout {
        align-items: flex-start;
        flex-direction: column;
    }

    .row-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-canvas {
        width: 100%;
    }

    .wide-chart {
        grid-column: auto;
    }

    .chart-row,
    .trash-type-row {
        grid-template-columns: 108px minmax(64px, 1fr) minmax(78px, auto);
    }

    .points-help-layout,
    .capi-advice-layout {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .capi-health-actions {
        grid-template-columns: 1fr;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-legal {
        padding-left: 0;
        padding-top: 14px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .environment-head,
    .analysis-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ceri-ring {
        justify-self: center;
    }

    .ceri-capi-card {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .ceri-factor {
        grid-template-columns: 116px 1fr 38px;
    }

    .cg-beach-rating-card {
        grid-template-columns: 42px 1fr;
    }

    .cg-rating-score {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }

    .capi-tour-overlay {
        align-items: end;
        padding: 10px;
        max-height: 100dvh;
        overflow: hidden;
    }

    .capi-tour-shell {
        grid-template-columns: 1fr;
        gap: 9px;
        width: 100%;
        align-items: stretch;
        overflow: visible;
    }

    .capi-tour-mascot {
        min-height: 118px;
        padding: 10px;
    }

    .capi-tour-mascot img {
        max-height: 114px;
    }

    .capi-dialogue-card {
        min-height: 0;
        gap: 10px;
        padding: 16px;
    }

    .capi-dialogue-card p {
        min-height: 112px;
        overflow: hidden;
        font-size: 14px;
        line-height: 1.45;
    }
}

@media (max-width: 560px) {
    .brand {
        min-width: 0;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .brand strong {
        font-size: 16px;
    }

    .account-strip,
    .top-actions,
    .hero-actions,
    .request-actions,
    .user-actions,
    .environment-head,
    .analysis-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .language-control {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 40px 42px minmax(0, 1fr);
    }

    .ranking-points {
        grid-column: 3;
    }

    .approval-points-field {
        grid-template-columns: 1fr;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button {
        width: 100%;
    }

    .admin-drawer {
        padding: 9px;
    }

    .admin-shell {
        padding: 14px;
    }

    .detail-metrics,
    .mini-stats,
    .profile-stats,
    .public-profile-stats,
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .public-profile-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .cg-beach-rating-card {
        grid-template-columns: 1fr;
    }

    .cg-rating-rank {
        width: 38px;
        height: 38px;
    }

    .cg-rating-score {
        grid-column: auto;
    }

    .capi-help-button {
        left: 10px;
        bottom: 10px;
    }

    .capi-health-panel {
        left: 10px;
        bottom: 70px;
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 86px);
        overflow: auto;
    }

    .capi-achievement-pop {
        right: 10px;
        bottom: 76px;
        grid-template-columns: 72px 1fr;
        width: calc(100vw - 20px);
    }

    .capi-achievement-pop img {
        width: 72px;
        height: 60px;
    }

    .modal {
        width: min(100% - 18px, 480px);
    }

    .modal-card {
        max-height: calc(100dvh - 18px);
        padding: 18px;
    }
}
