/* Shared chrome for every game in the catalogue.
   Copied once per generated site to assets/game.css.
   Everything is driven by the CSS custom properties the layout sets on :root,
   so a single stylesheet works under all design presets. */

.maq_area {
  --arc-gap: 14px;
  display: flex;
  flex-direction: column;
  gap: var(--arc-gap);
  align-items: center;
  width: 100%;
  color: var(--arc-text);
  font-family: inherit;
}

/* --- HUD: score / status row above the board --- */
.maq_painel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.maq_marca {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 8px 14px;
  min-width: 78px;
  text-align: center;
  line-height: 1.25;
}

.maq_marca_nome {
  display: block;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
}

.maq_marca_valor {
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- Controls row --- */
.maq_comandos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.maq_botao {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--arc-primary);
  background: var(--arc-primary);
  color: #fff;
  border-radius: var(--arc-radius);
  padding: 9px 18px;
  transition: opacity .15s ease, background-color .15s ease;
}

.maq_botao:hover { opacity: .88; }
.maq_botao:focus-visible { outline: 3px solid var(--arc-accent); outline-offset: 2px; }

.maq_botao_vazio {
  background: transparent;
  color: var(--arc-primary);
}

.maq_botao_vazio:hover { background: var(--arc-surface); opacity: 1; }

.maq_botao[aria-pressed="true"] {
  background: var(--arc-accent);
  border-color: var(--arc-accent);
  color: #fff;
}

.maq_grupo {
  display: inline-flex;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  overflow: hidden;
}

.maq_grupo .maq_botao {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--arc-text);
  padding: 8px 14px;
}

.maq_grupo .maq_botao[aria-pressed="true"] {
  background: var(--arc-primary);
  color: #fff;
}

.maq_rotulo {
  font-size: 13px;
  font-weight: 600;
  opacity: .75;
}

/* --- Status line --- */
.maq_estado {
  min-height: 24px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.maq_estado[data-tone="win"]  { color: var(--arc-primary); }
.maq_estado[data-tone="lose"] { color: #b4232a; }

/* --- Boards --- */
.maq_mesa {
  display: grid;
  gap: 6px;
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 10px;
  max-width: 100%;
  touch-action: manipulation;
}

.maq_casa {
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  min-width: 0;
  background: var(--arc-bg);
  border: 1px solid var(--arc-border);
  border-radius: calc(var(--arc-radius) * .6);
  color: var(--arc-text);
  font-weight: 700;
  line-height: 1;
  transition: background-color .12s ease, transform .12s ease;
}

.maq_casa:hover:not([disabled]) { background: var(--arc-surface); }
.maq_casa:focus-visible { outline: 3px solid var(--arc-accent); outline-offset: 1px; }
.maq_casa[disabled] { cursor: default; }
.maq_casa[data-hit="1"] { background: var(--arc-accent); color: #fff; }
.maq_casa[data-win="1"] { background: var(--arc-primary); color: #fff; }

/* --- Canvas games --- */
.maq_tela {
  display: block;
  max-width: 100%;
  height: auto;
  background: var(--arc-bg);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  touch-action: none;
}

/* --- Misc --- */
.maq_dica {
  font-size: 13px;
  opacity: .7;
  text-align: center;
  max-width: 46ch;
}

.maq_fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }

.maq_campo {
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  width: 130px;
  padding: 9px 10px;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  background: var(--arc-bg);
  color: var(--arc-text);
}

.maq_campo:focus-visible { outline: 3px solid var(--arc-accent); outline-offset: 1px; }

.maq_oculto {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
