#honeycomb-swarm-workshop.honeycomb-hive {
    --hive-gutter: clamp(14px, 3vw, 28px);
    --hive-line: color-mix(in srgb, var(--hc-glow) 33%, transparent);
    --hive-light: color-mix(in srgb, var(--hc-soft) 44%, #fff);
    --hive-ink: #f1edf5;
    --hive-muted: #d2cbd7;
    --hive-panel: color-mix(in srgb, var(--hc-deep) 26%, #090812);
    width: min(960px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    border-color: var(--hive-line);
    color: var(--hive-ink);
    font: 500 .94rem/1.4 Outfit, system-ui, sans-serif;
}

#honeycomb-swarm-workshop.honeycomb-hive[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

#honeycomb-swarm-workshop.honeycomb-hive.is-queen {
    border-color: color-mix(in srgb, var(--hc-glow) 83%, #fff);
}

#honeycomb-swarm-workshop.honeycomb-hive > header {
    padding: clamp(10px, 1.7vw, 18px) var(--hive-gutter);
    border-color: var(--hive-line);
    background: linear-gradient(110deg, color-mix(in srgb, var(--hc-deep) 44%, #100e19), #0c0a14cc);
}

.honeycomb-hive .honeycomb-swarm-workshop__title small {
    color: var(--hive-light);
    font-size: .73rem;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.honeycomb-hive .honeycomb-swarm-workshop__title h2 {
    margin-top: 3px;
    color: #fff;
    font: 800 clamp(1.38rem, 3.6vw, 2.15rem)/1.14 Outfit, system-ui, sans-serif;
    text-shadow: none;
}

#honeycomb-swarm-workshop.honeycomb-hive > header button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-color: var(--hive-line);
    background: #090713;
}

.honeycomb-hive :is(button, summary):focus-visible {
    outline: 2px solid var(--hive-light);
    outline-offset: 3px;
}

#honeycomb-swarm-workshop.honeycomb-hive .honeycomb-swarm-workshop__content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    gap: 13px;
    padding: 13px var(--hive-gutter) 23px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--hive-line) transparent;
}

.honeycomb-hive :is(p, h3, dl, dd) { margin: 0; }
.honeycomb-hive p { color: var(--hive-muted); }
.honeycomb-hive h3 { color: var(--hive-light); font-size: 1.08rem; line-height: 1.2; }
.honeycomb-hive small { color: var(--hive-muted); font-size: .78rem; font-weight: 600; }

.honeycomb-hive__overview {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.honeycomb-hive__swarm {
    display: grid;
    grid-template-columns: clamp(73px, 18vw, 156px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 1.9vw, 23px);
}

.honeycomb-hive__emblem {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: radial-gradient(circle, color-mix(in srgb, var(--hc-glow) 22%, transparent), transparent 69%);
}

.honeycomb-hive__emblem::before,
.honeycomb-hive__emblem::after {
    content: "";
    position: absolute;
    inset: 7%;
    z-index: -1;
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: color-mix(in srgb, var(--hc-glow) 31%, transparent);
}

.honeycomb-hive__emblem::after {
    inset: 8%;
    background: var(--hive-panel);
}

.honeycomb-hive__emblem img {
    width: 83%;
    height: 83%;
    object-fit: contain;
    filter: drop-shadow(0 0 13px var(--hive-line));
    animation: honeycombHiveFloat 4s ease-in-out infinite alternate;
}

.honeycomb-hive.is-queen .honeycomb-hive__emblem::before {
    background: var(--hc-glow);
    animation: honeycombHivePulse 2.4s ease-in-out infinite alternate;
}

#honeycomb-swarm-workshop .honeycomb-hive__number,
#honeycomb-swarm-workshop .honeycomb-hive__reserve {
    margin: 0 0 4px;
    color: #fff;
    font: 800 clamp(2.13rem, 6vw, 4.35rem)/1 Outfit, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

#honeycomb-swarm-workshop .honeycomb-hive__reserve {
    font-size: clamp(1.75rem, 4vw, 2.55rem);
}

.honeycomb-hive__number small,
.honeycomb-hive__reserve small {
    color: var(--hive-light);
    font-size: .94rem;
    white-space: nowrap;
}

#honeycomb-swarm-workshop .honeycomb-hive__swarm h3 {
    margin-bottom: 4px;
    font-size: clamp(1.13rem, 2.7vw, 1.5rem);
}

.honeycomb-hive__swarm h3 + p,
.honeycomb-hive__honey > p:last-child {
    font-size: .9rem;
}

.honeycomb-hive__honey {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--hive-line);
    border-radius: 13px;
    background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--hc-glow) 10%, var(--hive-panel)), var(--hive-panel) 72%);
}

#honeycomb-swarm-workshop .honeycomb-hive__honey h3 { margin-bottom: 4px; font-size: .91rem; }

.honeycomb-hive__cells {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 23px));
    gap: 2px;
    margin: 6px 0;
}

