/* Reversi */
.rv-score { display: flex; justify-content: center; gap: 22px; margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; }
.rv-chip { display: inline-flex; align-items: center; gap: 8px; }
.rv-chip i { width: 18px; height: 18px; border-radius: 50%; display: block; }
.rv-chip.b i { background: #15161c; box-shadow: inset 0 0 0 2px var(--line); }
.rv-chip.w i { background: #f6f6f2; box-shadow: inset 0 0 0 1px #0003; }
.rv-msg, #rv-msg[data-t="w"] { color: var(--a2); }
.rv-board {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px;
  width: min(100%, 500px); aspect-ratio: 1; margin: 0 auto; padding: 6px;
  background: #1f6b4a; border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.rv-sq { position: relative; border: 0; padding: 0; background: #2b8a5f; border-radius: 4px; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.rv-sq:hover { filter: brightness(1.08); }
.rv-disc { width: 80%; height: 80%; border-radius: 50%; transform: scale(0); transition: transform .18s ease, background .18s; }
.rv-sq.b .rv-disc { background: radial-gradient(circle at 35% 30%, #4a4d5c, #121318 60%); transform: scale(1); }
.rv-sq.w .rv-disc { background: radial-gradient(circle at 35% 30%, #fff, #d9dbe2 70%); transform: scale(1); }
.rv-sq.flip .rv-disc { animation: rv-flip .32s ease; }
@keyframes rv-flip { 0% { transform: scaleX(1); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.rv-sq.legal::after { content: ""; position: absolute; width: 22%; height: 22%; border-radius: 50%; background: rgba(0, 0, 0, .25); }
.rv-sq.last { box-shadow: inset 0 0 0 2px var(--a3); }

[data-theme="retro"] .rv-board { background: #000; border: 3px solid #000; gap: 2px; padding: 3px; box-shadow: inset 0 0 0 3px var(--a4), 6px 6px 0 #000; border-radius: 0; }
[data-theme="retro"] .rv-sq { background: #0d2b1c; border-radius: 0; }
[data-theme="retro"] .rv-disc { border-radius: 0; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
[data-theme="retro"] .rv-sq.b .rv-disc { background: var(--a1); box-shadow: 0 0 10px var(--a1); }
[data-theme="retro"] .rv-sq.w .rv-disc { background: var(--a2); }
[data-theme="retro"] .rv-chip.b i { background: var(--a1); border-radius: 0; }
[data-theme="retro"] .rv-chip.w i { background: var(--a2); border-radius: 0; }
[data-theme="retro"] .rv-sq.legal::after { background: var(--a4); border-radius: 0; width: 14%; height: 14%; opacity: .7; }
[data-theme="retro"] .rv-score { font-size: 12px; }

[data-theme="modern"] .rv-board { background: color-mix(in srgb, var(--a4) 70%, #000); }
[data-theme="modern"] .rv-sq { background: var(--a4); }

[data-theme="doodle"] .rv-board { background: var(--line); border-radius: var(--wob-2); border: 2.5px solid var(--line); gap: 2px; padding: 0; overflow: hidden; }
[data-theme="doodle"] .rv-sq { background: color-mix(in srgb, var(--a4) 22%, var(--c-bg)); border-radius: 0; }
[data-theme="doodle"] .rv-sq.b .rv-disc { background: repeating-linear-gradient(45deg, var(--line) 0 2px, #3b4566 2px 4px); border: 2px solid var(--line); border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%; }
[data-theme="doodle"] .rv-sq.w .rv-disc { background: #fff; border: 2px solid var(--line); border-radius: 48% 52% 46% 54% / 50% 46% 52% 48%; }
[data-theme="doodle"] .rv-chip.b i { background: var(--line); }
[data-theme="doodle"] .rv-chip.w i { background: #fff; border: 2px solid var(--line); }
[data-theme="doodle"] .rv-sq.last { box-shadow: inset 0 0 0 3px var(--a3); }
