:root {
    --bg: #0b0f16;
    --panel: #131a24;
    --line: #253041;
    --txt: #eef3ff;
    --muted: #a8b3c8;
    --accent: #7d5fff;
    --me: #4a7dff;
    --enemy: #e05a5a;
    --gold: #d4b483;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #0b0f16, #111827);
    color: var(--txt);
}

body.game-page {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

.wrap { max-width: 1400px; margin: 0 auto; padding: 16px; }

.wrap--game {
    max-width: 100%;
    min-height: 100dvh;
    padding: 6px 10px 16px;
    display: flex;
    flex-direction: column;
}

.wrap--game > .top {
    flex-shrink: 0;
    margin-bottom: 6px;
}

.wrap--game > .top .title { font-size: 18px; }

.wrap--game > .flash {
    flex-shrink: 0;
    margin-bottom: 6px;
    padding: 6px 10px;
    font-size: 12px;
}

.game-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.game-banner {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, #2a2218, #1a1510);
    box-shadow: 0 4px 20px rgba(212, 180, 131, .25);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.game-banner--hidden { display: none; }

.game-banner--defense {
    border-color: #6eb0ff;
    background: linear-gradient(135deg, #1a2a4a, #0f1a30);
    box-shadow: 0 0 20px rgba(74, 125, 255, .35);
}

.game-banner--turn {
    border-color: var(--gold);
    color: #ffe6b8;
}

.game-banner--wait {
    border-color: #5a8f5a;
    background: linear-gradient(135deg, #1a3020, #0f1a14);
}

.game-banner__timer {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    font-weight: 800;
    font-size: 16px;
    color: #ffb4b4;
}

.game-banner__timer.is-urgent {
    animation: banner-timer-pulse .8s ease-in-out infinite;
}

@keyframes banner-timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.territory-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.territory-card {
    border: 2px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #0d1219;
}
.territory-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    filter: saturate(.85);
}
.territory-card--locked img {
    opacity: .45;
    filter: grayscale(.7);
}
.territory-card--active {
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(212, 180, 131, .3);
}
.territory-card__body {
    padding: 10px 12px 12px;
}
.territory-card__hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}
.territory-card__badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}
.territory-card__badge--ok { background: #1f5a2c; color: #dcffe6; }
.territory-card__badge--active { background: #5a4020; color: #ffe6b8; margin-left: 4px; }
.territory-card__badge--lock { background: #3a2020; color: #ffb4b4; }

.story-hub-page .story-hub-panel {
    background: transparent;
    border: none;
    padding: 0;
}
.story-hub-lead {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.55;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.story-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    justify-items: center;
    align-items: start;
}
.story-chapter-card {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.story-chapter-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.story-chapter-card__link:not(.story-chapter-card__link--disabled):hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.story-chapter-card__link--disabled {
    cursor: not-allowed;
}
.story-chapter-card__visual {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.story-chapter-card__img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}
.story-chapter-card--locked .story-chapter-card__img {
    filter: grayscale(.85) brightness(.45);
}
.story-chapter-card--done .story-chapter-card__img {
    filter: saturate(.92);
}
.story-chapter-card__status {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 6px 22px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
    pointer-events: none;
}
.story-chapter-card__status--available {
    background: linear-gradient(180deg, #1f6b4a, #0f3d2c);
    border: 1px solid #3d9a6a;
    color: #dcffe6;
}
.story-chapter-card__status--done {
    background: linear-gradient(180deg, #1a5c38, #0d3322);
    border: 1px solid #2d8a55;
    color: #b8ffd4;
}
.story-chapter-card__status--locked {
    background: linear-gradient(180deg, #2a2a32, #12141a);
    border: 1px solid #4a4a58;
    color: #9a9ab0;
}
.story-chapter-card__lock-veil {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 12, .35);
    pointer-events: none;
}
.story-chapter-card__cta {
    text-align: center;
    margin: 0;
}
.story-chapter-card__locked {
    text-align: center;
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.story-intro-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(111, 82, 237, .18), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(212, 160, 90, .12), transparent 50%),
        #070b12;
}
.story-intro {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.story-intro__hero {
    margin: 0 auto 20px;
    max-width: 340px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
    line-height: 0;
}
.story-intro__hero img {
    width: 100%;
    height: auto;
    display: block;
}
.story-intro__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.story-intro__badge {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c9b896;
    border: 1px solid rgba(201, 184, 150, .35);
    border-radius: 999px;
    padding: 4px 12px;
}
.story-intro__card {
    background: rgba(12, 18, 28, .88);
    border: 1px solid rgba(212, 180, 131, .28);
    border-radius: 18px;
    padding: 28px 26px 32px;
    box-shadow: 0 20px 56px rgba(0, 0, 0, .45);
}
.story-intro__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.story-intro__title {
    margin: 0 0 6px;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.2;
    color: #f4ecd8;
}
.story-intro__subtitle {
    margin: 0 0 22px;
    font-size: 18px;
    font-weight: 500;
    font-style: italic;
    color: #c9b896;
}
.story-intro__lore {
    margin-bottom: 22px;
}
.story-intro__lore p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.65;
    color: #c8d4e8;
}
.story-intro__lore p:last-child {
    margin-bottom: 0;
}
.story-intro__objective {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(74, 125, 255, .12);
    border: 1px solid rgba(74, 125, 255, .28);
}
.story-intro__objective strong {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9eb8ff;
    margin-bottom: 6px;
}
.story-intro__objective p {
    margin: 0;
    font-size: 14px;
    color: #e8f0ff;
    line-height: 1.5;
}
.story-intro__facts {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 10px;
}
.story-intro__facts li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.story-intro__facts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.story-intro__fact-label {
    color: var(--muted);
    min-width: 100px;
}
.story-intro__fact-value {
    color: #f0f4ff;
    font-weight: 600;
}
.story-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.story-intro__actions .btn--large {
    padding: 14px 28px;
    font-size: 15px;
}
.story-intro__note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--muted);
}

/* Tutorial — Capítulo 1 (modo história) */
.jornadas-tutorial {
    position: fixed;
    inset: 0;
    z-index: 12000;
    pointer-events: none;
}
.jornadas-tutorial__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 14, .55);
    pointer-events: none;
}
.jornadas-tutorial__spotlight {
    position: fixed;
    display: none;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(4, 8, 14, .72);
    border: 2px solid rgba(212, 180, 131, .85);
    pointer-events: none;
    transition: top .2s, left .2s, width .2s, height .2s;
}
.jornadas-tutorial__card {
    position: fixed;
    z-index: 2;
    max-width: min(420px, calc(100vw - 24px));
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(18, 26, 42, .98), rgba(8, 12, 22, .99));
    border: 1px solid rgba(212, 180, 131, .4);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
    pointer-events: auto;
}
.jornadas-tutorial__card--center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}
.jornadas-tutorial__step {
    margin: 0 0 6px;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9eb8ff;
}
.jornadas-tutorial__title {
    margin: 0 0 8px;
    font-size: 17px;
    color: #f4ecd8;
}
.jornadas-tutorial__text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #c8d4e8;
}
.jornadas-tutorial__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* Intro em vídeo no mesmo painel do território (lado a lado na arena) */
.game-abandon-notice {
    margin-bottom: 10px;
    font-weight: 600;
}

