/* One Stroke board: lines, a live pen with a glowing trail, and corners. */
.os-stage { display: flex; justify-content: center; }
.os-board { display: block; width: min(100%, 440px); height: auto; aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 14px; background: radial-gradient(circle at 50% 45%, #273942, #1d2b32 75%); border: 1px solid #40555f; }
.os-board.is-locked { cursor: default; }

.os-river { fill: #173f45; }
.os-land { fill: #2c404b; }
.os-edge { fill: none; stroke: #4f6875; stroke-width: 7; stroke-linecap: round; }
.os-drawn { fill: none; stroke: #f0d78c; stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 5px #f0d78c88); }
.os-drawn.is-new { animation: os-shine .9s ease-out; }
.os-rubber { stroke: #f7e5b0; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 10; opacity: .85; pointer-events: none; }
.os-halo { fill: url(#os-halo-gradient); pointer-events: none; transition: r .15s; }
.os-halo.is-near { r: 34; }
.os-spark { fill: #f7e3a6; pointer-events: none; animation: os-spark .7s ease-out forwards; }
.os-burst { fill: none; stroke: #f0d78c; stroke-width: 3; pointer-events: none; animation: os-burst .55s ease-out forwards; }

.os-node { cursor: pointer; }
.os-node circle.dot { fill: #2b3e48; stroke: #8ca1ab; stroke-width: 2.5; transition: fill .2s, stroke .2s; }
.os-node circle.ring { fill: none; stroke: #f7e5b0; stroke-width: 2; opacity: 0; }
/* Corners stay filled once the pen has been through them; the colour
   changes with each further visit. The pen's corner is brightest. */
.os-node.visit-1 circle.dot { fill: #c9b26a; stroke: #e8d49a; }
.os-node.visit-2 circle.dot { fill: #6fbfa6; stroke: #f7e4ac; }
.os-node.visit-3 circle.dot { fill: #e0906a; stroke: #f6c3a6; }
.os-node.is-current circle.dot { fill: #fff6c9; stroke: #fff; filter: drop-shadow(0 0 6px #ffefbe); }
.os-node.is-current circle.ring { opacity: .9; stroke: #f0d78c; animation: os-pulse 1.4s ease-in-out infinite; }
.os-node.is-next circle.dot { stroke: #f7e5b0; stroke-width: 3; }
.os-node.is-next circle.ring { opacity: .7; animation: os-pulse 1.4s ease-in-out infinite; }
.os-node.is-selected circle.dot { fill: #f3d783; stroke: #f7f4ed; }
.os-node.is-odd circle.dot { stroke: #f2cc5a; stroke-width: 3.5; }
.os-node:focus { outline: none; }
.os-node:focus-visible circle.dot { stroke: #f0d78c; stroke-width: 4; }
/* Keyboard focus: a steady white dashed ring, so it never looks like the pulsing "next corner" ring. */
.os-node:focus-visible circle.ring { opacity: 1; stroke: #fff; stroke-width: 3; stroke-dasharray: 6 4; animation: none; }
.secret-locked { margin: 0; padding: 12px 16px; border: 1px dashed #c9bfa7; border-radius: 10px; color: #4b5b63; font-size: .9375rem; }
#level-title:focus { outline: none; }
.os-badge circle { fill: #e8d7a3; }
.os-badge.is-odd circle { fill: #f2cc5a; }
.os-badge text { font: 700 13px var(--sans); fill: #2f414a; text-anchor: middle; }
.os-label { font: 600 12px var(--sans); fill: #aab9c1; text-anchor: middle; pointer-events: none; }

.visit-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: #4b5b63; font-size: .8125rem; }
.visit-legend span { display: inline-flex; align-items: center; gap: 6px; }
.visit-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.predict-panel { margin: 0 0 14px; padding: 14px 16px; border: 1px solid #d6cfbf; border-radius: 10px; background: #fffdf8; }
.predict-question { margin: 0 0 10px; color: #22313a; font-weight: 600; }
.predict-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.predict-button { min-height: 44px; padding: 9px 16px; border: 1px solid #d6cfbf; border-radius: 7px; background: #f6f2e9; color: #7d5a10; font-size: .9375rem; }
.predict-button:hover:not(:disabled) { background: #f6f2e9; border-color: #efcc61; }
.predict-button:disabled { opacity: .4; cursor: default; }
.predict-panel .check-button { margin-top: 12px; }

@keyframes os-pulse { 50% { opacity: .15; } }
@keyframes os-spark { to { opacity: 0; r: .5; } }
@keyframes os-burst { from { r: 10; opacity: 1; } to { r: 34; opacity: 0; } }
@keyframes os-shine { 0% { stroke: #fff9e6; filter: drop-shadow(0 0 12px #ffefbe); } 100% { stroke: #f0d78c; } }

@media (prefers-reduced-motion: reduce) {
  .os-node circle.ring, .os-drawn.is-new, .os-spark, .os-burst { animation: none; }
  .os-spark, .os-burst { display: none; }
}
