.jp-nc-game { width: min(100%, 520px); margin-inline: auto; display: grid; gap: 1rem; }
.jp-nc-options, .jp-nc-scores, .jp-nc-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.jp-nc-options label { flex: 1 1 130px; display: grid; gap: .35rem; }
.jp-nc-scores span { flex: 1 1 75px; text-align: center; padding: .6rem; border: 1px solid var(--jp-border); border-radius: 8px; }
.jp-nc-scores strong { display: block; font-size: 1.4rem; }
#ncStatus { text-align: center; font-weight: 600; margin: 0; min-height: 1.5em; }
.jp-nc-board { width: min(100%, 360px); margin-inline: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.jp-nc-cell { aspect-ratio: 1; min-width: 0; border: 1px solid var(--jp-border); border-radius: 10px; background: var(--jp-surface-soft); color: var(--jp-text); font: inherit; font-size: clamp(2rem,10vw,4rem); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.jp-nc-cell[data-mark="X"] { color: #2563eb; }
.jp-nc-cell[data-mark="O"] { color: #b45309; }
.jp-nc-cell[aria-disabled="true"] { cursor: default; }
.jp-nc-cell:focus-visible { outline: 3px solid var(--jp-primary); outline-offset: 2px; }
.jp-nc-cell.is-winning { background: #dcfce7; color: #166534; border: 2px solid #166534; }
.jp-nc-actions button { min-height: 44px; }

#ncSoloPanel[hidden], #ncOnlinePanel[hidden], #ncOnlineBoard[hidden], #ncLobby [hidden] { display: none !important; }
#ncModes { margin-bottom: 1rem; }
#ncModes [aria-pressed="true"] { outline: 2px solid currentColor; }
#ncLobby { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
#ncLobby p, #ncLobby input { flex: 1 1 100%; min-width: 0; }
#ncOnlineStatus { text-align: center; font-weight: 600; }

:root[data-theme="dark"] .jp-nc-cell[data-mark="X"] { color: #93c5fd; }
:root[data-theme="dark"] .jp-nc-cell[data-mark="O"] { color: #fcd34d; }
:root[data-theme="dark"] .jp-nc-cell.is-winning { background: #183628; color: #86efac; border-color: #86efac; }
