:root {
  --paper: #ded5b5;
  --paper-light: #eee6c9;
  --ink: #292b22;
  --ink-soft: #5c604b;
  --red: #8d3028;
  --red-dark: #5b201c;
  --green: #52613d;
  --line: rgba(41, 43, 34, 0.45);
  --app-height: 100svh;
  --telegram-safe-top: 0px;
  --telegram-safe-bottom: 0px;
  --safe-top: max(12px, env(safe-area-inset-top), var(--telegram-safe-top));
  --safe-bottom: max(12px, env(safe-area-inset-bottom), var(--telegram-safe-bottom));
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: #24261e;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100svh;
  background: #24261e;
  user-select: none;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid #f4c76a;
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100%, 520px);
  height: var(--app-height);
  min-height: min(560px, var(--app-height));
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
}

.version-badge {
  position: absolute;
  z-index: 35;
  top: calc(var(--safe-top) + 3px);
  right: 14px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid rgba(91, 78, 45, 0.46);
  color: #66582f;
  background: rgba(236, 226, 190, 0.86);
  box-shadow: 1px 2px 0 rgba(48, 43, 29, 0.12);
  font: 800 0.54rem/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.version-badge[hidden] {
  display: none;
}

.version-badge:empty,
.dialog-version:empty {
  display: none;
}

.app-shell[data-screen="game"] .version-badge {
  border-color: rgba(250, 224, 132, 0.62);
  color: #f5dda0;
  background: rgba(42, 45, 32, 0.86);
  box-shadow: 0 0 10px rgba(49, 42, 22, 0.4);
}

.screen {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.screen[hidden] {
  display: none;
}

.screen--paper,
.panel-screen {
  padding: calc(var(--safe-top) + 12px) 20px calc(86px + var(--safe-bottom));
  overflow-y: auto;
  background:
    linear-gradient(rgba(231, 222, 192, 0.92), rgba(210, 200, 164, 0.95)),
    repeating-linear-gradient(8deg, rgba(50, 54, 39, 0.035) 0 1px, transparent 1px 6px);
}

.screen--paper::before,
.panel-screen::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(62, 65, 48, 0.35);
  pointer-events: none;
  content: "";
}

.paper-grain {
  position: absolute;
  inset: 0;
  opacity: 0.19;
  pointer-events: none;
  background-image: radial-gradient(rgba(38, 41, 29, 0.3) 0.5px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.gender-screen {
  display: grid;
  place-items: center;
  text-align: center;
}

.gender-card {
  position: relative;
  z-index: 2;
  width: min(100%, 360px);
  padding: 30px 20px 26px;
  border: 1px solid var(--line);
  background: rgba(238, 229, 198, 0.44);
  box-shadow: 7px 8px 0 rgba(69, 60, 39, 0.12);
}

.gender-card h1 {
  display: block;
  margin: 10px 0 8px;
  color: var(--red-dark);
  font-size: clamp(2.5rem, 12vw, 4rem);
  letter-spacing: -0.045em;
}

.gender-lead {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-style: italic;
}

.gender-actions {
  display: grid;
  gap: 11px;
}

.gender-forgot {
  margin-top: 2px;
}

.gender-response {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--red);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.title-block {
  position: relative;
  z-index: 1;
  text-align: center;
}

.edition-mark {
  margin: 0;
  color: var(--ink-soft);
  font: 700 0.66rem/1.2 Arial, sans-serif;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1,
h2,
p {
  position: relative;
  z-index: 1;
}

h1 {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 8px 0 0;
  font-size: clamp(2.55rem, 10.2vw, 3.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.title-word {
  display: block;
  line-height: 0.96;
}

.title-word--sequel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1em;
}

.title-sequel {
  margin-top: 0.08em;
  color: var(--red);
  font-size: 0.42em;
  line-height: 1;
  letter-spacing: 0;
}

.title-and {
  display: block;
  margin: 0;
  color: var(--red);
  font-size: 0.36em;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: lowercase;
}

.subtitle {
  margin: 12px auto 0;
  max-width: 290px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-style: italic;
}

.vegetable-showcase {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(235px, 43vh, 360px);
  margin: clamp(12px, 2.8vh, 24px) auto 0;
}

.vegetable-showcase::after {
  position: absolute;
  right: 7%;
  bottom: 2px;
  left: 7%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(53, 48, 33, 0.25), transparent 69%);
  content: "";
}

.vegetable-showcase img {
  position: relative;
  z-index: 1;
  width: 48%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 5px 2px rgba(40, 37, 27, 0.16));
}

.vegetable-showcase img:first-child {
  margin-right: -5%;
  transform: rotate(-3deg);
}

.vegetable-showcase img:last-child {
  margin-left: -5%;
  transform: rotate(3deg);
}

.enter-button {
  position: relative;
  z-index: 2;
  display: block;
  width: min(100%, 330px);
  margin: 6px auto 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.premium-stamp {
  position: relative;
  z-index: 1;
  display: block;
  margin: 12px auto 0;
  padding: 6px 10px;
  border: 1px dashed #786728;
  color: #67591e;
  background: rgba(239, 224, 146, 0.28);
  font: 700 0.67rem Arial, sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.premium-stamp .premium-star {
  display: inline-block;
  margin-right: 4px;
  color: #a58013;
  text-shadow: 0 0 7px rgba(221, 175, 42, 0.62);
  animation: premium-star-twinkle 1.8s ease-in-out infinite;
}

.premium-stamp.is-owned {
  border-style: solid;
  color: #3b2200;
  background: linear-gradient(120deg, #ffec87, #c9890c, #fff1a5, #b76f00);
  background-size: 220% 100%;
  box-shadow: 0 0 18px rgba(226, 172, 22, 0.48);
  animation: owned-gold 2.2s linear infinite;
}

.premium-stamp.is-owned .premium-star {
  color: #fff1a0;
  text-shadow: 0 0 5px #7b4300, 0 0 12px #fff0a2;
}

.main-nav {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px 5px var(--safe-bottom);
  border-top: 1px solid rgba(45, 49, 34, 0.5);
  background: rgba(48, 51, 38, 0.97);
  box-shadow: 0 -5px 14px rgba(38, 36, 28, 0.2);
}

.main-nav[hidden] {
  display: none;
}

.main-nav--compact {
  grid-template-columns: repeat(2, 1fr);
}

.main-nav button[hidden] {
  display: none;
}

.main-nav button {
  min-width: 0;
  padding: 2px;
  border: 0;
  color: #ddd6b8;
  background: transparent;
  font: 600 clamp(0.52rem, 2.4vw, 0.66rem) Arial, sans-serif;
  cursor: pointer;
}

.main-nav span {
  display: block;
  margin-bottom: 2px;
  color: #e5c964;
  font: 700 1.2rem Georgia, serif;
}

.game-screen {
  background: #b6a673;
  touch-action: manipulation;
}

.garden-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}

.game-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(37, 42, 32, 0.35), transparent 25%, transparent 80%, rgba(43, 36, 23, 0.25));
  pointer-events: none;
}

.hud {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 24px);
  right: 12px;
  left: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(53, 55, 37, 0.58);
  background: rgba(226, 216, 179, 0.91);
  box-shadow: 2px 3px 0 rgba(50, 47, 33, 0.18);
}

.hud-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font: 700 0.66rem Arial, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud-copy strong {
  color: var(--red);
}

.timer {
  flex: 0 0 auto;
  color: var(--red-dark);
  font: 700 1.07rem/1 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.vegetable-button {
  position: absolute;
  z-index: 3;
  bottom: calc(var(--safe-bottom) + 66px);
  width: min(52vw, 270px);
  height: min(61vh, 520px);
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.vegetable-button--radish {
  left: 0;
}

.vegetable-button--beet {
  right: 0;
}

.vegetable-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 9px 5px rgba(55, 39, 23, 0.22));
  pointer-events: none;
}

.vegetable-button.is-hit img {
  animation: vegetable-impact 360ms cubic-bezier(0.18, 0.8, 0.3, 1);
}

.golden-apple-button {
  position: absolute;
  z-index: 6;
  top: calc(var(--safe-top) + 136px);
  left: 50%;
  width: min(31vw, 154px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 237, 129, 0.5), transparent 68%);
  filter: drop-shadow(0 0 18px rgba(255, 214, 67, 0.9));
  transform: translateX(-50%);
  cursor: pointer;
  touch-action: manipulation;
  animation: apple-float 2.6s ease-in-out infinite;
}

.golden-apple-button[hidden] {
  display: none;
}

.golden-apple-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.golden-apple-button.is-hit-pop img {
  animation: golden-apple-impact-pop 760ms cubic-bezier(0.18, 0.86, 0.2, 1);
}

.golden-apple-button.is-hit-spin img {
  animation: golden-apple-impact-spin 900ms cubic-bezier(0.12, 0.72, 0.18, 1);
}

.golden-apple-button.is-hit-bounce img {
  animation: golden-apple-impact-bounce 940ms cubic-bezier(0.22, 0.78, 0.22, 1);
}

.golden-apple-button.is-storing img {
  animation: game-apple-store 820ms cubic-bezier(0.5, -0.08, 0.7, 0.25) forwards;
}

.golden-apple-button.is-retrieving img {
  animation: game-apple-retrieve 820ms cubic-bezier(0.16, 0.72, 0.2, 1.18) forwards;
}

.game-apple-visibility {
  position: absolute;
  z-index: 9;
  bottom: calc(var(--safe-bottom) + 72px);
  right: 12px;
  width: min(46vw, 188px);
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 226, 120, 0.78);
  color: #f7e9b0;
  background: rgba(45, 46, 31, 0.9);
  box-shadow: 0 0 12px rgba(58, 44, 17, 0.45), inset 0 0 10px rgba(255, 218, 79, 0.08);
  font: 800 0.54rem/1.18 Arial, sans-serif;
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.game-apple-visibility[hidden] {
  display: none;
}

.game-apple-visibility:disabled {
  opacity: 0.62;
  cursor: wait;
}

.sound-toggle,
.leave-button {
  position: absolute;
  z-index: 7;
  top: calc(var(--safe-top) + 82px);
  border: 1px solid rgba(53, 55, 37, 0.62);
  color: #efe6c7;
  background: rgba(49, 52, 38, 0.86);
  box-shadow: 2px 2px 0 rgba(35, 31, 22, 0.22);
  cursor: pointer;
}

.sound-toggle {
  left: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font: 700 1.2rem Arial, sans-serif;
}

.sound-toggle.is-muted {
  color: #a69f85;
}

.leave-button {
  right: 12px;
  min-height: 42px;
  padding: 0 13px;
  font: 700 0.7rem Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.impact-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.luxury-flash {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at var(--impact-x) var(--impact-y), rgba(255, 255, 255, 0.98), rgba(255, 224, 65, 0.74) 9%, rgba(255, 0, 173, 0.38) 24%, transparent 48%);
  mix-blend-mode: screen;
  animation: luxury-flash 720ms ease-out forwards;
}

.luxury-confetti {
  position: absolute;
  left: var(--impact-x);
  top: var(--impact-y);
  width: var(--confetti-size);
  height: calc(var(--confetti-size) * 0.55);
  border-radius: 2px;
  background: var(--confetti-color);
  box-shadow: 0 0 8px var(--confetti-color);
  animation: luxury-confetti 980ms var(--delay) cubic-bezier(0.08, 0.62, 0.22, 1) forwards;
}

.game-screen.is-luxury-hit {
  animation: luxury-screen-shake 520ms ease-out;
}

@keyframes vegetable-impact {
  0% { transform: scale(1); }
  32% { transform: translateY(-8px) scale(1.045); }
  68% { transform: translateY(2px) scale(0.985); }
  100% { transform: scale(1); }
}

@keyframes apple-float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  50% { transform: translateX(-50%) translateY(-8px) rotate(2deg); }
}

