/* ——— Home no mesmo modelo do pós-jogo ———
   Ordem pensada para o polegar: quem é o jogador, o que ele tem, o botão de
   jogar e só depois o resto. Os blocos são reordenados por CSS (order) para
   não mexer nos ids que o JS preenche. */

/* A imagem do logo tem bastante margem transparente; aperta o bloco */
body.wb-mobile-ui #start-screen .home-main-logo-center {
    padding: 0;
    margin: -8px 0 -14px;
}

body.wb-mobile-ui #start-screen .home-main-logo {
    width: auto;
    height: 112px;
}

body.wb-mobile-ui #start-screen > .text-center.mb-4 {
    margin-bottom: 0 !important;
}

body.wb-mobile-ui #start-screen .start-home-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

/* Os contêineres de login/perfil viram "transparentes" para o layout */
body.wb-mobile-ui #start-screen #home-auth-section,
body.wb-mobile-ui #start-screen #home-auth-user:not(.hidden) {
    display: contents;
}

/* Jogador: quem é, em que nível está e quanto falta para o próximo */
body.wb-mobile-ui #start-screen .hp-card {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 8px;
    margin: 0;
    padding: 12px;
    border-radius: 20px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(64, 140, 255, 0.22), transparent 60%),
        rgba(18, 36, 72, 0.72);
    background: radial-gradient(120% 120% at 0% 0%, rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r - 67), 255) clamp(0, calc(g - 44), 255) b / 0.22), transparent 60%), rgb(from var(--wb-surface, rgb(18 36 72)) r g b / 0.72); /* wb-theme */
    border: 1px solid rgba(131, 184, 255, 0.2);
    border: 1px solid rgb(from var(--wb-accent, rgb(131 184 255)) r g b / 0.2); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0;
    text-align: left;
    color: inherit;
    background: none;
    border: 0;
}

body.wb-mobile-ui #start-screen .hp-avatar {
    position: relative;
    flex: none;
    width: 52px;
    height: 52px;
}

body.wb-mobile-ui #start-screen .hp-avatar .home-auth-avatar,
body.wb-mobile-ui #start-screen .hp-avatar-initial {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 2px solid rgba(131, 184, 255, 0.45);
    border: 2px solid rgb(from var(--wb-accent, rgb(131 184 255)) r g b / 0.45); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-avatar .home-auth-avatar {
    display: block;
    object-fit: cover;
}

body.wb-mobile-ui #start-screen .hp-avatar-initial {
    display: none;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
    background: linear-gradient(160deg, #3d8bff, #1a4fb0);
    background: linear-gradient(160deg, rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r - 70), 255) clamp(0, calc(g - 45), 255) b), rgb(from var(--wb-surface, rgb(18 36 72)) clamp(0, calc(r + 8), 255) clamp(0, calc(g + 43), 255) clamp(0, calc(b + 104), 255))); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-avatar--empty .home-auth-avatar {
    display: none;
}

body.wb-mobile-ui #start-screen .hp-avatar--empty .hp-avatar-initial {
    display: grid;
}

body.wb-mobile-ui #start-screen .hp-level-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    color: #1d1400;
    background: linear-gradient(180deg, #ffd166, #ff9f43);
    border: 2px solid #0e1d3c;
}

body.wb-mobile-ui #start-screen .hp-id-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.2;
}

body.wb-mobile-ui #start-screen #home-auth-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.wb-mobile-ui #start-screen .hp-level-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #8fd3ff;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 12), 255) clamp(0, calc(g + 27), 255) b); /* wb-theme */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.wb-mobile-ui #start-screen .hp-edit-icon {
    flex: none;
    font-size: 0.72rem;
    color: #7fa3d6;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r - 4), 255) clamp(0, calc(g - 21), 255) clamp(0, calc(b - 41), 255)); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-logout {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    font-size: 1.05rem;
    color: #9fbce6;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 28), 255) clamp(0, calc(g + 4), 255) clamp(0, calc(b - 25), 255)); /* wb-theme */
    background: none;
    border: 1px solid rgba(131, 184, 255, 0.18);
    border: 1px solid rgb(from var(--wb-accent, rgb(131 184 255)) r g b / 0.18); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-logout:active {
    background: rgba(31, 79, 142, 0.5);
    background: rgb(from var(--wb-surface, rgb(18 36 72)) clamp(0, calc(r + 13), 255) clamp(0, calc(g + 43), 255) clamp(0, calc(b + 70), 255) / 0.5); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-xp {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
}

body.wb-mobile-ui #start-screen .hp-xp-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    background: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b / 0.12); /* wb-theme */
    overflow: hidden;
}

