:root {
  color-scheme: dark;
}

html, body {
  margin: 0;
  height: 100%;
  background: #0c0a08;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  overscroll-behavior-y: contain;
}

* { box-sizing: border-box; }

a { color: #ffa64d; }
a:hover { color: #ffbe7a; }

input { outline: none; }
button { font-family: 'Manrope', system-ui, sans-serif; }

::-webkit-scrollbar { width: 0; height: 0; }

#root {
  height: 100dvh;
  min-height: 100dvh;
  background: #14110d;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ---------- app shell (header / scroll area / bottom tabs) ---------- */

.bh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid #241f18;
  background: #171310;
  flex: none;
}

.bh-scroll {
  flex: 1;
  overflow-y: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.bh-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 8px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 14, 11, .92);
  backdrop-filter: blur(12px);
  border-top: 1px solid #241f18;
  z-index: 20;
}

/* ---------- animations (ported verbatim) ---------- */

@keyframes bhPop { 0% { transform: scale(.3); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes bhRise {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 1; transform: translate(-50%, -44px); }
  100% { opacity: 0; transform: translate(-50%, -62px); }
}
@keyframes bhFlick {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  30% { transform: rotate(-42deg) scale(1.08, .92); }
  60% { transform: rotate(-48deg) scale(.92, 1.1); }
}
@keyframes bhIn { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes bhFall { 0% { opacity: 1; transform: translateY(-24px) rotate(0deg); } 100% { opacity: 0; transform: translateY(600px) rotate(560deg); } }
@keyframes bhPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes bhGrow { 0% { transform: scaleY(.1); } 100% { transform: scaleY(1); } }
@keyframes bhDash { 0% { stroke-dashoffset: 600; } 100% { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bh-anim, .bh-header *, .bh-scroll * { animation: none !important; }
}