.honeycomb-hive__cells > i {
    position: relative;
    aspect-ratio: 1 / 1.08;
    clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%);
    background: var(--hive-line);
}

.honeycomb-hive__cells > i::after {
    content: "";
    position: absolute;
    inset: 1px;
    clip-path: inherit;
    background: var(--hive-panel);
}

.honeycomb-hive__cells > i.is-on {
    background: var(--hc-glow);
}

.honeycomb-hive__cells > i.is-on::after {
    background: linear-gradient(145deg, var(--hc-soft), var(--hc-main) 65%, var(--hc-accent));
}

.honeycomb-hive.is-queen .honeycomb-hive__cells > i.is-on::after {
    background: linear-gradient(145deg, var(--hc-soft), var(--hc-glow) 65%, var(--hc-main));
}

.honeycomb-hive__tiers,
.honeycomb-hive__states,
.honeycomb-hive__stats { display: grid; gap: 7px; }
.honeycomb-hive__tiers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#honeycomb-swarm-workshop .honeycomb-hive__states {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.honeycomb-hive__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.honeycomb-hive__tiers button,
.honeycomb-hive__detail,
#honeycomb-swarm-workshop .honeycomb-hive__states article,
.honeycomb-hive__log {
    min-width: 0;
    border: 1px solid var(--hive-line);
    border-radius: 10px;
    background: var(--hive-panel);
}

.honeycomb-hive__tiers button {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 62px;
    padding: 8px;
    color: var(--hive-ink);
    font: 700 .94rem/1.2 Outfit, system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}

.honeycomb-hive__tiers button[aria-pressed="true"] {
    background: linear-gradient(135deg, color-mix(in srgb, var(--hc-main) 22%, var(--hive-panel)), var(--hive-panel) 82%);
    box-shadow: inset 0 -2px var(--hc-glow);
}

.honeycomb-hive__tiers button[aria-current="step"],
.honeycomb-hive__tiers button:hover {
    border-color: var(--hc-glow);
}

.honeycomb-hive__tiers small,
.honeycomb-hive__states small { display: block; margin-bottom: 2px; }
.honeycomb-hive__tiers button[aria-current="step"] small { color: var(--hive-light); }

.honeycomb-hive__tiers img,
.honeycomb-hive__detail img,
.honeycomb-hive__states img,
.honeycomb-hive__rules img {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 7px;
    filter: drop-shadow(0 0 7px var(--hive-line));
}

.honeycomb-hive__detail,
#honeycomb-swarm-workshop .honeycomb-hive__states article,
.honeycomb-hive__rules {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
}

.honeycomb-hive__detail { border-inline-start: 2px solid var(--hc-glow); }
.honeycomb-hive__detail p,
.honeycomb-hive__states p,
.honeycomb-hive__rules p { margin-top: 3px; font-size: .86rem; }
#honeycomb-swarm-workshop .honeycomb-hive__status-title { margin: 0 0 6px; font-size: .98rem; }
.honeycomb-hive__states article.is-ready {
    background: linear-gradient(125deg, color-mix(in srgb, var(--hc-main) 13%, var(--hive-panel)), var(--hive-panel) 85%);
}
.honeycomb-hive__states article.is-ready small { color: var(--hive-light); }
.honeycomb-hive__states p.honeycomb-hive__waves { color: var(--hive-light); font-weight: 800; font-variant-numeric: tabular-nums; }
.honeycomb-hive__log { padding: 8px 10px; }
.honeycomb-hive__log summary { color: var(--hive-light); cursor: pointer; }
.honeycomb-hive__log[open] summary { margin-bottom: 7px; }
.honeycomb-hive__stats > div { padding-inline-start: 8px; border-inline-start: 1px solid var(--hive-line); }
.honeycomb-hive__stats dt { color: var(--hive-muted); font-size: .8rem; }
.honeycomb-hive__stats dd { color: #fff; font-weight: 800; font-size: 1.08rem; }
.honeycomb-hive__rules { margin-top: 8px; padding: 5px 0 0; }

@keyframes honeycombHiveFloat { to { transform: translateY(-5px); } }
@keyframes honeycombHivePulse { from { opacity: .5; } to { opacity: 1; } }

@media (max-width: 760px) {
    .honeycomb-hive__tiers button { flex-direction: column; align-items: flex-start; gap: 4px; }
    .honeycomb-hive__tiers img { flex-basis: 32px; width: 32px; height: 32px; }
}

@media (max-width: 560px) {
    .honeycomb-hive__overview { grid-template-columns: 1fr; }
    .honeycomb-hive__tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .honeycomb-hive__states,
    .honeycomb-hive__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #honeycomb-swarm-workshop .honeycomb-hive__states article { align-items: flex-start; }
}

@media (max-width: 360px) {
    .honeycomb-hive__tiers,
    .honeycomb-hive__states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .honeycomb-hive__states article { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .honeycomb-hive__emblem::before,
    .honeycomb-hive__emblem img { animation: none; }
}