body.wb-mobile-ui #start-screen .hp-xp-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5db8ff, #8fd3ff);
    background: linear-gradient(90deg, rgb(from var(--wb-accent-bg, var(--wb-accent, rgb(131 184 255))) clamp(0, calc(r - 38), 255) g b), rgb(from var(--wb-accent-bg, var(--wb-accent, rgb(131 184 255))) clamp(0, calc(r + 12), 255) clamp(0, calc(g + 27), 255) b)); /* wb-theme */
    transition: width 0.4s ease;
}

body.wb-mobile-ui #start-screen .hp-xp-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9fbce6;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 28), 255) clamp(0, calc(g + 4), 255) clamp(0, calc(b - 25), 255)); /* wb-theme */
}

/* Energia e missões: o que o jogador pode gastar e o que tem a fazer */
body.wb-mobile-ui #start-screen .home-auth-stats {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

body.wb-mobile-ui #start-screen .hp-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    padding: 8px 12px;
    border-radius: 16px;
    text-align: left;
    color: inherit;
    background: rgba(18, 36, 72, 0.72);
    background: rgb(from var(--wb-surface, rgb(18 36 72)) r g b / 0.72); /* wb-theme */
    border: 1px solid rgba(131, 184, 255, 0.16);
    border: 1px solid rgb(from var(--wb-accent, rgb(131 184 255)) r g b / 0.16); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-tile > i {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1.1rem;
    color: #8fd3ff;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 12), 255) clamp(0, calc(g + 27), 255) b); /* wb-theme */
    background: rgba(93, 184, 255, 0.14);
    background: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r - 38), 255) g b / 0.14); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-tile-energy > i {
    color: #ffd166;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r g b); /* wb-theme */
    background: rgba(255, 209, 102, 0.16);
}

body.wb-mobile-ui #start-screen .hp-tile-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

body.wb-mobile-ui #start-screen .hp-tile-text strong {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
    font-variant-numeric: tabular-nums;
}

body.wb-mobile-ui #start-screen .hp-tile-text small {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9fbce6;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 28), 255) clamp(0, calc(g + 4), 255) clamp(0, calc(b - 25), 255)); /* wb-theme */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.wb-mobile-ui #start-screen .hp-tile--low {
    border-color: rgba(255, 159, 67, 0.6);
}

body.wb-mobile-ui #start-screen .hp-tile--low .hp-tile-text strong {
    color: #ffd166;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r g b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .hp-tile:active {
    background: rgba(31, 79, 142, 0.6);
    background: rgb(from var(--wb-surface, rgb(18 36 72)) clamp(0, calc(r + 13), 255) clamp(0, calc(g + 43), 255) clamp(0, calc(b + 70), 255) / 0.6); /* wb-theme */
}

/* Linha de aviso abaixo do botão: some quando não tem texto (jogador logado) */
body.wb-mobile-ui #start-screen #home-auth-hint:empty {
    display: none;
}

/* Botão principal */
body.wb-mobile-ui #start-screen .btn-play-main {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    margin: 2px 0 0;
    padding: 0 16px;
    border: 0;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    color: #04210f;
    background: linear-gradient(180deg, #5df2a0 0%, #1fc978 100%);
    box-shadow:
        0 5px 0 #0f8a4f,
        0 18px 30px -14px rgba(31, 201, 120, 0.85);
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease;
    animation: wb-home-cta 2.2s ease-in-out 1.5s infinite;
}

