/* 花靈物語 — great spirits hub */
.bh-root { position: absolute; inset: 0; overflow: hidden; }
.bh-top { position: absolute; left: 8px; right: 8px; top: 4px; display: flex; align-items: center; gap: 8px; z-index: 6; }
.bh-back { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 3px solid var(--gold); background: radial-gradient(circle at 35% 30%, #fff, var(--cream-2)); color: var(--pink-d); font-size: 18px; font-weight: 900; padding: 0 2px 0 0; cursor: pointer; box-shadow: 0 3px 8px rgba(90,30,60,.3); transition: transform .12s; }
.bh-back:active { transform: scale(.9); }
.bh-tabs { display: flex; gap: 6px; flex: 1; justify-content: flex-start; }
.bh-tab { position: relative; display: flex; align-items: center; gap: 4px; height: 44px; min-width: 96px; padding: 0 10px 0 4px; border-radius: 22px; border: 2px solid var(--gold-l); background: rgba(255,248,240,.85); cursor: pointer; font-family: var(--font); transition: transform .15s cubic-bezier(.3,1.6,.5,1), background .15s; }
.bh-tab .ba-bust { flex: none; border-radius: 50%; overflow: hidden; background: #fff; border: 2px solid var(--gold-l); }
.bh-tab .nm { font-size: 14px; white-space: nowrap; color: #fff; text-shadow: var(--outline); }
.bh-tab.on { background: linear-gradient(180deg, #ff9cc4, var(--pink)); border-color: var(--gold); transform: scale(1.08); box-shadow: 0 3px 10px rgba(212,70,126,.4); }
.bh-tab:not(.on) .nm { color: var(--ink); text-shadow: none; font-weight: 800; }
.bh-tab.focus { outline: 3px solid #ffe28a; }

.bh-card { position: absolute; left: 8px; right: 8px; top: 54px; z-index: 5; padding: 6px 12px 7px; border-radius: 16px; border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaf4, var(--cream-2)); box-shadow: 0 3px 10px rgba(90,30,60,.22), inset 0 0 0 2px rgba(255,255,255,.7); font-size: 13px; color: var(--ink); }
.bh-card .r1 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bh-card .nm { font-size: 17px; color: var(--pink-d); }
.bh-card .ti { font-size: 12px; color: var(--ink-2); flex: 1; min-width: 0; }
.bh-card .stg { padding: 1px 10px; border-radius: 999px; background: var(--pink); color: #fff; text-shadow: 0 1px 0 var(--rose); font-weight: 900; font-size: 12px; border: 2px solid #fff; }
.bh-card .r2 { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.bh-card .hi { font-size: 16px; }
.bh-card .bar { flex: 1; height: 12px; border-radius: 6px; background: #f1d3dd; border: 2px solid var(--gold-l); overflow: hidden; }
.bh-card .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff9cc4, var(--pink-d)); border-radius: 6px; transition: width .6s ease; }
.bh-card .ht { font-size: 12px; color: var(--pink-d); min-width: 62px; text-align: right; }
.bh-card .r3 { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--ink-2); }

.bh-stage { position: absolute; left: 0; right: 0; bottom: 0; top: 0; z-index: 2; pointer-events: none; }
.bh-glow { position: absolute; left: 50%; bottom: 30px; width: 300px; height: 360px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255,190,220,.75) 0%, rgba(255,190,220,.3) 45%, transparent 70%); animation: pulse 4s ease-in-out infinite; }
.bh-fig { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); transform-origin: 50% 100%; animation: bh-breath 4s ease-in-out infinite; pointer-events: none; }
.bh-figin { pointer-events: auto; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(90,30,60,.3)); }
.bh-figin canvas { display: block; }
.bh-figin.focus { outline: none; filter: drop-shadow(0 0 8px #ffe28a); }
@keyframes bh-breath { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.018, 1.03); } }
.bh-bubble { position: absolute; left: 50%; top: 160px; max-width: 220px; transform: translateX(-50%) scale(.6); opacity: 0; padding: 7px 12px; border-radius: 14px; background: #fff; border: 2px solid var(--gold); color: var(--ink); font-size: 14px; font-weight: 800; text-align: center; line-height: 1.35; transition: opacity .15s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.bh-bubble.on { opacity: 1; transform: translateX(-50%) scale(1); }

.bh-col { position: absolute; top: 148px; bottom: 6px; width: 70px; display: flex; flex-direction: column; justify-content: center; gap: 6px; z-index: 4; }
.bh-col.l { left: 4px; align-items: center; } .bh-col.r { right: 4px; align-items: center; }
.bh-act { position: relative; display: flex; flex-direction: column; align-items: center; width: 70px; min-height: 66px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--font); animation: pop-in .25s cubic-bezier(.3,1.5,.5,1) both; transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.bh-act .gem { position: relative; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid var(--gold); background: radial-gradient(circle at 35% 28%, #fff 0%, #ffd3e5 40%, var(--pink) 100%); box-shadow: 0 3px 8px rgba(90,30,60,.35), inset 0 -3px 5px rgba(212,70,126,.35); }
.bh-act .ic { font-size: 24px; line-height: 1; }
.bh-act .lb { font-size: 12px; line-height: 1.1; margin-top: 2px; max-width: 70px; text-align: center; white-space: nowrap; }
.bh-act:active { transform: scale(.9); }
.bh-act.focus .gem { outline: 3px solid #ffe28a; outline-offset: 2px; }
.bh-act .dot { display: none; position: absolute; right: -3px; top: -3px; width: 15px; height: 15px; border-radius: 50%; background: #ff3b4e; border: 2px solid #fff; }
.bh-act .dot.on { display: block; animation: pulse 1.2s infinite; }
.bh-col .bh-act:nth-child(2) { animation-delay: .04s; } .bh-col .bh-act:nth-child(3) { animation-delay: .08s; } .bh-col .bh-act:nth-child(4) { animation-delay: .12s; } .bh-col .bh-act:nth-child(5) { animation-delay: .16s; }

.bh-banner { position: absolute; left: 0; right: 0; top: 36%; z-index: 75; text-align: center; pointer-events: none; animation: bh-slam 1.7s both; }
.bh-banner .t1 { font-size: 34px; letter-spacing: .04em; }
.bh-banner .t2 { font-size: 24px; margin-top: 4px; }
@keyframes bh-slam { 0% { transform: scale(2.4); opacity: 0; } 14% { transform: scale(.95); opacity: 1; } 22% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: scale(1) translateY(-12px); } }

.bh-comp { position: absolute; left: 8px; top: 62px; z-index: 72; display: flex; align-items: center; gap: 8px; max-width: 70%; padding: 4px 14px 4px 4px; border-radius: 40px; background: rgba(255,248,240,.92); border: 2px solid var(--gold); box-shadow: 0 3px 8px rgba(90,30,60,.25); font-size: 14px; font-weight: 800; color: var(--ink); animation: pop-in .3s both; transition: opacity .4s; pointer-events: none; }
.bh-comp.out { opacity: 0; }
.bh-comp .ba-bust { flex: none; border-radius: 50%; overflow: hidden; background: #fff; border: 2px solid var(--gold-l); }

/* modals */
.bh-empty { padding: 24px 8px; text-align: center; font-size: 15px; font-weight: 800; color: var(--ink-2); }
.bh-gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bh-gcell { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; min-height: 80px; border-radius: 12px; background: rgba(255,255,255,.7); border: 2px solid var(--gold-l); cursor: pointer; transition: transform .12s; }
.bh-gcell:active { transform: scale(.92); }
.bh-gcell img { width: 44px; height: 44px; object-fit: contain; }
.bh-gcell .cnt { position: absolute; right: 3px; top: 2px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--pink-d); color: #fff; font-size: 12px; text-align: center; }
.bh-gcell .pf { position: absolute; left: 2px; top: 1px; font-style: normal; font-size: 14px; }
.bh-gcell .nm { font-size: 12px; font-weight: 800; text-align: center; line-height: 1.15; word-break: break-word; }
.bh-places { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bh-place { position: relative; height: 88px; border-radius: 14px; overflow: hidden; border: 3px solid var(--gold); cursor: pointer; transition: transform .12s; }
.bh-place:active { transform: scale(.95); }
.bh-place .pic { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bh-place .lb { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 15px; }
.bh-place .ok { position: absolute; right: 6px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-d); color: #fff; font-style: normal; font-weight: 900; text-align: center; line-height: 26px; border: 2px solid #fff; }
.bh-pf-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.bh-pf-head .ba-bust { flex: none; border-radius: 50%; overflow: hidden; background: #fff; border: 3px solid var(--gold); }
.bh-pf-head .ti { font-size: 16px; font-weight: 900; color: var(--pink-d); }
.bh-pf-head .ln, .bh-stg .ln { font-size: 13px; line-height: 1.45; }
.bh-pf-sec { margin: 8px 0 3px; font-size: 14px; font-weight: 900; color: var(--pink-d); border-bottom: 2px dotted var(--gold-l); }
.bh-pf-bio { font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.bh-stg { margin: 5px 0; padding: 5px 8px; border-radius: 10px; background: rgba(255,255,255,.5); border: 2px solid transparent; opacity: .75; }
.bh-stg.on { opacity: 1; border-color: var(--pink); background: #ffeaf3; }
.bh-stg .top { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; }
.bh-stg .top span { font-size: 12px; color: var(--ink-2); font-weight: 800; }

/* house + codex entry buttons */
.hs-bigs { position: absolute; top: 56px; left: 8px; right: 8px; height: 64px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; border-radius: 16px; border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaf4, var(--cream-2)); box-shadow: 0 3px 10px rgba(90,30,60,.25), inset 0 0 0 2px rgba(255,255,255,.7); cursor: pointer; font-family: var(--font); transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.hs-bigs:active { transform: scale(.96); }
.hs-bigs.focus { outline: 3px solid #ffe28a; }
.hs-bigs img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 6%; border: 3px solid var(--gold); background: #fff; flex: none; }
.hs-bigs span { font-size: 18px; font-weight: 900; color: var(--pink-d); text-shadow: none; white-space: nowrap; }
.hs-bigs span.outline { color: var(--pink-d); text-shadow: none; }
.cx-bigalbum { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 72px; padding: 0 12px; margin-bottom: 8px; flex: none; border-radius: 16px; border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaf4, var(--cream-2)); box-shadow: 0 3px 10px rgba(90,30,60,.2), inset 0 0 0 2px rgba(255,255,255,.7); cursor: pointer; font-family: var(--font); color: var(--ink); }
.cx-bigalbum:active { transform: scale(.97); }
.cx-bigalbum img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid var(--gold-l); flex: none; }
.cx-bigalbum span { font-size: 16px; font-weight: 900; color: var(--pink-d); }
.cx-bigalbum b { padding: 2px 10px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 14px; }
