/* Jeu de go : styles propres à l'outil. Le plateau en bois et les pierres sont des objets volontairement colorés. */
.o-go { --o-go-bois: #dcb35c; --o-go-trait: #3b2a14; --o-go-dernier: #e0412f; min-width: 0; }
:root[data-theme="dark"] .o-go { --o-go-bois: #c99d48; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .o-go { --o-go-bois: #c99d48; }
}
.o-go [hidden] { display: none !important; }
.o-go .o-go-choix { padding: 0 0 8px; border-top: 0; }
.atelier .o-go .o-go-choix .btn[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-go .o-go-reglages { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; padding-bottom: 6px; }
.o-go .o-go-note { margin: 4px 0 0; }

.o-go .o-go-scene { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0 18px; border-top: 1px solid var(--bord); margin-top: 12px; }
.o-go .o-go-score { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.o-go .o-go-camp, .o-go .o-go-num { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: var(--surface-2); border: 2px solid transparent; color: var(--texte); font-size: .92rem; }
.o-go .o-go-camp strong, .o-go .o-go-num strong { font: 700 1.1rem var(--mono); min-width: 1.5ch; text-align: right; }
.o-go[data-phase="jeu"][data-trait="n"] .o-go-camp-n, .o-go[data-phase="jeu"][data-trait="b"] .o-go-camp-b { border-color: var(--marque); }
.o-go .o-go-jeton { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.o-go .o-go-jeton.noir { background: radial-gradient(circle at 35% 30%, #5a5f68, #111317 70%); }
.o-go .o-go-jeton.blanc { background: radial-gradient(circle at 35% 30%, #fff, #f1eee6 55%, #bdb6a6); outline: 1px solid var(--bord); }
.o-go .o-go-message { min-height: 3em; max-width: 64ch; font-weight: 700; font-size: 1.02rem; text-align: center; color: var(--texte); }
.o-go[data-phase="fini"] .o-go-message { color: var(--marque); }
.o-go .tirage-astuce { margin: 0; text-align: center; }

.o-go .o-go-plateau { width: min(100%, 640px); border-radius: 6px; touch-action: manipulation; }
.o-go .o-go-plateau:focus-visible { outline: 3px solid var(--marque); outline-offset: 3px; }
.o-go .o-go-plateau svg { display: block; width: 100%; height: auto; cursor: pointer; user-select: none; -webkit-user-select: none; }
.o-go .o-go-bois { fill: var(--o-go-bois); }
.o-go .o-go-lignes { fill: none; stroke: var(--o-go-trait); }
.o-go .o-go-cadre { fill: none; stroke: var(--o-go-trait); }
.o-go .o-go-hoshi { fill: var(--o-go-trait); }
.o-go .o-go-coord { fill: #4a3518; font-family: var(--police); font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.o-go .o-go-pierre.blanche { stroke: #8d8778; stroke-width: .03; }
.o-go .o-go-pierre.morte { opacity: .4; }
.o-go .o-go-dernier { fill: none; stroke-width: .08; }
.o-go .o-go-dernier.sur-noire { stroke: #fff; }
.o-go .o-go-dernier.sur-blanche { stroke: var(--o-go-dernier); }
.o-go .o-go-apercu { opacity: .45; pointer-events: none; }
.o-go .o-go-apercu.noire { fill: #111317; }
.o-go .o-go-apercu.blanche { fill: #fff; }
.o-go .o-go-terr.noir { fill: #111317; }
.o-go .o-go-terr.blanc { fill: #fff; stroke: #333; stroke-width: .03; }
.o-go .o-go-curseur { fill: none; stroke: #1d4ed8; stroke-width: .08; pointer-events: none; }
.o-go .o-go-plateau:not(:focus-visible) .o-go-curseur { display: none; }

.o-go .o-go-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.o-go .btn:focus-visible, .o-go select:focus-visible, .o-go input:focus-visible, .o-go textarea:focus-visible { outline: 3px solid var(--marque); outline-offset: 2px; }

.o-go .o-go-compte { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 420px); }
.o-go .o-go-compte table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.o-go .o-go-compte th, .o-go .o-go-compte td { padding: 5px 10px; border-bottom: 1px solid var(--bord); text-align: right; color: var(--texte); }
.o-go .o-go-compte th[scope="row"], .o-go .o-go-compte thead th:first-child { text-align: left; font-weight: 600; color: var(--texte-2); }
.o-go .o-go-compte td { font-family: var(--mono); }
.o-go .o-go-compte tr[data-go-ligne="total"] td, .o-go .o-go-compte tr[data-go-ligne="total"] th { font-weight: 700; color: var(--texte); }

.o-go .o-go-sgf { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--bord); }
.o-go .o-go-sgf > strong { font-size: .9rem; color: var(--texte-2); font-weight: 600; }
.o-go .o-go-sgf .o-go-actions { justify-content: flex-start; }
.o-go .o-go-sgf textarea { width: 100%; font: .85rem/1.4 var(--mono); }
.o-go .o-go-fichier { position: relative; display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.o-go .o-go-fichier input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.o-go .o-go-fichier:focus-within { outline: 3px solid var(--marque); outline-offset: 2px; }

@media (max-width: 520px) {
  .o-go .o-go-camp, .o-go .o-go-num { padding: 4px 10px; font-size: .85rem; }
  .o-go .o-go-actions .btn { flex: 1 1 40%; }
}
