: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%);
}

body.photo-viewer-open {
    overflow: hidden;
}

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);
}

h1:focus {
    outline: none;
}

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

.web-ad-slot {
    width: min(100% - 2rem, 1200px);
    min-height: 72px;
    margin: 0.75rem auto 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: var(--panel);
    font-size: 0.78rem;
}

.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: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: block;
}

.brand-mark-link,
.brand-wordmark {
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.brand-mark-link:focus-visible,
.brand-wordmark:focus-visible,
.account-login:focus-visible,
.account-trigger:focus-visible,
.account-menu a:focus-visible,
.account-menu button:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

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

.account-control {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: -10px;
    padding-bottom: 10px;
}

.account-login {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--deep-soft);
    font-weight: 800;
    padding: 8px 15px;
    text-decoration: none;
}

.account-trigger {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: var(--deep);
    color: var(--sand);
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
    font-weight: 900;
}

.account-trigger img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.account-initials {
    letter-spacing: 0.02em;
}

.field-label-with-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.privacy-help {
    position: relative;
    margin-left: auto;
}

.privacy-help summary {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--teal);
    border-radius: 50%;
    background: var(--white);
    color: var(--teal);
    cursor: help;
    font-size: 0.9rem;
    font-weight: 900;
    list-style: none;
}

.privacy-help summary::-webkit-details-marker {
    display: none;
}

.privacy-help summary:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}

.privacy-help-tooltip {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 64px));
    display: none;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
    padding: 14px;
}

.privacy-help:hover .privacy-help-tooltip,
.privacy-help:focus-within .privacy-help-tooltip,
.privacy-help[open] .privacy-help-tooltip {
    display: grid;
}

.privacy-help-tooltip p {
    margin: 0;
    color: var(--ink);
    font-size: 0.78rem;
    line-height: 1.45;
}

.account-menu {
    position: absolute;
    z-index: 50;
    top: 100%;
    right: 0;
    width: min(260px, calc(100vw - 28px));
    display: grid;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 9px;
}

.account-menu-name {
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 10px 12px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu a,
.account-menu button {
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    padding: 11px 12px;
    text-align: left;
    text-decoration: none;
}

.account-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.menu-count-badge {
    min-width: 24px;
    border-radius: 999px;
    background: var(--teal);
    color: var(--white);
    font-size: 0.72rem;
    line-height: 1;
    padding: 5px 7px;
    text-align: center;
}

.account-menu a:hover,
.account-menu button:hover {
    background: var(--foam);
}

.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;
}

.resend-button {
    margin-top: 8px;
}

.turnstile-field {
    display: grid;
    gap: 7px;
    min-height: 76px;
    margin: 4px 0 18px;
}

.turnstile-field small {
    color: var(--muted);
    font-size: 0.76rem;
}

.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;
}

.field-group-label {
    margin: 16px 0 8px;
    color: var(--deep);
    font-weight: 700;
}

.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;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-line input {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    margin: 0;
}

.attribution-field {
    border-left: 4px solid var(--teal);
}

.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;
}

.notice-inline {
    margin: 4px 0 2px;
}

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

.report-card {
    min-width: 0;
    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;
}

.report-attribution {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 6px;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.report-attribution img,
.report-attribution > span:first-child {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--deep);
    color: white;
    object-fit: cover;
    font-size: 0.65rem;
}

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

