:root {
    --ink: #143026;
    --paper: #e7eee9;
    --brand: #143026;
    --brand-text: #f3f7f4;
    --casa: #b7cfc0;
    --falha: #6b2a1a;
    --falha-fundo: #f8ebe6;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
}

body {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.55), transparent 28%),
        var(--paper);
    color: var(--ink);
    font-family: "Outfit", sans-serif;
}

.marca {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0;
    padding: 0.85rem 1.25rem 0.75rem;
    background: var(--brand);
    color: var(--brand-text);
    animation: sobe 0.55s ease both;
}

.nome {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
}

.casa {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 560;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--casa);
}

h1 {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 560;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.estado {
    margin: 0;
    color: #ffd7cc;
}

.estado[hidden] {
    display: none;
}

.tempo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--brand-text);
}

.graos {
    display: flex;
    gap: 0.25rem;
}

.graos button,
#play {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.graos button.ativo,
#play {
    text-decoration: underline;
    text-underline-offset: 0.28rem;
}

.trilho {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 18rem;
}

.faixa {
    position: relative;
    width: 14rem;
    height: 1.5rem;
}

.faixa::before,
#faixa-cheia {
    position: absolute;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
}

.faixa::before {
    content: "";
    left: 0;
    right: 0;
    background: rgba(243, 247, 244, 0.35);
}

#faixa-cheia {
    background: #f3f7f4;
}

.faixa input {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
}

.faixa input::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
}

.faixa input::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    border: 2px solid #143026;
    border-radius: 50%;
    background: #f3f7f4;
    pointer-events: auto;
    cursor: grab;
}

.faixa input::-moz-range-track {
    height: 3px;
    background: transparent;
    border: 0;
}

.faixa input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #143026;
    border-radius: 50%;
    background: #f3f7f4;
    pointer-events: auto;
    cursor: grab;
}

.palco {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
}

#mapa {
    min-height: 0;
    height: 100%;
    animation: aparece 0.7s ease 0.12s both;
}

.leitura {
    overflow: auto;
    padding: 0.9rem 1rem 1.4rem;
    background: rgba(231, 238, 233, 0.92);
}

.legenda,
#conjunto,
.leitura p {
    margin: 0 0 0.7rem;
    line-height: 1.35;
}

.linha {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.6rem;
    width: 100%;
    padding: 0.38rem 0;
    border: 0;
    border-top: 1px solid rgba(20, 48, 38, 0.16);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.linha.ativa {
    background: rgba(20, 48, 38, 0.08);
}

.linha em {
    font-style: normal;
    color: #5d6f64;
}

#detalhe h2 {
    margin: 0.8rem 0 0.35rem;
    font-family: "Fraunces", serif;
    font-size: 1.35rem;
}

.esforco {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.8rem;
}

.esforco input {
    width: 5rem;
    border: 0;
    border-bottom: 1px solid rgba(20, 48, 38, 0.4);
    background: transparent;
    font: inherit;
    color: inherit;
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
    opacity: 0.85;
}

@keyframes sobe {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes aparece {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 860px) {
    .marca,
    .nome,
    .tempo {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .palco {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(55dvh, 1fr) auto;
    }

    .leitura {
        max-height: 42dvh;
    }
}
