:root {
    color-scheme: dark;
    --bg: #000000;
    --elev: #1c1c1e;
    --fill: rgba(120, 120, 128, .24);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .60);
    --hairline: rgba(84, 84, 88, .65);
    --accent: #0a84ff;
    --ok: #30d158;
    --closed: #ff453a;
    --unknown: #ff9f0a;
    --map-bg: #101215;
    --map-block: rgba(235, 235, 245, .05);
    --map-park: rgba(48, 209, 88, .10);
    --map-street: rgba(235, 235, 245, .10);
    --map-street-2: rgba(235, 235, 245, .06);
    --map-rail: rgba(235, 235, 245, .42);
    --pill-shadow: 0 12px 30px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --bg: #f2f2f7;
        --elev: #ffffff;
        --fill: rgba(120, 120, 128, .12);
        --label: #000000;
        --label-2: rgba(60, 60, 67, .60);
        --hairline: rgba(60, 60, 67, .29);
        --accent: #007aff;
        --ok: #248a3d;
        --closed: #d70015;
        --unknown: #b25000;
        --map-bg: #e8ecf1;
        --map-block: rgba(60, 60, 67, .06);
        --map-park: rgba(52, 199, 89, .16);
        --map-street: #ffffff;
        --map-street-2: rgba(255, 255, 255, .72);
        --map-rail: rgba(60, 60, 67, .45);
        --pill-shadow: 0 10px 26px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .10);
    }
}

html[data-theme="light"],
html.force-light-theme {
    color-scheme: light !important;
    --bg: #f2f2f7 !important;
    --elev: #ffffff !important;
    --fill: rgba(120, 120, 128, .12) !important;
    --label: #000000 !important;
    --label-2: rgba(60, 60, 67, .60) !important;
    --hairline: rgba(60, 60, 67, .29) !important;
    --accent: #007aff !important;
    --ok: #248a3d !important;
    --closed: #d70015 !important;
    --unknown: #b25000 !important;
    --map-bg: #e8ecf1 !important;
    --map-block: rgba(60, 60, 67, .06) !important;
    --map-park: rgba(52, 199, 89, .16) !important;
    --map-street: #ffffff !important;
    --map-street-2: rgba(255, 255, 255, .72) !important;
    --map-rail: rgba(60, 60, 67, .45) !important;
    --pill-shadow: 0 10px 26px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .10) !important;
}

html[data-theme="dark"],
html.force-dark-theme {
    color-scheme: dark !important;
    --bg: #000000 !important;
    --elev: #1c1c1e !important;
    --fill: rgba(120, 120, 128, .24) !important;
    --label: #ffffff !important;
    --label-2: rgba(235, 235, 245, .60) !important;
    --hairline: rgba(84, 84, 88, .65) !important;
    --accent: #0a84ff !important;
    --ok: #30d158 !important;
    --closed: #ff453a !important;
    --unknown: #ff9f0a !important;
    --map-bg: #101215 !important;
    --map-block: rgba(235, 235, 245, .05) !important;
    --map-park: rgba(48, 209, 88, .10) !important;
    --map-street: rgba(235, 235, 245, .10) !important;
    --map-street-2: rgba(235, 235, 245, .06) !important;
    --map-rail: rgba(235, 235, 245, .42) !important;
    --pill-shadow: 0 12px 30px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35) !important;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -.011em;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--label);
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    min-height: calc(max(100vh, 100dvh, 100lvh) + 130px);
    overscroll-behavior: none;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    padding-top: calc(22px + env(safe-area-inset-top, 0px));
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--hairline);
}

.topbar__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.topbar__reload-btn {
    position: absolute;
    left: 16px;
    top: calc(50% + (env(safe-area-inset-top, 0px) / 2));
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--hairline) 65%, transparent);
    padding: 0;
    background: color-mix(in srgb, var(--elev) 82%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    color: var(--label);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease, background 0.15s ease;
}

