:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --surface: #ffffff;
    --surface-muted: #f2f0e9;
    --text: #252522;
    --text-muted: #595952;
    --border: #73736b;
    --accent: #245a3b;
    --focus: #005fcc;
    --shadow: 0 0.25rem 1.25rem rgb(0 0 0 / 18%);
    --progress-open: #279cdf;
    --progress-visited: #123e65;
    --progress-open-locked: #8bbcd8;
    --progress-visited-locked: #406080;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body,
#appShell {
    width: 100%;
    height: 100%;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--text);
    background: var(--surface-muted);
}

button,
a {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
#map:focus-visible,
#infoCard:focus-visible {
    outline: 0.2rem solid var(--focus);
    outline-offset: 0.15rem;
}

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1000;
    padding: 0.65rem 0.85rem;
    color: #ffffff;
    background: #000000;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.brand-logo {
    position: fixed;
    top: max(0.5rem, env(safe-area-inset-top));
    left: max(0.5rem, env(safe-area-inset-left));
    z-index: 180;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.25rem;
    overflow: hidden;
    border: 1px solid rgb(37 37 34 / 25%);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 92%);
    box-shadow: var(--shadow);
    pointer-events: none;
}

.brand-logo img {
    display: block;
    width: auto;
    max-width: none;
    height: 3rem;
}

.offline-badge {
    position: absolute;
    bottom: 0.2rem;
    right: 0.2rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
    background: #9f1d20;
    box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
    pointer-events: none;
}

.offline-badge svg {
    width: 0.75rem;
    height: 0.75rem;
    fill: none;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.pending-visit-indicator {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgb(18 62 101 / 35%);
    border-radius: 50%;
    color: #123e65;
    background: #ffffff;
    box-shadow: 0 1px 5px rgb(0 0 0 / 18%);
}

.pending-visit-indicator svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

#infoCard.info-card--pending .info-card__header {
    padding-left: 2.35rem;
}

#userSession {
    position: fixed;
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
    z-index: 250;
    display: flex;
    gap: 0.4rem;
}

.account-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgb(37 37 34 / 35%);
    border-radius: 0.75rem;
    color: var(--text);
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-weight: 650;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
    background: var(--surface-muted);
}

.visit-filter-button[data-visit-filter="open"] {
    color: #123e65;
    background: rgb(215 239 252 / 96%);
}

.visit-filter-button[data-visit-filter="visited"] {
    color: #fff;
    background: rgb(18 62 101 / 96%);
}

.visit-filter-button[data-visit-filter="visited"]:hover {
    background: #123e65;
}

.visit-filter-icon {
    display: none;
}

.visit-filter-button[data-visit-filter="all"] .visit-filter-icon--all,
.visit-filter-button[data-visit-filter="open"] .visit-filter-icon--open,
.visit-filter-button[data-visit-filter="visited"] .visit-filter-icon--visited {
    display: inline;
}

.account-menu-button--icon-only {
    padding: 0.45rem;
}

.account-menu-button svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.account-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: grid;
    gap: 0.75rem;
    width: min(18rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    padding: 0.85rem;
    border: 1px solid rgb(37 37 34 / 35%);
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 97%);
    box-shadow: var(--shadow);
    animation: account-panel-in 150ms ease-out;
}

