@font-face {
  font-family: Arame-Thin;
  src: url(fonts/arame.OTF);
}

@font-face {
  font-family: Gilroy-Regular;
  src: url(fonts/Gilroy-Regular.ttf);
}

:root {
  --gold: #ffd342;
  --gold-soft: #ffd700;
  --amber: #ffa01c;
  --panel: #231a0f;
  --panel-2: #1b140b;
  --line: rgba(255, 255, 255, 0.06);
  --white-dim: rgba(255, 255, 255, 0.72);
  --green: #3fbf76;
  --green-bg: rgba(43, 156, 92, 0.2);
  --red: #ff4144;
  --smoke: #dde5ed;
  --smoke-dark: #9fb0c1;
}

html {
  font-size: clamp(13px, 1.75vh, 40px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  height: 100vh;
  overflow: hidden;
  background: transparent;
  font-family: Gilroy-Regular, sans-serif;
}

.shop {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.shop.open {
  display: flex;
}

.board {
  position: relative;
  width: min(84rem, 84vw, calc(92vh * 1.4394));
  aspect-ratio: 1045 / 726;
  border-radius: 1.1rem;
  background: url(images/bg-bee-market.webp) no-repeat center;
  background-size: 100% 100%;
  animation: boardIn 0.5s cubic-bezier(0.2, 0.9, 0.24, 1.04) both;
}

.deco {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  animation: decoIn 0.5s cubic-bezier(0.22, 1, 0.32, 1) both;
}

.bee-1 { left: 57.5%; top: 1.2%; width: 5.2%; animation-delay: 0.24s; }
.bee-2 { left: 0.6%; top: 39.5%; width: 5.2%; animation-delay: 0.3s; }
.bee-3 { left: 93.6%; top: 19.5%; width: 5.2%; animation-delay: 0.27s; }
.bee-4 { left: 0.6%; top: 71.5%; width: 5.2%; animation-delay: 0.34s; }
.flower-1 { left: 0.4%; top: 7.5%; width: 5.4%; animation-delay: 0.18s; }
.flower-2 { left: 87.5%; top: 59.0%; width: 10.8%; animation-delay: 0.22s; }

.flight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.flight-dash {
  fill: none;
  stroke: rgba(255, 211, 66, 0.55);
  stroke-width: 2.2;
  stroke-dasharray: 6 9;
  stroke-linecap: round;
}

.flight-reveal {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
}

.trail-a {
  stroke: #454545;
  stroke-dasharray: 200 2000;
  stroke-dashoffset: 200;
}

.trail-b {
  stroke: #8f8f8f;
  stroke-dasharray: 115 2000;
  stroke-dashoffset: 115;
}

.trail-c {
  stroke: #ffffff;
  stroke-dasharray: 55 2000;
  stroke-dashoffset: 55;
}

.flight-bee {
  opacity: 0;
}

.board.fly .trail-a {
  animation: trailA 3.5s linear 0.35s forwards;
}

.board.fly .trail-b {
  animation: trailB 3.5s linear 0.35s forwards;
}

.board.fly .trail-c {
  animation: trailC 3.5s linear 0.35s forwards;
}

.board.fly .flight-dash {
  animation: beeDash 3.5s linear 0.35s forwards;
}

.board.fly .flight-bee {
  animation: beeFade 3.5s linear 0.35s forwards;
}

@keyframes trailA {
  to { stroke-dashoffset: -800; }
}

@keyframes trailB {
  to { stroke-dashoffset: -885; }
}

@keyframes trailC {
  to { stroke-dashoffset: -945; }
}

@keyframes beeDash {
  0% { opacity: 1; }
  86% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes beeFade {
  0% { opacity: 0; }
  4% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; }
}

.head {
  position: absolute;
  left: 3.3%;
  right: 3.3%;
  top: 4.0%;
  height: 8.5%;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.title {
  animation: shopIn 0.34s ease 0.14s both;
  font-family: Arame-Thin, sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0.07rem 0.16rem rgba(0, 0, 0, 0.85);
}

.title b {
  font-weight: normal;
  color: var(--gold);
}

.subtitle {
  animation: shopIn 0.34s ease 0.2s both;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--white-dim);
  text-shadow: 0 0.07rem 0.16rem rgba(0, 0, 0, 0.85);
}

.close {
  animation: shopIn 0.34s ease 0.26s both;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.28rem;
  background: rgba(255, 65, 68, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease background;
}

.close img {
  width: 1.05rem;
  height: 1.05rem;
}

.close:hover {
  background: rgba(255, 65, 68, 0.34);
}

.body {
  position: absolute;
  left: 3.3%;
  top: 14.5%;
  width: 93.4%;
  height: 80.5%;
  z-index: 2;
  display: flex;
  gap: 1.1rem;
}

.list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-right: 0.5rem;
}

.list::-webkit-scrollbar,
.cart-list::-webkit-scrollbar {
  width: 0.26rem;
}

.list::-webkit-scrollbar-track,
.cart-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.2rem;
}

.list::-webkit-scrollbar-thumb,
.cart-list::-webkit-scrollbar-thumb {
  background: rgba(255, 160, 28, 0.5);
  border-radius: 0.2rem;
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.8rem 1.1rem;
  border-radius: 0.35rem;
  background: var(--panel);
  border: 0.07rem solid var(--line);
  animation: rowIn 0.32s ease both;
  animation-delay: calc(var(--i) * 0.05s + 0.24s);
  transition: 0.25s ease border-color, 0.25s ease background;
}

.row:hover {
  border-color: rgba(255, 160, 28, 0.45);
  background: #2a2013;
}

.row-img {
  flex: 0 0 auto;
  width: 5rem;
  height: 5rem;
  border-radius: 0.3rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 160, 28, 0.22), rgba(255, 160, 28, 0) 62%),
    rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-img img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.row-info {
  flex: 1;
  min-width: 0;
}

