/* Reversi (site 1.71.0) */
.rv-score{display:flex;justify-content:space-between;gap:.6rem;padding:.45rem .6rem;margin-bottom:.6rem}
.rv-side{display:flex;align-items:center;gap:.5rem;padding:.2rem .5rem;border-radius:8px;border:1px solid transparent;font-size:.85rem}
.rv-side>span:last-child{display:flex;flex-direction:column;line-height:1.2}
.rv-side .tc-lcd{font-size:1.1rem;align-self:flex-start}
.rv-side.on{border-color:var(--tf-hot,#ff3d9a);box-shadow:0 0 12px rgba(255,61,154,.35)}
.rv-disc{display:inline-block;width:26px;height:26px;border-radius:50%}
.rv-disc.b{background:radial-gradient(circle at 35% 30%,#555,#000 70%);box-shadow:0 0 0 2px #3fd0ff}
.rv-disc.w{background:radial-gradient(circle at 35% 30%,#fff,#cfd6e0 70%);box-shadow:0 0 0 2px #ff3d9a}
.rv-wrap{display:flex;justify-content:center}
.rv-board{--sq:min(62px,calc((100vw - 48px)/8));display:grid;grid-template-columns:repeat(8,var(--sq));grid-auto-rows:var(--sq);gap:3px;padding:8px;border-radius:12px;
  background:linear-gradient(145deg,#06263a,#0b1a33);box-shadow:inset 0 0 0 1px rgba(63,208,255,.4),0 0 24px rgba(63,208,255,.15);user-select:none;-webkit-user-select:none}
.rv-sq{position:relative;padding:0;border:0;border-radius:6px;cursor:default;background:radial-gradient(circle at 50% 40%,#0f5a4a,#083a33);
  box-shadow:inset 0 0 0 1px rgba(94,224,143,.25);perspective:300px;-webkit-tap-highlight-color:transparent}
.rv-sq:focus-visible{outline:2px solid var(--tf-hot,#ff3d9a);outline-offset:1px;z-index:1}
.rv-sq.legal{cursor:pointer}
.rv-sq.legal::before{content:'';position:absolute;inset:38%;border-radius:50%;background:rgba(63,208,255,.55);box-shadow:0 0 10px rgba(63,208,255,.8)}
.rv-board.white .rv-sq.legal::before{background:rgba(255,61,154,.55);box-shadow:0 0 10px rgba(255,61,154,.8)}
.rv-board.nomoves .rv-sq.legal::before{display:none}
.rv-sq.legal:hover::before{inset:22%}
.rv-sq.last{box-shadow:inset 0 0 0 2px #ffd36b}
.rv-sq.hint{animation:rv-hint 1s ease-in-out 3}
.rv-d{position:absolute;inset:9%;border-radius:50%;transform-style:preserve-3d;transition:transform .42s cubic-bezier(.3,1.4,.5,1)}
.rv-d::before,.rv-d::after{content:'';position:absolute;inset:0;border-radius:50%;backface-visibility:hidden}
.rv-d::before{background:radial-gradient(circle at 35% 30%,#5a5a5a,#000 70%);box-shadow:0 0 0 2px rgba(63,208,255,.7),0 3px 6px rgba(0,0,0,.5)}
.rv-d::after{background:radial-gradient(circle at 35% 30%,#fff,#c9d1dc 70%);box-shadow:0 0 0 2px rgba(255,61,154,.7),0 3px 6px rgba(0,0,0,.5);transform:rotateY(180deg)}
.rv-d.w{transform:rotateY(180deg)}
.rv-d.new{animation:rv-drop .3s ease-out}
.rv-keys{margin:.5rem 0 0;text-align:center;font-size:.76rem;color:var(--muted,#9FB0C6)}
@media (pointer:coarse){.rv-keys{display:none}}
@keyframes rv-drop{from{opacity:0;scale:1.5}to{opacity:1;scale:1}}
@keyframes rv-hint{50%{box-shadow:inset 0 0 0 3px #ffd36b,0 0 16px #ffd36b}}
@media (prefers-reduced-motion:reduce){.rv-d{transition:none}.rv-d.new,.rv-sq.hint{animation:none}.rv-sq.hint{box-shadow:inset 0 0 0 3px #ffd36b}}
/* classic look: green felt board, flat discs, grey frame */
body.tc-on .rv-board{background:#808080;box-shadow:inset -2px -2px #fff,inset 2px 2px #404040;border-radius:0;gap:1px;padding:4px}
body.tc-on .rv-sq{border-radius:0;background:#008000;box-shadow:none}
body.tc-on .rv-sq.last{box-shadow:inset 0 0 0 2px #ffff00}
body.tc-on .rv-sq.legal::before,body.tc-on .rv-board.white .rv-sq.legal::before{background:rgba(255,255,255,.45);box-shadow:none;inset:42%}
body.tc-on .rv-d::before{background:#000;box-shadow:none}
body.tc-on .rv-d::after{background:#fff;box-shadow:none}
body.tc-on .rv-disc.b{background:#000;box-shadow:none}
body.tc-on .rv-disc.w{background:#fff;box-shadow:0 0 0 1px #000}
body.tc-on .rv-side.on{border-color:#000080;box-shadow:none;background:#c0c0c0}