.provider-panel {
    width: min(24rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

.search-panel {
    gap: 0.6rem;
    width: min(28rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

.search-panel h2 {
    margin: 0;
    font-size: 1.1rem;
}

.search-field {
    display: grid;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.search-field input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.search-results-status {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.825rem;
}

.search-results {
    display: grid;
    gap: 0.2rem;
    max-height: min(55dvh, 24rem);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.search-result-button {
    display: grid;
    grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem 0.55rem;
    border: 0;
    border-radius: 0.5rem;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.search-result-button:hover,
.search-result-button:focus-visible {
    background: var(--surface-muted);
}

.search-result-number {
    color: #123e65;
    font-weight: 750;
    white-space: nowrap;
}

.search-result-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.provider-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.provider-panel__header h2,
.provider-info-dialog h2 {
    margin: 0;
    font-size: 1.1rem;
}

.provider-selection-actions {
    display: flex;
    gap: 0.25rem;
}

.provider-selection-actions button {
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
    border: 0;
    border-radius: 0.45rem;
    color: var(--focus);
    background: transparent;
    cursor: pointer;
    font-weight: 650;
}

.provider-selection-actions button:hover {
    background: var(--surface-muted);
}

.provider-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

#providerOptions {
    display: grid;
    gap: 0.25rem;
    max-height: min(60dvh, 24rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.provider-option {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    border-radius: 0.5rem;
}

.provider-option:hover,
.provider-option:focus-within {
    background: var(--surface-muted);
}

.provider-option label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.35rem 0.25rem;
    cursor: pointer;
    font-weight: 600;
}

.provider-option input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: #123e65;
}

.provider-option label span {
    overflow-wrap: anywhere;
}

.provider-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
}

.provider-info-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
}

.provider-info-button:hover span {
    color: var(--text);
    background: var(--surface);
}

.provider-options-status {
    margin: 0;
    padding: 0.5rem 0.25rem;
    color: var(--text-muted);
}

.progress-overview {
    position: fixed;
    top: calc(max(0.5rem, env(safe-area-inset-top)) + 3.25rem);
    right: max(0.5rem, env(safe-area-inset-right));
    z-index: 240;
}

.progress-button {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 10.5rem;
    max-width: min(17rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgb(37 37 34 / 35%);
    border-radius: 0.75rem;
    color: var(--text);
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
}

.progress-button:hover,
.progress-button[aria-expanded="true"] {
    background: var(--surface-muted);
}

.progress-button__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.progress-button__title {
    font-size: 0.725rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.progress-button__count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 0.45rem;
    border-radius: 0.25rem;
    background: var(--progress-open);
    overflow: hidden;
}

.progress-bar--summary {
    height: 0.5rem;
}

.progress-bar__fill {
    height: 100%;
    background: var(--progress-visited);
    border-radius: 0.25rem;
    transition: width 300ms ease;
}

.progress-panel {
    max-height: min(65dvh, 30rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.progress-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.progress-panel__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.progress-list {
    display: grid;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.progress-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgb(37 37 34 / 18%);
    border-radius: 0.65rem;
    background: var(--surface);
}

.progress-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.progress-item__title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-weight: 650;
    font-size: 0.95rem;
    color: var(--text);
    overflow-wrap: anywhere;
}

.progress-item__abbr {
    font-size: 0.725rem;
    font-weight: 700;
    color: #123e65;
    background: #d7effc;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

.progress-item__lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    width: 1.15rem;
    height: 1.15rem;
}

.progress-item__lock svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.progress-item__body {
    display: grid;
    gap: 0.3rem;
}

.progress-item__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-muted);
}

.progress-item__status {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-muted);
    font-style: italic;
}

.progress-item--locked {
    background: rgb(248 247 244 / 92%);
    border-color: rgb(37 37 34 / 14%);
}

.progress-item--locked .progress-bar {
    background: var(--progress-open-locked);
}

.progress-item--locked .progress-bar__fill {
    background: var(--progress-visited-locked);
}

.progress-item--locked .progress-item__abbr {
    color: var(--text-muted);
    background: #e4e9ed;
}

.progress-item--not-ready {
    background: rgb(250 250 248 / 85%);
}

.account-panel .action {
    width: 100%;
}

#sessionStatus {
    color: var(--text-muted);
    overflow-wrap: anywhere;
    font-size: 0.875rem;
    line-height: 1.35;
}

.action,
.icon-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
}

.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
}

.action:hover,
.icon-button:hover {
    background: var(--surface-muted);
}

.action--primary {
    border-color: #123e65;
    color: #ffffff;
    background: #123e65;
}

.action--primary:hover {
    background: #0d2f4e;
}

.action--danger {
    border-color: #9f1d20;
    color: #8a171a;
}

.action--danger:hover {
    color: #ffffff;
    background: #9f1d20;
}

.action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.map-status {
    position: fixed;
    top: max(4rem, calc(env(safe-area-inset-top) + 4rem));
    left: 50%;
    z-index: 190;
    max-width: calc(100vw - 2rem);
    margin: 0;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    color: var(--text);
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    transform: translateX(-50%);
}

.map-status[data-state="error"] {
    border: 2px solid #9f1d20;
}

