html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#174A7E}button{font:inherit}.sp-board{font-family:Fredoka,system-ui,sans-serif;color:#174A7E}.sp-task{box-sizing:border-box;width:100%;height:100%;min-height:0;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;container-type:size}.sp-feedback{font-size:clamp(16px,2.2vmin,22px);line-height:1.2;max-width:45ch;text-align:center;background:#fff8e6;border-radius:12px;padding:7px 12px;margin:0;flex:none}.sp-feedback:empty{display:none}.sp-piece{box-sizing:border-box;border:2px solid #9e6f43;border-radius:12px;background:#fff8e6;color:#174A7E;min-width:48px;min-height:48px;padding:4px;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:pointer}.sp-piece img{width:100%;height:100%;object-fit:contain;pointer-events:none}.sp-piece>span{display:block;width:100%;height:100%;pointer-events:none}.sp-piece[aria-pressed=true]{outline:4px solid #f2c141;outline-offset:2px}.sp-board button:focus-visible,.sp-target:focus-visible,.sp-roll-field:focus-visible{outline:4px solid #174A7E;outline-offset:3px}.sp-target{cursor:pointer;touch-action:none}.sp-notice{outline:4px dashed #b5793b;outline-offset:1px}.sp-hand{position:fixed;z-index:80;width:48px;height:62px;object-fit:contain;pointer-events:none;max-width:none!important;max-height:none!important}.sp-hand[hidden]{display:none}.sp-goal{display:flex;align-items:center;justify-content:center;gap:14px;min-height:48px;padding:7px 20px;background:#fff8e6;border-radius:12px;flex:none}.sp-goal b{font-size:38px;line-height:1}.sp-dots{display:grid;grid-template-columns:repeat(4,12px);gap:7px}.sp-dots i{display:block;width:12px;height:12px;background:#174A7E;border-radius:50%}.sp-coin-scene{display:grid;grid-template-columns:minmax(130px,1fr) minmax(200px,1.5fr);gap:30px;align-items:center;justify-content:center;min-height:0;width:min(96%,800px);flex:1;max-height:75cqh}.sp-supply{box-sizing:border-box;min-width:0;min-height:100px;align-self:center;display:flex;flex-direction:column;align-items:center;gap:6px;background:#ecd3a6;border-radius:22px;padding:12px;box-shadow:0 4px 9px #2b3f2930}.sp-coin-grid{display:grid;grid-template-columns:repeat(5,var(--picnic-coin-cell));align-content:center;justify-content:center;gap:0}.sp-coin-grid .sp-piece{width:var(--picnic-coin-cell);height:var(--picnic-coin-cell);background:none;border:0;border-radius:50%;padding:2px}.sp-comparison{display:flex;gap:8px;align-items:center;justify-content:center;background:#fff8e6;padding:6px 10px;border-radius:12px;flex:none}.sp-comparison .sp-dots{grid-template-columns:repeat(4,7px);gap:4px}.sp-comparison .sp-dots i{width:7px;height:7px}.sp-route-card{display:flex;gap:14px;align-items:center;justify-content:center;min-height:48px;background:#fff8e6;padding:4px 14px;border-radius:12px;flex:none}.sp-route-card>span{display:flex;align-items:center;gap:4px;padding:2px}.sp-route-card img{width:42px;height:42px;object-fit:contain}.sp-route-card b{font-size:24px}.sp-visited{box-shadow:inset 0 -4px 0 #d49c25}.sp-roll-field{position:relative;width:min(98%,850px);min-height:150px;flex:1;max-height:60cqh;touch-action:none}.sp-roll-field svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.sp-roll-field polyline{fill:none;stroke-linecap:round;stroke-linejoin:round}.sp-road-edge{stroke:#b89d6b;stroke-width:142}.sp-road{stroke:#fff0c8;stroke-width:124}.sp-trail{stroke:#b77d33;stroke-width:8;stroke-dasharray:10 12}.sp-gate text{font-family:Fredoka,sans-serif;fill:#174A7E;font-size:44px;font-weight:600;paint-order:stroke;stroke:#fff8e6;stroke-width:9px}.sp-gate-visited image{filter:drop-shadow(0 3px 0 #cf9827)}.sp-roll-pot{position:absolute;width:100px;height:100px;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none}.sp-rolling-coin{position:absolute;width:56px;height:56px;border:0;background:transparent;transform:translate(-50%,-50%);padding:4px;touch-action:none;cursor:grab}.sp-rolling-coin img{width:100%;height:100%;object-fit:contain;pointer-events:none}.sp-steering{display:flex;align-items:center;justify-content:center;gap:8px;flex:none}.sp-steering button{min-width:48px;min-height:48px;border:2px solid #9e6f43;background:#fff8e6;color:#174A7E;border-radius:12px;font-size:23px;cursor:pointer}.sp-steering [data-tilt]{font-size:16px;padding:4px 8px}
@media(orientation:portrait){.sp-task{padding:5px 3px;gap:10px}.sp-coin-scene{grid-template-columns:minmax(100px,1fr) minmax(150px,1.35fr);gap:5px;width:100%;max-height:70cqh}.sp-coin-grid{grid-template-columns:repeat(2,48px)}.sp-supply{padding:8px 3px;min-height:90px}.sp-goal{padding:4px 12px;min-height:40px}.sp-goal b{font-size:30px}.sp-roll-field{max-height:60cqh}.sp-roll-pot{width:72px;height:85px}.sp-rolling-coin{width:48px;height:48px}.sp-steering{gap:5px}.sp-steering button{min-width:48px}.sp-feedback{font-size:16px;padding:5px 8px}}
@media(orientation:landscape) and (max-height:650px){.sp-task{gap:5px;padding:2px 6px}.sp-goal{position:absolute;left:0;top:0;z-index:1;min-height:40px;padding:4px 12px}.sp-goal b{font-size:28px}.sp-coin-scene{width:82%;margin-left:15%;max-height:95cqh;gap:10px;grid-template-columns:minmax(150px,1fr) minmax(250px,1.5fr)}.sp-supply{padding:4px;min-height:60px}.sp-coin-grid{grid-template-columns:repeat(5,48px)}.sp-comparison{position:absolute;left:0;bottom:10%;max-width:90px;flex-wrap:wrap;gap:3px}.sp-feedback{font-size:15px;padding:4px 8px;max-width:90%}.sp-route-card{position:absolute;left:0;top:0;padding:2px 8px;gap:6px;z-index:1}.sp-route-card img{width:34px;height:34px}.sp-route-card b{font-size:20px}.sp-roll-field{width:84%;margin-left:12%;max-height:74cqh;min-height:110px}.sp-steering{position:absolute;left:0;bottom:0;display:grid;grid-template-columns:repeat(2,48px);gap:4px}.sp-steering [data-tilt]{grid-column:1/-1;min-height:35px}.sp-roll-pot{width:74px;height:74px}.sp-route-card>img{width:34px;height:34px}}
.sp-coin-rows{display:flex;flex-direction:column;align-items:center;justify-content:center}.sp-coin-row{display:flex;align-items:center;justify-content:center}.sp-coin-rows .sp-piece{width:var(--picnic-coin-cell);height:var(--picnic-coin-cell);background:transparent;border:0;border-radius:50%;padding:3px;flex:none}.sp-steering [data-tilt]{min-height:48px}
@media(orientation:portrait){.sp-coin-scene{grid-template-columns:100px minmax(0,1fr);gap:4px;max-height:80cqh}.sp-supply{padding:4px 2px}.sp-board[data-kind="coins-for-the-picnic"] .sp-goal{align-self:flex-start}.sp-steering{display:grid;grid-template-columns:repeat(4,48px);gap:5px;align-self:flex-start}.sp-steering [data-tilt]{grid-column:1/span 2;min-height:48px}}
@media(orientation:landscape) and (max-height:650px){.sp-steering [data-tilt]{min-height:48px}.sp-board[data-kind="coins-for-the-picnic"] .sp-coin-scene{grid-template-columns:minmax(150px,1fr) minmax(240px,1.3fr)}}
.sp-coin-heading{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:64px;flex:none}
@media(orientation:portrait){.sp-board[data-kind="coins-for-the-picnic"] .sp-task{gap:5px;padding:3px 0}.sp-coin-heading{height:44px}.sp-coin-heading .sp-goal{box-sizing:border-box;height:40px;min-height:40px;padding:2px 12px;position:static}.sp-coin-scene{grid-template-columns:144px minmax(0,1fr);gap:4px;max-height:none}.sp-coin-scene .sp-supply{padding:2px 0;gap:0;background:#ecd3a6}.sp-coin-scene .sp-supply>span{display:none}.sp-coin-scene .sp-supply .sp-coin-grid{grid-template-columns:repeat(3,48px)}.sp-coin-scene.sp-full-pot{grid-template-columns:48px minmax(0,1fr)}.sp-coin-scene.sp-full-pot .sp-supply .sp-coin-grid{grid-template-columns:48px}.sp-board[data-kind="coins-for-the-picnic"] .sp-feedback{font-size:15px;padding:3px 6px}.sp-board[data-kind="coins-for-the-picnic"] .sp-comparison{position:absolute;right:0;top:0;font-size:13px;padding:2px 4px}}
@media(orientation:landscape) and (max-height:650px){.sp-coin-heading{position:absolute;left:0;top:0;width:140px;height:60px}.sp-coin-heading .sp-goal{position:static}.sp-board[data-kind="coins-for-the-picnic"] .sp-coin-scene{width:82%;margin-left:17%}}

@media(orientation:portrait){.sp-board[data-kind="rainbow-roll"] .sp-task{gap:5px}.sp-board[data-kind="rainbow-roll"] .sp-steering{display:flex;order:0;align-self:center;gap:5px}.sp-board[data-kind="rainbow-roll"] .sp-steering [data-tilt]{min-width:48px;min-height:48px;grid-column:auto}.sp-board[data-kind="rainbow-roll"] .sp-route-card{order:1;box-sizing:border-box;height:42px;min-height:42px;padding:2px 10px}.sp-board[data-kind="rainbow-roll"] .sp-route-card img{width:34px;height:34px}.sp-board[data-kind="rainbow-roll"] .sp-roll-field{order:2;min-height:100px;max-height:none}.sp-board[data-kind="rainbow-roll"] .sp-feedback{order:-1}}


.wm-guide-wrap .wm-guide-image { display: none; }

.sp-board[data-kind="coins-for-the-picnic"] {
  --picnic-coin-cell: clamp(48px, 10cqh, 60px);
  --pim-width: 420px;
  --pim-lane: 286px;
}

.sp-coin-heading .sp-coin-actor {
  position: absolute;
  top: 2px;
  left: calc(11px - .14 * var(--pim-width));
  width: var(--pim-width);
  max-width: none;
  max-height: none;
  pointer-events: none;
}

@media (orientation: landscape) and (min-width: 950px), (orientation: landscape) and (min-height: 651px) {
  .sp-board[data-kind="coins-for-the-picnic"] .sp-coin-scene {
    width: min(calc(100% - var(--pim-lane)), 800px);
    margin-inline-start: var(--pim-lane);
  }
}

@media (orientation: portrait) {
  .sp-board[data-kind="coins-for-the-picnic"] { --pim-width: min(316px, 67cqh); }
  .sp-coin-heading {
    height: calc(.57 * var(--pim-width));
    align-items: flex-start;
    justify-content: flex-end;
    padding-inline-end: 8px;
  }
  .sp-board[data-kind="coins-for-the-picnic"] .sp-comparison { top: 53px; right: 8px; }
}

@media (orientation: portrait) and (max-height: 670px) {
  .sp-board[data-kind="coins-for-the-picnic"] { --pim-width: min(220px, 54cqh); }
  .sp-coin-heading { height: calc(.70 * var(--pim-width)); justify-content: flex-start; padding-inline: 8px; }
  .sp-coin-heading .sp-coin-actor { left: auto; right: calc(11px - .14 * var(--pim-width)); }
  .sp-board[data-kind="coins-for-the-picnic"] .sp-feedback { position: absolute; top: 48px; left: 8px; max-width: 55%; font-size: 14px; }
  .sp-board[data-kind="coins-for-the-picnic"] .sp-comparison { top: 107px; right: auto; left: 8px; }
}

@media (orientation: portrait) and (max-height: 670px) and (max-width: 350px) {
  .sp-coin-heading:has(+ .sp-full-pot) { height: calc(.80 * var(--pim-width)); }
}

@media (orientation: portrait) and (min-height: 671px) and (max-height: 785px) {
  .sp-coin-heading { height: calc(.74 * var(--pim-width)); }
}

@media (orientation: landscape) and (max-height: 650px) {
  .sp-board[data-kind="coins-for-the-picnic"] { --pim-width: min(420px, max(112px, calc(109cqh - 56px))); }
  .sp-coin-heading .sp-coin-actor { top: 50px; }
}

@media (orientation: landscape) and (max-width: 949px) {
  .sp-board[data-kind="coins-for-the-picnic"] { --pim-width: min(420px, 24vw, max(112px, calc(109cqh - 56px))); --pim-lane: min(190px, 21vw); }
}

@media (orientation: landscape) and (max-width: 949px) and (min-height: 651px) {
  .sp-board[data-kind="coins-for-the-picnic"] { --pim-width: min(420px, 48vw); --pim-lane: calc(12px + .67 * var(--pim-width)); }
  .sp-coin-grid { grid-template-columns: repeat(3, var(--picnic-coin-cell)); }
}

.sp-coin-grid .sp-piece img, .sp-coin-rows .sp-piece img { max-width: none; max-height: none; }

.sp-pot {
  position: relative;
  width: min(100%, 100cqh, 430px);
  aspect-ratio: 720 / 529;
  justify-self: center;
}

.sp-pot > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px #26351658);
}

.sp-pot-inside {
  position: absolute;
  inset: 5% 0 19%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep the touch targets full size as the outer coins follow the rim. */
.sp-full-pot .sp-coin-row img { translate: var(--coin-x, 0px) var(--coin-y, 0px); }
.sp-full-pot .sp-coin-row:first-child { --coin-y: var(--coin-inset, 0px); }
.sp-full-pot .sp-coin-row:last-child { --coin-y: calc(-1 * var(--coin-inset, 0px)); }
.sp-full-pot .sp-coin-row .sp-piece:first-child:not(:only-child) { --coin-x: var(--coin-inset, 0px); }
.sp-full-pot .sp-coin-row .sp-piece:last-child:not(:only-child) { --coin-x: calc(-1 * var(--coin-inset, 0px)); }

.sp-count {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 12px;
  background: #174A7E;
  color: #fff8e6;
  font-size: clamp(19px, 3.8vmin, 24px);
  line-height: 1;
}

@media (orientation: portrait) {
  .sp-board[data-kind="coins-for-the-picnic"] { --picnic-coin-cell: 48px; }
  .sp-pot { width: min(100%, 324px); }
}

@media (orientation: portrait) and (max-width: 410px) {
  .sp-pot { --coin-inset: 8px; }
  .sp-coin-scene:not(.sp-full-pot) { grid-template-columns: 96px minmax(0, 1fr); }
  .sp-coin-scene:not(.sp-full-pot) .sp-supply .sp-coin-grid { grid-template-columns: repeat(2, 48px); }
  .sp-coin-rows .sp-piece { padding: 5px; }
}

@media (orientation: portrait) and (max-width: 350px) {
  .sp-coin-rows .sp-piece { padding: 7px; }
  .sp-coin-scene:not(.sp-full-pot) .sp-coin-rows .sp-piece { padding: 8px; }
}

@media (orientation: landscape) and (max-height: 650px) {
  .sp-board[data-kind="coins-for-the-picnic"] { --picnic-coin-cell: 48px; }
  .sp-pot { width: min(100%, calc(136cqh - 5px), 322px); }
}

@media (orientation: landscape) and (max-height: 520px) {
  .sp-pot { --coin-inset: 10px; }
  .sp-coin-rows .sp-piece { padding: 5px; }
  .sp-full-pot .sp-coin-rows .sp-piece { padding: 9px; }

  .sp-board[data-kind="coins-for-the-picnic"] .sp-feedback {
    position: absolute;
    top: 2px;
    left: 20%;
    z-index: 1;
    max-width: 35%;
  }

  .sp-board[data-kind="coins-for-the-picnic"] .sp-comparison {
    left: 20%;
    bottom: 2px;
    max-width: 36%;
  }
}