@keyframes golden-apple-impact-pop {
  0% { transform: scale(1) rotate(0); }
  22% { transform: scale(1.35) rotate(-7deg); filter: brightness(1.55) saturate(1.35); }
  48% { transform: scale(0.92) rotate(7deg); }
  72% { transform: scale(1.12) rotate(-3deg); filter: brightness(1.28); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes golden-apple-impact-spin {
  0% { transform: scale(1) rotate(0); }
  24% { transform: scale(0.78) rotate(-32deg); filter: brightness(1.35) saturate(1.4); }
  58% { transform: scale(1.32) rotate(390deg); filter: brightness(1.7) saturate(1.5); }
  82% { transform: scale(0.94) rotate(350deg); }
  100% { transform: scale(1) rotate(360deg); }
}

@keyframes golden-apple-impact-bounce {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(12px) scale(1.2, 0.72); filter: brightness(1.4); }
  42% { transform: translateY(-70px) scale(0.86, 1.24) rotate(-12deg); filter: brightness(1.8) saturate(1.5); }
  68% { transform: translateY(7px) scale(1.16, 0.82) rotate(7deg); }
  84% { transform: translateY(-17px) scale(0.96, 1.08) rotate(-3deg); }
  100% { transform: translateY(0) scale(1, 1) rotate(0); }
}

@keyframes luxury-flash {
  0% { opacity: 0; transform: scale(0.25); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.25); }
}