.map-intros-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(90, 64, 32, .2);
    border: 1px solid rgba(212, 180, 131, .35);
    font-size: 12px;
}

.map-intros-toolbar__label {
    flex: 1 1 180px;
    color: #ffe6b8;
    font-weight: 600;
}

.map-intro-stage {
    position: relative;
}

.map-intro-inline {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(212, 180, 131, .65);
    background: rgba(0, 0, 0, .72);
    opacity: 1;
    transition: opacity 1.1s ease-out;
    pointer-events: auto;
}

.player-arena.is-me .map-intro-inline {
    border-color: rgba(74, 125, 255, .75);
}

.player-arena.is-opponent .map-intro-inline {
    border-color: rgba(224, 90, 90, .55);
}

.map-intro-inline.is-fading {
    opacity: 0;
    pointer-events: none;
}

.map-intro-inline.is-done {
    display: none;
}

.map-intro-inline--peek {
    opacity: 0.92;
    pointer-events: auto;
}

.map-intro-inline--peek .map-intro-inline__media {
    display: none;
}

.map-intro-inline--peek .map-intro-inline__video {
    display: none;
}

.map-intro-inline__title {
    margin: 0;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: #ffe6b8;
    background: rgba(0, 0, 0, .55);
    flex: 0 0 auto;
}

.map-intro-inline__media {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: #000;
}

.map-intro-inline__video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    cursor: pointer;
    background: transparent;
    transition: opacity 1.1s ease-out;
}

.map-intro-inline.is-fading .map-intro-inline__video {
    opacity: 0;
}

.map-intro-inline__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px;
    background: rgba(8, 12, 20, .9);
    flex: 0 0 auto;
    transition: opacity .5s ease-out;
}

.map-intro-inline.is-fading .map-intro-inline__title,
.map-intro-inline.is-fading .map-intro-inline__actions {
    opacity: 0;
}

.player-arena__viewport--map-intro .board-map {
    visibility: visible;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.title { font-size: 24px; font-weight: 700; }

.panel {
    background: rgba(19, 26, 36, .95);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.flash-error { background: #5a1f1f; border: 1px solid #814242; }
.flash-win { background: #1f5a2c; border: 1px solid #3d9152; color: #dcffe6; }

.chip {
    display: inline-block;
    background: #1f2a3b;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    margin: 2px 6px 2px 0;
}

.chip-me { border-color: var(--me); color: #b8ccff; }
.chip-turn { border-color: var(--gold); color: #ffe6b8; }
.resource-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
.resource {
    background: #0f1520;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
}
.resource-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}
.bar {
    height: 8px;
    border-radius: 999px;
    background: #222c3e;
    overflow: hidden;
}
.bar > span {
    display: block;
    height: 100%;
}
.bar-life > span { background: linear-gradient(90deg, #4bd170, #1fa85c); }
.bar-mana > span { background: linear-gradient(90deg, #5aa7ff, #4a7dff); }

.mana-orbs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.mana-orb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #2a5080;
    background: #0c121c;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
    flex-shrink: 0;
}
.mana-orb--filled {
    border-color: #7eb8ff;
    background: radial-gradient(circle at 32% 28%, #b8dcff 0%, #5aa7ff 42%, #3d6fd4 100%);
    box-shadow: 0 0 10px rgba(74, 125, 255, .55), inset 0 -2px 4px rgba(30, 60, 140, .4);
}
.mana-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.mana-row__label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hand-cost-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.hand-cost-row .mana-orb {
    width: 10px;
    height: 10px;
    border-width: 1px;
}
.hand-cost-row .mana-orb--filled {
    box-shadow: 0 0 6px rgba(74, 125, 255, .4);
}
.player-arena__resources {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 10px 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(12, 18, 28, .92);
    border: 1px solid var(--line);
}
.player-arena__stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}
.player-arena__stat + .player-arena__stat {
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}
.player-arena__stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    min-width: 36px;
}
.player-arena__stat-value {
    font-weight: 700;
    color: #b8ffcc;
    min-width: 42px;
}
.player-arena__life .bar {
    width: 96px;
    flex: 0 0 96px;
    height: 10px;
}
.player-arena__mana .mana-orbs {
    gap: 7px;
}

/* Auth / tela inicial */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-page--landing {
    padding: 28px 20px 36px;
    overflow-x: hidden;
    background: #030508;
}

.auth-page--landing::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 15% 10%, rgba(212, 160, 60, .14), transparent 50%),
        radial-gradient(ellipse 55% 40% at 85% 85%, rgba(74, 125, 255, .12), transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(20, 28, 48, .8), transparent 70%);
    z-index: 0;
}

.landing {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.landing-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.landing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .45;
    animation: landing-orb-drift 14s ease-in-out infinite;
}

.landing-orb--gold {
    width: min(320px, 55vw);
    height: min(320px, 55vw);
    top: -8%;
    left: -10%;
    background: rgba(212, 160, 60, .35);
}

.landing-orb--blue {
    width: min(280px, 50vw);
    height: min(280px, 50vw);
    bottom: -5%;
    right: -8%;
    background: rgba(74, 125, 255, .3);
    animation-delay: -5s;
}

@keyframes landing-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -16px) scale(1.05); }
}

.landing-hero {
    width: 100%;
    text-align: center;
}

.landing-logo-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto 8px;
}

.landing-logo-wrap::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 55%;
    width: 88%;
    height: 70%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(212, 175, 90, .35) 0%, transparent 70%);
    animation: landing-logo-glow 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes landing-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes landing-logo-glow {
    0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: .9; transform: translate(-50%, -50%) scale(1.06); }
}

.landing-logo {
    display: block;
    width: min(100%, 340px);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, .55));
}

.landing-logo--float {
    position: relative;
    z-index: 1;
    animation: landing-logo-float 4.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .landing-logo--float,
    .landing-orb,
    .landing-logo-wrap::before {
        animation: none;
    }
}

.landing-badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #e8c878;
    background: rgba(212, 160, 60, .12);
    border: 1px solid rgba(212, 180, 131, .35);
    border-radius: 999px;
}

.landing-tagline {
    margin: 0;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    line-height: 1.55;
    color: #9eb0c8;
}

.audio-toggle {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9000;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212, 180, 131, .45);
    background: rgba(15, 21, 32, .92);
    color: #ffe6b8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.audio-toggle:hover {
    border-color: var(--gold);
}

.audio-toggle--off {
    opacity: .75;
    color: var(--muted);
}

.landing-main {
    width: 100%;
}

.landing-footer {
    font-size: 11px;
    color: var(--muted);
    opacity: .65;
    letter-spacing: .04em;
}

.auth-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(15, 21, 32, .92);
    border: 1px solid rgba(212, 180, 131, .35);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
}

.auth-wrap--glass {
    background: rgba(12, 18, 28, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 28px 26px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.profile-nickname-lead {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
    line-height: 1.5;
}
.profile-nickname-form__label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.profile-nickname-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.profile-nickname-form__input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(6, 10, 18, .9);
    color: #e8edf5;
    font-size: 15px;
}
.profile-nickname-form__input:focus {
    outline: none;
    border-color: rgba(212, 180, 131, .55);
    box-shadow: 0 0 0 2px rgba(111, 82, 237, .2);
}
.profile-nickname-form__hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.auth-google-wrap {
    margin-bottom: 4px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(212, 180, 131, .35);
    background: linear-gradient(135deg, rgba(18, 24, 38, .95), rgba(10, 14, 24, .98));
    color: #e8edf5;
    font-weight: 600;
    text-decoration: none;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, .35),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
}