body.wb-mobile-ui #start-screen .btn-play-main::before {
    content: none;
}

body.wb-mobile-ui #start-screen .btn-play-main i {
    font-size: 1.55rem;
}

body.wb-mobile-ui #start-screen .btn-play-main:active {
    transform: translateY(4px);
    box-shadow:
        0 1px 0 #0f8a4f,
        0 8px 16px -12px rgba(31, 201, 120, 0.85);
    animation: none;
}

/* Bônus do dia a uma partida de distância: o botão chama mais atenção */
body.wb-mobile-ui #start-screen .btn-play-main.btn-play-main--highlight {
    background: linear-gradient(180deg, #ffe27a 0%, #ffb347 100%);
    color: #2b1a00;
    box-shadow:
        0 5px 0 #b9741a,
        0 18px 30px -14px rgba(255, 180, 70, 0.9);
    animation-duration: 1.2s;
}

/* Convite "Chame um amigo": logo abaixo do Jogar agora (mesma ordem, vem
   depois no HTML). Dourado para não competir com o verde do botão principal. */
body.wb-mobile-ui #start-screen .home-invite-btn {
    order: 3;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 8px 12px 8px 10px;
    overflow: hidden;
    border-radius: 18px;
    text-align: left;
    cursor: pointer;
    color: #fff4d6;
    background: linear-gradient(135deg, rgba(255, 196, 80, 0.2), rgba(255, 120, 60, 0.12));
    border: 1px solid rgba(255, 196, 80, 0.55);
    box-shadow: 0 10px 24px -16px rgba(255, 170, 60, 0.9);
    transition: transform 0.08s ease;
}

/* Brilho que passa de vez em quando: chama o olho sem piscar. */
body.wb-mobile-ui #start-screen .home-invite-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: wb-invite-shine 4.5s ease-in-out 2s infinite;
    pointer-events: none;
}

body.wb-mobile-ui #start-screen .home-invite-btn:active {
    transform: translateY(2px);
}

body.wb-mobile-ui #start-screen .home-invite-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 1.2rem;
    color: #2b1a00;
    background: linear-gradient(180deg, #ffe27a 0%, #ffb347 100%);
    box-shadow: 0 3px 0 #b9741a;
}

body.wb-mobile-ui #start-screen .home-invite-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

body.wb-mobile-ui #start-screen .home-invite-text strong {
    font-size: 1rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-invite-text small {
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffd98a;
}

body.wb-mobile-ui #start-screen .home-invite-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 900;
    color: #2b1a00;
    background: linear-gradient(180deg, #ffe27a 0%, #ffb347 100%);
    box-shadow: 0 6px 16px -8px rgba(255, 180, 70, 0.95);
}

/* Tema claro: o fundo dourado translúcido some no creme; texto escuro. */
body.wb-mobile-ui[data-wb-theme='light'] #start-screen .home-invite-btn,
[data-wb-theme='light'] body.wb-mobile-ui #start-screen .home-invite-btn {
    background: linear-gradient(135deg, #fff1cc, #ffe2bf);
    border-color: rgba(214, 140, 30, 0.55);
}

body.wb-mobile-ui[data-wb-theme='light'] #start-screen .home-invite-text small,
[data-wb-theme='light'] body.wb-mobile-ui #start-screen .home-invite-text small {
    color: #8a5300;
}

@keyframes wb-invite-shine {
    0%,
    70% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.wb-mobile-ui #start-screen .home-invite-btn::after {
        animation: none;
    }
}

/* Recarga de energia / convite ao login, logo abaixo do botão */
body.wb-mobile-ui #start-screen #home-auth-hint {
    order: 4;
    margin: 0;
    padding: 0;
    font-size: 0.78rem;
    text-align: center;
    color: #b9d6ff;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 54), 255) clamp(0, calc(g + 30), 255) b); /* wb-theme */
    background: none;
    border: 0;
}

/* Login (visitante) */
body.wb-mobile-ui #start-screen #google-signin-btn {
    order: 5;
    align-self: center;
}

