/* Hive: honey amber. A honeycomb of pointy-top cells (the center one filled),
   the word you're building in big caps above it, and a rank ladder up top
   whose current rung holds your score. */

:root { --amber: #f5b82e; --amber-ink: #a86c00; --cell: #ebebeb; }
.hive { --game: var(--amber); gap: 16px; padding-top: 14px; }
.hive .btn { height: 46px; padding: 0 20px; }

/* rank ladder */
.progress { display: grid; gap: 10px; }
.rank { display: flex; align-items: baseline; justify-content: space-between; margin: 0; }
.rank b { font: 700 22px/1.1 var(--slab); }
.rank span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track { position: relative; display: flex; align-items: center; justify-content: space-between; height: 30px; margin: 0; padding: 0; list-style: none; }
.track::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: #e2e2e2; }
.track li { position: relative; display: grid; place-items: center; width: 10px; height: 10px; border-radius: 50%; background: #e2e2e2; font: 700 12px var(--ui); font-variant-numeric: tabular-nums; }
.track li.past { background: var(--amber); }
.track li.now { width: 30px; height: 30px; margin: 0 -10px; background: var(--amber); }

/* found words */
.found { border: 1px solid var(--rule); border-radius: 8px; }
.found-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 15px; }
.found-bar > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.found-bar .peek { margin-left: 10px; color: var(--muted); text-transform: capitalize; }
.found.open .peek { display: none; }
.found-bar svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.found.open .found-bar svg { transform: rotate(180deg); }
.found-list { columns: 3 90px; gap: 12px; margin: 0; padding: 4px 12px 12px; list-style: none; font-size: 15px; text-transform: capitalize; }
.found-list li { padding: 3px 0; border-bottom: 1px solid #f0f0f0; break-inside: avoid; }
.found-list .pg { font-weight: 800; }
.found-list .bonus::after { content: ' ·'; color: var(--amber-ink); font-weight: 800; }

/* the word being typed */
.entry { display: flex; justify-content: center; align-items: center; min-height: 44px; margin: 6px 0 0; font: 700 clamp(26px, 8vw, 32px)/1 var(--ui); text-transform: uppercase; letter-spacing: 0.02em; }
.entry .c { color: var(--amber-ink); }
.entry .bad { color: #c4c4c4; }
.entry .caret { width: 2px; height: 1.1em; margin-left: 2px; background: var(--amber); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.entry.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* the honeycomb */
.comb {
  --w: min(84px, 23vw); --h: calc(var(--w) * 1.1547); --D: calc(var(--w) + 7px);
  position: relative; width: calc(var(--D) * 2 + var(--w)); height: calc(var(--D) * 1.732 + var(--h)); margin: 0 auto;
}
.cell {
  position: absolute; left: calc(50% + var(--x) * var(--D) - var(--w) / 2); top: calc(50% + var(--y) * var(--D) - var(--h) / 2);
  display: grid; place-items: center; width: var(--w); height: var(--h); padding: 0; border: 0; cursor: pointer;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--cell); color: var(--ink); font: 700 clamp(24px, 7.5vw, 30px)/1 var(--ui); text-transform: uppercase;
  transition: transform 0.08s;
}
.cell:hover { background: #e0e0e0; }
.cell.mid, .cell.mid:hover { background: var(--amber); }
.cell:active { transform: scale(0.92); }

.actions { display: flex; justify-content: center; gap: 10px; }
.btn.round { width: 46px; padding: 0; }
.btn.round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.links { display: flex; justify-content: center; gap: 22px; margin: 0; }
.link { padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }

/* once it's over, the board is just to look at */
body.over .comb, body.over .actions { opacity: 0.45; pointer-events: none; }

/* modals */
.all-words { columns: 3 90px; gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 15px; text-transform: capitalize; color: #a0a0a0; }
.all-words li { padding: 2px 0; break-inside: avoid; }
.all-words .got { color: var(--ink); font-weight: 600; }
.all-words .pg { text-decoration: underline 2px var(--amber); text-underline-offset: 3px; }
.key-line { display: flex; gap: 14px; font-size: 13px; color: #a0a0a0; }
.key-line .got { color: var(--ink); font-weight: 600; }
.key-line .pg { text-decoration: underline 2px var(--amber); text-underline-offset: 3px; }
.hint-grid { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; }
.hint-grid th, .hint-grid td { padding: 5px 4px; border-bottom: 1px solid var(--rule); }
.hint-grid thead th { font-size: 12px; color: var(--muted); }
.hint-grid tbody th { text-align: left; }
.two { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.two span { font-weight: 600; }
.two b { margin-left: 4px; font-weight: 400; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .entry .caret, .entry.shake { animation: none; }
  .cell { transition: none; }
}