.btn-google:hover {
    border-color: rgba(212, 180, 131, .55);
    background: linear-gradient(135deg, rgba(28, 36, 54, .98), rgba(14, 18, 30, 1));
    box-shadow:
        0 8px 24px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(66, 133, 244, .15),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    transform: translateY(-1px);
    color: #fff;
}

.btn-google__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(135deg, #4285f4, #34a853 50%, #fbbc05 70%, #ea4335);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--muted, #8b9cb3);
    font-size: 12px;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .12);
}

.landing--modern .auth-tabs {
    gap: 6px;
    padding: 4px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, .25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
}

.landing--modern .auth-tab {
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 13px;
    transition: background .2s, color .2s, box-shadow .2s;
}

.landing--modern .auth-tab.is-active {
    background: linear-gradient(135deg, rgba(111, 82, 237, .9), rgba(74, 125, 255, .85));
    box-shadow: 0 4px 14px rgba(74, 125, 255, .35);
    color: #fff;
}

.landing--modern .auth-form input {
    border-radius: 10px;
    border-color: rgba(255, 255, 255, .1);
    background: rgba(6, 10, 18, .85);
    transition: border-color .2s, box-shadow .2s;
}

.landing--modern .auth-form input:focus {
    outline: none;
    border-color: rgba(212, 180, 131, .55);
    box-shadow: 0 0 0 3px rgba(212, 160, 60, .15);
}

.landing--modern .auth-form .btn-primary {
    border-radius: 10px;
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 15px;
    letter-spacing: .02em;
    box-shadow: 0 6px 20px rgba(111, 82, 237, .35);
    transition: transform .15s, box-shadow .15s;
}

.landing--modern .auth-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(111, 82, 237, .45);
}

.landing--modern .auth-form hr {
    margin: 22px 0;
    border-top-color: rgba(255, 255, 255, .08);
}

.landing--modern .auth-form h3 {
    font-size: 14px;
    color: #c8d4e8;
    letter-spacing: .03em;
}

.auth-brand h1 { margin: 0 0 8px; font-size: 22px; }
.auth-brand p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