.topbar__reload-btn svg {
    width: 17px;
    height: 17px;
    transition: transform 0.4s ease;
}

.topbar__reload-btn:active {
    transform: translateY(-50%) scale(0.92);
    opacity: 0.8;
}

.topbar__reload-btn.is-spinning svg {
    animation: topbar-spin 0.65s linear infinite;
}

@keyframes topbar-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.topbar__account-btn {
    position: absolute;
    right: 16px;
    top: calc(50% + (env(safe-area-inset-top, 0px) / 2));
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6a88 55%, #ff99ac 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.topbar__account-btn:active {
    transform: translateY(-50%) scale(0.92);
    opacity: 0.85;
}

.topbar__avatar-initial {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    user-select: none;
}

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

.screen {
    display: block;
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
}

.now {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--label-2);
}

.now strong {
    color: var(--label);
    font-size: 17px;
}

.mapview {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: var(--map-bg);
    touch-action: none;
    display: none;
}

body.view-map .mapview {
    display: block;
}

body.view-map .now,
body.view-map .panel,
body.view-map .spacer {
    display: none;
}

.mapfallback {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.mapcanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.locate-btn {
    position: absolute;
    right: 16px;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--hairline) 50%, transparent);
    background: var(--elev);
    background: color-mix(in srgb, var(--elev) 88%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.locate-btn:active {
    transform: scale(.94);
}

.locate-btn svg {
    width: 25px;
    height: 25px;
    transform: translate(-1px, 1px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.locate-btn.is-locating svg {
    transform: translate(-1px, 1px) scale(1.15) rotate(-10deg);
}

.map-legend {
    position: absolute;
    right: 16px;
    bottom: calc(156px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.map-legend__toggle {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--hairline) 50%, transparent);
    background: color-mix(in srgb, var(--elev) 88%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
    color: var(--label);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease;
}

.map-legend__toggle:active {
    transform: scale(.94);
}

.map-legend__mark {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.map-legend__rows {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    transition: max-height .42s cubic-bezier(.32, .72, 0, 1), opacity .24s ease, padding .42s cubic-bezier(.32, .72, 0, 1);
}

.map-legend.is-open .map-legend__rows {
    max-height: 170px;
    opacity: 1;
    padding: 10px 12px;
    border-color: color-mix(in srgb, var(--hairline) 50%, transparent);
    background: color-mix(in srgb, var(--elev) 88%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}

.map-legend__row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--label);
    white-space: nowrap;
}

.map-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55);
}

.mv-bg { fill: var(--map-bg); }
.mv-block { fill: var(--map-block); }
.mv-park { fill: var(--map-park); }

.mv-street {
    stroke: var(--map-street);
    stroke-width: 14;
    stroke-linecap: round;
    fill: none;
}

.mv-street2 {
    stroke: var(--map-street-2);
    stroke-width: 9;
    stroke-linecap: round;
    fill: none;
}

.mv-rail {
    stroke: var(--map-rail);
    fill: none;
}

.mv-rail-band { stroke-width: 2.5; opacity: .8; }
.mv-rail-sleepers { stroke-width: 9; stroke-dasharray: 2 11; opacity: .4; }

.mv-route {
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-dasharray: 1 9;
    stroke-linecap: round;
    fill: none;
    opacity: .85;
}

.mv-acc { fill: var(--accent); opacity: .14; }
.mv-dot { fill: var(--accent); stroke: var(--map-bg); stroke-width: 3; }

.pin--closed { color: var(--closed); }
.pin--open { color: var(--ok); }
.pin--unknown { color: var(--unknown); }

.pin-core {
    fill: currentColor;
    stroke: var(--map-bg);
    stroke-width: 3;
}

.pin-pulse {
    fill: currentColor;
    transform-box: fill-box;
    transform-origin: center;
    animation: pinPulse 2.4s ease-out infinite;
}

@keyframes pinPulse {
    0% { transform: scale(.6); opacity: .55; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.2); opacity: 0; }
}

.panel {
    padding: 18px 16px;
}

.panel h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.021em;
}