@keyframes luxury-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.3); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--confetti-x), var(--confetti-y)) rotate(var(--confetti-rot)) scale(1); }
}

@keyframes luxury-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  18% { transform: translate(-5px, 3px); }
  34% { transform: translate(5px, -3px); }
  50% { transform: translate(-3px, -2px); }
  68% { transform: translate(3px, 2px); }
}

.result-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.result-seal {
  position: absolute;
  top: 12%;
  right: 7%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 3px double rgba(141, 48, 40, 0.52);
  border-radius: 50%;
  color: rgba(141, 48, 40, 0.55);
  font-size: 2rem;
  font-weight: 700;
  transform: rotate(11deg);
}

.result-screen h2 {
  margin: 12px 0 28px;
  color: var(--red-dark);
  font-size: clamp(2.7rem, 12vw, 4.5rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.result-lead {
  margin: 0;
  color: var(--ink-soft);
  font-style: italic;
}

.result-time {
  display: block;
  margin: 3px 0 8px;
  font: 700 clamp(2.2rem, 12vw, 4.2rem) Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.result-caption {
  max-width: 330px;
  margin: 0 auto 26px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.result-actions {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100%, 340px);
  gap: 10px;
}

.primary-button {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--red-dark);
  color: #f2e9cb;
  background: var(--red);
  box-shadow: 3px 3px 0 rgba(70, 43, 29, 0.25);
  font-weight: 700;
  cursor: pointer;
}

.text-button {
  min-height: 42px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.panel-screen {
  z-index: 10;
}

.panel-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.back-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(239, 231, 202, 0.46);
  font-size: 1.4rem;
  cursor: pointer;
}

.panel-content {
  position: relative;
  z-index: 1;
  padding: 28px 2px 20px;
}

.panel-content h2 {
  margin: 0 0 8px;
  color: var(--red-dark);
  font-size: clamp(2.2rem, 10vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.panel-intro {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-style: italic;
}

.empty-state {
  padding: 38px 20px;
  border: 1px solid var(--line);
  background: rgba(238, 229, 198, 0.36);
  text-align: center;
}

.empty-state-symbol {
  display: block;
  margin-bottom: 12px;
  color: var(--red);
  font-size: 3rem;
}

.empty-state strong {
  display: block;
  font-size: 1.25rem;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.rules-version {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font: 700 0.66rem Arial, sans-serif;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

.developer-credit {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font: 700 0.72rem/1.4 Arial, sans-serif;
  letter-spacing: 0.03em;
  text-align: center;
}

.developer-credit a {
  color: var(--red-dark);
  text-decoration-color: rgba(91, 32, 28, 0.45);
  text-underline-offset: 3px;
}

.inventory-board {
  position: relative;
  min-height: 520px;
  padding: 18px;
  border: 6px ridge #6d6247;
  background:
    radial-gradient(circle at 50% 44%, rgba(126, 104, 61, 0.23), transparent 42%),
    linear-gradient(145deg, #4c5139, #1d241a);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.inventory-figure {
  position: absolute;
  z-index: 1;
  top: 14px;
  bottom: 8px;
  left: 50%;
  width: 58%;
  height: calc(100% - 22px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.7));
  transform: translateX(-50%);
}

.equipment-slot {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 6px;
  border: 4px ridge #a98f5d;
  color: #d9c078;
  background: radial-gradient(circle, rgba(64, 70, 49, 0.95), rgba(13, 18, 12, 0.96));
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.75), 0 3px 8px rgba(0, 0, 0, 0.45);
}

.equipment-slot svg {
  width: 42px;
  height: 42px;
  fill: rgba(190, 159, 91, 0.16);
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.equipment-slot span {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  padding: 2px 5px;
  color: #e2cd91;
  background: rgba(17, 22, 16, 0.88);
  font: 700 0.54rem Arial, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.equipment-slot--hat { top: 2%; left: 50%; transform: translateX(-50%); }
.equipment-slot--armor { top: 28%; left: 50%; transform: translateX(-50%); }
.equipment-slot--cloak { top: 27%; right: 3%; }
.equipment-slot--weapon { top: 47%; left: 3%; }
.equipment-slot--boots { bottom: 3%; left: 50%; transform: translateX(-50%); }

.artifact-tray {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 10px;
  padding: 7px;
  border: 5px ridge #7d6c49;
  background: linear-gradient(#383d2c, #1b2118);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.72), 0 3px 6px rgba(55, 45, 29, 0.24);
}

.artifact-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 3px ridge #9a8052;
  background:
    linear-gradient(135deg, rgba(214, 187, 118, 0.07), transparent 48%),
    #171d15;
  box-shadow: inset 0 0 9px rgba(0, 0, 0, 0.85);
}

.inventory-drop-slot {
  cursor: pointer;
}

.inventory-drop-slot.has-apple svg {
  opacity: 0.12;
}

.inventory-drop-slot.is-apple-target {
  outline: 2px solid #ffe47a;
  outline-offset: 2px;
  box-shadow: inset 0 0 12px rgba(255, 226, 105, 0.38), 0 0 14px rgba(255, 210, 54, 0.68);
  animation: inventory-target-pulse 900ms ease-in-out infinite alternate;
}

.inventory-apple {
  position: absolute;
  z-index: 4;
  inset: 2px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: radial-gradient(circle, rgba(255, 229, 105, 0.34), transparent 68%);
  cursor: grab;
  touch-action: manipulation;
}

.inventory-apple:active {
  cursor: grabbing;
}

.inventory-apple img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 218, 61, 0.9));
  pointer-events: none;
}

.inventory-apple.is-selected img {
  animation: inventory-apple-selected 680ms ease-in-out infinite alternate;
}

.inventory-apple.just-moved img {
  animation: inventory-apple-moved 620ms cubic-bezier(0.16, 0.8, 0.2, 1);
}

.luxury-dialog {
  width: min(calc(100% - 22px), 470px);
  max-height: 94svh;
  padding: 30px 22px 24px;
  overflow: auto;
  border: 4px solid #ffe477;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 0, 171, 0.48), transparent 38%),
    linear-gradient(145deg, #080008, #25001f 46%, #050005);
  box-shadow: 0 0 0 5px #7f005f, 0 0 0 9px #f9c92b, 0 24px 90px rgba(255, 0, 177, 0.65);
  text-align: center;
  isolation: isolate;
}

.luxury-dialog::backdrop {
  background: radial-gradient(circle, rgba(94, 0, 72, 0.82), rgba(0, 0, 0, 0.94));
  backdrop-filter: blur(5px) saturate(1.4);
}

.luxury-showcase,
.luxury-offer {
  min-width: 0;
}

.luxury-offer {
  width: 100%;
}

.luxury-rays {
  position: absolute;
  z-index: -1;
  inset: -35%;
  opacity: 0.42;
  background: repeating-conic-gradient(from 0deg, rgba(255, 223, 82, 0.55) 0 4deg, transparent 4deg 12deg);
  animation: luxury-rays 16s linear infinite;
}

.luxury-close {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 231, 131, 0.7);
  border-radius: 50%;
  color: #ffe477;
  background: rgba(0, 0, 0, 0.55);
  font-size: 1.6rem;
  cursor: pointer;
}

.dialog-version {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 229, 120, 0.62);
  border-radius: 999px;
  color: #ffe889;
  background: rgba(0, 0, 0, 0.55);
  font: 800 0.54rem/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-version[hidden] {
  display: none;
}

.luxury-kicker {
  margin: 0;
  color: #ffdf64;
  font: 800 0.68rem Arial, sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.luxury-dialog h2 {
  margin: 7px 0 0;
  color: #fff7c2;
  font: 900 clamp(2.25rem, 11vw, 3.6rem)/0.82 Arial Black, Arial, sans-serif;
  letter-spacing: -0.08em;
  text-shadow: 0 2px 0 #9e5600, 0 0 12px #ffcf31, 0 0 30px #ff00ae;
  text-transform: uppercase;
}

.purchase-apple {
  position: relative;
  z-index: 1;
  display: block;
  width: min(72vw, 290px);
  margin: -2px auto -14px;
  filter: drop-shadow(0 0 16px rgba(255, 229, 103, 0.95)) drop-shadow(0 0 32px rgba(255, 0, 171, 0.7));
  animation: purchase-apple 2.1s ease-in-out infinite;
}

.luxury-copy {
  max-width: 330px;
  margin: 0 auto 12px;
  color: #fff0d2;
  font: 700 0.88rem/1.35 Arial, sans-serif;
  text-shadow: 0 1px 8px #000;
}

.luxury-info-toggle {
  position: relative;
  z-index: 2;
  padding: 5px 12px;
  border: 1px solid rgba(255, 228, 119, 0.72);
  border-radius: 999px;
  color: #ffe889;
  background: rgba(0, 0, 0, 0.48);
  font: 800 0.68rem Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.luxury-info-toggle[aria-expanded="true"] {
  color: #200014;
  background: #ffe36d;
  box-shadow: 0 0 16px rgba(255, 225, 83, 0.72);
}

.luxury-info {
  max-width: 340px;
  margin: 10px auto 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 229, 126, 0.54);
  color: #fff6c9;
  background: rgba(0, 0, 0, 0.52);
  font: 700 0.78rem/1.4 Arial, sans-serif;
  text-shadow: 0 1px 6px #000;
}

.luxury-price {
  display: grid;
  place-items: center;
  margin: 8px auto 14px;
}

.luxury-price strong {
  color: #fff29c;
  font: 900 2.25rem/1 Arial Black, Arial, sans-serif;
  text-shadow: 0 0 16px rgba(255, 210, 37, 0.82);
}

.luxury-price small {
  margin-top: 3px;
  color: #bca8ba;
  font: 600 0.62rem Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.luxury-buy {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid #fff3a8;
  border-radius: 10px;
  color: #210015;
  background: linear-gradient(100deg, #ff36c4, #ffe45e, #ff8a00, #ff36c4);
  background-size: 260% 100%;
  box-shadow: 0 0 22px rgba(255, 218, 57, 0.75), inset 0 2px 2px rgba(255, 255, 255, 0.7);
  font: 900 0.88rem Arial Black, Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: luxury-buy 2.4s linear infinite;
  cursor: pointer;
}

.luxury-buy:disabled {
  opacity: 0.72;
  cursor: wait;
}

.luxury-check {
  margin-top: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 228, 119, 0.72);
  border-radius: 999px;
  color: #ffe889;
  background: rgba(0, 0, 0, 0.48);
  font: 800 0.7rem Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.luxury-check:disabled {
  opacity: 0.55;
  cursor: wait;
}

.luxury-promo-toggle {
  display: block;
  margin: 10px auto 0;
  padding: 3px 5px;
  border: 0;
  border-bottom: 1px dashed rgba(255, 228, 119, 0.65);
  color: #ffe889;
  background: transparent;
  font: 700 0.7rem Arial, sans-serif;
  cursor: pointer;
}

.luxury-promo-form {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(255, 229, 126, 0.45);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
}

.luxury-promo-form label {
  display: block;
  margin-bottom: 7px;
  color: #fff6c9;
  font: 700 0.7rem Arial, sans-serif;
}

.luxury-promo-form div {
  display: flex;
  gap: 6px;
}

.luxury-promo-form input {
  min-width: 0;
  flex: 1;
  padding: 9px 10px;
  border: 1px solid #d7b845;
  border-radius: 7px;
  color: #2a071f;
  background: #fff8d2;
  font: 800 0.72rem Arial, sans-serif;
  text-transform: uppercase;
}

.luxury-promo-form button {
  padding: 8px 10px;
  border: 1px solid #fff3a8;
  border-radius: 7px;
  color: #250019;
  background: #ffe05b;
  font: 900 0.65rem Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.purchase-status {
  min-height: 1.25em;
  max-width: 360px;
  margin: 9px 0 0;
  color: #fff19a;
  font: 700 0.75rem Arial, sans-serif;
}

@media (min-width: 700px) {
  .luxury-dialog[open] {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(300px, 1.1fr);
    align-items: center;
    width: min(calc(100% - 48px), 760px);
    max-height: calc(100dvh - 48px);
    padding: 28px 30px 24px;
    overflow: hidden;
    column-gap: 30px;
  }

  .luxury-showcase {
    align-self: center;
  }

  .luxury-dialog h2 {
    font-size: clamp(2.65rem, 5vw, 3.6rem);
  }

  .purchase-apple {
    width: min(30vw, 280px);
    margin: 2px auto -8px;
  }

  .luxury-offer {
    align-self: center;
  }

  .luxury-copy {
    margin-bottom: 10px;
  }

  .luxury-price {
    margin: 10px auto 12px;
  }
}

@media (max-width: 699px) and (max-height: 820px) {
  .luxury-dialog {
    width: min(calc(100% - 14px), 470px);
    max-height: calc(100dvh - 14px);
    padding: 22px 16px 13px;
    border-width: 3px;
    border-radius: 18px;
  }

  .luxury-dialog h2 {
    margin-top: 4px;
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 0.84;
  }

  .purchase-apple {
    width: min(54vw, 205px);
    margin: -5px auto -12px;
  }

  .luxury-copy {
    margin-bottom: 7px;
    font-size: 0.78rem;
  }

  .luxury-info-toggle {
    padding: 4px 10px;
  }

  .luxury-info {
    margin: 7px auto 8px;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .luxury-price {
    margin: 5px auto 8px;
  }

  .luxury-price strong {
    font-size: 1.8rem;
  }

  .luxury-price small {
    font-size: 0.56rem;
  }

  .luxury-buy {
    min-height: 46px;
    padding: 9px 13px;
    font-size: 0.78rem;
  }

  .luxury-check {
    margin-top: 7px;
    padding: 6px 13px;
  }

  .luxury-promo-toggle {
    margin-top: 7px;
  }

  .luxury-promo-form {
    margin-top: 7px;
    padding: 8px;
  }

  .purchase-status {
    min-height: 1em;
    margin-top: 5px;
    font-size: 0.68rem;
  }
}

@keyframes owned-gold {
  to { background-position: -220% 0; }
}

@keyframes premium-star-twinkle {
  0%, 100% { transform: scale(0.9) rotate(-8deg); filter: brightness(0.9); }
  45% { transform: scale(1.24) rotate(7deg); filter: brightness(1.55); }
  62% { transform: scale(1.02) rotate(-2deg); }
}

@keyframes game-apple-store {
  0% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: brightness(1.1); }
  30% { opacity: 1; transform: translateY(-24px) scale(1.18) rotate(-22deg); filter: brightness(1.65); }
  68% { opacity: 0.78; transform: translateY(72px) scale(0.52) rotate(190deg); }
  100% { opacity: 0; transform: translateY(150px) scale(0.05) rotate(340deg); filter: brightness(0.45); }
}

@keyframes game-apple-retrieve {
  0% { opacity: 0; transform: translateY(150px) scale(0.05) rotate(-300deg); filter: brightness(0.55); }
  38% { opacity: 1; transform: translateY(-28px) scale(1.24) rotate(20deg); filter: brightness(1.85) saturate(1.55); }
  68% { transform: translateY(5px) scale(0.92) rotate(-7deg); }
  84% { transform: translateY(-4px) scale(1.06) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: brightness(1); }
}

@keyframes inventory-target-pulse {
  from { filter: brightness(0.92); }
  to { filter: brightness(1.25); }
}

@keyframes inventory-apple-selected {
  from { transform: translateY(0) scale(1); filter: drop-shadow(0 0 5px rgba(255, 218, 61, 0.9)); }
  to { transform: translateY(-3px) scale(1.12); filter: drop-shadow(0 0 12px #fff0a2); }
}

@keyframes inventory-apple-moved {
  0% { opacity: 0; transform: scale(0.25) rotate(-140deg); filter: brightness(2); }
  58% { opacity: 1; transform: scale(1.26) rotate(8deg); filter: brightness(1.65); }
  78% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes luxury-rays {
  to { transform: rotate(360deg); }
}

@keyframes purchase-apple {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.025); }
}

@keyframes luxury-buy {
  to { background-position: -260% 0; }
}

noscript {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: #292b22;
  text-align: center;
}

@media (max-height: 690px) {
  .screen--paper {
    padding-top: calc(var(--safe-top) + 7px);
  }

  .title-block .subtitle {
    display: none;
  }

  .vegetable-showcase {
    height: 37vh;
    margin-top: 8px;
  }

  .premium-stamp {
    margin-top: 7px;
  }
}

@media (min-width: 521px) {
  body {
    display: grid;
    place-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