body.wb-mobile-ui #start-screen #email-auth-btn {
    order: 5;
    min-height: 44px;
    margin: 0;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #cfe2ff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r - 28), 255) clamp(0, calc(g - 18), 255) b); /* wb-theme */
    background: rgba(18, 36, 72, 0.6);
    background: rgb(from var(--wb-surface, rgb(18 36 72)) r g b / 0.6); /* wb-theme */
    border: 1px solid rgba(131, 184, 255, 0.22);
    border: 1px solid rgb(from var(--wb-accent, rgb(131 184 255)) r g b / 0.22); /* wb-theme */
}

/* Já logado: o botão de entrar por e-mail não faz sentido */
body.wb-mobile-ui
    #start-screen
    #home-auth-section:has(#home-auth-user:not(.hidden))
    #email-auth-btn {
    display: none;
}

/* Ritmo do dia como "gancho" laranja */
body.wb-mobile-ui #start-screen #home-daily-progress {
    order: 6;
    margin: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 196, 80, 0.16), rgba(255, 140, 60, 0.1));
    border: 1px solid rgba(255, 196, 80, 0.38);
}

body.wb-mobile-ui #start-screen .home-daily-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 6px;
}

body.wb-mobile-ui #start-screen .home-daily-progress-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffd166;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r g b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-daily-progress-count {
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-daily-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    background: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b / 0.12); /* wb-theme */
    overflow: hidden;
}

body.wb-mobile-ui #start-screen .home-daily-progress-fill {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffd166, #ff9f43);
}

body.wb-mobile-ui #start-screen .home-daily-progress-note {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #eaf4ff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r - 1), 255) g b); /* wb-theme */
}

/* Modos de jogo */
body.wb-mobile-ui #start-screen .home-modes-head {
    order: 7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

body.wb-mobile-ui #start-screen #game-modes-carousel {
    order: 8;
    /* espaço para os pontinhos do carrossel, que ficam abaixo dele */
    margin: 0 0 20px;
}

@keyframes wb-home-cta {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.025);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.wb-mobile-ui #start-screen .btn-play-main {
        animation: none;
    }
}

/* ——— Modos de jogo em grade ———
   Antes era um carrossel que mostrava um modo por vez; quem não arrastava
   nunca descobria os outros. Agora todos aparecem, com o que cada um é,
   quanto custa e o recorde do jogador. */
body.wb-mobile-ui #start-screen #game-modes-grid {
    order: 8;
}

.hm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hm-card {
    --hm-accent: #8fd3ff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
    min-height: 132px;
    padding: 12px;
    border-radius: 18px;
    text-align: left;
    color: #eaf4ff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r - 1), 255) g b); /* wb-theme */
    background:
        radial-gradient(
            120% 90% at 100% 0%,
            color-mix(in srgb, var(--hm-accent) 26%, transparent),
            transparent 62%
        ),
        rgba(18, 36, 72, 0.78);
    background: radial-gradient( 120% 90% at 100% 0%, color-mix(in srgb, var(--hm-accent) 26%, transparent), transparent 62% ), rgb(from var(--wb-surface, rgb(18 36 72)) r g b / 0.78); /* wb-theme */
    border: 1px solid color-mix(in srgb, var(--hm-accent) 42%, transparent);
    box-shadow: 0 4px 0 rgba(4, 10, 26, 0.55);
    box-shadow: 0 4px 0 rgb(from var(--wb-surface, rgb(18 36 72)) clamp(0, calc(r - 14), 255) clamp(0, calc(g - 26), 255) clamp(0, calc(b - 46), 255) / 0.55); /* wb-theme */
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease;
}
@supports (color: rgb(from red r g b)) { .hm-card { --hm-accent: rgb(from var(--wb-accent-bg, var(--wb-accent, rgb(131 184 255))) clamp(0, calc(r + 12), 255) clamp(0, calc(g + 27), 255) b); } } /* wb-theme */

.hm-card:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(4, 10, 26, 0.55);
    box-shadow: 0 1px 0 rgb(from var(--wb-surface, rgb(18 36 72)) clamp(0, calc(r - 14), 255) clamp(0, calc(g - 26), 255) clamp(0, calc(b - 46), 255) / 0.55); /* wb-theme */
}

