html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Thyr-Tracker user markers */
.thyr-user-wrap {
    background: transparent;
    border: 0;
}

.thyr-user {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    pointer-events: auto;
    transform-origin: 50% 50%;
    transition: transform 0.25s ease-out;
}

.thyr-user.thyr-arrow svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.thyr-user.thyr-offline {
    opacity: 0.45;
    filter: grayscale(0.5);
}

.thyr-popup-lastseen {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* Dark theme for Leaflet popups – matches admin panel */
.leaflet-popup-content-wrapper {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content {
    margin: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.leaflet-popup-tip {
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-close-button {
    color: #94a3b8 !important;
}

.leaflet-popup-close-button:hover {
    color: #f1f5f9 !important;
}

.thyr-popup {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 140px;
}

.thyr-popup-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thyr-popup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
    flex: 0 0 auto;
}

.thyr-popup .thyr-user-img {
    display: block;
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #334155;
}

.thyr-popup-beers {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fbbf24;
    text-align: center;
}

/* Keep Leaflet zoom control clear of the hamburger menu (top-left). */
.leaflet-top.leaflet-left {
    margin-top: 50px;
}

/* Dark theme for Leaflet zoom control (+/-) – matches hamburger menu. */
.leaflet-bar,
.leaflet-bar a,
.leaflet-bar a:hover {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.leaflet-bar a {
    border-bottom-color: #334155;
}

.leaflet-bar a:hover {
    background-color: #334155;
    color: #f1f5f9;
}

.leaflet-bar a.leaflet-disabled {
    background-color: #1e293b;
    color: #64748b;
}

.leaflet-control-attribution {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #cbd5e1 !important;
}

.leaflet-control-attribution a {
    color: #93c5fd !important;
}

/* VIP marker pulse – subtle, slow, behind the arrow. */
.thyr-user.thyr-vip {
    position: relative;
}

.thyr-user.thyr-vip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border-radius: 50%;
    background: currentColor;
    color: #d946ef;
    opacity: 0.55;
    transform: scale(0.6);
    animation: thyr-vip-pulse 2.4s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes thyr-vip-pulse {
    0%   { transform: scale(0.55); opacity: 0.55; }
    80%  { transform: scale(2.0);  opacity: 0;    }
    100% { transform: scale(2.0);  opacity: 0;    }
}

/* Mission markers */
.thyr-mission-wrap {
    background: transparent;
    border: 0;
}

.thyr-mission svg {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.thyr-mission-popup {
    max-width: 300px;
    color: #f1f5f9;
}

.thyr-mission-popup .tmp-code {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.thyr-mission-popup .tmp-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.1rem 0 0.45rem;
}

.thyr-mission-popup .thyr-mission-img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.45rem;
    border: 1px solid #334155;
}

.thyr-mission-popup .tmp-text {
    font-size: 0.82rem;
    line-height: 1.35;
    max-height: 220px;
    overflow-y: auto;
    white-space: normal;
}

.thyr-mission-popup .tmp-eta {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fbbf24;
}

.thyr-mission-popup .tmp-deadline {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f87171;
}

/* Event markers */
.thyr-event-wrap { background: transparent; border: 0; }
.thyr-event svg { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
.thyr-event.thyr-event-far svg { opacity: 0.55; filter: grayscale(100%) drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }

.thyr-event-popup { max-width: 300px; color: #f1f5f9; }
.thyr-event-popup .tep-by {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c4b5fd;
}
.thyr-event-popup .tep-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.1rem 0 0.45rem;
}
.thyr-event-popup .thyr-event-img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.45rem;
    border: 1px solid #334155;
}
.thyr-event-popup .tep-text {
    font-size: 0.82rem;
    line-height: 1.35;
    max-height: 200px;
    overflow-y: auto;
    white-space: normal;
}
.thyr-event-popup .tep-start {
    margin-top: 0.45rem;
    padding-top: 0.35rem;
    border-top: 1px solid #334155;
    font-size: 0.78rem;
    color: #cbd5e1;
}
.thyr-event-popup .tep-radius {
    font-size: 0.78rem;
    color: #cbd5e1;
}
.thyr-event-popup .tep-timer {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #a78bfa;
    font-variant-numeric: tabular-nums;
}

.thyr-event-popup .tep-participants {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid #334155;
}
.thyr-event-popup .tep-part-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c4b5fd;
    margin-bottom: 0.3rem;
    font-weight: 600;
}
.thyr-event-popup .tep-part-count {
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.thyr-event-popup .tep-part-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.thyr-event-popup .tep-part-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.55);
    font-size: 0.82rem;
}
.thyr-event-popup .tep-part-muted {
    opacity: 0.55;
}
.thyr-event-popup .tep-part-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
}
.thyr-event-popup .tep-part-name {
    flex: 1 1 auto;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.thyr-event-popup .tep-part-crown {
    font-size: 0.75rem;
    flex: 0 0 auto;
}
.thyr-event-popup .tep-part-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 0.78rem;
    line-height: 1;
    flex: 0 0 auto;
}
.thyr-event-popup .tep-chip-here {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}
.thyr-event-popup .tep-chip-left {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3);
}
.thyr-event-popup .tep-chip-pend {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.3);
}
.thyr-event-popup .tep-chip-decl {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.3);
}
.thyr-event-popup .tep-chip-away {
    background: transparent;
    color: #475569;
    font-weight: 700;
}

