#path-game {--ink:#1c2b22;--muted:#58665b;--lime:#c5ef69;--board:#192a21;width:min(100%,560px);margin:0 auto;text-align:left;}
.path-panel {
  min-width: 0;
  padding: clamp(16px, 4vw, 28px);
  border: 1px solid #dce0d2;
  border-radius: 24px;
  background: #fffef7;
  box-shadow: 0 12px 40px #1c2b2209;
}
.path-eyebrow { margin: 0 0 6px; color: #556d40; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
#path-title { margin: 0; font-size: clamp(32px, 7vw, 42px); line-height: 1.15; letter-spacing: -1.2px; font-weight: 800; }
.path-intro { margin: 12px 0 0; max-width: 34ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.path-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 24px; }
.path-level-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
#path-level { min-width: 132px; max-width: 100%; min-height: 44px; padding: 8px 30px 8px 12px; color: var(--ink); background-color: #f5f6ed; border: 1px solid #cbd3c2; border-radius: 9px; font-size: 15px; font-weight: 800; }
.path-progress { display: flex; flex-direction: column; gap: 1px; margin: 0 0 1px; font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; }
#path-count { font-size: 26px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }

#path-board {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  margin: 20px auto 0;
  padding: 0;
  background: var(--board);
  border-radius: 18px;
  outline: 1px solid #14251b;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#path-svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
#path-line { fill: none; stroke: var(--lime); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
#path-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  padding: 6px;
  gap: 12px;
}
.path-cell {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 1px solid #4c6352;
  border-radius: 12px;
  background: #2c4234;
  color: #f3f5e4;
  font-size: clamp(19px, 5vw, 26px);
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms;
}
.path-cell.is-blocked { border-color: #283e30; background: #1e3226; cursor: default; opacity: 1; }
.path-cell.is-blocked::before { content: ""; position: absolute; top: calc(50% - 2px); left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 1px; background: #3d5543; }
.path-cell.is-finish { border: 2px solid #eeeccf; background: #344b39; }
.path-cell.is-visited { border-color: var(--lime); background: var(--lime); color: #192a21; }
.path-cell.is-tip { box-shadow: inset 0 0 0 2px #fffef7; }
.path-cell:focus-visible { outline: 3px solid #ffd681; outline-offset: 2px; }
.path-legend { display: flex; justify-content: center; gap: 20px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.path-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-start, .legend-finish { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 5px; font-size: 11px; line-height: 1; font-weight: 800; }
.legend-start { color: var(--ink); background: var(--lime); }
.legend-finish { color: #fffef7; background: #344b39; border: 1px solid #344b39; }
#path-status { min-height: 3em; margin: 18px 0 14px; color: #415345; font-size: 15px; font-weight: 700; line-height: 1.5; }
#path-game[data-complete="true"] #path-status { color: #375b1d; }
.path-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.path-action { min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd3c2; border-radius: 10px; color: var(--ink); background: #f1f3e9; font-size: 15px; font-weight: 800; cursor: pointer; }
.path-action-primary { grid-column: 1 / -1; border-color: var(--ink); color: #fffef7; background: var(--ink); }
.path-action:disabled { color: #697366; background: #e8ebdf; border-color: #d9dfcf; cursor: default; }
.path-action:focus-visible, #path-level:focus-visible { outline: 3px solid #668e2c; outline-offset: 3px; }
.path-instructions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e6d8; color: var(--muted); font-size: 13px; line-height: 1.6; }
.path-instructions p { margin: 0; }
.path-instructions p + p { margin-top: 6px; }
.path-noscript { color: #793713; font-size: 14px; }
@media (max-width:400px){#path-game{padding:12px}}
@media (min-width:480px){.path-actions{grid-template-columns:1fr 1fr 1.25fr}.path-action-primary{grid-column:auto}}
@media (prefers-reduced-motion:reduce){#path-game *,#path-game *::before,#path-game *::after{transition:none!important;animation:none!important}}
