/* 🐝 불러오는 중 (hive-loading.js) — 움직임은 전부 transform·opacity 만 써서 그래픽 카드가 그림 → CPU 거의 0, 기다릴 때만 움직임 */
html{--hive-bee-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='56' viewBox='-32 -30 64 56'%3E%3Cg fill='%23eaf7ff' fill-opacity='.8' stroke='%239cc8e2' stroke-width='1.2'%3E%3Cellipse cx='4' cy='-15' rx='7.5' ry='12' transform='rotate(28 4 -4)'/%3E%3Cellipse cx='-5' cy='-14' rx='7' ry='11' transform='rotate(-18 -2 -4)'/%3E%3C/g%3E%3Cellipse cx='0' cy='4' rx='16' ry='11.5' fill='%23ffc83a' stroke='%233a2200' stroke-width='1.8'/%3E%3Cpath d='M6 -6.6 q2.4 10.6 0 21.2 M-2 -7.4 q2.4 11.4 0 22.8' fill='none' stroke='%233a2200' stroke-width='3.6' stroke-linecap='round'/%3E%3Cpath d='M-15.4 4 l-6.4 0' stroke='%233a2200' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='11' cy='0.5' r='1.8' fill='%233a2200'/%3E%3Cpath d='M13 -6 q4 -7 8 -7 M9 -7 q1 -7 4 -9' fill='none' stroke='%233a2200' stroke-width='1.4' stroke-linecap='round'/%3E%3Cellipse cx='12' cy='6' rx='2.4' ry='1.5' fill='%23ff9c7a' fill-opacity='.7'/%3E%3C/svg%3E");--hive-hex-bg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 24 L91 42 V78 L60 96 L29 78 V42Z' fill='%23ffb52e' fill-opacity='.12'/%3E%3C/svg%3E");--hive-hex-line:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M41 46 c-3 6 -4 14 -4 24' stroke='%23fff' stroke-opacity='.35' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Cpath d='M60 24 L91 42 V78 L60 96 L29 78 V42Z' fill='none' stroke='%23e9a81c' stroke-width='3.2' stroke-linejoin='round'/%3E%3C/svg%3E");--hive-honey:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffe07a'/%3E%3Cstop offset='.45' stop-color='%23ffbf2e'/%3E%3Cstop offset='1' stop-color='%23e2850c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 6 q10 -6 20 0 t20 0 t20 0 t20 0 t20 0 t20 0 V120 H0Z' fill='url(%23g)'/%3E%3Ccircle cx='44' cy='20' r='2.4' fill='%23fff6c8' fill-opacity='.75'/%3E%3Ccircle cx='70' cy='34' r='1.8' fill='%23fff6c8' fill-opacity='.6'/%3E%3C/svg%3E")}

/* ── 맨 위 꿀 막대 ── */
#hive-bar{position:fixed;left:0;right:0;top:0;height:3px;z-index:2147482500;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .25s ease}
#hive-bar i{position:absolute;top:0;bottom:0;left:0;width:40%;background:linear-gradient(90deg,transparent,#f0a92e 25%,#ffd25e 50%,#f0a92e 75%,transparent);transform:translateX(-100%)}
html.hive-busy #hive-bar{opacity:1}
html.hive-busy #hive-bar i{animation:hive-bar 1.15s cubic-bezier(.45,0,.25,1) infinite}
@keyframes hive-bar{to{transform:translateX(250%)}}

