:root {
    color-scheme: light;
    --ink: #122d2f;
    --muted: #607274;
    --deep: #082f35;
    --deep-soft: #10464d;
    --teal: #087e7d;
    --teal-bright: #16a3a0;
    --foam: #e9f5f1;
    --sand: #f6f1e7;
    --coral: #ee7f5c;
    --line: #d8e3df;
    --white: #ffffff;
    --shadow: 0 22px 55px rgba(8, 47, 53, 0.11);
    font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif;
    background: var(--sand);
    color: var(--ink);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(22, 163, 160, 0.12), transparent 27rem),
        linear-gradient(180deg, #fbfaf6 0%, var(--sand) 100%);
}

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

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

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--deep);
}

.site-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 0 32px;
}

.topbar {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(8, 47, 53, 0.12);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 48% 52% / 55% 48% 52% 45%;
    background: var(--deep);
    color: #c8ffef;
    font-weight: 800;
    letter-spacing: -0.08em;
    transform: rotate(-6deg);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.73rem;
}

.version-badge,
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--foam);
    color: var(--deep-soft);
    font-size: 0.77rem;
    font-weight: 700;
    padding: 7px 11px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
    gap: 48px;
    align-items: center;
    padding: 72px 48px;
    margin: 32px 0;
    overflow: hidden;
    border-radius: 32px;
    background: var(--deep);
    color: #d9ebe7;
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto -10% -70% 35%;
    height: 145%;
    border: 1px solid rgba(199, 255, 239, 0.13);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(199, 255, 239, 0.035), 0 0 0 110px rgba(199, 255, 239, 0.025);
}

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