.hm-card:focus-visible {
    outline: 2px solid var(--hm-accent);
    outline-offset: 2px;
}

.hm-arcade {
    --hm-accent: #ff7a7a;
}
.hm-zen {
    --hm-accent: #5df2a0;
}
.hm-thematic {
    --hm-accent: #ffd166;
}
.hm-ladder {
    --hm-accent: #b79bff;
}
@supports (color: rgb(from red r g b)) { .hm-ladder { --hm-accent: rgb(from var(--wb-accent-bg, var(--wb-accent, rgb(131 184 255))) clamp(0, calc(r + 52), 255) clamp(0, calc(g - 29), 255) b); } } /* wb-theme */
.hm-daily {
    --hm-accent: #ffb347;
}
.hm-duels {
    --hm-accent: #6bc7ff;
}
@supports (color: rgb(from red r g b)) { .hm-duels { --hm-accent: rgb(from var(--wb-accent-bg, var(--wb-accent, rgb(131 184 255))) clamp(0, calc(r - 24), 255) clamp(0, calc(g + 15), 255) b); } } /* wb-theme */

.hm-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    margin-bottom: 3px;
    border-radius: 11px;
    font-size: 1.1rem;
    color: #0b1734;
    background: var(--hm-accent);
}

.hm-tag {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hm-accent);
}

.hm-name {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
}

.hm-desc {
    font-size: 0.74rem;
    line-height: 1.28;
    color: #c7dbf7;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r - 36), 255) clamp(0, calc(g - 25), 255) clamp(0, calc(b - 8), 255)); /* wb-theme */
}

.hm-meta {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hm-accent);
}

.hm-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    width: 100%;
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.7rem;
    font-weight: 800;
}

.hm-cost {
    padding: 2px 8px;
    border-radius: 999px;
    color: #2b1a00;
    background: linear-gradient(135deg, #ffe27a, #ffb347);
}

.hm-cost.is-free {
    color: #04210f;
    background: #5df2a0;
}

.hm-cost:empty,
.hm-best:empty {
    display: none;
}

.hm-best {
    color: #b9d6ff;
    color: rgb(from var(--wb-accent, rgb(131 184 255)) clamp(0, calc(r + 54), 255) clamp(0, calc(g + 30), 255) b); /* wb-theme */
}

/* Cartões largos: ícone à esquerda, texto no meio, seta à direita */
.hm-wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-height: 0;
}

.hm-wide .hm-icon {
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 14px;
    font-size: 1.4rem;
}

.hm-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hm-go {
    flex: none;
    font-size: 1.1rem;
    color: var(--hm-accent);
}

/* Botão principal em duas linhas: ação + qual modo será aberto */
body.wb-mobile-ui #start-screen .btn-play-main .hq-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

body.wb-mobile-ui #start-screen .btn-play-main .hq-mode {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.75;
}

/* Sequência de dias: o motivo para voltar amanhã */
body.wb-mobile-ui #start-screen .home-streak {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 196, 80, 0.28);
}

body.wb-mobile-ui #start-screen .home-streak.hidden {
    display: none;
}

body.wb-mobile-ui #start-screen .home-streak-flame {
    flex: none;
    font-size: 1.35rem;
    line-height: 1;
}

body.wb-mobile-ui #start-screen .home-streak-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

body.wb-mobile-ui #start-screen .home-streak-text strong {
    font-size: 0.86rem;
    font-weight: 900;
    color: #ffffff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r + 20), 255) clamp(0, calc(g + 11), 255) b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-streak-text small {
    font-size: 0.76rem;
    line-height: 1.3;
    color: #eaf4ff;
    color: rgb(from var(--wb-ink, rgb(235 244 255)) clamp(0, calc(r - 1), 255) g b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-streak--risk .home-streak-text strong {
    color: #ffd166;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r g b); /* wb-theme */
}

/* Atalho de anúncio: energia na hora, logo abaixo da recarga */
body.wb-mobile-ui #start-screen .home-ad-energy {
    order: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffe9b0;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r clamp(0, calc(g + 24), 255) clamp(0, calc(b + 74), 255)); /* wb-theme */
    background: rgba(255, 196, 80, 0.12);
    border: 1px solid rgba(255, 196, 80, 0.45);
}