@media (min-width: 900px) {
    .auth-page--landing {
        padding: 40px 32px;
        align-items: center;
    }

    .landing--modern {
        max-width: 980px;
        display: grid;
        grid-template-columns: 1fr minmax(360px, 420px);
        grid-template-rows: auto 1fr auto;
        gap: 20px 56px;
        align-items: center;
    }

    .landing-hero {
        grid-column: 1;
        grid-row: 1 / 3;
        text-align: left;
        padding-right: 12px;
    }

    .landing-logo-wrap {
        margin-left: 0;
    }

    .landing-logo {
        width: min(100%, 420px);
        margin-left: 0;
    }

    .landing-badge {
        margin-left: 0;
    }

    .landing-tagline {
        margin-left: 0;
        margin-right: 0;
        max-width: 42ch;
    }

    .landing-main {
        grid-column: 2;
        grid-row: 1 / 3;
        width: 100%;
    }

    .landing-footer {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (min-width: 640px) and (max-width: 899px) {
    .landing-logo {
        width: min(100%, 380px);
    }
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab {
    flex: 1; padding: 10px; border: 1px solid var(--line); background: #0e1420;
    color: var(--txt); border-radius: 8px; cursor: pointer;
}
.auth-tab.is-active { background: var(--accent); border-color: #6f52ed; }
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }
.auth-form label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.auth-form input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #324158; background: #0e1420; color: #fff; margin-bottom: 4px; }
.auth-form hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.auth-form h3 { margin: 0 0 8px; font-size: 15px; }

.btn {
    display: inline-block; padding: 10px 16px; border-radius: 8px; border: 0;
    font-weight: 700; cursor: pointer; text-decoration: none; color: #fff;
    font-size: 14px;
}
.btn-primary { background: var(--accent); width: 100%; margin-top: 8px; }
.btn-secondary { background: #3d4f6f; width: 100%; margin-top: 8px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Arena — zoom out por participantes */
.arena-section h3 { margin: 0 0 10px; font-size: 16px; color: var(--muted); }

.arena-section--fit {
    margin-bottom: 0 !important;
    padding: 8px 10px !important;
}

.arena-section--fit h3 { display: none; }

.arena-camera {
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 8px;
    background: #080c12;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: visible;
}

.arena-section--fit .arena-camera {
    padding: 8px;
    gap: 12px;
    align-items: start;
}

.arena-camera[data-players="1"] { grid-template-columns: 1fr; }
.arena-camera[data-players="2"] {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    max-height: none;
}

.arena-section--fit .arena-camera[data-players="2"] {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

@media (min-width: 960px) {
    .arena-section--fit .arena-camera[data-players="2"] {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
}

/* Seu campo à esquerda, oponente à direita (2 jogadores) */
.arena-camera[data-players="2"] .player-arena.is-me { order: 1; }
.arena-camera[data-players="2"] .player-arena.is-opponent { order: 2; }
.arena-camera[data-players="2"] .player-arena.is-opponent {
    border-color: #5a3540;
}
.arena-camera[data-players="2"] .player-arena.is-me {
    border-color: var(--me);
}
.arena-side-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 8px;
}
.arena-side-label--opponent { color: #e8a0a8; }
.arena-side-label--me { color: #9eb8ff; }
.arena-camera[data-players="3"] { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.arena-camera[data-players="4"] {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    grid-template-rows: repeat(2, auto);
}

.player-arena {
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px 12px 14px;
    background: #0d1219;
    transition: border-color .2s, box-shadow .2s;
}

.arena-section--fit .player-arena {
    padding: 8px 10px 10px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: auto;
}

.player-arena.is-me {
    border-color: var(--me);
    box-shadow: 0 0 0 1px rgba(74, 125, 255, .3);
}

.player-arena.is-opponent { border-color: #4a3038; }
.player-arena.is-active-turn { box-shadow: 0 0 16px rgba(212, 180, 131, .35); }

.player-arena__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    font-size: 13px;
}

.player-arena__head strong { font-size: 14px; }
.player-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.direct-target-btn {
    border: 1px solid #7b2f2f;
    background: #3d1e24;
    color: #ffd9d9;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}
.direct-target-btn.is-ready,
.direct-target-btn.direct-target-btn--armed {
    border-color: #ff6e6e;
    background: #6f2028;
    box-shadow: 0 0 0 2px rgba(255, 110, 110, .25);
    cursor: pointer;
    opacity: 1;
}

.direct-target-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.player-arena__viewport {
    position: relative;
    width: 100%;
    overflow: visible;
    border-radius: 10px;
    padding: 14px 16px 20px;
    margin-top: 2px;
    background: #080c12;
    border: 1px solid #1e2a3d;
    box-sizing: border-box;
}

.arena-section--fit .player-arena__head {
    margin-bottom: 0;
    font-size: 11px;
}

.arena-section--fit .player-arena__head strong { font-size: 12px; }

.arena-section--fit .arena-side-label {
    margin-bottom: 2px;
    font-size: 9px;
}

.arena-section--fit .player-arena__resources {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 6px 0 8px;
    padding: 8px 10px;
    flex-wrap: wrap;
}

.arena-section--fit .player-arena__stat-label { font-size: 9px; }

.arena-section--fit .player-arena__stat-value--leader {
    color: #ffe6b8;
    font-weight: 800;
}

.arena-section--fit .player-arena__viewport {
    flex: none;
    padding: 8px 10px 12px;
    overflow: visible;
}

.arena-section--fit .board-map {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.arena-section--fit .board-map__img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center center;
}

.player-arena__viewport .board-map {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    line-height: 0;
}

.arena-camera[data-players="2"] .board-map,
.arena-camera[data-players="3"] .board-map,
.arena-camera[data-players="4"] .board-map,
.arena-camera[data-players="1"] .board-map { transform: none; }

.board-map {
    position: relative;
    line-height: 0;
    width: 100%;
    max-width: 100%;
}

/* Proporção do mapa = imagem inteira visível; slots em % acompanham o resize */
.board-map--stage {
    display: block;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.board-map__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    vertical-align: top;
}

.board-zone {
    position: absolute;
    overflow: visible;
    border-radius: 6px;
    background: rgba(16, 24, 37, .28);
    box-shadow: inset 0 0 0 2px rgba(255, 221, 162, .85);
    z-index: 2;
    cursor: pointer;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .25);
    transition: box-shadow .15s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-zone:has(.board-card-wrap) {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    overflow: visible;
}

.board-zone:has(.board-card-wrap--attack) {
    overflow: visible;
}

.board-zone:hover { z-index: 3; }
.board-zone:not(:has(.board-card-wrap)):hover { box-shadow: 0 0 0 2px var(--gold); }
.board-zone.is-selected { z-index: 4; }
.board-zone.is-selected:not(:has(.board-card-wrap)) { box-shadow: 0 0 0 3px var(--accent); }
.board-zone.is-target:not(:has(.board-card-wrap)) { box-shadow: 0 0 0 3px var(--enemy); }
.board-zone:hover:has(.board-card-wrap) .board-card-wrap {
    box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(0, 0, 0, .5);
    z-index: 3;
}
.board-zone.is-available:not(:has(.board-card-wrap)) {
    box-shadow: 0 0 0 3px #49c2ff;
    background: linear-gradient(165deg, #98dcff 0%, #58b8f2 45%, #2f91cc 100%);
}
.board-zone.is-attackable:not(:has(.board-card-wrap)) {
    box-shadow: 0 0 0 3px #ff6e6e;
    background: linear-gradient(165deg, #ffb1b1 0%, #ff7a7a 45%, #e75252 100%);
}

.board-zone.is-available:has(.board-card-wrap) .board-card-wrap {
    outline-color: #49c2ff;
    box-shadow: 0 0 0 3px #49c2ff, 0 4px 14px rgba(0, 0, 0, .5);
}
.board-zone.is-attackable:has(.board-card-wrap) .board-card-wrap {
    outline-color: #ff6e6e;
    box-shadow: 0 0 0 3px #ff6e6e, 0 4px 14px rgba(0, 0, 0, .5);
}
.board-zone.is-selected:has(.board-card-wrap) .board-card-wrap {
    outline-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent), 0 4px 14px rgba(0, 0, 0, .5);
}
.board-zone.is-target:has(.board-card-wrap) .board-card-wrap {
    outline-color: var(--enemy);
    box-shadow: 0 0 0 3px var(--enemy), 0 4px 14px rgba(0, 0, 0, .5);
}
.board-zone:disabled { cursor: default; opacity: .85; }

/* Fantasia Medieval — territorio.png (numeração 1–7) */
.board-map--fantasia-medieval .board-zone--1 { left: 69%; top: 13%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--2 { left: 11%; top: 33%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--3 { left: 42%; top: 53%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--4 { left: 9.5%; top: 64%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--5 { left: 37%; top: 75%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--6 { left: 57%; top: 45%; width: 13.5%; height: 20%; }
.board-map--fantasia-medieval .board-zone--7 { left: 73.5%; top: 32%; width: 20%; height: 30%; z-index: 5; }

/* Lendas Youkai — lendas-youkai.png (1 topo-esq, 2 topo-centro, 3 topo-dir, 4 meio-esq, 5 meio-dir, 6 baixo-esq, 7 baixo-centro) */
.board-map--lendas-youkai .board-zone--1 { left: 4.5%; top: 11%; width: 12%; height: 16%; }
.board-map--lendas-youkai .board-zone--2 { left: 42%; top: 5%; width: 13%; height: 15%; }
.board-map--lendas-youkai .board-zone--3 { left: 83.5%; top: 11%; width: 12%; height: 16%; }
.board-map--lendas-youkai .board-zone--4 { left: 4%; top: 36%; width: 14%; height: 17%; }
.board-map--lendas-youkai .board-zone--5 { left: 83%; top: 36%; width: 14%; height: 17%; }
.board-map--lendas-youkai .board-zone--6 { left: 9%; top: 70%; width: 14%; height: 13%; }
.board-map--lendas-youkai .board-zone--7 { left: 36%; top: 68%; width: 24%; height: 22%; z-index: 5; }

/* Legião dos Ossos — Legiao-dos-Ossos.png (8 slots) */
.board-map--legiao-dos-ossos .board-zone--1 { left: 38%; top: 2%; width: 24%; height: 14%; z-index: 6; }
.board-map--legiao-dos-ossos .board-zone--2 { left: 4%; top: 16%; width: 16%; height: 16%; }
.board-map--legiao-dos-ossos .board-zone--3 { left: 80%; top: 16%; width: 16%; height: 16%; }
.board-map--legiao-dos-ossos .board-zone--4 { left: 2%; top: 38%; width: 16%; height: 18%; }
.board-map--legiao-dos-ossos .board-zone--5 { left: 82%; top: 38%; width: 16%; height: 18%; }
.board-map--legiao-dos-ossos .board-zone--6 { left: 32%; top: 36%; width: 36%; height: 20%; z-index: 4; }
.board-map--legiao-dos-ossos .board-zone--7 { left: 30%; top: 58%; width: 40%; height: 22%; z-index: 5; }
.board-map--legiao-dos-ossos .board-zone--8 { left: 34%; top: 78%; width: 32%; height: 18%; }

.board-map--legiao-dos-ossos .board-zone--7:has(.board-card-wrap--leader-life) {
    width: 44%;
    height: 26%;
    left: 28%;
    top: 54%;
}

.zone-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: rgba(255, 242, 204, .95);
    text-shadow: 0 1px 2px rgba(0,0,0,.8);
    pointer-events: none;
}

.board-map--legiao-dos-ossos .zone-num {
    font-size: 16px;
    align-items: flex-start;
    padding-top: 4px;
}

.board-map--legiao-dos-ossos .zone-name {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;
    font-size: 7px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: rgba(200, 255, 210, .92);
    text-shadow: 0 1px 3px #000;
    pointer-events: none;
    overflow: hidden;
    max-height: 2.4em;
}

.board-card-wrap {
    position: relative;
    flex-shrink: 0;
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 5 / 7;
    overflow: visible;
    border-radius: 6px;
    background: #0a0f18;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
    transition: box-shadow .2s ease, outline-color .2s ease, transform .2s ease;
}

.board-card-wrap--attacking {
    z-index: 6;
    box-shadow: 0 0 18px rgba(255, 90, 60, .55);
}

.board-card-wrap--attacking > img {
    opacity: 0.15;
}

.board-card-attack-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    z-index: 8;
    background: #000;
    pointer-events: none;
}

.board-card-wrap--attack.board-card-wrap--attacking .board-card-attack-video {
    transform: rotate(-90deg);
}

.board-card-wrap--defense {
    outline: 2px solid rgba(255, 221, 162, .75);
    transform: rotate(0deg);
}
.board-card-wrap--leader-life {
    outline: 3px solid #d4b483;
    box-shadow: 0 0 18px rgba(212, 180, 131, .55);
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 8px;
}

.board-card-wrap--leader-life > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    border-radius: 8px;
    display: block;
}

.board-card-wrap--leader-life .board-card-abilities {
    display: none;
}

.board-card-wrap--leader-life .card-lifebar {
    height: 7px;
    bottom: 28px;
}

.board-card-wrap--leader-life .board-card-stats {
    font-weight: 800;
    color: #ffe6b8;
    font-size: 10px;
    bottom: 4px;
}

.board-zone--7:has(.board-card-wrap--leader-life) {
    overflow: visible;
    z-index: 6;
}

.board-zone--7:has(.board-card-wrap--leader-life):hover {
    z-index: 7;
}

.board-card-wrap--attack {
    outline: 2px solid #e75252;
    box-shadow: 0 0 12px rgba(231, 82, 82, .35);
    transform: rotate(90deg);
    transform-origin: center center;
    height: 100%;
    width: auto;
    max-height: 100%;
    max-width: 100%;
}
.board-card-wrap--attack .card-leader-badge,
.board-card-wrap--attack .card-mode-badge,
.board-card-wrap--attack .card-stack-badge,
.board-card-wrap--attack .board-card-combat,
.board-card-wrap--attack .board-card-abilities,
.board-card-wrap--attack .card-lifebar,
.board-card-wrap--attack .board-card-stats,
.board-card-wrap--attack .evolve-ready {
    transform: rotate(-90deg);
}
.board-card-combat {
    position: absolute;
    top: 12px;
    left: 3px;
    right: 3px;
    z-index: 6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2px;
    pointer-events: none;
}
.board-card-atk,
.board-card-def {
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .78);
    border: 1px solid rgba(255, 255, 255, .12);
    text-shadow: 0 1px 2px #000;
}
.board-card-atk {
    color: #ffc4b8;
}
.board-card-def {
    color: #b8d8ff;
}
.board-card-wrap--leader-life .board-card-combat {
    top: 14px;
}
@keyframes blocker-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(110, 176, 255, .5); }
    50% { box-shadow: 0 0 0 5px rgba(110, 176, 255, .9); }
}
.card-leader-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 5;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #5a4020;
    color: #ffe6b8;
    border: 1px solid #d4b483;
    border-radius: 4px;
    padding: 1px 4px;
}
.card-mode-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 5;
    font-size: 7px;
    font-weight: 700;
    background: #3d2020;
    color: #ffb4b4;
    border-radius: 4px;
    padding: 1px 3px;
}
.card-stack-badge {
    position: absolute;
    bottom: 18px;
    right: 2px;
    z-index: 5;
    font-size: 8px;
    font-weight: 800;
    background: linear-gradient(135deg, #5a4020, #8a6020);
    color: #ffe6b8;
    border: 1px solid #d4b483;
    border-radius: 4px;
    padding: 2px 5px;
}
.board-card-abilities {
    position: absolute;
    bottom: 30px;
    left: 2px;
    right: 2px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 6px;
    line-height: 1.15;
    pointer-events: none;
}
.ability {
    display: block;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .65);
    color: #c8d4e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ability--2 {
    color: #ffe6b8;
    background: rgba(90, 64, 32, .85);
    font-weight: 700;
}
.ability--locked {
    color: #888;
    font-style: italic;
}
.board-zone.is-evolve-target:not(:has(.board-card-wrap)) {
    box-shadow: 0 0 0 3px #d4b483 !important;
    background: rgba(90, 64, 32, .25) !important;
}
.board-zone.is-evolve-target:has(.board-card-wrap) .board-card-wrap {
    outline-color: #d4b483;
    box-shadow: 0 0 0 3px #d4b483, 0 4px 14px rgba(0, 0, 0, .5);
}
.leader-defense-panel {
    border: 2px solid #6eb0ff;
    box-shadow: 0 0 24px rgba(74, 125, 255, .25);
    margin-bottom: 16px;
}

.leader-defense-panel--compact {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 8px 10px;
    max-height: 18vh;
    overflow-y: auto;
}

.leader-defense-panel--compact h3 {
    margin: 0 0 6px;
    font-size: 13px;
}

.leader-defense-panel--compact .leader-defense-panel__intro {
    margin: 0 0 8px;
    font-size: 12px;
}
.leader-defense-panel h3 {
    margin: 0 0 10px;
    color: #b8ccff;
}
.leader-defense-panel__intro {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.leader-defense-panel__hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--muted);
}
.leader-defense-panel__empty {
    margin: 0 0 12px;
    color: #ffb4b4;
    font-size: 13px;
}
.leader-defense-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leader-defense-options--row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.leader-defense-options--row .leader-defense-option__btn {
    padding: 6px 10px;
    font-size: 12px;
}

.btn--compact {
    padding: 6px 12px !important;
    font-size: 12px !important;
    width: auto;
}

.force-leader-form {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 4px;
}
.leader-defense-option {
    margin: 0;
}
.leader-defense-option__btn {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #3d6fd4;
    background: linear-gradient(135deg, #1a2a4a, #0f1a30);
    color: var(--txt);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
.leader-defense-option__btn:hover {
    border-color: #7eb8ff;
    box-shadow: 0 0 12px rgba(74, 125, 255, .4);
    transform: translateY(-1px);
}
.leader-defense-option__name {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.leader-defense-option__name em {
    font-style: normal;
    color: #ffe6b8;
    font-size: 11px;
}
.leader-defense-option__meta {
    display: block;
    font-size: 12px;
    color: var(--muted);
}
.leader-defense-pass {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.board-zone.is-blocker {
    box-shadow: 0 0 0 3px #6eb0ff, 0 0 20px rgba(110, 176, 255, .5) !important;
    animation: blocker-pulse 1.2s ease-in-out infinite;
    z-index: 6 !important;
}
.board-zone.is-blocker .board-card-wrap--defense {
    outline: 3px solid #7eb8ff;
    outline-offset: 1px;
    box-shadow: 0 0 0 3px #6eb0ff, 0 0 20px rgba(110, 176, 255, .5);
}

.board-card-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    border-radius: 5px;
}

.board-card-stats {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px;
    font-size: 9px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.card-lifebar {
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 18px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(0, 0, 0, .4);
    z-index: 5;
}
.card-lifebar > span {
    display: block;
    height: 100%;
    min-width: 2px;
    background: linear-gradient(180deg, #7dffb0, #2db868 55%, #1a8f4a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

@keyframes evolve-sfx-glow {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 0 transparent;
    }
    45% {
        filter: brightness(1.4) saturate(1.2);
        box-shadow: 0 0 22px rgba(255, 210, 90, 0.75), 0 0 40px rgba(120, 180, 255, 0.35);
    }
}

.board-card-wrap--evolve-sfx {
    animation: evolve-sfx-glow 0.55s ease-in-out 2;
    z-index: 4;
}

.board-zone--leader-speaking .board-card-wrap--leader-life {
    filter: brightness(1.08);
}

.leader-speech {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    z-index: 12;
    min-width: 140px;
    max-width: min(240px, 42vw);
    pointer-events: none;
    animation: leader-speech-pop 0.35s ease-out;
}

.leader-speech--foe .leader-speech__text {
    border-color: rgba(255, 120, 100, 0.55);
}

.leader-speech--me .leader-speech__text {
    border-color: rgba(120, 180, 255, 0.55);
}

.leader-speech__name {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffd978;
    margin-bottom: 3px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.leader-speech__text {
    background: rgba(8, 12, 28, 0.94);
    border: 1px solid rgba(255, 215, 120, 0.45);
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.35;
    color: #f3f6ff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    text-align: center;
}

@keyframes leader-speech-pop {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.audio-toggle--voice {
    margin-left: 6px;
}

.evolve-ready {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #0f2413;
    background: #8cff7e;
    border-radius: 999px;
    padding: 2px 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

/* Mão e ações */
.layout-main { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
@media (max-width: 960px) { .layout-main { grid-template-columns: 1fr; } }

.layout-main--fit {
    gap: 10px;
    grid-template-columns: 1fr minmax(220px, 280px);
    margin-top: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.panel--hand__tips {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 8px;
    line-height: 1.4;
}

.panel--hand,
.action-bar--fit {
    margin-bottom: 0;
    padding: 10px 12px;
}

.panel-title-compact {
    margin: 0 0 6px;
    font-size: 13px;
}

.action-bar__mana {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.action-bar__leader {
    color: #ffe6b8;
    margin-left: 4px;
}

.action-bar__arcana {
    color: #c9b8ff;
    font-weight: 700;
}

/* Dock compacto (mobile) — ícones no rodapé */
.action-bar__dock {
    display: contents;
}

.action-bar__dock-form {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.btn--dock {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
}

.action-dock__icon {
    font-size: 1.25rem;
    line-height: 1;
}

.action-dock__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.action-dock__label--compact {
    display: none;
    text-transform: uppercase;
}

.action-bar__dock-badge {
    display: none;
}

.hand-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.layout-main--fit .hand-card {
    flex: 0 0 118px;
}

.layout-main--fit .hand-card__art img,
.layout-main--fit .hand-card img {
    height: 88px;
}

.layout-main--fit .hand-card-hp__value {
    font-size: 11px;
}

.layout-main--fit .hand-card-stat {
    font-size: 8px;
}

.layout-main--fit .hand-card .info {
    padding: 4px 6px;
    font-size: 9px;
}

.layout-main--fit .action-hint {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 11px;
}

.layout-main--fit .btn:not(.btn--dock) {
    padding: 7px 10px;
    font-size: 12px;
}

@media (min-width: 961px) {
    .action-bar--fit .btn--dock {
        flex-direction: row;
        width: 100%;
        gap: 8px;
        padding: 7px 10px;
        justify-content: center;
    }

    .action-bar--fit .action-dock__label--wide {
        font-size: 12px;
        text-transform: none;
    }
}

/* Arena — mobile: mão e ações em coluna, dock compacto fixo na base */
@media (max-width: 960px) {
    .wrap--game {
        padding-left: 6px;
        padding-right: 6px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
    }

    .game-shell {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .arena-section--fit {
        padding: 6px 4px !important;
        overflow-x: hidden;
    }

    .arena-section--fit .arena-camera {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .arena-section--fit .player-arena {
        min-width: 0;
        width: 100%;
    }

    .layout-main--fit {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .layout-main--fit .panel--hand {
        order: 1;
        width: 100%;
        min-width: 0;
        padding: 8px 8px calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .layout-main--fit .panel--hand__tips {
        display: none;
    }

    .layout-main--fit .hand-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }

    .layout-main--fit .hand-card {
        flex: 0 0 clamp(96px, 38vw, 120px);
        scroll-snap-align: start;
    }

    .layout-main--fit .hand-card__art img,
    .layout-main--fit .hand-card img {
        height: clamp(72px, 22vw, 88px);
    }

    /* Esconde barra fixa durante escolha/apresentação de líder (evita sobrepor o modal) */
    .game-shell--leader-setup .layout-main--fit .action-bar--fit,
    .game-shell--leader-intro .layout-main--fit .action-bar--fit,
    body.game-page:has(#leader-setup-overlay:not(.leader-setup-overlay--pending-intro)) .layout-main--fit .action-bar--fit {
        display: none !important;
    }

    body.game-page:has(.game-shell--leader-setup) .wrap--game,
    body.game-page:has(.game-shell--leader-intro) .wrap--game,
    body.game-page:has(#leader-setup-overlay:not(.leader-setup-overlay--pending-intro)) .wrap--game {
        padding-bottom: 16px;
    }

    .layout-main--fit .action-bar--fit {
        order: 2;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        border-radius: 12px 12px 0 0;
        border: 1px solid var(--line);
        border-bottom: none;
        background: rgba(12, 17, 26, 0.96);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.45);
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 4px 6px;
        align-items: stretch;
    }

    .layout-main--fit .action-bar--fit:has(.action-bar__dock-badge) {
        grid-template-columns: auto 1fr 1fr;
    }

    .layout-main--fit .action-bar__title-desktop,
    .layout-main--fit .action-bar__mana--desktop {
        display: none;
    }

    .layout-main--fit .action-hint {
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 0;
        max-height: 2.5em;
        margin: 0;
        padding: 3px 6px;
        font-size: 11px;
        line-height: 1.3;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        background: rgba(0, 0, 0, 0.25);
        border-radius: 6px;
    }

    .layout-main--fit .action-bar__dock {
        display: contents;
    }

    .layout-main--fit .action-bar__dock-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-row: 2;
        grid-column: 1;
        align-self: center;
        min-width: 36px;
        height: 44px;
        padding: 0 6px;
        font-size: 12px;
        font-weight: 800;
        color: #d4c4ff;
        background: rgba(80, 60, 140, 0.35);
        border: 1px solid rgba(160, 130, 255, 0.35);
        border-radius: 10px;
    }

    .layout-main--fit .btn--dock {
        grid-row: 2;
        width: 100%;
        padding: 5px 8px;
        min-height: 44px;
        border-radius: 10px;
    }

    .layout-main--fit .action-bar--fit:has(.action-bar__dock-badge) #btn-evolve.btn--dock {
        grid-column: 2;
    }

    .layout-main--fit .action-bar--fit:has(.action-bar__dock-badge) .action-bar__dock-form {
        grid-column: 3;
    }

    .layout-main--fit .action-bar--fit:not(:has(.action-bar__dock-badge)) #btn-evolve.btn--dock {
        grid-column: 1;
    }

    .layout-main--fit .action-bar--fit:not(:has(.action-bar__dock-badge)) .action-bar__dock-form {
        grid-column: 2;
    }

    .layout-main--fit .action-bar__dock-form {
        display: flex;
        margin: 0;
    }

    .layout-main--fit .action-bar__dock-form .btn--dock {
        width: 100%;
    }

    .layout-main--fit .action-dock__icon {
        font-size: 1.1rem;
    }

    .layout-main--fit .action-dock__label--wide {
        display: none;
    }

    .layout-main--fit .action-dock__label--compact {
        display: inline;
        font-size: 9px;
    }

    body.game-page.has-lobby-global .wrap--game {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    body.game-page.has-lobby-global .layout-main--fit .panel--hand {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    body.game-page.has-lobby-global .lobby-global-chat {
        margin-bottom: 8px;
    }
}

@media (max-width: 960px) and (min-width: 700px) {
    .arena-section--fit .arena-camera[data-players="2"] {
        grid-template-columns: 1fr;
    }
}

.hand-card {
    flex: 0 0 150px;
    border: 2px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #111826;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
    position: relative;
}

.hand-card__art {
    position: relative;
    line-height: 0;
}

.hand-card-combat {
    position: absolute;
    top: 6px;
    left: 4px;
    right: 4px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
}

.hand-card-stat {
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .78);
    border: 1px solid rgba(255, 255, 255, .12);
    text-shadow: 0 1px 2px #000;
}

.hand-card-stat--atk {
    color: #ffc4b8;
}

.hand-card-stat--def {
    color: #b8d8ff;
}

.hand-card-hp {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .72);
    border: 1px solid rgba(45, 184, 106, .45);
    pointer-events: none;
}

.hand-card-hp__label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #9ed4b0;
}

.hand-card-hp__value {
    font-size: 12px;
    font-weight: 800;
    color: #7dffb0;
    text-shadow: 0 0 8px rgba(90, 220, 130, .35);
}

.hand-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.hand-card.is-selected { border-color: var(--accent); box-shadow: 0 0 12px rgba(125, 95, 255, .5); }
.hand-card--arcana {
    border-color: #6b4fd6;
    box-shadow: 0 0 10px rgba(107, 79, 214, .35);
}
.hand-card--arcana .info { color: #d4c4ff; }

.hand-card__art img,
.hand-card img { width: 100%; height: 138px; object-fit: cover; display: block; }
.hand-card .info { padding: 8px; font-size: 11px; }

.hand-card-stats-line {
    display: inline-block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #c8d4e8;
}

.action-bar { display: flex; flex-direction: column; gap: 8px; }
.action-hint {
    font-size: 12px;
    color: var(--muted);
    min-height: 40px;
    padding: 8px;
    background: #0e1420;
    border-radius: 8px;
    border: 1px dashed var(--line);
}

.lobby-form label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.lobby-form input, .lobby-form select {
    width: 100%; padding: 10px; border-radius: 8px;
    border: 1px solid #324158; background: #0e1420; color: #fff;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stats-row .resource--opponent { order: 1; }
.stats-row .resource--me { order: 2; }
@media (max-width: 700px) {
    .stats-row { grid-template-columns: 1fr; }
    .player-arena__stat + .player-arena__stat {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
        width: 100%;
    }
    .player-arena__resources {
        flex-direction: column;
        align-items: stretch;
    }
}
.resource--me { border-color: rgba(74, 125, 255, .45); }
.resource--opponent { border-color: rgba(120, 70, 80, .45); }

.deck-preview {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 12px 0;
    padding-bottom: 6px;
}
.deck-preview img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.deck-box { flex: 1 1 300px; }
.deck-count-full { color: #ffb4b4; font-weight: 700; }
.deck-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}
.deck-card-row:last-child { border-bottom: 0; }
.deck-card-row img {
    width: 44px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.deck-card-row__info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.deck-card-row__info strong { font-size: 13px; }
.btn-sm-remove {
    width: 36px;
    padding: 6px 0;
    text-align: center;
    border-color: #814242;
    color: #ffb4b4;
    font-size: 18px;
    line-height: 1;
}

/* Sala de encontro */
.lobby-wrap { max-width: 1100px; }
.lobby-hero h2 { margin: 0 0 8px 0; }
.lobby-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 14px;
}
@media (max-width: 900px) {
    .lobby-grid { grid-template-columns: 1fr; }
}
.lobby-players { display: flex; flex-direction: column; gap: 10px; }
.lobby-player {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 10px;
    background: #0f1520;
    border: 1px solid var(--line);
}
.lobby-player--me {
    border-color: var(--me);
    box-shadow: 0 0 0 1px rgba(74, 125, 255, .25);
}
.top__profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    flex-shrink: 0;
    box-sizing: border-box;
}

.profile-avatar--header.profile-avatar--img,
.profile-avatar--header.profile-avatar--initial,
.profile-avatar--header.profile-avatar--video {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
}

.profile-avatar--small.profile-avatar--img,
.profile-avatar--small.profile-avatar--initial,
.profile-avatar--small.profile-avatar--video {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    margin-right: 6px;
    vertical-align: middle;
}

.profile-avatar--img {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 180, 131, .65);
    display: block;
    background: #0a0e14;
}

.profile-avatar--video {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 180, 131, .65);
    display: block;
    background: #0a0e14;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.profile-picker__thumb--video {
    object-fit: cover;
    background: #0a0e14;
}

.profile-avatar--initial {
    border-radius: 50%;
    background: linear-gradient(135deg, #4a7dff, #7d5fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
}

.profile-avatar--header.profile-avatar--initial {
    font-size: 15px;
}

.profile-avatar--small.profile-avatar--initial {
    font-size: 12px;
}

.lobby-player__avatar .profile-avatar--img,
.lobby-player__avatar .profile-avatar--initial,
.lobby-player__avatar .profile-avatar--video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.lobby-player__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #4a7dff, #7d5fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.lobby-player__avatar .profile-avatar--initial {
    font-size: 16px;
}

.rank-row__player {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.profile-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    max-width: 720px;
}

.profile-picker__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.profile-picker__item:hover {
    background: rgba(74, 125, 255, .08);
}

.profile-picker__item--active {
    border-color: var(--gold);
    background: rgba(212, 180, 131, .12);
}

.profile-picker__item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-picker__thumb {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #0a0e14;
}

.profile-picker__thumb--default {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #4a7dff, #7d5fff);
}

.profile-picker__label {
    font-size: 10px;
    text-align: center;
    color: var(--muted);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lobby-player__name { font-weight: 700; margin-bottom: 4px; }
.lobby-player__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}
.lobby-status--in_game { color: #ffe6b8; }
.lobby-status--lobby { color: #b8ffcc; }
.lobby-player__msg {
    margin-top: 6px;
    font-size: 12px;
    color: #d4c4ff;
    font-style: italic;
}
.lobby-form label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.lobby-form input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #324158;
    background: #0e1420;
    color: #fff;
}
.lobby-shortcuts { display: flex; flex-direction: column; gap: 8px; }
.lobby-challenge {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: #0f1520;
    font-size: 12px;
}
.lobby-challenge__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.lobby-challenge__actions form {
    flex: 1;
}

.challenge-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.challenge-popup[hidden] {
    display: none !important;
}
.challenge-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
}
.challenge-popup__card {
    position: relative;
    z-index: 1;
    max-width: 400px;
    width: 100%;
    margin: 0;
    text-align: center;
    animation: popup-in .25s ease-out;
}
.challenge-popup__card h3 {
    margin: 0 0 10px 0;
    color: var(--gold);
}
.challenge-popup__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
@keyframes popup-in {
    from { opacity: 0; transform: scale(.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Chat global da sala + popup de desafio */
body.has-lobby-global {
    padding-top: 0;
}
.lobby-global-chat {
    position: sticky;
    top: 0;
    z-index: 900;
    margin: 0 auto 10px;
    max-width: 1100px;
    padding: 8px 12px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(12, 18, 28, .96), rgba(8, 12, 20, .92));
    border: 1px solid rgba(212, 180, 131, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.lobby-global-chat__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.lobby-global-chat__title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
}
.lobby-global-chat__hint {
    font-size: 11px;
    color: var(--muted);
}
.lobby-global-chat__viewport {
    max-height: 108px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 2px;
    scroll-behavior: smooth;
}
.lobby-global-chat__empty {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}
.lobby-global-chat__line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
    border-left: 3px solid rgba(212, 180, 131, .5);
    font-size: 12px;
    line-height: 1.35;
}
.lobby-global-chat__line--enter {
    animation: lobby-chat-drop .45s ease-out;
}
.lobby-global-chat__line--chat {
    border-left-color: rgba(110, 176, 255, .65);
}
.lobby-global-chat__line--system,
.lobby-global-chat__line--challenge {
    border-left-color: rgba(255, 210, 90, .75);
    background: rgba(90, 64, 32, .22);
}
.lobby-global-chat__line--me {
    background: rgba(40, 72, 48, .35);
    border-left-color: #7fd89a;
}
.lobby-global-chat__who {
    font-weight: 700;
    color: #ffe6b8;
    flex-shrink: 0;
}
.lobby-global-chat__body {
    color: #e8edf5;
    word-break: break-word;
}
.lobby-global-chat__compose {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}
.lobby-global-chat__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin: 0;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(212, 180, 131, .35);
    background: rgba(0, 0, 0, .35);
    color: #e8edf5;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}
.lobby-global-chat__input::placeholder {
    color: var(--muted);
}
.lobby-global-chat__input:focus {
    outline: none;
    border-color: rgba(212, 180, 131, .65);
    box-shadow: 0 0 0 2px rgba(212, 180, 131, .15);
}
.lobby-global-chat__compose .lobby-global-chat__send {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    margin: 0 !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
}
@keyframes lobby-chat-drop {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.challenge-popup-open {
    overflow: hidden;
}
.challenge-popup__text {
    margin: 0 0 6px;
}
.challenge-popup__sub {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}
body.game-page.has-lobby-global .lobby-global-chat {
    max-width: 100%;
}

/* Vídeo de apresentação dos líderes (centro da arena) */
.arena-section--fit {
    position: relative;
}
.leader-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 850;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.leader-intro-overlay.is-fading {
    opacity: 0;
    transition: opacity 0.9s ease;
}
.leader-intro-overlay.is-done {
    display: none !important;
}
.leader-intro-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 14, 0.82);
}
.leader-intro-overlay__stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(92%, 760px);
    max-height: 92%;
    padding: 12px;
}
.leader-intro-overlay__caption {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
}
.leader-intro-overlay__video {
    width: 100%;
    max-height: min(68vh, 480px);
    border-radius: 12px;
    border: 2px solid rgba(212, 180, 131, 0.45);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    background: #000;
    object-fit: contain;
}
.leader-intro-overlay__actions {
    display: flex;
    justify-content: center;
}
.game-shell--leader-intro .game-layout,
.game-shell--leader-intro .action-bar {
    pointer-events: none;
    user-select: none;
}
.game-shell--leader-intro .leader-intro-overlay,
.game-shell--leader-intro .leader-intro-overlay button {
    pointer-events: auto;
}

/* Escolha do líder no início da partida */
.leader-setup-overlay--pending-intro {
    display: none !important;
}
.game-shell--leader-setup .game-layout {
    pointer-events: none;
    filter: blur(2px);
    opacity: 0.45;
}
.leader-setup-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(4, 8, 14, .82);
}
.leader-setup-panel {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
}
.leader-setup-panel__title {
    margin: 0 0 8px;
    font-size: 20px;
}
.leader-setup-panel__hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.leader-setup-panel__hint--wait {
    text-align: center;
    color: #ffe6b8;
}
.leader-setup-panel__wait {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.leader-setup-overlay--waiting-opponent .leader-setup-panel {
    text-align: center;
    max-width: 420px;
}
.hand-card--dragging {
    opacity: 0.55;
    transform: scale(0.96);
}
.hand-card[draggable="true"] {
    cursor: grab;
}
.hand-card--arcana {
    cursor: pointer;
}
.board-zone.is-drop-target {
    outline: 2px dashed rgba(127, 216, 154, 0.85);
    outline-offset: 2px;
    background: rgba(40, 72, 48, 0.35);
}
.leader-setup-panel__empty {
    color: #e8c89a;
    font-size: 14px;
}
.leader-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.leader-setup-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #0d1219;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.leader-setup-card:hover {
    border-color: #5a7dff;
    transform: translateY(-2px);
}
.leader-setup-card--selected {
    border-color: var(--me);
    box-shadow: 0 0 0 2px rgba(74, 125, 255, .35);
}
.leader-setup-card--synergy {
    border-color: #3d9152;
}
.leader-setup-card--synergy.leader-setup-card--selected {
    box-shadow: 0 0 0 2px rgba(90, 220, 130, .35);
}
.leader-setup-card img {
    width: 100%;
    max-width: 110px;
    border-radius: 8px;
}
.leader-setup-card__name {
    font-size: 12px;
    font-weight: 700;
    color: #e8edf5;
}
.leader-setup-card__badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ed4b0;
    background: #1a3324;
    padding: 2px 8px;
    border-radius: 999px;
}
.leader-setup-card__stats {
    font-size: 11px;
    color: var(--muted);
}
.leader-setup-card__boost {
    color: #9ed4b0;
}
.leader-setup-card__qty {
    font-size: 10px;
    color: var(--muted);
}
.leader-setup-actions {
    display: flex;
    justify-content: center;
}
.hand-card--leader {
    outline: 1px solid rgba(90, 220, 130, .45);
}
.hand-card__leader-tag {
    display: inline-block;
    margin-left: 4px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ed4b0;
    vertical-align: middle;
}

/* Aviso PvP — seu turno */
.pvp-turn-notice {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}
.pvp-turn-notice[hidden] {
    display: none !important;
}
.pvp-turn-notice__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 18, 0.62);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.pvp-turn-notice.is-visible .pvp-turn-notice__backdrop {
    opacity: 1;
}
.pvp-turn-notice__card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 40px;
    border-radius: 16px;
    border: 2px solid rgba(212, 180, 131, 0.85);
    background: linear-gradient(165deg, rgba(22, 32, 48, 0.97) 0%, rgba(10, 14, 24, 0.98) 100%);
    box-shadow:
        0 0 40px rgba(125, 95, 255, 0.35),
        0 12px 48px rgba(0, 0, 0, 0.65);
    transform: scale(0.9) translateY(12px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.pvp-turn-notice.is-visible .pvp-turn-notice__card {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.pvp-turn-notice.is-fading .pvp-turn-notice__card {
    transform: scale(0.96) translateY(-6px);
    opacity: 0;
}
.pvp-turn-notice__glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(125, 95, 255, 0.25) 0%, transparent 65%);
    pointer-events: none;
    animation: pvp-turn-pulse 1.2s ease-in-out infinite;
}
.pvp-turn-notice__title {
    position: relative;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffe6b8;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.pvp-turn-notice__sub {
    position: relative;
    font-size: 14px;
    color: #b8c8e8;
    text-align: center;
}
@keyframes pvp-turn-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