/* Pin-route button shown in event and mission popups */
.thyr-event-popup .tep-head,
.thyr-mission-popup .tmp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.thyr-pin-route {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid #334155;
    border-radius: 50%;
    background: #1e293b;
    color: #93c5fd;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.thyr-pin-route:hover  { background: #2563eb; color: #ffffff; border-color: #1d4ed8; }
.thyr-pin-route:active { transform: translateY(1px); }

/* Coordinate-copy toast popup */
.thyr-coord-toast .leaflet-popup-content-wrapper {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #334155;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
.thyr-coord-toast .leaflet-popup-tip { background: #0f172a; }
.thyr-coord-toast .tcc-toast {
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: center;
}
.thyr-coord-toast .tcc-toast code {
    font-size: 0.78rem;
    color: #fbbf24;
}
.thyr-coord-toast .tcc-err code { color: #fca5a5; }

/* Route mode: cursor + destination + popup */
.thyr-route-mode { cursor: crosshair; }
.thyr-route-mode .leaflet-grab,
.thyr-route-mode .leaflet-interactive { cursor: crosshair; }

/* Event pick mode: same crosshair cue when picking a coordinate. */
.thyr-pick-mode { cursor: crosshair; }
.thyr-pick-mode .leaflet-grab,
.thyr-pick-mode .leaflet-interactive { cursor: crosshair; }

.thyr-route-dest svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.thyr-route-popup .leaflet-popup-content-wrapper {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #2563eb;
    border-radius: 8px;
}
.thyr-route-popup .leaflet-popup-tip { background: #0f172a; border-left: 1px solid #2563eb; border-bottom: 1px solid #2563eb; }
.thyr-route-popup .thyr-route-info {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Long-press marker action menu */
.thyr-marker-menu-popup .leaflet-popup-content-wrapper {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #2563eb;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}
.thyr-marker-menu-popup .leaflet-popup-tip {
    background: #0f172a;
    border-left: 1px solid #2563eb;
    border-bottom: 1px solid #2563eb;
}
.thyr-marker-menu-popup .leaflet-popup-content {
    margin: 8px 10px;
}
.thyr-marker-menu .tmm-head {
    font-weight: 700;
    font-size: 0.95rem;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    margin-bottom: 6px;
}
.thyr-marker-menu .tmm-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.thyr-marker-menu .tmm-btn {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}
.thyr-marker-menu .tmm-btn:hover { background: #334155; }
.thyr-marker-menu .tmm-btn.tmm-beer:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: #f59e0b;
}
.thyr-marker-menu .tmm-btn.tmm-wave:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: #3b82f6;
}

/* Notice markers */
.thyr-notice-wrap {
    background: transparent;
    border: 0;
}

.thyr-notice svg {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.thyr-notice-popup {
    max-width: 320px;
    color: #f1f5f9;
}

.thyr-notice-popup .tnp-from {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
}

.thyr-notice-popup .tnp-when {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.thyr-notice-popup .tnp-text {
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
}

/* Beer competition podium overlay (broadcast when Andreas ends the contest) */
.thyr-podium-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.thyr-podium-modal {
    position: relative;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    padding: 1.25rem 1rem 1.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.thyr-podium-close {
    position: absolute;
    top: 0.35rem;
    right: 0.55rem;
    background: transparent;
    color: #cbd5e1;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
}

.thyr-podium-close:hover { color: #f1f5f9; }

.thyr-podium-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.thyr-podium-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5rem;
}

.thyr-podium-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.thyr-podium-medal { font-size: 1.8rem; line-height: 1; }

.thyr-podium-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.3rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thyr-podium-count {
    font-size: 0.85rem;
    color: #fbbf24;
    margin: 0.2rem 0 0.45rem;
}

.thyr-podium-block {
    width: 100%;
    background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 6px 6px 0 0;
}

.thyr-podium-col.rank-1 .thyr-podium-block { height: 120px; background: linear-gradient(180deg, #fbbf24 0%, #b45309 100%); }
.thyr-podium-col.rank-2 .thyr-podium-block { height: 90px; background: linear-gradient(180deg, #cbd5e1 0%, #475569 100%); }
.thyr-podium-col.rank-3 .thyr-podium-block { height: 70px; background: linear-gradient(180deg, #d97706 0%, #78350f 100%); }

.thyr-podium-col.empty .thyr-podium-name { color: #64748b; }
.thyr-podium-col.empty .thyr-podium-block { opacity: 0.4; }

@media (max-width: 360px) {
    .thyr-podium-title { font-size: 1rem; }
    .thyr-podium-medal { font-size: 1.5rem; }
    .thyr-podium-name { font-size: 0.85rem; }
    .thyr-podium-col.rank-1 .thyr-podium-block { height: 100px; }
    .thyr-podium-col.rank-2 .thyr-podium-block { height: 75px; }
    .thyr-podium-col.rank-3 .thyr-podium-block { height: 55px; }
}

/* In-page toast fallback (used when system notifications are unavailable). */
.thyr-toast-host {
    position: fixed;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 10000;
    pointer-events: none;
    max-width: calc(100% - 1.2rem);
    width: min(420px, 100%);
}

.thyr-toast {
    pointer-events: auto;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-left: 4px solid #fbbf24;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    padding: 0.55rem 0.6rem 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thyr-toast-body { flex: 1 1 auto; min-width: 0; }
.thyr-toast-title { font-weight: 700; font-size: 0.95rem; }
.thyr-toast-text {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 0.15rem;
    word-break: break-word;
}

.thyr-toast-ok {
    flex: 0 0 auto;
    background: #334155;
    color: #f1f5f9;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

.thyr-toast-ok:hover { background: #475569; }

/* Install-as-app prompt banner. */
.thyr-install {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    z-index: 1100;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.thyr-install-body {
    pointer-events: auto;
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-left: 4px solid #38bdf8;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: 480px;
    width: 100%;
}

.thyr-install-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.thyr-install-text strong { font-size: 0.95rem; }
.thyr-install-text span { font-size: 0.82rem; color: #cbd5e1; }
.thyr-install-icon {
    display: inline-block;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 0 0.25rem;
    margin: 0 0.15rem;
}

.thyr-install-btn {
    flex: 0 0 auto;
    background: #38bdf8;
    color: #0f172a;
    border: 0;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.thyr-install-btn:hover { background: #7dd3fc; }

.thyr-install-close {
    flex: 0 0 auto;
    background: transparent;
    color: #94a3b8;
    border: 0;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.thyr-install-close:hover { color: #f1f5f9; }

/* Welcome onboarding modal (post-login one-click setup). */
.thyr-onb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.thyr-onb {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 1.2rem 1.3rem 1.1rem;
    width: min(440px, 100%);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.thyr-onb h2 {
    margin: 0 0 0.6rem;
    font-size: 1.25rem;
}

.thyr-onb p { margin: 0 0 0.6rem; font-size: 0.95rem; color: #cbd5e1; }

.thyr-onb-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.thyr-onb-list li {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 0.92rem;
}

.thyr-onb-ios {
    background: #1e293b;
    border: 1px solid #334155;
    border-left: 4px solid #38bdf8;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin: 0 0 1rem;
}

.thyr-onb-ios ol { margin: 0.3rem 0 0 1.2rem; padding: 0; }
.thyr-onb-ios li { padding: 0.15rem 0; font-size: 0.9rem; color: #e2e8f0; }
.thyr-onb-key {
    display: inline-block;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 0 0.3rem;
    margin: 0 0.15rem;
    font-weight: 600;
}

.thyr-onb-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.thyr-onb-primary {
    background: #38bdf8;
    color: #0f172a;
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.thyr-onb-primary:disabled { opacity: 0.6; cursor: default; }
.thyr-onb-primary:hover:not(:disabled) { background: #7dd3fc; }

.thyr-onb-secondary {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.92rem;
    cursor: pointer;
}

.thyr-onb-secondary:hover { background: #1e293b; color: #f1f5f9; }

.thyr-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.92);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.thyr-gate {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 1.3rem 1.4rem 1.2rem;
    width: min(460px, 100%);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.thyr-gate h2 {
    margin: 0 0 0.7rem;
    font-size: 1.3rem;
}

.thyr-gate p { margin: 0 0 0.7rem; font-size: 0.95rem; color: #cbd5e1; }

.thyr-gate-status {
    background: #1e293b;
    border: 1px solid #854d0e;
    border-left: 4px solid #fbbf24;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    color: #fef3c7;
    font-size: 0.9rem;
    margin: 0.4rem 0 0.9rem;
}


.thyr-onb-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.3rem;
}

.thyr-onb-ios code {
    background: #0f172a;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #fbbf24;
}