.location-link {
    width: fit-content;
    border: 0;
    background: transparent;
    color: var(--teal);
    cursor: pointer;
    font: inherit;
    padding: 2px 0;
    text-align: left;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.location-link:hover,
.location-link:focus-visible {
    color: var(--coral);
}

.address-link {
    display: block;
    margin: 4px 0;
}

.address-search-field {
    position: relative;
}

.address-suggestions {
    position: absolute;
    z-index: 45;
    top: 78px;
    left: 0;
    right: 0;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.address-suggestions button {
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 12px 14px;
    text-align: left;
}

.address-suggestions button:last-child {
    border-bottom: 0;
}

.address-suggestions button:hover,
.address-suggestions button:focus-visible {
    background: var(--foam);
}

.report-detail-row .field > label {
    min-height: 1.3rem;
}

.report-detail-row .field > input {
    box-sizing: border-box;
    height: 48px;
}

.page-return {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.policy-page {
    width: min(900px, 100%);
    margin: 36px auto 52px;
}

.policy-page > .section-intro {
    max-width: 720px;
}

.policy-card {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 34px);
}

.policy-card h2 {
    margin-bottom: 10px;
}

.policy-card p:last-child,
.policy-card li:last-child {
    margin-bottom: 0;
}

.policy-card li + li {
    margin-top: 8px;
}

.policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.preferences-card {
    display: grid;
    gap: 24px;
}

.preferences-version {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

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

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

.report-attribution-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 10px;
}

.relationship-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #bddbd2;
    border-radius: 999px;
    background: var(--foam);
    color: var(--deep-soft);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    padding: 7px 10px;
}

.relationship-badge-compact {
    padding: 5px 8px;
    font-size: 0.68rem;
}

.relationship-incomingrequest {
    border-color: #e8b7a8;
    background: #fff0ed;
    color: #943f32;
}

.relationship-friends {
    border-color: #8ecfbd;
    background: #e8f7f1;
    color: #165f4f;
}

.relationship-blockedbyyou {
    border-color: #d1d5d2;
    background: #edf0ed;
    color: var(--muted);
}

.report-share {
    margin-top: 11px;
    border-top: 1px solid #edf0ed;
    padding-top: 9px;
}

.report-share summary {
    width: fit-content;
    color: var(--teal);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
}

.report-share-actions,
.friendship-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.report-share-actions button {
    border: 1px solid #bddbd2;
    border-radius: 999px;
    background: var(--foam);
    color: var(--deep-soft);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px 12px;
}

.report-share-actions button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.report-share > small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.shared-nibble-panel {
    scroll-margin-top: 24px;
    margin-bottom: 28px;
}

.shared-nibble-panel:focus {
    outline: 3px solid rgba(22, 163, 160, 0.28);
    outline-offset: 4px;
}

.shared-nibble-card {
    max-width: 760px;
    margin: 0 auto;
}

.shared-nibble-photo {
    display: block;
    width: min(100%, 560px);
    max-height: 420px;
    margin: 14px 0;
    border-radius: 13px;
    object-fit: cover;
}

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

.recent-nibbles-heading {
    justify-content: center;
    margin-bottom: 12px;
    text-align: center;
}

.recent-nibbles-separator {
    width: 90%;
    height: 4px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--teal-bright) 12%, var(--teal-bright) 88%, transparent);
    box-shadow: 0 5px 14px rgba(22, 163, 160, 0.24);
}

.recent-nibbles-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.recent-nibbles-tools small {
    width: 100%;
    color: var(--muted);
}

.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 {
    --map-panel-height: 510px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    height: calc(var(--map-panel-height) + 2px);
    min-height: calc(var(--map-panel-height) + 2px);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

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

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
    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 {
    min-height: 0;
    max-height: var(--map-panel-height);
    border-left: 1px solid var(--line);
    background: #f8fbfa;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.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-thumbnail-button {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: zoom-in;
}

.photo-thumbnail-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-thumbnail-button:focus-visible,
.photo-delete-button:focus-visible,
.photo-viewer-close:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}

.photo-delete-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-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.64;
}