.panel p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--label-2);
}

.settings-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 15px;
}

.settings-value {
    color: var(--label-2);
    font-variant-numeric: tabular-nums;
}

.settings-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 15px 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #ffffff;
    background: var(--accent);
    cursor: pointer;
}

.btn:active {
    opacity: .8;
}

.btn--secondary {
    background: var(--fill);
    color: var(--label);
}

.settings-status {
    min-height: 18px;
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--label-2);
    text-align: center;
}

.settings-credit {
    margin: 18px 0 0;
    font-size: 11px;
    color: var(--label-2);
    text-align: center;
    opacity: .8;
}

.input {
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent);
    border-radius: 14px;
    background: var(--elev);
    background: color-mix(in srgb, var(--elev) 70%, transparent);
    font-family: inherit;
    font-size: 16px;
    color: var(--label);
    box-sizing: border-box;
}

.input::placeholder {
    color: var(--label-2);
}

textarea.input {
    min-height: 88px;
    resize: vertical;
}

label.btn {
    display: block;
    text-align: center;
    cursor: pointer;
}

.pl-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pl-photos img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--hairline) 40%, transparent);
}

.pl-card-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    transition: opacity .3s ease;
}

.pl-card-backdrop.is-visible {
    opacity: 1;
}

.pl-card {
    position: fixed;
    left: 50%;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    width: min(100% - 56px, 330px);
    transform: translateX(-50%);
    perspective: 1400px;
    animation: plCardIn .38s cubic-bezier(.32, .72, 0, 1);
}

@keyframes plCardIn {
    from { opacity: 0; transform: translateX(-50%) translateY(26px) scale(.98); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.pl-card__flip {
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform .68s cubic-bezier(.32, .72, 0, 1);
    will-change: transform;
}

.pl-card.is-flipped .pl-card__flip {
    transform: rotateY(180deg);
}

.pl-card__face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.pl-card__face--front {
    position: relative;
}

.pl-card__face--back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
}

.pl-card:not(.is-flipped) .pl-card__face--back {
    pointer-events: none;
}

.pl-card.is-flipped .pl-card__face--front {
    pointer-events: none;
}

.pl-card__inner {
    background: var(--elev);
    border: 1px solid color-mix(in srgb, var(--hairline) 40%, transparent);
    border-radius: 28px;
    padding: 10px 10px 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .22);
}

.pl-card__inner--back {
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.pl-card__go.pl-card__go--back {
    margin-top: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.pl-card__go--back svg {
    width: 18px;
    height: 18px;
    margin-left: -3px;
}

.pl-info {
    margin: 6px 2px 12px;
}

.pl-info__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--hairline) 35%, transparent);
}

.pl-info__row:last-child {
    border-bottom: 0;
}

.pl-info__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--label-2);
    flex-shrink: 0;
}

.pl-info__value {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.pl-info__value--open { color: var(--ok); }
.pl-info__value--closed { color: var(--closed); }
.pl-info__value--closing { color: var(--unknown); }
.pl-info__value--opening { color: var(--ok); opacity: .85; }

.pl-info__section {
    margin: 0 2px 12px;
}

.pl-info__section-title {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--label-2);
}

.pl-info__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pl-info__list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--hairline) 35%, transparent);
    font-size: 14px;
    font-weight: 600;
}

.pl-info__list li:last-child {
    border-bottom: 0;
}

.pl-info__train {
    font-weight: 500;
    color: var(--label-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    text-align: right;
}

.pl-info__note {
    margin: 0 2px 12px;
    font-size: 13px;
    color: var(--label-2);
}

.pl-card__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 46vh;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #2b3550, #171d2e);
}

.pl-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pl-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .45);
}

.pl-card__placeholder svg {
    width: 58px;
    height: 58px;
}

