.margot-permission-scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.margot-permission-scene::backdrop {
    background: rgb(20 17 24 / 0%);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);

    transition:
        background 340ms ease,
        backdrop-filter 340ms ease,
        -webkit-backdrop-filter 340ms ease;
}

.margot-permission-scene.is-visible::backdrop {
    background: rgb(20 17 24 / 30%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.margot-permission-card,
.margot-permission-guide {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(18px) scale(.96);

    transition:
        opacity 300ms ease,
        filter 340ms ease,
        transform 380ms cubic-bezier(.2, .8, .2, 1);
}

.margot-permission-card.is-visible,
.margot-permission-guide.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: none;
}

.margot-permission-card::backdrop,
.margot-permission-guide::backdrop {
    background: transparent;
}

.margot-permission-card {
    box-sizing: border-box;
    width: min(90vw, 420px);
    max-height: 88dvh;
    margin: auto;
    border: 1px solid #fff9;
    border-radius: 32px;
    padding: 30px 26px;
    background: #fffffff5;
    color: #19191e;
    box-shadow: 0 24px 90px #0002;
    text-align: center;
    font: 17px/1.5 system-ui, sans-serif;
}

.margot-permission-card h2 {
    font: 750 28px/1.15 system-ui, sans-serif;
    margin: 18px 0;
}

.margot-permission-card .permission-detail {
    font-size: 14px;
    color: #66636b;
}

.margot-permission-card button {
    border: 0;
    border-radius: 99px;
    background: #f3153c;
    color: white;
    width: 100%;
    min-height: 54px;
    font: 650 17px system-ui, sans-serif;
    margin-top: 12px;
    transition: transform 150ms ease;
}

.margot-permission-card button:active {
    transform: scale(.96);
}

.permission-art {
    font-size: 64px;
}

.margot-permission-card.is-visible .permission-art {
    animation:
        permission-arrive
        520ms
        cubic-bezier(.18, .9, .25, 1.15)
        both;
}

.margot-permission-guide {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: max(32px, env(safe-area-inset-top)) 24px;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: center;
}

.permission-brand {
    font: 900 26px Georgia, serif;
    margin: 8px;
    text-shadow: 0 2px 12px #0005;
}

.permission-arrow {
    position: absolute;
    width: 14vw;
    max-width: 64px;
    top: 77.5%;
    transform: translateY(-46%);
    pointer-events: none;
}

.permission-arrow-left {
    left: 0;
}

.permission-arrow-right {
    right: 0;
    transform: translateY(-46%) scaleX(-1);
}

.permission-arrow svg {
    display: block;
    width: 100%;
    overflow: visible;
    animation: permission-point 1700ms ease-in-out infinite;
}

.arrow-shadow {
    fill: #ed2147;
    stroke: #281d24;
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.arrow-body {
    fill: #fff;
    stroke: #281d24;
    stroke-width: 3;
    stroke-linejoin: round;
}

.arrow-sketch {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/*
 * Posições de referência:
 * o iOS não expõe a geometria dos botões do seu alerta.
 */
[data-kind="always"] .permission-arrow {
    top: calc(50% + 76px);
}

[data-kind="notifications"] .permission-arrow {
    top: calc(50% + 82px);
}

[data-kind="notifications"] .permission-arrow-left {
    display: none;
}

.margot-location-pill {
    position: fixed;
    z-index: 1600;
    top: calc(env(safe-area-inset-top) + 10px);
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    max-width: 420px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 14px 16px 8px;
    border: 1px solid rgb(30 20 35 / 8%);
    border-radius: 18px;
    background: #fff;
    color: #241d26;
    box-shadow: 0 4px 18px rgb(35 20 30 / 10%);
    max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
    overflow-y: auto;
    overflow-wrap: anywhere;
    font: 13px/1.4 system-ui, sans-serif;
    text-align: left;
}

.margot-location-pill[hidden],
.margot-location-pill [hidden] {
    display: none;
}

.margot-location-pill [data-title] {
    display: block;
    padding-right: 32px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 750;
}

.margot-location-pill [data-description] {
    display: block;
    margin-top: 5px;
    color: #615764;
}

.margot-location-pill-actions {
    margin-top: 4px;
}

.margot-location-pill button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.margot-location-pill [data-settings] {
    display: block;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 0;
    background: transparent;
    color: #bb1645;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 750;
    text-align: left;
    text-decoration: none;
    white-space: normal;
}

.margot-location-pill [data-settings]::after {
    content: " ›";
}

.margot-location-pill [data-close] {
    position: absolute;
    right: 2px;
    top: 2px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #756976;
    font-size: 22px;
    line-height: 1;
}

.margot-location-pill button:focus-visible,
.margot-location-settings-guide button:focus-visible {
    outline: 2px solid #bb1645;
    outline-offset: 2px;
}

.margot-location-settings-guide {
    position: fixed;
    inset: auto 12px max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: 440px;
    max-height: calc(100dvh - env(safe-area-inset-top) - 32px);
    box-sizing: border-box;
    margin: 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 26px 22px 12px;
    border: 1px solid rgb(30 20 35 / 8%);
    border-radius: 28px;
    background: #fff;
    color: #241d26;
    box-shadow: 0 12px 48px #0003;
    font: 15px/1.45 system-ui, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;
}

.margot-location-settings-guide::backdrop {
    background: rgb(20 12 20 / 38%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.margot-location-settings-guide h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -.5px;
}

.margot-location-settings-guide > p {
    margin: 8px 0 20px;
    color: #615764;
}

.margot-location-settings-steps {
    counter-reset: location-step;
    list-style: none;
    padding: 0;
    margin: 0;
}

.margot-location-settings-steps li {
    counter-increment: location-step;
    margin: 0 0 20px;
}

.margot-location-settings-steps li > p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-weight: 650;
}

.margot-location-settings-steps li > p::before {
    content: counter(location-step);
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: #f9e9ef;
    color: #a9133c;
    font-size: 13px;
    font-weight: 750;
}

.margot-location-settings-example {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid #e8e5eb;
    border-radius: 14px;
    background: #f7f6f9;
    font-size: 17px;
}

.margot-location-settings-example strong {
    font-weight: 500;
}

.margot-location-settings-pin {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    height: 28px;
    background: #007aff;
    color: white;
    border-radius: 7px;
    font-size: 24px;
    line-height: 1;
}

.margot-location-settings-chevron,
.margot-location-settings-check {
    margin-left: auto;
    font-size: 24px;
}

.margot-location-settings-chevron {
    color: #837b88;
}

.margot-location-settings-check {
    color: #006bd6;
}

.margot-location-settings-guide > .margot-location-settings-footnote {
    margin: 0 0 16px;
    font-size: 13px;
}

.margot-location-settings-guide button {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    font: 650 15px/1.3 system-ui, sans-serif;
    white-space: normal;
    cursor: pointer;
    touch-action: manipulation;
}

.margot-location-settings-guide [data-open-settings] {
    background: #bb1645;
    color: #fff;
}

.margot-location-settings-guide [data-guide-cancel] {
    margin-top: 4px;
    background: transparent;
    color: #615764;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .margot-location-pill,
    .margot-location-settings-guide {
        background: #252128;
        color: #fff8fc;
        border-color: rgb(255 255 255 / 12%);
    }

    .margot-location-pill [data-description],
    .margot-location-pill [data-close],
    .margot-location-settings-guide > p,
    .margot-location-settings-guide [data-guide-cancel] {
        color: #d0c3ce;
    }

    .margot-location-pill [data-settings] {
        color: #ff99b5;
    }

    .margot-location-settings-example {
        background: #322d37;
        border-color: #514856;
    }

    .margot-location-settings-check {
        color: #70baff;
    }
}

@keyframes permission-point {
    50% {
        transform: translateX(3px) rotate(-2deg);
    }
}

@keyframes permission-arrive {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (orientation: landscape),
       (min-width: 600px),
       (max-height: 680px) {
    .permission-arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .margot-permission-card,
    .margot-permission-guide,
    .margot-permission-scene::backdrop {
        transition: none;
        transform: none;
        filter: none;
    }

    .permission-art,
    .permission-arrow svg,
    .margot-location-pill {
        animation: none !important;
    }
}