.eyebrow {
    margin-bottom: 10px;
    color: var(--teal-bright);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 730px;
    margin-bottom: 20px;
    color: var(--white);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero-intro {
    max-width: 650px;
    color: #bcd3cf;
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

.hero-pills span {
    border: 1px solid rgba(203, 255, 239, 0.24);
    border-radius: 999px;
    padding: 8px 12px;
    color: #d6f5ed;
    font-size: 0.78rem;
}

.water-card {
    position: relative;
    z-index: 1;
    min-height: 240px;
    display: grid;
    place-items: center;
}

.water-rings {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(199, 255, 239, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 0 35px rgba(199, 255, 239, 0.07), 0 0 0 70px rgba(199, 255, 239, 0.035);
}

.float-marker {
    position: relative;
    width: 92px;
    height: 116px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 45% 45%;
    background: var(--coral);
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.5rem;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.18);
}

.water-card p {
    position: absolute;
    bottom: 20px;
    margin: 0;
    color: #bcd3cf;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 48px;
}

.right-column {
    display: grid;
    gap: 24px;
}

.panel {
    border: 1px solid rgba(8, 47, 53, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 40px rgba(8, 47, 53, 0.07);
    padding: 30px;
    backdrop-filter: blur(12px);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.panel-heading.compact {
    align-items: center;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.08;
}

.account-chip {
    max-width: 220px;
    text-align: right;
}

.account-chip span {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
}

.account-chip button,
.text-button,
.report-actions button {
    border: 0;
    background: transparent;
    color: var(--teal);
    cursor: pointer;
    font-weight: 700;
    padding: 5px 0;
}

.text-button {
    width: 100%;
    margin-top: 17px;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
}

.field label,
.location-heading strong {
    color: var(--deep);
    font-size: 0.85rem;
    font-weight: 700;
}

.field small,
.location-heading small,
.security-note,
.section-intro {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfdfc;
    color: var(--ink);
    outline: none;
    padding: 12px 13px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 4px rgba(22, 163, 160, 0.12);
}

.valid.modified:not([type=checkbox]) {
    border-color: var(--teal);
}

.invalid {
    border-color: #c94d4d;
}

.validation-message,
.validation-errors {
    color: #a53636;
    font-size: 0.8rem;
}

.validation-errors {
    margin: 0 0 18px;
    padding-left: 20px;
}

.form-row {
    display: grid;
    gap: 16px;
}

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

.location-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0 12px;
}

.location-heading small {
    display: block;
    margin-top: 2px;
}

.privacy-field {
    margin-top: 4px;
    border: 1px solid #cfe7df;
    border-radius: 14px;
    background: var(--foam);
    padding: 16px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.button {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    padding: 12px 17px;
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.button-primary {
    background: var(--teal);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(8, 126, 125, 0.2);
}

.button-secondary {
    border: 1px solid #bddbd2;
    background: var(--foam);
    color: var(--deep-soft);
}

.button-quiet {
    background: #edf0ed;
    color: var(--muted);
}

.button-full {
    width: 100%;
}

.security-note {
    margin: 22px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.notice {
    margin: 0 0 20px;
    border-radius: 13px;
    padding: 13px 16px;
    font-size: 0.87rem;
    font-weight: 600;
}

.notice-success {
    border: 1px solid #b7ddcf;
    background: #e8f7f1;
    color: #165f4f;
}

.notice-error {
    border: 1px solid #edc2ba;
    background: #fff0ed;
    color: #943f32;
}

.report-list {
    display: grid;
    gap: 12px;
}

.report-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fdfefc;
    padding: 16px;
}

.report-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.72rem;
}

.activity-tag,
.visibility-tag {
    display: inline-flex;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 8px;
}

.activity-tag {
    background: var(--foam);
    color: var(--teal);
}

.activity-catch {
    background: #fff0e8;
    color: #a94c2f;
}

.activity-lostfish {
    background: #f1eff5;
    color: #665378;
}

.visibility-tag {
    background: #f2f3ef;
    color: var(--muted);
}

.report-card h3 {
    margin: 12px 0 5px;
    color: var(--deep);
    font-size: 1rem;
}

.report-card p {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.coordinates {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.report-actions {
    display: flex;
    gap: 16px;
    margin-top: 11px;
    border-top: 1px solid #edf0ed;
    padding-top: 8px;
}

.report-actions .danger-link {
    color: #b3463a;
}

.public-panel {
    background: linear-gradient(145deg, rgba(233, 245, 241, 0.92), rgba(255, 255, 255, 0.92));
}

.privacy-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--teal-bright);
    box-shadow: 0 0 0 5px rgba(22, 163, 160, 0.12);
}

.empty-state {
    border: 1px dashed #bfd1cb;
    border-radius: 14px;
    padding: 28px 18px;
    text-align: center;
}

.empty-state.small {
    padding: 20px 14px;
}

.empty-state strong {
    color: var(--deep);
}

.empty-state p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.loading-panel,
.startup-loader {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--muted);
}

.startup-loader {
    min-height: 100vh;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(8, 126, 125, 0.16);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

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

.site-footer {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(8, 47, 53, 0.12);
    color: var(--muted);
    font-size: 0.76rem;
}

#blazor-error-ui {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 1000;
    display: none;
    max-width: 620px;
    margin: 0 auto;
    border-radius: 12px;
    background: #8e372e;
    color: white;
    box-shadow: var(--shadow);
    padding: 14px 18px;
}

#blazor-error-ui a,
#blazor-error-ui button {
    margin-left: 12px;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    font-weight: 800;
}

.map-experience {
    margin-bottom: 24px;
    overflow: hidden;
}

.map-heading {
    align-items: flex-end;
}

.map-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.map-actions label {
    width: 100%;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.map-actions select {
    min-width: 170px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--white);
    color: var(--ink);
    padding: 0 12px;
}

.map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    min-height: 510px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

.map-canvas-wrap {
    position: relative;
    min-width: 0;
}

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 510px;
    background: #dcebea;
}

.map-status {
    position: absolute;
    z-index: 5;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px);
    border-radius: 999px;
    background: rgba(8, 47, 53, 0.92);
    color: white;
    padding: 9px 16px;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.map-status-error {
    background: rgba(142, 55, 46, 0.95);
}

.map-legend {
    position: absolute;
    z-index: 4;
    right: 10px;
    bottom: 28px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: calc(100% - 20px);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--deep);
    padding: 8px 10px;
    box-shadow: 0 7px 20px rgba(8, 47, 53, 0.16);
    font-size: 0.7rem;
    font-weight: 800;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-point,
.legend-cluster {
    width: 14px;
    height: 14px;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--deep);
    border-radius: 50%;
    font-size: 0.46rem;
    font-style: normal;
}

.legend-point.approximate {
    background: #e9c46a;
}

.legend-point.exact {
    background: #2a9d8f;
}

.legend-cluster {
    width: 20px;
    height: 20px;
    background: #f4a261;
}

.map-results {
    border-left: 1px solid var(--line);
    background: #f8fbfa;
    padding: 18px;
    overflow-y: auto;
}

.map-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.map-result-heading h3,
.map-result-card h4 {
    margin: 0;
    color: var(--deep);
}

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

.map-result-card,
.map-list-button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    padding: 14px;
    text-align: left;
}

.map-result-card:focus,
.map-list-button:focus-visible,
.draft-map-marker:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}

.map-result-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.map-list-alternative {
    margin-top: 14px;
}