.pl-card__map-btn {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(16, 21, 33, .55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.pl-card__map-btn:active {
    transform: scale(.94);
    background: rgba(16, 21, 33, .75);
}

.pl-card__map-btn svg {
    width: 20px;
    height: 20px;
}

.pl-card__photo-btn {
    position: absolute;
    left: 12px;
    bottom: 62px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(16, 21, 33, .55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, opacity .2s ease;
}

.pl-card__photo-btn:active {
    transform: scale(.94);
    background: rgba(16, 21, 33, .75);
}

.pl-card__photo-btn svg {
    width: 20px;
    height: 20px;
}

.pl-card__photo-btn.is-uploading {
    opacity: .5;
}

.pl-card__name {
    margin: 0 4px 2px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.pl-card__sub {
    margin: 0 4px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--label-2);
}

.pl-card__sub--open { color: var(--ok); }
.pl-card__sub--closed { color: var(--closed); }
.pl-card__sub--closing { color: var(--unknown); }
.pl-card__sub--opening { color: var(--ok); opacity: .85; }

.pl-card__info {
    display: flex;
    gap: 18px;
    margin: 0 4px 14px;
    font-size: 14px;
    font-weight: 600;
}

.pl-card__info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pl-card__info-item svg {
    width: 16px;
    height: 16px;
    color: var(--label-2);
}

.pl-card__actions {
    display: flex;
    gap: 10px;
}

.pl-card__go {
    flex: 1;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    cursor: pointer;
    background: #111114;
    color: #ffffff;
}

.pl-card__go:active {
    opacity: .85;
}

.pl-card__fav {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent);
    background: transparent;
    color: var(--label-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.pl-card__fav:active {
    transform: scale(.94);
}

.pl-card__fav-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: block;
}

.pl-card__fav-icon svg {
    position: absolute;
    inset: 0;
    width: 18px;
    height: 18px;
}

.pl-card__fav-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.pl-card__fav-fill {
    fill: currentColor;
    transform: scale(0);
    transform-origin: 50% 50%;
    transition: transform .16s ease-in;
}

.pl-card__fav.is-fav {
    background: #ff3b30;
    border-color: transparent;
    color: #ffffff;
}

.pl-card__fav.is-fav .pl-card__fav-fill {
    transform: scale(1);
    transition: transform .42s cubic-bezier(.34, 1.56, .64, 1);
}

.pl-card__fav.is-animating {
    animation: favPop .42s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes favPop {
    0% { transform: scale(1); }
    35% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@media (prefers-color-scheme: dark) {
    .pl-card__go {
        background: #ffffff;
        color: #000000;
    }
}

.spacer {
    height: 40px;
}

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -5px;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    padding-bottom: 5px;
    pointer-events: none;
}

@media (display-mode: standalone) {
    .tabbar {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) - 8px);
    }
}

.tabbar__pill {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 350px;
    padding: 4px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--hairline) 50%, transparent);
    border-radius: 999px;
    box-shadow: var(--pill-shadow);
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.tabbar__blur {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: var(--elev);
    background: color-mix(in srgb, var(--elev) 60%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    pointer-events: none;
}

/* Ovale di sfondo animato che scorre fluidamente */
.tabbar__indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 75px;
    height: auto;
    border-radius: 999px;
    background: #ebebeb;
    pointer-events: none;
    z-index: 1;
    transform: translate3d(4px, 0, 0);
    transition: background-color .3s ease;
    will-change: transform, width;
}

@media (prefers-color-scheme: dark) {
    .tabbar__indicator {
        background: rgba(255, 255, 255, 0.18);
    }
}

.tab {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 51px;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tab:first-of-type {
    justify-content: flex-start;
}

.tab:last-of-type {
    justify-content: flex-end;
}

.tab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 75px;
    height: 51px;
    border-radius: 999px;
    color: var(--label);
    transition: color 0.22s ease, transform 0.15s ease;
}

.tab svg {
    width: 25px;
    height: 25px;
}

.tab:active .tab__icon {
    transform: scale(0.92);
}

@media (prefers-reduced-motion: reduce) {
    .pin-pulse { animation: none; opacity: 0; }
}

/* ==========================================================================
   Apple iOS Account & Settings Screen (Exact Match to Reference)
   ========================================================================== */

body.view-account {
    overflow: hidden !important;
}

body.view-account .topbar,
body.view-account .now,
body.view-account .spacer {
    display: none !important;
}

body.view-account .screen {
    padding-top: 0 !important;
    overflow: hidden !important;
}

body.view-account .panel {
    padding: 0 !important;
}

.apple-account {
    padding: calc(18px + env(safe-area-inset-top, 14px)) 20px calc(75px + env(safe-area-inset-bottom, 8px)) 20px;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.apple-account__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apple-account__footer {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.apple-account__reload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fill);
    border: none;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--label-2);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.apple-account__reload-btn svg {
    color: var(--label-2);
}

.apple-account__reload-btn:hover {
    color: var(--label);
    background: var(--hairline);
}

.apple-account__reload-btn:active {
    transform: scale(0.96);
    opacity: 0.7;
}

.ios-subtle-link {
    background: none;
    border: none;
    color: var(--label-2);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

.ios-subtle-link:hover,
.ios-subtle-link:active {
    opacity: 0.7;
}

/* Top bar: < on left, Logout on right */
.apple-account__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    margin-bottom: 4px;
}

.apple-account__back {
    background: none;
    border: none;
    padding: 6px;
    margin-left: -6px;
    color: var(--label);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

.apple-account__back:active {
    opacity: 0.5;
}

.apple-account__back svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
}

.apple-account__logout {
    background: none;
    border: none;
    padding: 6px 0;
    color: var(--label-2);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
}

.apple-account__logout:hover,
.apple-account__logout:active {
    color: #ff3b30;
}

/* Profile Section (Centered) */
.apple-account__profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.apple-account__avatar-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6a88 55%, #ff99ac 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.apple-account__avatar-initial {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    user-select: none;
}

