/* Anotação de partida presencial (tela /anotar) e anotações no torneio presencial. Usa as variáveis de app.css. */

.otb .page-head p { max-width: 640px; }
.otb-tabs { margin-bottom: 12px; width: 100%; max-width: 520px; }
.otb-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 12px; }
.otb-tabs .ico { width: 16px; height: 16px; }
.otb-setup { max-width: 720px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.otb-q { display: flex; flex-direction: column; gap: 8px; }
.otb-label { font-weight: 700; font-size: 15px; }
.otb-mt { margin-top: 10px; }
.otb-pairing { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; max-width: 720px; }
.otb-pairing .ico { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* Cor */
.otb-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.otb-color { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 10px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.otb-color svg { width: 40px; height: 40px; }
.otb-color.on { border-color: var(--brand-2); background: var(--warn-bg); }

/* Adversário */
.otb-results { display: flex; flex-direction: column; gap: 4px; }
.otb-res { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; min-height: 52px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.otb-res:hover, .otb-res:focus-visible { background: var(--surface-2); }
.otb-res .grow, .otb-chip .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.otb-nores { padding: 6px 2px; }
.otb-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--ok); border-radius: var(--radius-sm); background: var(--ok-bg); }
.otb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.otb-pgn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; min-height: 150px; resize: vertical; }
.otb-save { min-height: 18px; display: flex; align-items: center; gap: 4px; }
.otb-save .ico { width: 14px; height: 14px; color: var(--ok); }
.otb-recent { max-width: 720px; margin-top: 16px; }
.otb-rec { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.otb-rec:first-of-type { border-top: 0; }
.otb-rec > span:first-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

/* Tabuleiro */
.otb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.otb-title { display: flex; flex-direction: column; min-width: 0; }
.otb-title b { font-size: 18px; overflow-wrap: anywhere; }
.otb-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(280px, 380px); gap: 24px; align-items: start; }
.otb-boardcol .board-wrap { max-width: 560px; }
.otb-side { display: flex; flex-direction: column; gap: 12px; }
.otb-turn { font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.otb-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; border: 2px solid #777; }
.otb-dot.w { background: #fff; }
.otb-dot.b { background: #16171a; }
.otb-check, .otb-end { color: var(--bad); }
.otb-past { margin-top: 6px; color: var(--warn); }
.otb-ctrls { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 8px; }
.otb-big { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; padding: 8px; }
.otb-big .ico { width: 22px; height: 22px; }
.otb-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; max-height: 190px; overflow-y: auto; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 15px; }
.otb-strip .n { color: var(--muted); font-size: 13px; margin-left: 4px; }
.otb-strip .m { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.otb-strip .m.on { background: var(--brand); color: #111; }
.otb-help { margin: 0; line-height: 1.45; }

/* Resultado */
.otb-results3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.otb-resbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; min-height: 76px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.otb-resbtn b { font-size: 22px; font-family: var(--font-display); }
.otb-resbtn span { font-size: 12px; color: var(--muted); text-align: center; }
.otb-resbtn.on { border-color: var(--brand-2); background: var(--warn-bg); }
.otb-resbtn:disabled { opacity: .4; cursor: default; }
.otb-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.otb-chipbtn { padding: 10px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.otb-chipbtn.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Análise: aviso da partida presencial */
.otb-note { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.otb-note .ico { width: 16px; height: 16px; }

/* Torneio presencial: anotações por mesa */
.tt-myboard { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tt-myboard > div { flex: 1; min-width: 220px; }
.tt-otb td { padding-top: 0 !important; border-top: 0 !important; }
.tt-otb-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.tt-otb-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-otb-item .ico { width: 14px; height: 14px; }
.tt-otb-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line-2); }

@media (max-width: 980px) {
  .otb-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .otb-boardcol .board-wrap { max-width: none; }
}
@media (max-width: 640px) {
  .otb-grid { grid-template-columns: minmax(0, 1fr); }
  .otb-setup { padding: 16px; }
  .otb-play .player-bar { padding: 4px 2px; }
  .otb-head .btn { flex: none; }
}