.row-name {
  font-family: Arame-Thin, sans-serif;
  font-size: 1.2rem;
  color: #fff;
}

.row-name span {
  font-family: Gilroy-Regular, sans-serif;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

.row-desc {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.3rem;
  max-height: 2.6rem;
  overflow: hidden;
  color: var(--white-dim);
}

.row-price {
  flex: 0 0 auto;
  padding: 0.35rem 0.75rem;
  border-radius: 0.18rem;
  font-size: 1rem;
  color: var(--green);
  background: var(--green-bg);
}

.row-add {
  flex: 0 0 auto;
  width: 7.4rem;
  height: 2.6rem;
  border: 0;
  border-radius: 0.18rem;
  cursor: pointer;
  font-family: Arame-Thin, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: #9a9a9a;
  background: rgba(255, 255, 255, 0.05);
  transition: 0.25s ease all;
}

.row-add:hover {
  color: #241a0c;
  background: var(--amber);
  box-shadow: 0 0 1.4rem rgba(255, 160, 28, 0.45), inset 0 0 0.5rem rgba(255, 255, 255, 0.28);
}

.row.active .row-add {
  color: var(--gold);
  background: rgba(255, 211, 66, 0.14);
}

.cart {
  position: relative;
  animation: shopIn 0.4s ease 0.3s both;
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
  border-radius: 0.35rem;
  background: var(--panel-2);
  border: 0.07rem solid var(--line);
  overflow: hidden;
}

.cart-list {
  flex: 1;
  margin: 0 0 0.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.35rem;
}

.cart-empty {
  margin: auto;
  font-size: 0.88rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}

.cart-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.035);
  animation: rowIn 0.22s ease both;
}

