/* ==============================================================
   STONE STACKING · page styles
   File: /stone-stacking/stone-stacking.css
   Colours, font and buttons come from site.css.
   The "How it helps" section uses shared styles (site.css, section 13).
   Scene and stone colours live in stone-stacking.js (section 1).

   Sections:
     1  Layout and intro
     2  The riverbank
     3  Controls
   ============================================================== */


/* --------------------------------------------------------------
   1 · LAYOUT AND INTRO
   -------------------------------------------------------------- */
.riverbank {
  padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
  background: linear-gradient(var(--c-sky-top), var(--bg));
}
.riverbank__intro { max-width: 44rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.riverbank__title {
  margin-bottom: .35em;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
  font-weight: var(--weight-light);
  letter-spacing: -.025em;
}
.riverbank__lede {
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}


/* --------------------------------------------------------------
   2 · THE RIVERBANK
   -------------------------------------------------------------- */
.bank {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 76svh;
  margin-inline: auto;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #CFDDE0;
}
@media (max-width: 700px) {
  .bank { aspect-ratio: 60 / 76; }
}
.bank canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;             /* dragging a stone doesn't scroll the page */
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.bank canvas.is-over-stone { cursor: grab; }
.bank canvas.is-dragging { cursor: grabbing; }

.bank__count {
  position: absolute;
  left: 50%;
  top: .8rem;
  padding: .25rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #22323A;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.bank-hint {
  margin-top: .75rem;
  text-align: center;
  font-size: var(--step--1);
  color: var(--muted);
}


/* --------------------------------------------------------------
   3 · CONTROLS
   -------------------------------------------------------------- */
.stack-panel {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.stack-panel__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.stack-panel__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.stack-panel__best {
  font-size: var(--step--1);
  color: var(--muted);
}
.stack-status {
  min-height: 1.65em;
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .stack-panel__actions .btn { flex: 1 1 100%; }
}