.apple-account__name {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--label);
    margin: 0 0 1px 0;
    text-align: center;
}

.apple-account__email {
    font-size: 13px;
    color: var(--label-2);
    margin: 0;
    text-align: center;
}

/* Section Titles */
.apple-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--label-2);
    margin: 10px 0 2px 0;
}

/* List Rows */
.apple-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    min-height: 40px;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    transition: opacity 0.15s ease;
}

.apple-row:active {
    opacity: 0.7;
}

.apple-row__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apple-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fill);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--label);
    flex-shrink: 0;
}

.apple-icon-badge svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

.apple-row__label {
    font-size: 15px;
    font-weight: 500;
    color: var(--label);
}

.apple-row__right {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--label-2);
    font-size: 14.5px;
}

.apple-row__chevron {
    width: 15px;
    height: 16px;
    color: var(--hairline);
    stroke-width: 2.5;
}

/* iOS Toggle Switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch__slider {
    position: absolute;
    inset: 0;
    background-color: var(--fill);
    border-radius: 30px;
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.ios-switch__slider::before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-switch input:checked + .ios-switch__slider {
    background-color: #007aff;
}

.ios-switch input:checked + .ios-switch__slider::before {
    transform: translateX(20px);
}

/* ==========================================================================
   Modern Apple iOS Theme Selector Sheet (Display & Brightness Style)
   ========================================================================== */

.ios-theme-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ios-theme-modal:not([hidden]) {
    display: flex;
}

.ios-theme-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.ios-theme-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ios-theme-modal__sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--elev);
    border-radius: 28px 28px 0 0;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 16px)) 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    border-top: 1px solid var(--hairline);
    transform: translateY(100%);
    transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 1;
}

.ios-theme-modal.is-open .ios-theme-modal__sheet {
    transform: translateY(0);
}