.cart-img {
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.22rem;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-img img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.cart-info {
  flex: 1;
  min-width: 0;
}

.cart-name {
  font-family: Arame-Thin, sans-serif;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-sub {
  margin-top: 0.22rem;
  font-size: 0.78rem;
  color: var(--green);
}

.cart-qty {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-radius: 0.18rem;
  background: rgba(0, 0, 0, 0.3);
}

.qty-btn {
  width: 1.5rem;
  height: 1.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--white-dim);
  transition: 0.15s ease all;
}

.qty-btn:hover {
  color: #241a0c;
  background: var(--amber);
}

.qty-val {
  width: 2.2rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  outline: 0;
  text-align: center;
  user-select: text;
  font-family: Gilroy-Regular, sans-serif;
  font-size: 0.85rem;
  color: #fff;
  background: transparent;
  transition: 0.15s ease background;
}

.qty-val:focus {
  background: rgba(255, 160, 28, 0.22);
}

.cart-remove {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 0.18rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(255, 65, 68, 0.7);
  background: rgba(255, 65, 68, 0.09);
  transition: 0.2s ease all;
}

.cart-remove:hover {
  color: #fff;
  background: rgba(255, 65, 68, 0.45);
}

.cart-foot {
  animation: shopFade 0.4s ease 0.46s both;
  padding-top: 0.85rem;
  border-top: 0.07rem solid var(--line);
}

.cart-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-line span {
  font-family: Arame-Thin, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--white-dim);
}

.cart-line em {
  font-family: Gilroy-Regular, sans-serif;
  font-style: normal;
  font-size: 1rem;
  color: #fff;
}

.cart-line.total {
  margin-bottom: 0.85rem;
}

.cart-line.total b {
  font-family: Gilroy-Regular, sans-serif;
  font-size: 1.65rem;
  font-weight: normal;
  color: var(--gold);
}

.checkout {
  height: 3rem;
  border-radius: 0.18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: Arame-Thin, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: #9a9a9a;
  background: rgba(255, 255, 255, 0.05);
  transition: 0.25s ease all;
}

.checkout.ready {
  color: #241a0c;
  background: var(--amber);
}

.checkout.ready:hover {
  box-shadow: 0 0 1.8rem rgba(255, 160, 28, 0.5), inset 0 0 0.6rem rgba(255, 255, 255, 0.3);
}

.checkout.poor {
  color: var(--red);
  background: rgba(255, 65, 68, 0.12);
  cursor: default;
}