.tile-error-banner {
    position: fixed;
    top: max(6.5rem, calc(env(safe-area-inset-top) + 6.5rem));
    left: 50%;
    z-index: 185;
    max-width: calc(100vw - 2rem);
    margin: 0;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(159, 29, 32, 0.45);
    border-radius: 0.6rem;
    color: var(--text);
    background: rgb(255 255 255 / 96%);
    box-shadow: var(--shadow);
    font-size: 0.825rem;
    line-height: 1.35;
    transform: translateX(-50%);
    text-align: center;
}

.tile-error-banner p {
    margin: 0;
}

#mapLegend {
    position: fixed;
    bottom: max(2rem, calc(env(safe-area-inset-bottom) + 2rem));
    left: max(0.5rem, env(safe-area-inset-left));
    z-index: 150;
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgb(37 37 34 / 30%);
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 88%);
    box-shadow: 0 0.1rem 0.5rem rgb(0 0 0 / 14%);
    font-size: 0.75rem;
}

#mapLegend > span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-radius: 50% 50% 50% 0;
    line-height: 1;
    transform: rotate(-45deg);
}

.legend-pin--open {
    border-color: #168bd2;
    color: #ffffff;
    background: #168bd2;
}

.legend-pin--visited {
    border-color: #123e65;
    color: #ffffff;
    background: #123e65;
    font-size: 0.68rem;
}

.legend-pin--visited > span {
    transform: rotate(45deg);
}

#infoCard {
    position: fixed;
    right: max(0.5rem, env(safe-area-inset-right));
    bottom: max(1.75rem, calc(env(safe-area-inset-bottom) + 1.75rem));
    left: max(0.5rem, env(safe-area-inset-left));
    z-index: 300;
    max-height: min(65dvh, 32rem);
    padding: 1rem;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.info-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.point-number,
.point-provider,
.point-name,
.point-status,
.point-visited {
    margin: 0;
}

.visit-controls {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(37 37 34 / 20%);
}

.offline-notice {
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 0.45rem;
    border-left: 0.25rem solid #9f1d20;
    background: rgba(159, 29, 32, 0.08);
    color: #8a171a;
    font-size: 0.85rem;
    font-weight: 650;
}

.visit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.action--tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 0.5rem;
    min-height: 4.75rem;
    aspect-ratio: 1 / 1;
    text-align: center;
    border-radius: 0.65rem;
}

.action--tile svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.action--tile .stamp-logo-icon {
    width: 2rem;
    height: 2rem;
    fill: currentColor;
    stroke: none;
}

.action--tile span {
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1.2;
}

.visit-form__actions,
.delete-visit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.visit-form {
    display: grid;
    gap: 0.75rem;
}

.visit-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.visit-fields label {
    display: grid;
    gap: 0.3rem;
    font-weight: 650;
}

.visit-fields label span,
.visit-form__hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.visit-fields input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.visit-fields input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.visit-form__hint,
.visit-action-status {
    margin: 0;
}

.visit-action-status {
    min-height: 1.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.visit-action-status[data-state="error"] {
    color: #8a171a;
    font-weight: 650;
}

.delete-visit-dialog p {
    margin-bottom: 1rem;
}

.delete-visit-actions {
    justify-content: flex-end;
}

.point-number {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.point-provider {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.point-name {
    margin-top: 0.15rem;
    font-size: clamp(1.25rem, 5vw, 1.65rem);
    line-height: 1.2;
}

.point-status {
    margin-top: 0.85rem;
    font-weight: 700;
}

.point-status[data-state="visited"] {
    color: var(--accent);
}

.point-status[data-state="unknown"] {
    color: var(--text-muted);
    font-weight: 500;
}

.tour-list {
    display: grid;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
    padding-left: 1.25rem;
}

.point-visited {
    display: block;
    margin-top: 0.85rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.provider-info-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: min(80dvh, 38rem);
    padding: 1rem;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.provider-info-dialog::backdrop {
    background: rgb(0 0 0 / 42%);
}

.provider-info-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.provider-info-dialog > p {
    line-height: 1.5;
}

.provider-website {
    width: fit-content;
}

.provider-data-source {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(15, 45, 72, 0.18);
    font-size: 0.88rem;
}

.provider-data-source h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.provider-data-source p {
    margin: 0 0 0.5rem;
}

.provider-data-download {
    color: #124a73;
}

.provider-disclaimer {
    padding: 0.75rem;
    border-left: 0.25rem solid #168bd2;
    background: var(--surface-muted);
    font-size: 0.875rem;
}

.ol-attribution {
    right: max(0.25rem, env(safe-area-inset-right)) !important;
    bottom: max(0.25rem, env(safe-area-inset-bottom)) !important;
}

.ol-attribution .footer-link {
    color: inherit;
    opacity: 0.65;
    text-decoration: none;
}

.ol-attribution .footer-link:hover,
.ol-attribution .footer-link:focus {
    opacity: 1;
    text-decoration: underline;
}

@media (min-width: 45rem) and (hover: hover) and (pointer: fine) {
    .brand-logo {
        width: 20rem;
        height: auto;
        padding: 0.4rem 0.6rem;
        overflow: visible;
    }

    .brand-logo img {
        width: 100%;
        height: auto;
    }

    .brand-logo .offline-badge {
        top: 0.35rem;
        right: 0.5rem;
        bottom: auto;
    }

    .map-status {
        top: max(6.5rem, calc(env(safe-area-inset-top) + 6.5rem));
    }

    #infoCard {
        right: auto;
        bottom: auto;
        left: 1rem;
        width: min(25rem, calc(100vw - 2rem));
        max-height: min(70vh, 32rem);
        border-radius: 0.75rem;
    }
}

.update-prompt {
    position: fixed;
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 1.25rem));
    left: 50%;
    z-index: 650;
    width: min(26rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    animation: account-panel-in 200ms ease-out;
}

.update-prompt__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: rgb(255 255 255 / 97%);
    box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 28%);
}