.photo-capacity,
.photo-inline-message {
    margin: 8px 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.photo-inline-message {
    border-left: 3px solid var(--teal);
    padding: 7px 9px;
}

.photo-inline-error {
    border-color: #a33f35;
    color: #7d2b24;
}

.photo-inline-success {
    border-color: var(--teal);
    color: var(--deep-soft);
}

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

.photo-viewer-backdrop {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 18px;
    background: rgba(2, 19, 23, 0.9);
    cursor: zoom-out;
}

.photo-viewer {
    position: relative;
    width: min(1100px, calc(100vw - 36px));
    height: min(860px, calc(100dvh - 36px));
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(233, 245, 241, 0.35);
    border-radius: 18px;
    background: #061f24;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
    padding: 52px 18px 18px;
    cursor: default;
}

.photo-viewer img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.photo-viewer-close {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(233, 245, 241, 0.5);
    border-radius: 50%;
    background: rgba(8, 47, 53, 0.96);
    color: var(--foam);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.photo-viewer-status {
    display: grid;
    place-items: center;
    gap: 12px;
    max-width: 520px;
    color: var(--foam);
    text-align: center;
}

.photo-viewer-status p {
    margin: 0;
}

.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-login {
    display: block;
    margin: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    color: var(--teal);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.report-details-login:hover,
.report-details-login:focus-visible {
    color: var(--coral);
}

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

@media (max-width: 520px) {
    .report-details dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .report-details dd {
        margin-bottom: 7px;
    }
}

.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-attribution a {
    color: var(--teal-700);
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {
    .provider-attribution a {
        color: var(--sand-200);
    }
}

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

.login-page,
.profile-page {
    width: min(1040px, 100%);
    min-height: calc(100vh - 178px);
    margin: 36px auto;
}

.login-page {
    width: min(520px, 100%);
    display: grid;
    align-items: center;
}

.login-card h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 6vw, 3rem);
}

.profile-card {
    overflow: hidden;
}

.profile-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding-bottom: 26px;
}

.profile-identity h1 {
    margin-bottom: 7px;
    overflow-wrap: anywhere;
    font-size: clamp(2.1rem, 6vw, 3.7rem);
}

.profile-identity p {
    margin-bottom: 5px;
    color: var(--muted);
}

.profile-member-since {
    font-size: 0.8rem;
}

.profile-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--deep);
    color: #c8ffef;
    font-weight: 900;
}

.profile-avatar-large {
    width: clamp(86px, 14vw, 132px);
    height: clamp(86px, 14vw, 132px);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-editor,
.profile-section,
.profile-empty-state {
    border-top: 1px solid var(--line);
    padding: 24px 0;
}

.profile-friend-actions {
    min-width: min(100%, 290px);
}

.friendship-controls {
    display: grid;
    gap: 7px;
}

.friendship-actions {
    margin-top: 2px;
}

.friendship-actions .button {
    padding: 9px 12px;
    font-size: 0.78rem;
}

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

.friends-hub {
    display: grid;
    gap: 28px;
}

.friend-search,
.friends-section {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.friend-search h2,
.friends-section h2 {
    margin-bottom: 14px;
}

.friend-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.friend-search-controls .field {
    margin-bottom: 0;
}

.friend-search-controls .button {
    min-height: 48px;
}

.friend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 12px;
    margin-top: 16px;
}

.friend-card {
    min-width: 0;
    display: grid;
    gap: 14px;
    align-content: start;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fdfefc;
    padding: 15px;
}

.friend-profile-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.friend-profile-link > span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.friend-profile-link strong,
.friend-profile-link small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-profile-link small {
    color: var(--muted);
    font-size: 0.74rem;
}

.friend-profile-link:hover strong,
.friend-profile-link:focus-visible strong {
    color: var(--teal);
}

.friend-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}

.blocked-friends summary {
    color: var(--deep);
    cursor: pointer;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 800;
}

.blocked-friends > p {
    color: var(--muted);
    font-size: 0.82rem;
}

