/* Doublet — a ladder of word-tiles down the page. */

.doublet-frame {
  width: min(520px, 96vw);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vw, 16px);
  padding: clamp(14px, 2.6vw, 22px);
  align-items: center;
}
.case-eyebrow {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  color: var(--ink-light);
  margin: 0;
}
.charge {
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(15px, 2.2vw, 17.5px);
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
}
.charge b { color: var(--oxblood); font-weight: 600; letter-spacing: .12em; }

/* ---- the ladder ---- */
.ladder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.rung {
  display: grid;
  grid-template-columns: repeat(4, clamp(44px, 11vw, 56px));
  gap: 7px;
  padding: 0;
  background: none;
  border: none;
  cursor: default;
  position: relative;
}
.rung .cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 5vw, 28px);
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(246, 238, 214, .6);
  box-shadow: inset 0 0 0 1.5px rgba(122, 104, 80, .45);
  transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.rung.fixed .cell {
  background: radial-gradient(circle at 36% 30%, rgba(227, 183, 84, .5), rgba(200, 156, 58, .35));
  box-shadow: inset 0 0 0 1.5px rgba(156, 120, 38, .7);
  color: var(--ink);
}
.rung.set { cursor: pointer; }
.rung.set:hover .cell { background: rgba(246, 238, 214, .95); }
.rung.set .cell.changed { box-shadow: inset 0 0 0 2px rgba(90, 26, 31, .6); color: var(--oxblood); }
.rung.active .cell { background: var(--cream); box-shadow: inset 0 0 0 2px rgba(90, 26, 31, .55); }
.rung.active .cell.ghost { color: rgba(107, 90, 72, .45); font-style: italic; }
.rung.active .cell.caret { box-shadow: inset 0 0 0 2.5px var(--oxblood); }
.rung.shake { animation: dbl-shake .3s var(--ease); }
@keyframes dbl-shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.gap-dots {
  font-family: var(--display);
  color: var(--ink-light);
  letter-spacing: .5em;
  font-size: 18px;
  line-height: 1;
  margin: -2px 0;
}

.legend {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-light);
}
.frame-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#ghost-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
}

.help-body { text-align: left; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.help-body p { margin: 0 0 12px; }
.help-body b { color: var(--oxblood); }
.overlay-next {
  margin: 14px 0 0;
  font-family: var(--hand);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-light);
}
.overlay-stats .ladder-echo {
  display: block;
  font-family: var(--caps);
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--ink-light);
}

.game-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 20, 16, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 40;
}
.game-toast.on { opacity: 1; transform: translateX(-50%); }