.ios-theme-modal__grabber {
    width: 36px;
    height: 5px;
    background: var(--hairline);
    border-radius: 999px;
    margin: 0 auto 14px auto;
}

.ios-theme-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ios-theme-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--label);
    margin: 0;
    letter-spacing: -0.015em;
}

.ios-theme-modal__close {
    background: var(--fill);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--label-2);
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ios-theme-modal__close svg {
    width: 15px;
    height: 15px;
}

.ios-theme-modal__close:active {
    transform: scale(0.92);
    opacity: 0.7;
}

.ios-theme-modal__subtitle {
    font-size: 13.5px;
    color: var(--label-2);
    margin: 0 0 20px 0;
}

/* Centered variant (modal al centro dello schermo) */
.ios-theme-modal--center {
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.ios-theme-modal--center .ios-theme-modal__sheet {
    width: 100%;
    max-width: 340px;
    border-radius: 28px;
    border: 1px solid var(--hairline);
    border-top: 1px solid var(--hairline);
    padding: 20px 18px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .25);
    transform: scale(.9);
    opacity: 0;
    transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .24s ease;
}

.ios-theme-modal--center.is-open .ios-theme-modal__sheet {
    transform: scale(1);
    opacity: 1;
}

.ios-theme-modal--center .ios-theme-modal__grabber {
    display: none;
}

.ios-theme-modal--center .ios-theme-modal__subtitle {
    margin-bottom: 16px;
}

/* 3-Column Theme Options */
.ios-theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ios-theme-card {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: transform 0.15s ease;
}

.ios-theme-card:active {
    transform: scale(0.96);
}

/* Miniature Phone Preview */
.ios-theme-preview {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    border: 2px solid var(--hairline);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ios-theme-card.is-selected .ios-theme-preview {
    border-color: #007aff;
    box-shadow: 0 0 0 1px #007aff, 0 4px 14px rgba(0, 122, 255, 0.25);
}

/* Light Preview */
.ios-theme-preview--light {
    background: #f2f2f7;
}

.ios-theme-preview--light .ios-preview-bar {
    height: 10px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ios-theme-preview--light .ios-preview-line {
    height: 4px;
    width: 50%;
    background: rgba(60, 60, 67, 0.3);
    border-radius: 2px;
}

.ios-theme-preview--light .ios-preview-card {
    flex: 1;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Dark Preview */
.ios-theme-preview--dark {
    background: #000000;
}

.ios-theme-preview--dark .ios-preview-bar {
    height: 10px;
    background: #1c1c1e;
    border-radius: 4px;
}

.ios-theme-preview--dark .ios-preview-line {
    height: 4px;
    width: 50%;
    background: rgba(235, 235, 245, 0.3);
    border-radius: 2px;
}

.ios-theme-preview--dark .ios-preview-card {
    flex: 1;
    background: #1c1c1e;
    border-radius: 6px;
}

/* Auto / Split Preview */
.ios-theme-preview--auto {
    padding: 0;
    flex-direction: row;
    background: transparent;
}

.ios-preview-half {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 4px;
}

.ios-preview-half--light {
    background: #f2f2f7;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.ios-preview-half--light .ios-preview-bar {
    height: 10px;
    background: #ffffff;
    border-radius: 3px;
}

.ios-preview-half--light .ios-preview-card {
    flex: 1;
    background: #ffffff;
    border-radius: 4px;
}

.ios-preview-half--dark {
    background: #000000;
}

.ios-preview-half--dark .ios-preview-bar {
    height: 10px;
    background: #1c1c1e;
    border-radius: 3px;
}

.ios-preview-half--dark .ios-preview-card {
    flex: 1;
    background: #1c1c1e;
    border-radius: 4px;
}

/* Label below preview */
.ios-theme-card__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--label);
    margin-top: 2px;
}

/* Radio Button underneath */
.ios-theme-card__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ios-theme-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ios-theme-card.is-selected .ios-theme-card__radio {
    border-color: #007aff;
    background: #007aff;
}

.ios-theme-card.is-selected .ios-theme-card__dot {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   Apple Nearby Crossings View (Stile Apple / iOS Inset Grouped)
   ========================================================================== */

body.view-nearby .now {
    display: none !important;
}

body.view-nearby .panel {
    padding: 0 !important;
}

body.view-nearby .screen {
    padding-top: calc(62px + env(safe-area-inset-top, 0px)) !important;
}

.apple-nearby {
    max-width: 580px;
    margin: 0 auto;
    padding: 16px 12px calc(90px + env(safe-area-inset-bottom, 16px));
    box-sizing: border-box;
}

.apple-nearby__header {
    margin-bottom: 14px;
    padding: 0 4px;
}

.apple-nearby__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apple-nearby__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--label);
    line-height: 1.15;
}