body.wb-mobile-ui #start-screen .home-ad-energy.hidden {
    display: none;
}

body.wb-mobile-ui #start-screen .home-ad-energy i {
    font-size: 1.1rem;
    color: #ffd166;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r g b); /* wb-theme */
}

body.wb-mobile-ui #start-screen .home-ad-energy small {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #1d1400;
    background: #ffd166;
}

body.wb-mobile-ui #start-screen .home-ad-energy:disabled {
    opacity: 0.6;
}

body.wb-mobile-ui #start-screen .home-ad-energy--urgent {
    min-height: 54px;
    font-size: 1rem;
    color: #1d1400;
    background: linear-gradient(180deg, #ffd166 0%, #ff9f43 100%);
    border-color: transparent;
    box-shadow: 0 4px 0 #b8691f;
}

body.wb-mobile-ui #start-screen .home-ad-energy--urgent i {
    color: #1d1400;
}

body.wb-mobile-ui #start-screen .home-ad-energy--urgent small {
    color: #ffe9b0;
    color: rgb(from var(--wb-warm, rgb(255 209 102)) r clamp(0, calc(g + 24), 255) clamp(0, calc(b + 74), 255)); /* wb-theme */
    background: rgba(29, 20, 0, 0.75);
}

/* Links para as paginas do site (temas, como jogar, sobre, contato, privacidade, termos):
   <a> reais para o robo do Google. Celular: grade 3x2 com icone em cima e nome
   embaixo (no toque nao ha title, entao o nome precisa estar visivel).
   Tablet: icone + nome em grade 3x2. PC: icone + nome em uma linha so. */
.home-site-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 18px auto 0;
    padding: 0 16px;
    max-width: 420px;
}

.home-site-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    padding: 8px 6px;
    border-radius: 14px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Fundo e borda seguem a cor do texto: funciona nos temas claro e escuro. */
    background: color-mix(in srgb, currentColor 9%, transparent);
    border-color: color-mix(in srgb, currentColor 18%, transparent);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-site-links a i {
    font-size: 1.1rem;
    line-height: 1;
}

.home-site-links__label {
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
}

.home-site-links a:hover,
.home-site-links a:focus-visible {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    background: color-mix(in srgb, currentColor 15%, transparent);
    border-color: color-mix(in srgb, currentColor 30%, transparent);
    transform: translateY(-1px);
}

.home-site-links a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Tablet: icone + nome, grade de 3 colunas (2 linhas). */
@media (min-width: 768px) {
    .home-site-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        max-width: 640px;
        padding: 0 24px;
    }

    .home-site-links a {
        flex-direction: row;
        gap: 8px;
        width: auto;
        height: 44px;
        min-height: 0;
        justify-content: flex-start;
        padding: 0 14px;
        border-radius: 999px;
    }

    .home-site-links a i {
        font-size: 1rem;
    }

    .home-site-links__label {
        font-size: inherit;
        line-height: inherit;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* PC: tudo em uma linha, largura pelo conteudo. */
@media (min-width: 1200px) {
    .home-site-links {
        display: flex;
        flex-wrap: wrap;
        max-width: 1040px;
        gap: 10px;
    }

    .home-site-links a {
        padding: 0 16px;
    }
}


/* "Entrar" no aviso de login: pulsa os botoes de login para mostrar onde tocar. */
#home-auth-section.is-attention {
    border-radius: 18px;
    animation: home-auth-attention 0.8s ease-in-out 3;
}

@keyframes home-auth-attention {
    0%,
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
    50% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--wb-accent, rgb(131 184 255)) 70%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    #home-auth-section.is-attention {
        animation: none;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--wb-accent, rgb(131 184 255)) 70%, transparent);
    }
}