.preferences-section {
    margin-top: 26px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.preferences-section h2 {
    margin-bottom: 7px;
}

.preferences-section > p {
    max-width: 760px;
    margin-top: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.profile-photo-editor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.profile-photo-editor h2,
.profile-section h2,
.profile-empty-state h2 {
    margin-bottom: 7px;
}

.profile-photo-editor p,
.profile-empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.upload-button {
    position: relative;
    overflow: hidden;
}

.upload-button input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.profile-form fieldset {
    min-width: 0;
    margin: 24px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
}

.profile-form legend {
    color: var(--deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
    padding: 0 14px 0 0;
}

.privacy-note {
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--foam);
    color: var(--muted);
    padding: 13px 16px;
    font-size: 0.82rem;
    line-height: 1.55;
}

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

.profile-details-grid > div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}

.profile-details-grid dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-details-grid dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.profile-biography {
    max-width: 74ch;
    white-space: pre-wrap;
    line-height: 1.7;
}

.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 {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-rows: var(--map-panel-height) minmax(0, auto);
    }

    .map-canvas-wrap,
    .map-canvas {
        height: var(--map-panel-height);
        min-height: var(--map-panel-height);
        max-height: var(--map-panel-height);
    }

    .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;
    }

    .brand {
        gap: 9px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .brand strong {
        font-size: 1.12rem;
    }

    .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 {
        --map-panel-height: 420px;
        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;
    }

    .profile-identity {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 15px;
    }

    .profile-edit-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .profile-friend-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .friend-search-controls {
        grid-template-columns: 1fr;
    }

    .friend-search-controls .button {
        width: 100%;
    }

    .profile-photo-editor {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink: #e3f1ee;
        --muted: #a9bfbb;
        --deep: #dff7f1;
        --deep-soft: #bde9df;
        --teal: #55c9be;
        --teal-bright: #72ddd1;
        --foam: #153b3d;
        --sand: #071b1f;
        --coral: #ff9876;
        --line: #315154;
        --shadow: 0 22px 55px rgba(0, 0, 0, 0.36);
        background: var(--sand);
    }

    body {
        background:
            radial-gradient(circle at 12% 12%, rgba(85, 201, 190, 0.12), transparent 27rem),
            linear-gradient(180deg, #0b2428 0%, var(--sand) 100%);
    }

    .topbar {
        border-bottom-color: rgba(189, 233, 223, 0.2);
    }

    .hero {
        border: 1px solid #315154;
        background: #092f35;
    }

    .panel {
        border-color: var(--line);
        background: rgba(13, 39, 43, 0.94);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    }

    .policy-card {
        border-color: var(--line);
        background: #102f33;
    }

    .photo-inline-error {
        color: #ffb29d;
    }

    .account-login,
    .account-menu,
    .privacy-help summary,
    .privacy-help-tooltip {
        border-color: var(--line);
        background: #102f33;
    }

    input,
    select,
    textarea,
    .map-actions select,
    .report-card,
    .map-result-card,
    .map-list-button,
    .log-tools input,
    .log-tools select {
        border-color: var(--line);
        background: #102f33;
        color: var(--ink);
    }

    input::placeholder,
    textarea::placeholder {
        color: #829c98;
    }

    .button-secondary,
    .activity-tag,
    .version-badge,
    .count-badge,
    .location-confirmation,
    .privacy-field {
        border-color: #3a6264;
        background: #153b3d;
        color: var(--deep);
    }

    .button-quiet,
    .visibility-tag {
        background: #273c3f;
        color: var(--muted);
    }

    .notice-success {
        border-color: #2f7667;
        background: #143d34;
        color: #bdebdc;
    }

    .notice-error {
        border-color: #915247;
        background: #452722;
        color: #ffd2ca;
    }

    .activity-catch {
        background: #4b3026;
        color: #ffbea6;
    }

    .activity-lostfish {
        background: #362f45;
        color: #d9c9ef;
    }

    .public-panel {
        background: linear-gradient(145deg, rgba(17, 54, 54, 0.96), rgba(13, 39, 43, 0.96));
    }

    .map-results,
    .profile-editor,
    .progressive-fields {
        border-color: var(--line);
        background: #0d292d;
    }

    .map-canvas {
        background: #173f43;
    }

    .map-legend {
        border: 1px solid var(--line);
        background: rgba(13, 39, 43, 0.95);
        color: var(--deep);
        box-shadow: 0 7px 20px rgba(0, 0, 0, 0.35);
    }

    .report-actions,
    .report-share,
    .security-note,
    .danger-zone,
    .progressive-fields[open] summary {
        border-color: var(--line);
    }

    .friend-card {
        border-color: var(--line);
        background: #102f33;
    }

    .relationship-badge,
    .report-share-actions button {
        border-color: #3a6264;
        background: #153b3d;
        color: var(--deep);
    }

    .relationship-incomingrequest {
        border-color: #915247;
        background: #452722;
        color: #ffd2ca;
    }

    .relationship-friends {
        border-color: #2f7667;
        background: #143d34;
        color: #bdebdc;
    }

    .relationship-blockedbyyou {
        background: #273c3f;
        color: var(--muted);
    }

    .offline-notice {
        border-color: #a5782c;
        background: #493a1b;
        color: #ffe5a8;
    }

    .accuracy-warning,
    .danger-zone summary,
    .report-actions .danger-link {
        color: #ff9f8e;
    }
}

@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;
    }
}
