body:has(.em-page) main {
    background: #fff !important;
}

.em-page {
    background: #fff;
    color: #1a1a1a;
    padding: 8px 8px 72px;
    max-width: 520px;
    margin: 0 auto;
}

.em-mapa-wrap {
    position: relative;
    margin-bottom: 14px;
}

.em-mapa {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #e6e6e6;
}

.em-mapa th,
.em-mapa td {
    border: 1px solid #d5d5d5;
    text-align: center;
    font-weight: 700;
    line-height: 1.35;
    padding: 1px 0;
}

.em-mapa th {
    width: 46px;
    background: #5c6bc0;
    color: #fff;
    font-size: 10px;
}

.em-mapa td {
    height: 18px;
    background: #e4e4e4;
    color: transparent;
    font-size: 8px;
}

.em-mapa td.hit {
    background: #930989;
    color: #fff;
}

.em-mapa td:nth-child(6),
.em-mapa td:nth-child(11),
.em-mapa td:nth-child(16),
.em-mapa td:nth-child(21) {
    border-right: 2px solid #1a1a1a;
}

.em-mapa tr.em-extra {
    display: none;
}

.em-mapa.expandido tr.em-extra {
    display: table-row;
}

.em-mapa tr.em-extra th {
    font-size: 7px;
    line-height: 1.1;
    padding: 2px 1px;
    color: #fff;
}

.em-mapa tr.em-extra td {
    color: #1a1a1a;
    background: #fff;
    font-size: 8px;
    height: 22px;
}

.em-rotulo-atraso { background: #111 !important; }
.em-rotulo-freq { background: #555 !important; }
.em-rotulo-maior { background: #333 !important; }

.em-neutro { background: #fff !important; color: #1a1a1a !important; }
.em-atraso-fria { background: #6699ff !important; color: #fff !important; }
.em-atraso-boa { background: #ffcc00 !important; color: #1a1a1a !important; }
.em-atraso-fixa { background: #ff0000 !important; color: #fff !important; }
.em-freq-ruim { background: #cccccc !important; color: #1a1a1a !important; }
.em-freq-media { background: #99ffff !important; color: #1a1a1a !important; }
.em-freq-otima { background: #ff6600 !important; color: #fff !important; }

.em-mais,
html[data-theme="dark"] .em-mais {
    margin-top: 10px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #d5d5d5;
    border-radius: 12px;
    padding: 10px;
}

.em-mais p,
html[data-theme="dark"] .em-mais p,
html[data-theme="dark"] .em-mais span,
html[data-theme="dark"] .em-mais b {
    color: #1a1a1a;
    margin: 0 0 6px;
    font-size: 13px;
}

.em-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.em-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #930989;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.em-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.em-legenda span {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
}

.em-expandir {
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: #7b1fa2;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.em-painel {
    border: 2px solid #7b1fa2;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.em-painel-head {
    width: 100%;
    border: 0;
    background: #7b1fa2;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-align: left;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-painel-corpo {
    padding: 10px;
}

.em-painel-corpo.fechado {
    display: none;
}

.em-painel-linha {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.em-stats {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.em-stat {
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    text-align: center;
    font-size: 10px;
    line-height: 1.25;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.em-stat span {
    white-space: normal;
}

.em-nowrap {
    white-space: nowrap;
}

.em-stat b {
    color: #178a3c;
}

.em-stat b.fora {
    color: #c62828;
}

.em-volante {
    flex: 0 0 132px;
}

.em-volante .numbers {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    width: 132px !important;
    gap: 3px;
    margin: 0;
    padding: 6px;
    background: #fffdf2;
    border: 2px solid #930989;
    border-radius: 12px;
    box-sizing: border-box;
}

.em-volante .numbers > div {
    width: auto !important;
    margin: 0;
    display: flex;
    justify-content: center;
}

.em-page .numbers span:not(.dozen-circle),
html[data-theme="dark"] .em-page .numbers span:not(.dozen-circle) {
    width: 22px !important;
    height: 22px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    font-size: 10px !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #930989 !important;
    border: 2px solid #930989 !important;
}

.em-page .numbers span.selected,
html[data-theme="dark"] .em-page .numbers span.selected {
    background: #930989 !important;
    color: #fff !important;
}

.em-dezenas {
    margin: 10px 0 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.em-dezenas b {
    color: #c62828;
    margin-left: 4px;
}

.em-dezenas b.ok {
    color: #178a3c;
}

.em-acoes {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.em-btn {
    border-radius: 10px;
    min-height: 42px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.em-btn-salvar {
    background: #0f6b32;
    color: #fff;
    border: 0;
}

.em-btn-copiar {
    background: #fff;
    color: #3a3a3a;
    border: 1px solid #c8c8c8;
}

.em-btn-limpar {
    background: #d32f2f;
    color: #fff;
    border: 0;
}

.em-vazio {
    padding: 12px;
    text-align: center;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #d5d5d5;
}
