html, body { min-height: 100%; }
body { background: #f9f5e9; color: #293e31; }
.hive { --edge: clamp(12px, 2vw, 32px); position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(240px, 1fr); }
:focus-visible, .hive-heading-tools :focus-visible { outline: 3px solid #5e478a; outline-offset: 3px; box-shadow: none; }
.hive-head { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px var(--edge); color: #000000; }
.hive-title { min-width: 0; }
.hive-head h1 { max-width: none; font-size: clamp(24px, 2.7vw, 38px); letter-spacing: -.055em; line-height: 1; }
.live { display: flex; align-items: center; gap: 9px; margin: 0 0 7px; font: 700 15px/1.2 var(--font-mono); letter-spacing: .04em; }
.live i { height: 10px; width: 10px; border-radius: 50%; background: #FF6954; box-shadow: 0 0 0 3px #FF695426; }
.live > span:last-child { margin-left: 8px; font-weight: 400; color: #000000; }
.hive-heading-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: clamp(10px, 1.6vw, 24px); align-items: center; }
.hive-back { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; font: 700 12px/1.3 var(--font-body); color: #000000; }
.count { max-width: 130px; display: flex; align-items: center; gap: 7px; margin: 0; font: 400 9px/1.3 var(--font-mono); text-transform: uppercase; }
#count { flex-shrink: 0; font: 700 25px/1 var(--font-head); }
#count.bump { animation: count-bump .5s ease; }
@keyframes count-bump { 40% { transform: scale(1.1); } }
.hive-heading-tools .music-toggle { min-width: 72px; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid #000000; border-radius: 8px; background: #fffbea; color: #000000; font-size: 10px; }
.hive-heading-tools .music-toggle:hover, .hive-heading-tools .music-toggle[aria-pressed="true"] { background: #FF6954; color: #000000; }
.sky { grid-row: 2; position: relative; min-width: 0; min-height: 0; background: var(--honeycomb-background); isolation: isolate; overflow: hidden; }
.hive-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hive-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.swarm-bee { position: absolute; top: 0; left: 0; will-change: transform; transform-origin: 50% 50%; pointer-events: none; }
.swarm-bee > svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 1px #2d48202b); }
.sky .swarm-bee .tag { display: block; box-sizing: border-box; width: var(--label-width, 104px); max-width: var(--label-width, 104px); margin: -3px 0 0 calc(50% - var(--label-width, 104px) / 2); padding: 2px 4px; border: 1px solid #6f8056; border-radius: 5px 8px 4px 7px; color: #293f2d; background: #fff9e7ef; text-align: center; font: 700 9px/1.2 var(--font-body); white-space: normal; overflow-wrap: anywhere; }
.swarm-bee .tag em { font-size: 8px; font-style: normal; font-weight: 400; }
.swarm-bee.z-far { opacity: .75; }
.swarm-bee.z-far .tag { display: none; }
.swarm-bee.z-mid { opacity: .9; }
.swarm-bee.named { opacity: 1; }
.swarm-bee.named .tag { display: block; }
.sky.crowded .swarm-bee:not(.named) .tag { display: none; }
.sky.crowded .swarm-bee:not(.named) { opacity: .78; }
.swarm-bee.is-arriving { z-index: 15 !important; opacity: 1; }
.swarm-bee .bee-wings, .landed .bee-wings, .empty-hex .bee-wings { animation: tv-flap .18s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 66px 40px; }
@keyframes tv-flap { to { transform: scaleY(.67); } }
.landed { position: fixed; bottom: 24px; left: 24px; z-index: 20; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 5px 14px; align-items: center; width: min(340px, calc(100% - 48px)); padding: 12px 16px; border: 2px solid #496344; border-radius: 12px 22px 10px 18px; color: #2c422f; background: #fff8e1; box-shadow: 0 6px 0 #344e3d24; animation: arrive .5s ease-out both; }
.landed[hidden], .empty[hidden], .landed-line[hidden] { display: none; }
.landed-bee { grid-column: 1; grid-row: 1 / 3; }
.landed-bee svg { width: 100%; display: block; }
.landed .mono { grid-column: 2; margin: 0; font-size: 10px; }
.landed-name { grid-column: 2; margin: 0; font: 700 21px/1.1 var(--font-body); overflow-wrap: anywhere; }
.landed-line { grid-column: 1 / -1; margin: 5px 0 0; font: 400 13px/1.4 var(--font-body); }
@keyframes arrive { from { transform: translateY(12px); opacity: 0; } }
.empty { position: absolute; z-index: 15; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 300px; display: grid; justify-items: center; gap: 8px; padding: 16px 24px; border: 2px solid #7f9160; border-radius: 16px; background: #fff9e8ed; text-align: center; pointer-events: none; }
.empty-hex { width: 70px; }
.empty h2 { font-size: 23px; }
.empty p { margin: 0; font-size: 12px; }
.empty p strong { display: block; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .live > span:last-child { display: none; } }
@media (max-width: 699px) {
  .hive-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 8px 12px; }
  .hive-title { grid-column: 1; grid-row: 1; }
  .hive-head h1 { font-size: clamp(21px, 5.8vw, 30px); }
  .live { font-size: 12px; margin-bottom: 5px; }
  .hive-heading-tools { display: contents; }
  .hive-heading-tools .music-toggle { grid-column: 2; grid-row: 1; justify-self: end; min-width: 68px; padding-inline: 8px; font-size: 9px; }
  .hive-heading-tools .count { grid-column: 1; grid-row: 2; max-width: 110px; gap: 5px; font-size: 8px; }
  .hive-back { grid-column: 2; grid-row: 2; justify-self: end; }
  #count { font-size: 20px; }
  .landed { left: 12px; bottom: 12px; width: calc(100% - 24px); }
  .empty { width: 250px; }
}
@media (max-height: 450px) and (min-width: 700px) {
  .hive-head { padding-block: 5px; }
  .hive-head h1 { font-size: 23px; }
  .live { font-size: 12px; margin-bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
