/* Pebble Path: stone tiles with water channels. First-party CSS only, no images, no animation.
   Tile colours are fixed so they read the same in Meadow and Dusk; the frame follows the theme. */
/* The shared readable layer sets a dark --muted on :root, which would hide hint text in Dusk. Restore Dusk's own value here. */
html[data-calm-theme="dusk"] { --muted: #A9B8B8; }
.hint { color: var(--muted); font-size: .95rem; }
.notice { padding: .6rem .8rem; border: var(--line) dashed var(--border); border-radius: var(--radius-sm); background: var(--note); }
.confirm { margin-top: .75rem; padding: .6rem .8rem; border: var(--line) solid var(--border); border-radius: var(--radius-sm); background: var(--note); }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.game-footer { margin-top: 1.5rem; }
.game-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; }

/* Tile size is set from the screen width, not the newer ratio property, so it also works on iOS Safari 14.
   72px covers the page and panel padding; boards are 3, 4 or 5 tiles wide and tiles never go under 44px at 320px. */
.board { --n: 4; --gap: 2px; --tile: min(5.5rem, calc((100vw - 72px - (var(--n) - 1) * var(--gap)) / var(--n))); display: grid; gap: var(--gap); width: max-content; max-width: 100%; margin: 0 auto; padding: var(--gap); border: var(--line) solid var(--border); border-radius: var(--radius); background: var(--border); box-shadow: var(--shadow); }
.board-row { display: grid; grid-template-columns: repeat(var(--n), var(--tile)); gap: var(--gap); }
.tile { position: relative; display: flex; align-items: center; justify-content: center; width: var(--tile); height: var(--tile); min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 4px; box-shadow: none; background: #e3d5b0; font: inherit; line-height: 1; color: #12261a; cursor: pointer; }
.tile.is-wet { background: #cfe3ea; }
.tile:active { transform: none; box-shadow: none; }
.tile:focus { outline: 4px solid var(--focus); outline-offset: -4px; z-index: 1; }
.channel { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.channel::before, .channel::after { content: ""; position: absolute; background: #7a6a45; }
.is-wet .channel::before, .is-wet .channel::after { background: #2b6f8f; }
/* Straight: a bar from top to bottom. Corner: a bar from the top to the middle and from the middle to the right. */
.channel::before { top: 0; left: 37%; width: 26%; height: 100%; }
.channel.corner::before { height: 63%; }
.channel.corner::after { top: 37%; left: 37%; width: 63%; height: 26%; }
.turn-1 { transform: rotate(90deg); }
.turn-2 { transform: rotate(180deg); }
.turn-3 { transform: rotate(270deg); }
.tile .wave { position: absolute; top: 2px; right: 4px; font-size: .9rem; font-weight: 700; pointer-events: none; }
.tile .edge { position: absolute; top: 50%; margin-top: -.6rem; font-size: 1.1rem; font-weight: 700; pointer-events: none; }
.tile .edge.in { left: 2px; }
.tile .edge.out { right: 2px; }

.status { min-height: 1.7rem; margin: .75rem 0; }
.actions { margin-top: .5rem; }
.panel.board-panel { padding-left: .75rem; padding-right: .75rem; }

.sizes { border: 0; margin: 0; padding: 0; }
.sizes legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
.size-option { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .4rem .9rem; border: var(--line) solid var(--border); border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.size-option input { width: 1.5rem; height: 1.5rem; flex: none; }
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } .channel::before, .channel::after { background: CanvasText; } }