.apple-nearby__badge {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.apple-nearby__subtitle {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--label-2);
    line-height: 1.35;
}

.apple-nearby__gps-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--unknown) 12%, var(--elev));
    border: 1px solid color-mix(in srgb, var(--unknown) 35%, transparent);
}

.apple-nearby__gps-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--unknown) 22%, transparent);
    color: var(--unknown);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apple-nearby__gps-icon svg {
    width: 17px;
    height: 17px;
}

.apple-nearby__gps-info {
    flex: 1;
    min-width: 0;
}

.apple-nearby__gps-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--label);
    line-height: 1.25;
}

.apple-nearby__gps-text {
    font-size: 12px;
    color: var(--label-2);
    margin-top: 2px;
}

.apple-nearby__gps-btn {
    padding: 6px 14px;
    border-radius: 9999px;
    border: none;
    background: var(--accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.apple-nearby__gps-btn:active {
    transform: scale(0.94);
    opacity: 0.85;
}

/* Apple Ticket Cards Container (From Reference Photo) */
.apple-nearby__cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apple-ticket-card {
    background: var(--elev);
    border-radius: 20px;
    padding: 18px 16px 16px 16px;
    border: 1px solid color-mix(in srgb, var(--hairline) 65%, transparent);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    position: relative;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apple-ticket-card:active {
    transform: scale(0.992);
}

/* Header: Title and Address */
.apple-ticket-card__header {
    margin-bottom: 14px;
}

.apple-ticket-card__title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--label);
    margin: 0 0 5px 0;
    line-height: 1.25;
}

.apple-ticket-card__address {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--label-2);
    line-height: 1.35;
}

.apple-ticket-card__address svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Middle: Stato - Visual Track - Distanza */
.apple-ticket-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    margin-bottom: 18px;
    border-top: 1px dashed color-mix(in srgb, var(--hairline) 75%, transparent);
    border-bottom: 1px dashed color-mix(in srgb, var(--hairline) 75%, transparent);
}

.apple-ticket-card__col {
    display: flex;
    flex-direction: column;
}

.apple-ticket-card__col--left {
    align-items: flex-start;
    min-width: 90px;
}

.apple-ticket-card__col--center {
    align-items: center;
    flex: 1;
    padding: 0 10px;
}

.apple-ticket-card__col--right {
    align-items: flex-end;
    min-width: 90px;
}

.apple-ticket-card__lbl {
    font-size: 12px;
    font-weight: 500;
    color: var(--label-2);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.apple-ticket-card__val {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--label);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* Status colors */
.apple-ticket-card__val--open {
    color: var(--ok);
}

.apple-ticket-card__val--closed {
    color: var(--closed);
}

.apple-ticket-card__val--closing,
.apple-ticket-card__val--opening {
    color: var(--unknown);
}

.apple-ticket-card__val--unknown {
    color: var(--label-2);
    font-size: 13px;
}

/* Middle track line & icon */
.apple-ticket-card__track-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.apple-ticket-card__track-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--label);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
    background: var(--fill);
    padding: 2px 7px;
    border-radius: 9999px;
    white-space: nowrap;
    display: inline-block;
}

