/* Magnata: tabuleiro 9x9 com painel central */
.mg-tabuleiro { position: relative; width: min(520px, 100%); aspect-ratio: 1; display: grid; grid-template: repeat(9, 1fr) / repeat(9, 1fr); gap: 2px;
  background: #234a3a; padding: 2px; border-radius: 6px; font-family: var(--sans); }
.mg-casa { position: relative; border: 0; margin: 0; padding: 2px 1px; background: #f6f1e4; color: #2b2620; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: inherit; cursor: pointer; overflow: hidden; text-align: center; line-height: 1.05; border-radius: 2px; }
.mg-casa:hover { background: #fffaf0; }
.mg-casa:focus-visible { outline: 3px solid #2b6cb0; outline-offset: -2px; z-index: 3; }
.mg-casa.canto { background: #efe4c9; font-weight: 700; }
.mg-nome { font-size: clamp(.42rem, 1.4vw, .64rem); font-weight: 600; padding: 0 1px; word-break: normal; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
.mg-preco { font-size: clamp(.38rem, 1.25vw, .58rem); color: #6b6155; }
.mg-faixa { position: absolute; display: flex; gap: 1px; align-items: center; justify-content: center; }
.lado-baixo .mg-faixa { top: 0; left: 0; right: 0; height: 22%; } .lado-cima .mg-faixa { bottom: 0; left: 0; right: 0; height: 22%; }
.lado-esq .mg-faixa { right: 0; top: 0; bottom: 0; width: 22%; flex-direction: column; } .lado-dir .mg-faixa { left: 0; top: 0; bottom: 0; width: 22%; flex-direction: column; }
.lado-baixo:has(.mg-faixa) { padding-top: 24%; } .lado-cima:has(.mg-faixa) { padding-bottom: 24%; }
.lado-esq:has(.mg-faixa) { padding-right: 24%; } .lado-dir:has(.mg-faixa) { padding-left: 24%; }
.mg-faixa .casinha { width: 5px; height: 5px; background: #2ecc71; border: 1px solid #145a32; border-radius: 1px; }
.mg-faixa .hotel { width: 12px; height: 6px; background: #e74c3c; border: 1px solid #7b241c; border-radius: 1px; }
.lado-esq .mg-faixa .hotel, .lado-dir .mg-faixa .hotel { width: 6px; height: 12px; }
.mg-dono { position: absolute; width: 0; height: 0; border-style: solid; border-width: 0 0 12px 12px; border-color: transparent transparent var(--cor) transparent; right: 0; bottom: 0; }
.mg-casa.hipotecada { background: repeating-linear-gradient(135deg, #eee6d4 0 5px, #ddd2bb 5px 10px); color: #8a8070; }
.mg-casa.destaque { box-shadow: inset 0 0 0 3px #f2b440; z-index: 2; }
.mg-casa.dica { box-shadow: inset 0 0 0 3px #2f9e57; z-index: 2; animation: mg-pulsar .9s infinite alternate; }
@keyframes mg-pulsar { to { box-shadow: inset 0 0 0 1px #2f9e57; } }

.mg-peoes { position: absolute; inset: 2px; pointer-events: none; }
.mg-peao { position: absolute; width: 2.8%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--cor);
  box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0,0,0,.5); transition: left .09s linear, top .09s linear; z-index: 4; }

.mg-centro { background: radial-gradient(ellipse at 50% 35%, #fbf7ec, #efe6cf); border-radius: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; padding: 4%; text-align: center; color: #2b2620; overflow: auto; }
.mg-marca { font-family: var(--serif-titulo); font-size: clamp(1.3rem, 5vw, 2.3rem); font-weight: 600; letter-spacing: .06em; color: #234a3a; line-height: 1; }
.mg-marca small { display: block; font-family: var(--sans); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: #8a7a5a; margin-top: .25rem; }
.mg-dados { display: flex; gap: .5rem; }
.mg-dado { --d: clamp(30px, 6.5vw, 44px); width: var(--d); height: var(--d); border-radius: 8px; background: linear-gradient(145deg, #fffdf8, #e8e0d0); box-shadow: 0 3px 0 #b9ab90, 0 5px 9px rgba(0,0,0,.25);
  display: grid; grid-template: repeat(3, calc(var(--d) * .24)) / repeat(3, calc(var(--d) * .24)); place-content: center; }
.mg-dado i { width: calc(var(--d) * .17); height: calc(var(--d) * .17); border-radius: 50%; background: #2b2620; align-self: center; justify-self: center; visibility: hidden; }
.mg-dado i.on { visibility: visible; }
.mg-dado.rolando { animation: mg-rolar .45s ease-out; }
@keyframes mg-rolar { from { transform: rotate(-200deg) scale(.6); } to { transform: none; } }
.mg-mensagem { font-size: clamp(.72rem, 1.9vw, .9rem); max-width: 34ch; min-height: 2.4em; }
.mg-carta { font-size: clamp(.7rem, 1.8vw, .85rem); background: #fff; border: 1px solid #d9c9a3; border-left: 4px solid #e2852b; border-radius: 6px; padding: .45rem .6rem; max-width: 36ch; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.mg-carta b { display: block; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #b06a1e; margin-bottom: .15rem; }
.mg-botoes { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.mg-botoes .xz-botao { padding: .45rem .8rem; font-size: clamp(.72rem, 1.8vw, .88rem); }

/* ficha (título de posse) */
.mg-ficha { width: min(250px, 100%); background: #fff; color: #2b2620; border: 1px solid #d9c9a3; border-radius: 8px; overflow: hidden; font-family: var(--sans); font-size: .78rem; box-shadow: 0 3px 10px rgba(0,0,0,.12); text-align: left; }
.mg-ficha-topo { color: #fff; font-weight: 700; padding: .4rem .6rem; font-size: .95rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.mg-ficha-topo small { display: block; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; opacity: .9; font-weight: 600; }
.mg-ficha-topo.neutro { background: #234a3a; }
.mg-ficha table { width: 100%; border-collapse: collapse; margin: .3rem 0; }
.mg-ficha td { padding: .12rem .6rem; } .mg-ficha td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.mg-ficha p { margin: .3rem .6rem; }
.mg-ficha-pe { border-top: 1px solid #eee3c9; padding-top: .3rem; color: #6b6155; }
.mg-info { width: 100%; display: flex; justify-content: center; min-height: 0; }

/* painel dos jogadores */
.mg-jogadores { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-family: var(--sans); font-size: .82rem; }
.mg-jogadores li { display: grid; grid-template-columns: .8rem 1fr auto; gap: .4rem; align-items: center; padding: .35rem .45rem; border-radius: 8px; border: 1px solid transparent; }
.mg-jogadores li.vez { border-color: var(--realce); background: var(--papel-2); }
.mg-jogadores li.falido { opacity: .45; text-decoration: line-through; }
.mg-jogadores .bola { width: .8rem; height: .8rem; border-radius: 50%; background: var(--cor); }
.mg-jogadores .din { font-weight: 700; font-variant-numeric: tabular-nums; }
.mg-jogadores small { display: block; color: var(--tinta-suave); font-size: .7rem; }
.mg-construir { display: grid; gap: .3rem; font-family: var(--sans); font-size: .8rem; }
.mg-construir button { display: flex; justify-content: space-between; gap: .4rem; text-align: left; }
.mg-construir .vazio { color: var(--tinta-suave); font-style: italic; font-size: .78rem; margin: 0; }
.xz-lances li.mg-lance { display: block; font-size: .78rem; line-height: 1.35; }
.mg-placar { grid-template-columns: repeat(2, 1fr); }
.mg-palco { grid-template-columns: 220px minmax(0, 1fr) 250px; }

@media (max-width: 980px) { .mg-palco { grid-template-columns: 1fr; } }

/* mini do tutorial */
.xz-mini.mg-mini { display: block; border: 0; width: 220px; }
.mg-mini .mg-tabuleiro { width: 220px; gap: 1px; padding: 1px; }
.mg-mini .mg-nome { font-size: .3rem; } .mg-mini .mg-preco { display: none; }
.mg-mini .mg-centro { padding: 2px; gap: 2px; overflow: hidden; }
.mg-mini .mg-ficha { font-size: .5rem; width: 100%; }
.mg-mini .mg-ficha-topo { font-size: .6rem; padding: .15rem .3rem; }
.mg-mini .mg-ficha td { padding: 0 .3rem; }
.mg-mini .mg-peao { width: 4%; }
.xz-mini.mg-mini .mg-centro { display: flex; place-items: normal; background: radial-gradient(ellipse at 50% 35%, #fbf7ec, #efe6cf); }
.xz-mini.mg-mini .mg-peoes { position: absolute; display: block; background: none; }

/* o centro do tabuleiro é sempre claro: botões com cores fixas, nos dois modos */
.mg-centro .xz-botao { background: #fff; color: #2b2620; border-color: #d9c9a3; }
.mg-centro .xz-botao:hover:not(:disabled) { border-color: #7a3b2e; color: #7a3b2e; }
.mg-centro .xz-botao.principal { background: #7a3b2e; border-color: #7a3b2e; color: #fff; }
.mg-centro .xz-botao.principal:hover { background: #5e2c22; color: #fff; }

/* tela cheia: cresce até caber na largura e na altura que sobra abaixo da barra */
body.tc .mg-tabuleiro { width: min(100%, calc(var(--tc-alto, 700px) - 80px), 780px); }
