@font-face { font-family: "Lilita One"; src: url(/fonts/LilitaOne.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(/fonts/Fredoka.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }
:root {
  --honey: #ffc61a; --honey2: #f5a524; --amber: #c98a1b; --ink: #3b2a14; --ink2: #6b5636; --cream: #fff6dc; --paper: #fffdf6;
  --green: #4fb05a; --red: #e5484d; --pink: #ff7aa2; --line: #f0dfb4; --shadow: 0 6px 18px #6b4a1022;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Fredoka", system-ui, sans-serif; color: var(--ink); background: var(--cream); -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
h1, h2, h3, .big, .btn.big { font-family: "Lilita One", "Fredoka", sans-serif; font-weight: 400; letter-spacing: .3px; }
a { color: var(--amber); }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; padding: 6px 10px; border-radius: 8px; }
.boot { display: grid; place-items: center; height: 100vh; gap: 12px; color: var(--ink2); }
.boot-bee { width: 46px; height: 34px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--honey) 0 10px, #2b2118 10px 16px); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }

/* ---- buttons ---- */
.btn { border: 0; border-radius: 14px; padding: 10px 16px; background: linear-gradient(#ffd84a, var(--honey2)); color: #3b2412; font-weight: 600; box-shadow: 0 3px 0 var(--amber), var(--shadow); cursor: pointer; white-space: nowrap; min-height: 44px; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--amber); }
.btn:disabled { opacity: .45; cursor: default; filter: grayscale(.4); }
.btn.small { padding: 6px 10px; min-height: 36px; font-size: 14px; border-radius: 11px; }
.btn.big { font-size: 22px; padding: 14px 26px; border-radius: 18px; }
.btn.ghost { background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.btn.green { background: linear-gradient(#7fdc87, var(--green)); color: #fff; box-shadow: 0 3px 0 #2f7c38; }
.btn.red { background: linear-gradient(#ff8a8d, var(--red)); color: #fff; box-shadow: 0 3px 0 #a52a2e; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.inp { font: inherit; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; min-height: 44px; width: 100%; background: #fff; color: var(--ink); }
.fine { font-size: 13px; color: var(--ink2); line-height: 1.45; margin: 8px 0 0; }
.center { text-align: center; }
.note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: #fff3c4; font-size: 14px; line-height: 1.4; }
.note.warn { background: #ffe1d6; }
.rar { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px; }

/* ---- the game screen ---- */
.game, .welcome { position: fixed; inset: 0; overflow: hidden; }
.stage { position: absolute; inset: 0; background: linear-gradient(#bfe6ff, #fff6dc 70%); touch-action: none; }
.stage canvas.gl3d { display: block; position: absolute; inset: 0; }
.flat-stage, .flat-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flat-bee { position: absolute; left: 16%; top: 40%; width: 18px; height: 13px; margin: -6px 0 0 -9px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--c) 0 5px, #2b2118 5px 8px); box-shadow: 0 -5px 0 -2px #eaf6ffcc; transition: left 1s linear, top 1s linear; }
.flat-bee[data-stage="collect"] { animation: bob 1.1s ease-in-out infinite; }
.flat-bee[data-stage="rest"] { transform: scale(.85); }
.hud-top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; gap: 8px; align-items: stretch; pointer-events: none; }
.hud-top > * { pointer-events: auto; background: #fffdf6e8; border-radius: 16px; box-shadow: var(--shadow); padding: 6px 12px; }
.chip.field { border: 0; display: grid; text-align: left; cursor: pointer; border-left: 6px solid var(--g); max-width: 34vw; }
.chip.field b { font-size: 14px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.field small { font-size: 12px; color: var(--ink2); }
.bal { flex: 1; display: grid; justify-items: center; align-content: center; min-width: 0; }
.bal .big { font-size: 24px; line-height: 1; color: var(--amber); }
.bal small, .round small { font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.round { display: grid; justify-items: center; align-content: center; min-width: 64px; }
.round b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wake { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(min(46vh, 430px) + 12px + var(--safe-b)); border: 0; border-radius: 99px; padding: 12px 22px; font-family: "Lilita One", sans-serif; font-size: 19px; color: #3b2412; background: linear-gradient(#fff07a, var(--honey)); box-shadow: 0 4px 0 var(--amber), 0 8px 24px #c98a1b66; animation: pulse 1.4s ease-in-out infinite; cursor: pointer; z-index: 3; min-height: 48px; }
.wake[hidden] { display: none; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.06); } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: calc(min(46vh, 430px) + var(--safe-b)); background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 24px #6b4a1026; display: flex; flex-direction: column; transition: height .25s ease; z-index: 2; }
.sheet.closed { height: calc(62px + var(--safe-b)); }
.sheet.closed + .wake, .game:has(.sheet.closed) .wake { bottom: calc(74px + var(--safe-b)); }
.tabs { display: flex; padding: 6px 8px 0; gap: 4px; border-bottom: 2px solid var(--line); flex: none; }
.tab { flex: 1; border: 0; background: none; padding: 6px 4px 8px; border-radius: 12px 12px 0 0; font-weight: 600; font-size: 14px; color: var(--ink2); display: grid; justify-items: center; cursor: pointer; min-height: 52px; }
.tab .ti { font-size: 18px; line-height: 1.1; }
.tab.on { color: var(--ink); background: #fff3c4; }
.panel { flex: 1; overflow-y: auto; padding: 12px 12px calc(16px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.sheet.closed .panel { display: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats > div { background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--line); display: grid; gap: 2px; min-width: 0; }
.stats small { font-size: 11px; color: var(--ink2); }
.stats b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { display: block; height: 6px; background: #f3e6c3; border-radius: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #ffd84a, var(--honey2)); }
.meter[hidden] { display: none; }
.meter.phase { margin-top: 3px; height: 5px; }
.meter.phase i { transition: width 1s linear; }
.meter.phase.out i, .meter.phase.back i { background: linear-gradient(90deg, #9fd8ff, #3fa7f5); }
.meter.phase.collect i { background: linear-gradient(90deg, #c7f08f, #5cc96b); }
.meter.phase.vat i { background: linear-gradient(90deg, #ffe08a, #f08a24); }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.slot { border: 0; text-align: left; position: relative; background: #fff; border-radius: 16px; padding: 10px 10px 10px 50px; min-height: 76px; display: grid; gap: 3px; align-content: center; box-shadow: inset 0 0 0 2px var(--line); }
.slot b { font-size: 15px; }
.slot small { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.slot.bee { cursor: pointer; box-shadow: inset 0 0 0 2px var(--c); }
.slot.bee.resting { background: #fff4d6; }
.slot.empty, .slot.locked.next { padding-left: 12px; }
.slot.locked { background: #f6efe0; box-shadow: none; display: grid; place-items: center; padding: 10px; color: #b7a585; }
.slot.locked.next { place-items: stretch; color: var(--ink); }
.bee-ico { position: absolute; left: 10px; top: 50%; width: 32px; height: 24px; margin-top: -12px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--c, var(--honey)) 0 7px, #2b2118 7px 11px); box-shadow: 4px -9px 0 -4px #eaf6ff, -3px -9px 0 -4px #eaf6ff; }
.slot.bee.busy .bee-ico { animation: bob 1.2s ease-in-out infinite; }
.bee-ico.big { position: static; display: block; width: 64px; height: 48px; margin: 0; flex: none; }
.egg-ico { position: absolute; left: 14px; top: 50%; width: 24px; height: 31px; margin-top: -15px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, #fff1d6 60%, var(--c, #f3d9a8)); animation: wobble 2s ease-in-out infinite; }
@keyframes wobble { 40% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } }
.card { background: #fff; border-radius: 16px; padding: 12px; box-shadow: inset 0 0 0 2px var(--line); margin-bottom: 10px; }
.card > b { display: block; margin-bottom: 4px; }
.card.shop { display: flex; gap: 12px; align-items: center; }
.card.shop > div:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.card.shop small { font-size: 12px; color: var(--ink2); }
.shop-ico { position: relative; flex: none; width: 44px; height: 44px; left: auto; top: auto; margin: 0; }
.shop-ico.egg-ico { width: 34px; height: 44px; }
.cell-ico { clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); background: linear-gradient(#ffd84a, var(--honey2)); }
.lvl { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff3c4; display: grid; place-items: center; line-height: 1; }
.lvl small { font-size: 10px; color: var(--ink2); }
.maxed { font-weight: 700; color: var(--green); padding: 0 8px; }
.odds { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0 0; font-size: 11px; }
.odds span { color: var(--c); font-weight: 700; }
.panel h3 { margin: 14px 2px 8px; font-size: 18px; }
.card.claim { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card.claim > div { display: grid; gap: 2px; }
.card.claim .big { font-size: 26px; color: var(--amber); }
.card.claim small { font-size: 12px; color: var(--ink2); }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.mini td { padding: 5px 4px; border-top: 1px solid var(--line); }
.mini .num { text-align: right; font-variant-numeric: tabular-nums; }
.status { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 99px; background: #eee; }
.status.paid { background: #d5f5d8; color: #2f7c38; }
.status.pending, .status.sending { background: #fff3c4; color: #8a6200; }
.status.cancelled { background: #f6d5d5; color: #a52a2e; }
.ladder { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.ladder li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; font-size: 14px; }
.ladder li i { width: 14px; height: 14px; border-radius: 50%; background: var(--f); box-shadow: 0 0 0 3px var(--g); }
.ladder li small { color: var(--ink2); font-size: 12px; }
.ladder li.on { background: #fff3c4; font-weight: 700; }
.ladder li.past { opacity: .6; }
.segs { display: flex; gap: 6px; }
.seg { flex: 1; border: 0; padding: 8px; border-radius: 10px; background: #f6efe0; cursor: pointer; font-weight: 600; min-height: 40px; }
.seg.on { background: var(--honey); }
.toggle { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; }
.card.me { display: flex; justify-content: space-between; align-items: center; }
.card.me > div { display: grid; }
.card.me small, .card .row small { font-size: 12px; color: var(--ink2); }
.bee-card { display: flex; gap: 14px; align-items: flex-start; }
.bee-card p { margin: 6px 0 0; }
.wallets { display: grid; gap: 8px; }
.wopt { text-align: center; text-decoration: none; display: block; }

/* ---- welcome ---- */
.hero { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); max-width: 460px; margin: 0 auto; background: #fffdf6ee; border-radius: 24px; padding: 18px 18px 14px; box-shadow: var(--shadow); text-align: center; }
.hero h1 { margin: 0; font-size: 46px; color: var(--amber); text-shadow: 0 3px 0 #ffe9a8; }
.hero .tag { margin: 6px 0 14px; font-size: 17px; line-height: 1.35; }
.hero .btn.big { width: 100%; }

/* ---- plain pages ---- */
.page { max-width: 680px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 16px 40px; line-height: 1.5; }
.page h1 { font-size: 34px; color: var(--amber); margin: 10px 0; }
.page h2 { margin-top: 22px; }
.steps li { margin-bottom: 8px; }
.back { font-weight: 600; text-decoration: none; }

/* ---- modals and toasts ---- */
.modal-back { position: fixed; inset: 0; background: #3b2a1455; display: grid; place-items: end center; z-index: 50; animation: fade .15s; }
.modal-back.out { opacity: 0; transition: opacity .15s; }
.modal-card { width: min(520px, 100%); max-height: 86vh; overflow: auto; background: var(--paper); border-radius: 22px 22px 0 0; padding: 14px 16px calc(18px + var(--safe-b)); box-shadow: var(--shadow); outline: none; animation: up .2s ease; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-card .x { border: 0; background: #f6efe0; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); } }
.toasts { position: fixed; top: calc(70px + var(--safe-t)); left: 0; right: 0; display: grid; justify-items: center; gap: 6px; z-index: 60; pointer-events: none; }
.toast { background: #3b2a14; color: #fff; padding: 9px 14px; border-radius: 14px; font-size: 14px; max-width: 92vw; box-shadow: var(--shadow); animation: up .2s; }
.toast.good { background: #2f7c38; }
.toast.bad { background: #a52a2e; }
.toast.out { opacity: 0; transition: opacity .3s; }

/* ---- wide screens: the sheet becomes a side panel ---- */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .sheet, .sheet.closed { top: 12px; right: 12px; bottom: 12px; left: auto; width: 400px; height: auto; border-radius: 22px; }
  .sheet.closed .panel { display: block; }
  .hud-top { right: 424px; }
  .wake, .game:has(.sheet.closed) .wake { left: calc((100% - 412px) / 2); bottom: 28px; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .modal-back { place-items: center; }
  .modal-card { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.slots > * { min-width: 0; }
.slot .btn.small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.field { max-width: 38vw; }
.chip.field b { font-size: 13px; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .hero { left: auto; right: 32px; top: 50%; bottom: auto; transform: translateY(-50%); width: 400px; margin: 0; }
}

.soon { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff3c4; color: #5a3b00; text-align: center; }
.soon b { font-family: "Lilita One", sans-serif; font-size: 22px; letter-spacing: .02em; }
.modal-card h3 { margin: 14px 0 6px; font-size: 16px; }
textarea.inp { resize: vertical; min-height: 76px; }

/* ---- graphics settings and the vignette over the 3D view (steps without post-processing) ---- */
.segs.wrap { flex-wrap: wrap; margin-top: 8px; }
.segs.wrap .seg { flex: 1 0 auto; min-width: 64px; font-size: 13px; padding: 6px 8px; min-height: 36px; }
.stage.vignette::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 120% 95% at 50% 42%, transparent 55%, #3b2a1433 100%); }

/* ---- polish: light surfaces, soft depth, honeycomb texture, small springy motions ---- */
:root { color-scheme: light; --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8zM14 32l14 8v16M14 32L0 40v16' fill='none' stroke='%23f0dfb4' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --spring: cubic-bezier(.2, 1.35, .4, 1); --shadow2: 0 1px 0 #fff inset, 0 8px 22px #6b4a1022, 0 2px 4px #6b4a1014; }
body { background: var(--cream) var(--hex); }
.hud-top > * { background: linear-gradient(#fffefb, #fff8e6e8); box-shadow: var(--shadow2); border: 1px solid #ffffffb0; }
.bal .big { display: inline-block; text-shadow: 0 2px 0 #ffe9a8; }
.bal .big.bump { animation: bump .7s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.28); color: #e08a00; } 100% { transform: scale(1); } }
.chip.field { transition: transform .15s var(--spring); }
.chip.field:active { transform: scale(.96); }
.sheet { background: var(--paper) var(--hex); box-shadow: 0 -8px 28px #6b4a102e, 0 -1px 0 #fff inset; }
.sheet::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 9px; background: #e6d3a6; }
.tabs { padding-top: 12px; }
.tab { transition: color .15s, background .2s; }
.tab .ti { display: grid; place-items: center; height: 24px; }
.tab.on { background: linear-gradient(#fff3c4, #ffe9a0); color: #5a3a10; box-shadow: 0 -1px 0 #fff inset; }
.tab.on .ti svg { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.7) rotate(-8deg); } 100% { transform: none; } }
.panel.enter > * { animation: rise .32s var(--spring) both; }
.panel.enter > *:nth-child(2) { animation-delay: .04s; } .panel.enter > *:nth-child(3) { animation-delay: .08s; } .panel.enter > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.btn { position: relative; overflow: hidden; transition: transform .12s var(--spring), box-shadow .12s, filter .15s; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, #ffffff66 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s; pointer-events: none; }
.btn:hover:not(:disabled)::after { transform: translateX(120%); }
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: translateY(2px) scale(.98); }
:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
.card, .stats > div { background: linear-gradient(#fff, #fffcf3); box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 #f0dfb4aa; }
.slot { background: linear-gradient(#fff, #fffaf0); box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 #f0dfb4aa; transition: transform .18s var(--spring), box-shadow .18s; }
.slot.bee { box-shadow: inset 0 0 0 2px var(--c), 0 3px 0 color-mix(in srgb, var(--c) 35%, transparent); }
.slot.bee:hover { transform: translateY(-2px); }
.slot.bee:active { transform: scale(.98); }
.slot.bee[data-r="epic"], .slot.bee[data-r="legendary"] { animation: aura 2.4s ease-in-out infinite; }
@keyframes aura { 50% { box-shadow: inset 0 0 0 2px var(--c), 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 3px 12px color-mix(in srgb, var(--c) 40%, transparent); } }
.slot.locked { background: #f6efe0 var(--hex); }
.bee-ico { background: radial-gradient(circle at 35% 30%, #ffffff66, transparent 45%), repeating-linear-gradient(90deg, var(--c, var(--honey)) 0 7px, #2b2118 7px 11px); box-shadow: inset -3px -4px 0 #00000022; }
.bee-ico::before, .bee-ico::after { content: ""; position: absolute; top: -9px; width: 14px; height: 11px; border-radius: 50%; background: #eaf6ffdd; box-shadow: inset 0 0 0 1px #c8e4f5; transform-origin: 50% 100%; }
.bee-ico::before { left: 4px; transform: rotate(-18deg); } .bee-ico::after { left: 13px; transform: rotate(14deg); }
.slot.bee.busy .bee-ico::before, .slot.bee.busy .bee-ico::after { animation: flutter .12s linear infinite alternate; }
@keyframes flutter { to { transform: rotate(0deg) scaleY(.55); } }
.bee-ico.big { position: relative; }
.meter { box-shadow: inset 0 1px 2px #6b4a1018; }
.meter i { border-radius: 9px; background-size: 200% 100%; }
.meter.phase[class] i { background-image: repeating-linear-gradient(-45deg, #ffffff38 0 6px, transparent 6px 12px), var(--bar, linear-gradient(90deg, #ffd84a, var(--honey2))); background-size: 24px 100%, 100% 100%; animation: march 1s linear infinite; }
.meter.phase.out i, .meter.phase.back i { --bar: linear-gradient(90deg, #9fd8ff, #3fa7f5); }
.meter.phase.collect i { --bar: linear-gradient(90deg, #c7f08f, #5cc96b); }
.meter.phase.vat i { --bar: linear-gradient(90deg, #ffe08a, #f08a24); }
@keyframes march { to { background-position: 24px 0, 0 0; } }
.toast { border-radius: 16px; animation: toastIn .35s var(--spring); box-shadow: 0 10px 26px #3b2a1440; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.94); } }
.modal-card { animation: up .32s var(--spring); background: var(--paper) var(--hex); }
.wake { overflow: hidden; }
.wake::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, #ffffff88 50%, transparent 65%); animation: sweep 2.6s ease-in-out infinite; }
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.seg { transition: background .15s, transform .12s var(--spring); }
.seg:active { transform: scale(.96); }
.seg.on { background: linear-gradient(#ffe066, var(--honey)); box-shadow: 0 2px 0 var(--amber); }
.hero { box-shadow: var(--shadow2); border: 1px solid #fff; }
.hero h1 { letter-spacing: .5px; }
/* the flat view's bees: striped, with fluttering wings */
.flat-bee { width: 20px; height: 14px; box-shadow: inset -2px -3px 0 #00000026; background: radial-gradient(circle at 35% 30%, #ffffff66, transparent 45%), repeating-linear-gradient(90deg, var(--c) 0 5px, #2b2118 5px 8px); }
.flat-bee::before, .flat-bee::after { content: ""; position: absolute; top: -7px; width: 9px; height: 8px; border-radius: 50%; background: #f2fbffdd; box-shadow: inset 0 0 0 1px #bfe0f2; transform-origin: 50% 100%; animation: flutter .1s linear infinite alternate; }
.flat-bee::before { left: 3px; } .flat-bee::after { left: 9px; }
.flat-bee[data-stage="rest"]::before, .flat-bee[data-stage="rest"]::after { animation: none; }
.flat-clouds { animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(8px); } }

/* ---- big moments (client/moments.ts): hatch reveal, first-minute tour, offline pill ---- */
.hatch { position: relative; height: 190px; display: grid; place-items: center; overflow: hidden; margin: 4px 0 2px; }
.hatch .rays { position: absolute; width: 340px; height: 340px; border-radius: 50%; opacity: 0; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 45%, transparent) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: raysIn .5s .55s ease-out forwards, spin 9s .55s linear infinite; }
.hatch .glow { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #fff 0, color-mix(in srgb, var(--c) 70%, #fff) 35%, transparent 70%); opacity: 0; animation: flash .7s .5s ease-out forwards; }
.hatch .shell { position: absolute; left: 50%; width: 76px; margin-left: -38px; background: radial-gradient(circle at 35% 30%, #fff, #fff6e0 55%, #f1dfb8); box-shadow: inset -4px -5px 0 #0000000f; z-index: 2; }
.hatch .shell::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: linear-gradient(135deg, transparent 33%, var(--paper) 33% 66%, transparent 66%) 0 0 / 12px 10px repeat-x; }
.hatch .shell.top { top: 46px; height: 52px; border-radius: 50% 50% 0 0 / 80% 80% 0 0; animation: shake .5s ease-in-out, shellTop .7s .5s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.hatch .shell.top::after { bottom: -5px; }
.hatch .shell.bot { top: 98px; height: 40px; border-radius: 0 0 50% 50% / 0 0 90% 90%; animation: shake .5s ease-in-out, shellBot .7s .5s ease-in forwards; }
.hatch .shell.bot::after { top: -5px; transform: scaleY(-1); }
.hatch .hatchling { position: relative; z-index: 1; left: auto; top: auto; margin: 0; transform: scale(0); animation: popOut .6s .62s cubic-bezier(.3, 1.6, .5, 1) forwards, bob 1.4s 1.3s ease-in-out infinite; }
.hatch .hatchling::before, .hatch .hatchling::after { animation: flutter .1s linear infinite alternate; }
.hatch .confetti { position: absolute; left: 50%; top: 50%; }
.hatch .confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: burst 1.1s calc(.55s + var(--d)) cubic-bezier(.2, .7, .4, 1) forwards; }
.hatch.rare .confetti i:nth-child(odd) { border-radius: 50%; width: 9px; height: 9px; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes shellTop { to { transform: translate(-46px, -60px) rotate(-38deg); opacity: 0; } }
@keyframes shellBot { 60% { opacity: 1; } to { transform: translate(30px, 70px) rotate(24deg); opacity: 0; } }
@keyframes popOut { 0% { transform: scale(0) translateY(20px); } 100% { transform: scale(1.5); } }
@keyframes flash { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: .55; transform: scale(1.6); } }
@keyframes raysIn { to { opacity: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); } }
.hatch-name { text-align: center; font-size: 22px; margin: 4px 0; font-family: "Lilita One", "Fredoka", sans-serif; }
.celebrate .modal-card { box-shadow: 0 0 0 3px #ffd16688, 0 18px 50px #6b4a1055; }
.row.center { justify-content: center; }

.intro { text-align: center; }
.intro h3 { font-size: 22px; margin: 6px 0 4px; }
.intro p { margin: 0 auto 10px; max-width: 34em; line-height: 1.45; }
.intro-art { height: 96px; display: grid; place-items: center; position: relative; }
.intro-art::before { content: ""; position: absolute; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #ffe9a8, #ffd16600 70%); }
.intro-art > span { position: relative; left: auto; top: auto; margin: 0; }
.intro-art.bee > span { animation: bob 1.3s ease-in-out infinite; }
.intro-art.bee > span::before, .intro-art.bee > span::after { animation: flutter .12s linear infinite alternate; }
.intro-art.egg > span { width: 40px; height: 52px; animation: wobble 1.4s ease-in-out infinite; }
.jar-ico { display: block; width: 46px; height: 54px; border-radius: 10px 10px 14px 14px; background: linear-gradient(#fff8 0 0) 8px 10px / 6px 26px no-repeat, linear-gradient(to top, var(--honey) 0 62%, #fff4d6 62%); box-shadow: inset 0 0 0 3px #e9c46a, 0 -8px 0 -2px #e5484d; animation: bob 2s ease-in-out infinite; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width .25s, background .25s; }
.dots i.on { width: 22px; border-radius: 4px; background: var(--honey2); }
.linkish { border: 0; background: none; padding: 0; color: var(--amber); text-decoration: underline; cursor: pointer; }

.offline { position: fixed; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); z-index: 70; background: #3b2a14; color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); animation: toastIn .3s; }
.offline::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--honey); animation: pulseDot 1s ease-in-out infinite; }
@keyframes pulseDot { 50% { opacity: .3; } }

/* plain pages: not found, terms */
.page .lost { text-align: center; padding-top: 30px; }
.page .lost .bee-ico { margin: 20px auto; animation: bob 1.4s ease-in-out infinite; }
.page .lost .bee-ico::before, .page .lost .bee-ico::after { animation: flutter .12s linear infinite alternate; }
.page .loading { color: var(--ink2); }
@media (prefers-reduced-motion: reduce) {
  .hatch *, .intro-art *, .jar-ico, .offline::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
  .hatch .hatchling { transform: scale(1.5); }
}
@media (max-height: 520px) { .hatch { height: 130px; } .hatch .shell.top { top: 22px; } .hatch .shell.bot { top: 74px; } .intro-art { height: 64px; } }