.notify-stack {
  position: absolute;
  left: 1.6vw;
  top: 50%;
  width: 17rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.notify {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.95rem;
  border-radius: 0.35rem;
  background:
    linear-gradient(180deg, rgba(26, 17, 8, 0.32) 0%, rgba(18, 12, 6, 0.72) 100%),
    url(images/panel-wood.webp) center / cover;
  border: 0.09rem solid rgba(255, 211, 66, 0.26);
  box-shadow:
    inset 0 0 1.8rem rgba(0, 0, 0, 0.5),
    0 0.5rem 1.3rem rgba(0, 0, 0, 0.62);
  animation: notifyIn 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.notify-hex {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.04rem;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
  background: linear-gradient(180deg, var(--gold) 0%, var(--amber) 100%);
  filter: drop-shadow(0 0 0.45rem rgba(255, 211, 66, 0.45));
  animation: notifyHexPop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.1s both;
}

.notify-hex svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: #241a0c;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notify.success .notify-hex {
  background: linear-gradient(180deg, #7ee6a8 0%, #2f9c5c 100%);
  filter: drop-shadow(0 0 0.45rem rgba(63, 191, 118, 0.45));
}

.notify.error .notify-hex {
  background: linear-gradient(180deg, #ff8a8c 0%, #c62a2d 100%);
  filter: drop-shadow(0 0 0.45rem rgba(255, 65, 68, 0.45));
}

.notify-body {
  flex: 1;
  min-width: 0;
}

.notify.out {
  animation: notifyOut 0.3s ease both;
}

.notify-title {
  font-family: Arame-Thin, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.notify.success .notify-title {
  color: #6ede9a;
}

.notify.error .notify-title {
  color: #ff6b6d;
}

.notify-text {
  margin-top: 0.28rem;
  font-family: Gilroy-Regular, sans-serif;
  font-size: 0.72rem;
  line-height: 1.02rem;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes notifyIn {
  0% {
    opacity: 0;
    transform: translateY(2.2rem) scale(0.86);
  }
  55% {
    opacity: 1;
    transform: translateY(-0.22rem) scale(1.035);
  }
  78% {
    transform: translateY(0.06rem) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes notifyHexPop {
  from {
    opacity: 0;
    transform: scale(0.35) rotate(-40deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes notifyOut {
  to {
    opacity: 0;
    transform: translateY(1.1rem) scale(0.92);
  }
}

.helpbox {
  position: absolute;
  left: 50%;
  bottom: 1.8vh;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92vw;
  display: none;
  align-items: flex-start;
  gap: 2.2rem;
  padding: 1rem 2.6rem;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 72%);
}

.helpbox.show {
  display: flex;
  animation: helpIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.helpbox.show.hide {
  animation: helpOut 0.34s cubic-bezier(0.4, 0, 0.9, 0.35) both;
}

.helpbox-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
}

.helpbox-key {
  min-width: 2.85rem;
  height: 2.47rem;
  padding: 0 0.6rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
  font-family: Arame-Thin, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  color: #241a0c;
  background: linear-gradient(180deg, var(--gold) 0%, var(--amber) 100%);
  filter: drop-shadow(0 0.2rem 0.5rem rgba(0, 0, 0, 0.75));
}

.helpbox-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.helpbox-text {
  font-family: Arame-Thin, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  text-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.95);
}

.helpbox-num {
  font-family: Gilroy-Regular, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

@keyframes helpIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(1.9rem) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-0.42rem) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@keyframes helpOut {
  0% {
    opacity: 1;
    transform: translateX(-50%);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) translateY(-0.42rem) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(1.9rem) scale(0.9);
  }
}

.progress {
  position: absolute;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  display: none;
}

.progress.show {
  display: block;
  animation: progressIn 0.25s ease both;
}

.progress-panel {
  position: relative;
  width: 34rem;
  padding: 0.95rem 1.2rem 1.05rem 2.2rem;
  border-radius: 0.4rem;
  background:
    linear-gradient(180deg, rgba(26, 17, 8, 0.3) 0%, rgba(18, 12, 6, 0.68) 100%),
    url(images/panel-wood.webp) center / cover;
  border: 0.09rem solid rgba(255, 211, 66, 0.28);
  box-shadow:
    inset 0 0 2.2rem rgba(0, 0, 0, 0.55),
    inset 0 0.09rem 0 rgba(255, 211, 66, 0.14),
    0 0.7rem 1.8rem rgba(0, 0, 0, 0.65);
}

.progress-flower {
  position: absolute;
  left: -1.5rem;
  bottom: -1.1rem;
  width: 4.2rem;
  pointer-events: none;
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.progress-label {
  font-family: Arame-Thin, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: #fff;
}

.progress-percent {
  font-family: Gilroy-Regular, sans-serif;
  font-size: 1.05rem;
  color: var(--gold);
}

.progress-comb-wrap {
  position: relative;
}

.progress-comb {
  display: flex;
  gap: 0.3rem;
  height: 1.53rem;
}

.comb-cell {
  flex: 1;
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, filter 0.2s ease;
}

.comb-cell.on {
  background: linear-gradient(180deg, var(--gold) 0%, var(--amber) 100%);
}

.comb-cell.lead {
  filter: drop-shadow(0 0 0.55rem rgba(255, 211, 66, 0.9));
}

.status.steal .comb-cell.on {
  background: linear-gradient(180deg, #2b2b2b 0%, #000 100%);
}

.status.steal .comb-cell.lead {
  filter: drop-shadow(0 0 0.55rem rgba(0, 0, 0, 0.85));
}

.status-jar.steal {
  width: 3.4rem;
}

.status.above {
  bottom: 24vh;
}

.status .progress-panel {
  width: 26rem;
  padding: 0.7rem 1.3rem 0.8rem 2.2rem;
}

.status .progress-head {
  margin-bottom: 0.55rem;
}

.status .progress-label {
  font-size: 0.82rem;
  color: var(--gold);
}

.status-lane {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.status-lane .progress-comb-wrap {
  flex: 1;
}

.status-jar {
  flex: 0 0 auto;
  width: 2.3rem;
  filter: drop-shadow(0 0.18rem 0.35rem rgba(0, 0, 0, 0.65));
}

.status-jar.smoke {
  width: 4.3rem;
}

.status .progress-comb {
  height: auto;
  gap: 0.26rem;
}

.status .comb-cell {
  aspect-ratio: 1.2;
}

.status .progress-bee {
  width: 2.2rem;
}

.status.smoke .progress-label {
  color: var(--smoke);
}

.status.smoke .comb-cell.on {
  background: linear-gradient(180deg, var(--smoke) 0%, var(--smoke-dark) 100%);
}

.status.smoke .comb-cell.lead {
  filter: drop-shadow(0 0 0.55rem rgba(226, 234, 242, 0.85));
}

.status-sub {
  margin-top: 0.55rem;
  font-family: Arame-Thin, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
  color: rgba(255, 255, 255, 0.72);
}

.progress-bee {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 2;
  width: 2.8rem;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0.18rem 0.3rem rgba(0, 0, 0, 0.65));
  pointer-events: none;
  animation: beeHover 0.55s ease-in-out infinite alternate;
}

@keyframes beeHover {
  from {
    transform: translate(-50%, -50%) translateY(-0.11rem) rotate(-5deg);
  }
  to {
    transform: translate(-50%, -50%) translateY(0.11rem) rotate(5deg);
  }
}

@keyframes progressIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.8rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@keyframes boardIn {
  from {
    opacity: 0;
    transform: translateY(2.2rem) scale(0.985);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shopIn {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shopFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes decoIn {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(-0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.crank {
  position: fixed;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 26rem;
  height: 3.4rem;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.crank.show {
  opacity: 1;
}

.crank-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.35rem;
  transform: translateY(-50%);
  border-radius: 0.7rem;
  background: rgba(27, 20, 11, 0.88);
  border: 1px solid rgba(255, 211, 66, 0.35);
  box-shadow: 0 0.2rem 0.9rem rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.crank-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 160, 28, 0.75), var(--gold));
  box-shadow: 0 0 1.2rem rgba(255, 211, 66, 0.5);
  transition: width 0.12s linear;
}

.crank-chevrons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-right: 0.9rem;
}

.crank-chevrons span {
  width: 0.62rem;
  height: 0.62rem;
  border-top: 0.2rem solid rgba(255, 211, 66, 0.8);
  border-right: 0.2rem solid rgba(255, 211, 66, 0.8);
  transform: rotate(45deg);
}

.crank.show .crank-chevrons span {
  animation: crankPush 1.1s ease-in-out infinite;
}

.crank.show .crank-chevrons span:nth-child(2) { animation-delay: 0.12s; }
.crank.show .crank-chevrons span:nth-child(3) { animation-delay: 0.24s; }

@keyframes crankPush {
  0%, 100% { opacity: 0.25; transform: rotate(45deg) translate(-0.1rem, 0.1rem); }
  50% { opacity: 1; transform: rotate(45deg) translate(0.1rem, -0.1rem); }
}

.crank-handle {
  position: absolute;
  left: 0;
  top: 50%;
  width: 2.6rem;
  height: 2.9rem;
  margin-left: -1.3rem;
  transform: translateY(-50%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(180deg, var(--gold) 0%, var(--amber) 100%);
  filter: drop-shadow(0 0.2rem 0.5rem rgba(0, 0, 0, 0.6));
  transition: left 0.06s linear;
}

.crank-handle::after {
  content: "";
  position: absolute;
  inset: 22%;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--panel);
}

.jarmark {
  position: fixed;
  z-index: 4;
  width: 7vh;
  height: 7vh;
  margin: -3.5vh 0 0 -3.5vh;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 211, 66, 0) 38%,
    rgba(255, 211, 66, 0.3) 56%,
    rgba(255, 211, 66, 0.5) 68%,
    rgba(255, 211, 66, 0) 78%);
}

.jarmark.show {
  opacity: 1;
  animation: jarMarkPulse 1.6s ease-in-out infinite;
}

@keyframes jarMarkPulse {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
}

.pour {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pour.show {
  opacity: 1;
}

#pourBody {
  fill: url(#pourGrad);
  stroke: none;
}

#pourGloss {
  fill: none;
  stroke: rgba(230, 198, 82, 0.42);
  stroke-linecap: round;
}

#pourShine {
  fill: none;
  stroke: rgba(238, 212, 116, 0.38);
  stroke-linecap: round;
}

#pourTip {
  fill: url(#pourTipGrad);
}

}