/* ── 목록 자리: 받는 동안 「비어 있어요」 대신 꿀벌 ── */
html.hive-wait :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page,.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty){visibility:hidden}
html.hive-busy :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page){visibility:visible!important;position:relative;min-height:150px;color:transparent!important}
html.hive-busy :is(.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty){visibility:visible!important;position:relative;min-height:96px;color:transparent!important}
html.hive-busy :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page,.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty)>*{visibility:hidden}
html.hive-busy :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page,.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty)::before{content:""!important;display:block!important;position:absolute!important;left:calc(50% - 26px)!important;top:calc(50% - 36px)!important;width:52px!important;height:46px!important;margin:0!important;background:var(--hive-bee-img) center/contain no-repeat!important;opacity:1!important;animation:hive-bob 1.6s ease-in-out infinite!important}
html.hive-busy :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page,.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty)::after{content:var(--hive-loading,"꿀 모으는 중…")!important;display:block!important;position:absolute!important;left:0!important;right:0!important;top:calc(50% + 16px)!important;margin:0!important;text-align:center!important;font-size:.72rem!important;font-weight:800!important;letter-spacing:.14em!important;color:#c98a12!important;visibility:visible!important;background:none!important;animation:hive-blink 1.8s ease-in-out infinite!important}
html:not([data-theme=light]).hive-busy :is(.community-page .bd-empty,.board-empty,.board-cafe-empty,.notice-empty,.ev-empty,.pg-empty-box,.pg-empty,.lottery-desk-empty,.voice-empty,.theater-empty,.viewer-empty,.season-empty,.empty-page,.comments-empty,.notification-empty,.song-empty,.lottery-inline-empty,.prediction-empty-user,.viewer-roulette-empty)::after{color:#ffcf6a!important}
@keyframes hive-bob{0%,100%{transform:translate(-6px,2px) rotate(-5deg)}50%{transform:translate(6px,-7px) rotate(5deg)}}
@keyframes hive-blink{50%{opacity:.45}}

/* ── 페이지 넘어갈 때 (route-loader): 육각 벌집에 꿀이 차오르고, 꿀벌이 둘레를 빙글 ── */
html.honey .route-loader{position:relative!important;display:block!important;min-height:min(52vh,360px)!important;margin:40px auto!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
html.honey .route-loader>*{display:none!important}
html.honey .route-loader::before,html.honey .route-loader::after{content:"";position:absolute;width:120px;height:120px;left:calc(50% - 60px);top:calc(50% - 72px);background:var(--hive-hex-bg) center/contain no-repeat;pointer-events:none}
html.honey .route-loader::after{z-index:2;background-image:var(--hive-hex-line);filter:drop-shadow(0 10px 22px rgba(233,168,28,.28))}
html.honey .route-loader>i{display:block!important;position:absolute;z-index:1;width:120px!important;height:120px!important;left:calc(50% - 60px);top:calc(50% - 72px);margin:0;border-radius:0!important;background:none!important;animation:none!important;overflow:hidden;clip-path:polygon(50% 20%,75.83% 35%,75.83% 65%,50% 80%,24.17% 65%,24.17% 35%)}
html.honey .route-loader>i::before{content:"";position:absolute;left:0;right:0;top:0;height:100%;background:var(--hive-honey) 0 0/100% 100% no-repeat;transform:translateY(80%);animation:hive-fill 3.2s cubic-bezier(.45,0,.25,1) infinite}
html.honey .route-loader>span:first-of-type{display:block!important;position:absolute;z-index:3;width:140px!important;height:140px!important;left:calc(50% - 70px);top:calc(50% - 82px);margin:0;border-radius:0!important;background:none!important;animation:hive-orbit 3.6s linear infinite!important}
html.honey .route-loader>span:first-of-type::before{content:"";position:absolute;width:30px;height:26px;left:calc(50% - 15px);top:-8px;background:var(--hive-bee-img) center/contain no-repeat}
html.honey .route-loader>small{display:block!important;position:absolute;left:0;right:0;top:calc(50% + 60px);font-size:0!important;text-align:center;background:none!important}
html.honey .route-loader>small::after{content:var(--hive-loading,"꿀 모으는 중…");font-size:.74rem;font-weight:800;letter-spacing:.14em;color:#c98a12;animation:hive-blink 1.8s ease-in-out infinite}
html.honey:not([data-theme=light]) .route-loader>small::after{color:#ffcf6a}
@keyframes hive-fill{0%{transform:translateY(80%)}62%,80%{transform:translateY(18%)}100%{transform:translateY(80%)}}
@keyframes hive-orbit{to{transform:rotate(360deg)}}

/* 움직임 줄이기를 켠 사람: 멈춘 그림만 */
@media (prefers-reduced-motion:reduce){
  #hive-bar i,html.hive-busy #hive-bar i{animation:none;transform:none;width:100%;opacity:.7}
  html.hive-busy *::before,html.hive-busy *::after,html.honey .route-loader>i::before,html.honey .route-loader>span:first-of-type,html.honey .route-loader>small::after{animation:none!important}
  html.honey .route-loader>i::before{transform:translateY(45%)}
}
