/* Hive Meta and Alternative Hive Builds pages: bee chips, honeycomb diagrams, bee detail panel. */
.bee-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .25rem 0 1rem; }
.bee-chips li { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .25rem .7rem .25rem .3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--text); font-size: .85rem; font-weight: 650; }
.bee-chips img { width: 2.2rem; height: auto; }
.meta-list { max-width: 64rem; }
.meta-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.hive-diagram { margin: 0; }
/* Honeycomb hive: 5 columns of flat-topped hexagons, columns 2 and 4 raised half a slot (like the in-game hive). */
.hive-grid {
  --w: 3rem; --h: calc(var(--w) * .866); --gap: .22rem;
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  display: grid; width: max-content;
  grid-template-columns: repeat(4, calc(var(--w) * .75 + var(--gap))) var(--w);
  grid-auto-rows: calc(var(--h) + var(--gap));
  padding: calc(var(--h) / 2) .6rem .6rem; border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 35%, #f6bd3814, transparent 70%), #0000002e;
}
.hive-cell { --rim: #5c4718; --fill: radial-gradient(circle at 50% 40%, #3b2b10, #1d1609 75%); position: relative; display: grid; place-items: center; width: var(--w); height: var(--h); padding: 0; border: 0; background: var(--rim); clip-path: var(--hex); }
.hive-cell::before { content: ""; position: absolute; inset: 2px 2.5px; background: var(--fill); clip-path: var(--hex); }
.hive-cell:nth-child(5n+2), .hive-cell:nth-child(5n+4) { transform: translateY(-50%); }
.hive-cell img { position: relative; z-index: 1; width: 76%; height: auto; filter: drop-shadow(0 1px 1px #0008); }
.hive-cell .hive-gear { position: absolute; z-index: 2; right: 21%; bottom: 2px; width: 40%; filter: drop-shadow(0 0 1px #000) drop-shadow(0 1px 1px #000a); pointer-events: none; }
.hive-cell.open { --rim: #ffffff1f; --fill: #00000040; }
.hive-cell.open-red { --rim: #ff888e55; --fill: #ff888e12; }
.hive-cell.open-white { --rim: #e2e8f055; --fill: #e2e8f00d; }
.hive-diagram figcaption { max-width: 13.6rem; margin-top: .7rem; color: var(--muted); font-size: .8rem; }
button.hive-cell { font: inherit; color: inherit; cursor: pointer; transition: background-color .15s ease, filter .15s ease; }
button.hive-cell:focus-visible { outline: none; --rim: #fff; }
/* Gifted: gold rim, warm honey fill, small star at the top edge. */
.hive-cell.is-gifted { --rim: #e9ac2c; --fill: radial-gradient(circle at 50% 42%, #6b4b12, #33230a 72%); }
.hive-cell.is-gifted::after { content: "★"; position: absolute; z-index: 2; top: 3px; left: 50%; transform: translateX(-50%); color: #ffe08a; font-size: .5rem; line-height: 1; pointer-events: none; text-shadow: 0 0 3px #000; }
button.hive-cell:hover, button.hive-cell[aria-expanded="true"], button.hive-cell[aria-describedby] { --rim: #ffe08a; filter: brightness(1.15); }
.gifted-key { display: flex; align-items: center; gap: .45rem; margin-top: .55rem; color: var(--muted); font-size: .8rem; }
.gifted-key span { flex: none; width: 1.2rem; height: 1.04rem; background: #e9ac2c; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
/* Mutation panel: one shared element, placed beside the active bee. */
.bee-tip { position: fixed; top: 0; left: 0; z-index: 60; width: min(20rem, calc(100vw - 16px)); padding: 1rem 1.1rem .9rem; border: 1px solid #f6bd3859; border-radius: .85rem; background: linear-gradient(160deg, var(--raised), var(--surface) 70%); box-shadow: 0 18px 40px #0009; color: var(--text); font-size: .86rem; line-height: 1.45; animation: bee-tip-in .12s ease both; }
.bee-tip[hidden] { display: none; }
.bee-tip-hive { color: var(--gold-light); font: 700 .7rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.bee-tip h3 { margin: .15rem 1.6rem 0 0; font-size: 1.15rem; }
.bee-tip h4 { margin-top: .7rem; color: var(--gold-light); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.bee-tip p { margin: .2rem 0 0; color: var(--muted); }
.bee-tip .bee-tip-mutation { color: var(--text); font-weight: 650; }
.bee-tip .bee-tip-gifted.is-gifted { color: var(--gold-light); }
.bee-tip .unverified { font-style: italic; font-weight: 400; color: var(--muted); }
.bee-tip-source { margin-top: .7rem !important; padding-top: .55rem; border-top: 1px solid var(--line); font-size: .74rem; }
.bee-tip-source a { color: var(--gold-light); text-decoration: underline; text-underline-offset: .18em; }
.bee-tip-close { position: absolute; top: .45rem; right: .5rem; width: 1.9rem; height: 1.9rem; border: 1px solid transparent; border-radius: .45rem; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.bee-tip-close:hover { color: var(--text); border-color: var(--line); }
.bee-tip-close:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 1px; }
.bee-tip:not(.is-pinned) .bee-tip-close { visibility: hidden; }
@keyframes bee-tip-in { from { opacity: 0; } }
/* "More builds" link at the bottom of each Hive Meta color. */
.more-builds { margin-top: 1rem; }
/* Alternative Hive Builds: one block per build inside a color section. */
.alt-build { padding-top: 1.4rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.alt-build:first-of-type { padding-top: 0; margin-top: .6rem; border-top: 0; }
.alt-build h3 { margin-bottom: .4rem; }
@media (prefers-reduced-motion: reduce) {
  .bee-tip { animation: none; }
  button.hive-cell { transition: none; }
  button.hive-cell:hover, button.hive-cell[aria-expanded="true"], button.hive-cell[aria-describedby] { filter: none; }
}
@media (max-width: 760px) {
  .meta-panel { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

.meta-panel, .alt-build {
  border-radius: var(--radius);
  box-shadow: inset 0 1px #dae6fc13;
}
.alt-build {
  border: 1px solid var(--line);
  padding: clamp(.85rem, 2.5vw, 1.4rem);
  background: linear-gradient(145deg, #21314985, #10182766);
}
.alt-build:first-of-type { padding-top: clamp(.85rem, 2.5vw, 1.4rem); border-top: 1px solid var(--line); }
.hive-diagram .hive-grid { border: 1px solid #d0ab6550; }
.bee-tip { max-height: calc(100dvh - 1rem); overflow: auto; }
[data-motion-paused] .bee-tip { animation: none; }
@media (max-width: 360px) {
  .hive-diagram .hive-grid { --w: 2.65rem; }
}
