/* gate.css — owner: js/gate.js
   Only .gate-* names live here. The dialog shell itself (.dialog, .dialog-*) belongs to
   components.css and is never redefined; this file styles what goes inside the card.
   Every colour is a token from base.css. */

.gate,
.gate-stack{
  display:flex; flex-direction:column; gap:var(--sp-3);
}

/* ============================================================== grown-ups === */

/* The number, spelled out. Big enough to read across a kitchen table and held apart
   from the body copy, because it is the thing being asked for, not an explanation. */
.gate-words{
  padding:var(--sp-3);
  border:2px solid var(--line); border-radius:var(--r-md);
  background:var(--bg);
  font-size:19px; font-weight:800; line-height:1.3; text-align:center;
  color:var(--ink);
}

.gate-input{
  width:100%;
  min-height:56px;
  padding:var(--sp-2) var(--sp-3);
  border:2px solid var(--line); border-radius:var(--r-md);
  background:var(--surface); color:var(--ink);
  font-family:inherit; font-size:26px; font-weight:800; line-height:1;
  text-align:center; letter-spacing:.22em; text-indent:.22em;
}
.gate-input:focus-visible{ border-color:var(--brand); }

.dialog-error{
  margin:0;
  font-size:13px; font-weight:700; line-height:1.3;
  color:var(--bad);
}
.dialog-error[hidden]{ display:none; }

/* ================================================================ climbers === */

/* Slots fill left to right as the pad is tapped, so a child who cannot count still
   sees how many are left. */
.gate-slots{
  display:flex; justify-content:center; gap:var(--sp-2);
}
.gate-slot{
  display:grid; place-items:center;
  width:52px; height:52px;
  border:2px dashed var(--line); border-radius:var(--r-md);
  background:var(--bg);
  font-size:28px; line-height:1;
}
.gate-slot.is-on{
  border-style:solid; border-color:var(--brand);
  background:var(--brand-soft);
}

.gate-pad{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:var(--sp-2);
}
.gate-key{
  display:grid; place-items:center;
  min-height:64px; padding:var(--sp-2);
}
.gate-key-glyph{ font-size:30px; line-height:1; }

.gate-undo,
.gate-forgot{
  font-size:14px;
}

@media (max-width:359px){
  .gate-slot{ width:44px; height:44px; font-size:24px; }
  .gate-key{ min-height:56px; }
  .gate-key-glyph{ font-size:26px; }
  .gate-words{ font-size:17px; }
}