.map-list-alternative summary {
    cursor: pointer;
    color: var(--deep);
    font-weight: 800;
    padding: 10px 2px;
}

.map-list-button {
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.map-list-button:hover {
    border-color: var(--teal);
}

.map-list-button span {
    color: var(--muted);
    font-size: 0.78rem;
}

.draft-map-marker {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    background: var(--coral);
    color: white;
    box-shadow: 0 5px 16px rgba(8, 47, 53, 0.3);
    cursor: move;
    font-size: 1.5rem;
    font-weight: 900;
    transform: rotate(-45deg);
}

.draft-map-marker::first-letter {
    transform: rotate(45deg);
}

.location-confirmation {
    margin: 4px 0 18px;
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--foam);
    padding: 11px 13px;
    color: var(--deep);
    font-size: 0.8rem;
}

.accuracy-warning {
    color: #8e372e;
    font-weight: 800;
}

.optional-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
}

.profile-editor {
    margin: -4px 0 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbfa;
    padding: 20px;
}

.profile-editor h3 {
    margin: 0 0 4px;
    color: var(--deep);
}

.profile-editor > div > p:last-child,
.danger-zone p {
    color: var(--muted);
    font-size: 0.8rem;
}

.danger-zone {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.danger-zone summary {
    cursor: pointer;
    color: #8e372e;
    font-weight: 800;
}

.button-danger {
    border-color: #8e372e;
    background: #8e372e;
    color: white;
}

.progressive-fields {
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdfc;
    padding: 0 16px;
}

.progressive-fields summary {
    cursor: pointer;
    color: var(--deep);
    font-weight: 800;
    padding: 15px 0;
}

.progressive-fields summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.progressive-fields[open] summary {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

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

.inline-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(76px, 0.6fr);
    gap: 8px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin-bottom: 14px;
    color: var(--deep);
    font-weight: 700;
}

.checkbox-field input {
    width: 20px;
    height: 20px;
}

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

.photo-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.photo-strip figure {
    position: relative;
    aspect-ratio: 1;
    margin: 0;
}

.photo-strip img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 9px;
    object-fit: cover;
}

.photo-strip button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(142, 55, 46, 0.92);
    color: white;
    cursor: pointer;
    font-weight: 900;
}

.photo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.photo-actions button,
.photo-upload-button {
    border: 0;
    background: transparent;
    color: var(--teal);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.photo-empty {
    color: var(--muted);
    font-size: 0.76rem;
}

.log-tools {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(120px, 0.8fr));
    gap: 10px;
    margin: 0 0 18px;
}

.log-tools label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.log-tools input,
.log-tools select {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    padding: 9px 10px;
    color: var(--ink);
    font: inherit;
}

.report-details {
    margin: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
}

.report-details summary {
    color: var(--teal);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
}

.report-details dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 5px 10px;
    margin: 10px 0 2px;
    font-size: 0.78rem;
}

.report-details dt {
    color: var(--muted);
    font-weight: 800;
}

.report-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.log-more {
    width: 100%;
    margin-top: 14px;
}

.provider-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}

.provider-actions small {
    max-width: 520px;
    color: var(--muted);
}

.offline-notice {
    border-color: #d39b38;
    background: #fff4d6;
    color: #6e4a08;
}

@media (max-width: 980px) {
    .hero,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .water-card {
        display: none;
    }

    .hero {
        padding: 54px 36px;
    }

    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-results {
        min-height: 150px;
        max-height: 330px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

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

@media (max-width: 640px) {
    .site-shell {
        padding: 0 14px;
    }

    .topbar {
        min-height: 76px;
    }

    .brand small,
    .version-badge {
        display: none;
    }

    .hero {
        margin: 14px 0;
        border-radius: 20px;
        padding: 38px 24px;
    }

    .hero h1 {
        font-size: 2.65rem;
    }

    .panel {
        border-radius: 18px;
        padding: 22px 18px;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .three-columns {
        grid-template-columns: 1fr;
    }

    .log-tools {
        grid-template-columns: 1fr;
    }

    .panel-heading,
    .location-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-actions,
    .map-actions select,
    .map-actions .button {
        width: 100%;
    }

    .map-layout,
    .map-canvas {
        min-height: 420px;
    }

    .map-canvas {
        height: 420px;
    }

    .map-results {
        min-height: auto;
        max-height: 360px;
    }

    .map-legend {
        left: 8px;
        right: 8px;
        justify-content: center;
    }

    .account-chip {
        max-width: 100%;
        text-align: left;
    }

    .location-heading .button {
        width: 100%;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 20px 0;
    }
}

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