.update-prompt__card p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.update-prompt__card .action {
    flex-shrink: 0;
    min-height: 2.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
}

@media (max-width: 27rem) {
    .account-menu-button {
        padding: 0.45rem;
    }

    .account-menu-button > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

@media (max-width: 32rem) {
    .visit-fields {
        grid-template-columns: 1fr;
    }

    .visit-form__actions .action,
    .delete-visit-actions .action {
        width: 100%;
    }
}

@keyframes account-panel-in {
    from {
        opacity: 0;
        transform: translateY(-0.35rem);
    }
}

@keyframes auth-barrier-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-contrast: more) {
    .account-menu-button,
    .account-panel,
    .search-panel,
    .provider-info-dialog,
    .progress-button,
    .progress-item,
    #mapLegend,
    #infoCard {
        border-width: 2px;
        background: var(--surface);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .account-menu-button,
    .account-panel,
    .provider-info-dialog,
    .progress-button,
    .progress-item,
    #mapLegend {
        background: var(--surface);
        backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-panel {
        animation: none;
    }

    .progress-bar__fill {
        transition: none;
    }

    .auth-barrier__spinner {
        animation: none;
    }
}

.auth-barrier {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: rgb(25 25 24 / 65%);
    backdrop-filter: blur(8px);
}

.auth-barrier__card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem 1.75rem 1.5rem;
    border: 1px solid rgb(37 37 34 / 20%);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 30%);
    text-align: center;
}

.auth-barrier__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-barrier__logo img {
    width: min(14rem, 80%);
    height: auto;
}

.auth-barrier__title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.auth-barrier__notice {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: left;
    background: rgba(39, 156, 223, 0.15);
    border: 1px solid rgba(39, 156, 223, 0.35);
    color: var(--text);
}

.auth-barrier__notice strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.auth-barrier__notice--rejected {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.35);
}

.auth-barrier__description {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.auth-barrier__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
}

.auth-barrier__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 3rem;
    color: var(--text-muted);
    font-weight: 600;
}

.auth-barrier__spinner {
    width: 1.35rem;
    height: 1.35rem;
    border: 0.2rem solid rgb(39 156 223 / 30%);
    border-top-color: #279cdf;
    border-radius: 50%;
    animation: auth-barrier-spin 800ms linear infinite;
}

.auth-barrier__footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(37 37 34 / 12%);
    font-size: 0.85rem;
}

.auth-barrier__privacy-link {
    color: var(--text-muted);
    text-decoration: underline;
}

.auth-barrier__privacy-link:hover,
.auth-barrier__privacy-link:focus {
    color: var(--text);
}

#appShell[inert] {
    filter: blur(3px) grayscale(30%);
    pointer-events: none;
    user-select: none;
}

@media (prefers-reduced-transparency: reduce) {
    .auth-barrier {
        background: var(--surface-muted);
        backdrop-filter: none;
    }
}

