/* ---------- Beehive ---------- */

:root {
  --honey: #d9a92f;
  --honey-dim: #6b5316;
}

.stage { justify-content: flex-start; gap: 10px; padding: 8px var(--pad) 0; }

/* ---------- rank + score ---------- */

.rank {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.rank__name {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  min-width: 76px;
}

.rank__track {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  background: var(--surface-3);
  border-radius: 1px;
}

.rank__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--honey);
  border-radius: 1px;
  transition: width .35s var(--ease);
}

.rank__dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--honey);
  color: #2a1f00;
  font-size: 12px;
  font-weight: 750;
  display: grid;
  place-items: center;
  transition: left .35s var(--ease);
}

/* ---------- found words strip ---------- */

.found {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
}

.found__count {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.found__list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-2);
  text-transform: capitalize;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
}

.found__chev { flex: 0 0 auto; color: var(--muted); }
.found__chev svg { width: 16px; height: 16px; display: block; }

/* ---------- current entry ---------- */

.entry {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
}
.entry__ctr { color: var(--honey); }
.entry__bad { color: var(--muted); }

.entry__caret {
  width: 2px;
  height: 28px;
  margin-left: 1px;
  background: var(--honey);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.entry.is-shake { animation: nudge .32s; }
@keyframes nudge {
  25% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
}

/* ---------- the hive ---------- */

.hive-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hive {
  position: relative;
  width: calc(var(--hex-h, 78px) * 2.598);
  height: calc(var(--hex-h, 78px) * 2.5);
}

.hex {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--hex-h, 78px) * .866);
  height: var(--hex-h, 78px);
  /* pointy-top hexagon */
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--surface-3);
  color: var(--text);
  font-size: calc(var(--hex-h, 78px) * .34);
  font-weight: 700;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  transition: filter .1s;
}
.hex--center { background: var(--honey); color: #2a1f00; }
.hex:active { filter: brightness(1.35); }
.hex--center:active { filter: brightness(.9); }

/* Positions of the flower: centre, then E, W, NE, NW, SE, SW.
   Percentages are of the hex's own box, so they hold at every size. */
.hex.p0 { transform: translate(-50%,  -50%) scale(.94); }
.hex.p1 { transform: translate(50%,   -50%) scale(.94); }
.hex.p2 { transform: translate(-150%, -50%) scale(.94); }
.hex.p3 { transform: translate(0,    -125%) scale(.94); }
.hex.p4 { transform: translate(-100%,-125%) scale(.94); }
.hex.p5 { transform: translate(0,      25%) scale(.94); }
.hex.p6 { transform: translate(-100%,  25%) scale(.94); }

/* ---------- controls ---------- */

.hive-ctl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 4px;
}
.hive-ctl .btn { min-width: 96px; }
.hive-ctl .btn--round {
  min-width: 46px;
  width: 46px;
  padding: 0;
}
.hive-ctl .btn--round svg { width: 20px; height: 20px; }

/* ---------- word list sheet ---------- */

.wordcols {
  columns: 3 90px;
  column-gap: 14px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.wordcols li {
  font-size: 14px;
  text-transform: capitalize;
  color: var(--text-2);
  break-inside: avoid;
  padding: 2px 0;
  border-bottom: 1px solid var(--line-soft);
}
.wordcols li.is-pangram { color: var(--honey); font-weight: 700; }
.wordcols li.is-missed { color: var(--muted); opacity: .7; }

.ranklist { margin: 6px 0 0; padding: 0; list-style: none; }
.ranklist li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
}
.ranklist li.is-here { color: var(--honey); font-weight: 700; }
.ranklist li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