.apple-ticket-card__track {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.apple-ticket-card__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--label-2);
    flex-shrink: 0;
}

.apple-ticket-card__line {
    flex: 1;
    height: 1px;
    border-bottom: 1.5px dotted color-mix(in srgb, var(--hairline) 90%, transparent);
}

.apple-ticket-card__train-icon {
    width: 16px;
    height: 16px;
    margin: 0 4px;
    color: var(--label-2);
    flex-shrink: 0;
}

/* Actions: Two pill buttons */
.apple-ticket-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.apple-ticket-card__btn {
    height: 44px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.apple-ticket-card__btn:active {
    transform: scale(0.96);
}

.apple-ticket-card__btn--secondary {
    background: transparent;
    color: var(--label);
    border: 1px solid var(--hairline);
}

.apple-ticket-card__btn--secondary:active {
    background: var(--fill);
}

.apple-ticket-card__btn--primary {
    background: var(--label);
    color: var(--bg);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.apple-ticket-card__btn--primary:active {
    opacity: 0.85;
}

/* Report Alert (modal centrato, stile moderno) */
.ios-theme-modal--center .report-alert {
    padding: 0;
    overflow: hidden;
}

.report-alert__body {
    padding: 24px 20px 12px;
    text-align: center;
}

.report-alert__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--label);
}

.report-alert__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--label-2);
}

.report-alert__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 20px;
}

.report-alert__btn {
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    border: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--label);
    background: transparent;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.report-alert__btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}

#report-confirm-open {
    background: var(--ok);
    color: #ffffff;
}

#report-confirm-closed {
    background: var(--closed);
    color: #ffffff;
}

#report-sheet-cancel {
    border: 1px solid var(--hairline);
    color: var(--label);
}

/* Apple Toast notification */
.apple-toast {
    position: fixed;
    top: calc(70px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--elev);
    border: 1px solid var(--hairline);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 18px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--label);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.apple-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* States */
.apple-nearby__state {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.apple-nearby__state-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--label);
    margin: 12px 0 6px;
}

.apple-nearby__state-text {
    font-size: 14px;
    color: var(--label-2);
    margin: 0;
}

.apple-nearby__empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fill);
    color: var(--label-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.apple-nearby__empty-icon svg {
    width: 24px;
    height: 24px;
}

.apple-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid color-mix(in srgb, var(--label-2) 20%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: apple-spin 0.7s linear infinite;
    margin-bottom: 12px;
}

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

/* ==========================================================================
   Apple Search View Components (Stile Apple iOS Spotlight / Maps)
   ========================================================================== */

.apple-search-wrap {
    margin-bottom: 12px;
}

.apple-search-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: var(--fill);
    border: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent);
    border-radius: 12px;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.apple-search-field:focus-within {
    background: var(--elev);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.apple-search-icon {
    width: 18px;
    height: 18px;
    color: var(--label-2);
    flex-shrink: 0;
    margin-right: 8px;
}

.apple-search-input {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    color: var(--label);
    letter-spacing: -0.01em;
}

.apple-search-input::placeholder {
    color: var(--label-2);
    opacity: 0.8;
}

.apple-search-input::-webkit-search-cancel-button,
.apple-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.apple-search-clear {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--label-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.12s ease;
}

.apple-search-clear:active {
    opacity: 1;
}

.apple-search-clear svg {
    width: 18px;
    height: 18px;
}

/* Quick Filter Chips (iOS Segmented Pills) */
.apple-filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    margin: 0 -2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.apple-filter-chips::-webkit-scrollbar {
    display: none;
}

.apple-chip {
    padding: 6px 14px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    background: var(--fill);
    color: var(--label-2);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.apple-chip:active {
    transform: scale(0.96);
}

.apple-chip.is-active {
    background: var(--label);
    color: var(--bg);
    font-weight: 600;
}

.apple-search-count {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--label-2);
    padding: 0 4px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

