:root {
  --ink: #f8f4e8;
  --muted: rgba(248, 244, 232, 0.72);
  --blue-0: #082331;
  --blue-1: #123e54;
  --blue-2: #1e6984;
  --wood-dark: #2c130c;
  --wood: #724226;
  --wood-light: #b47a49;
  --store: rgba(14, 16, 17, 0.72);
  --gold: #ffd85f;
  --green: #77e48a;
  --red: #ff6b6b;
  --line: rgba(255, 246, 220, 0.2);
  --shadow: rgba(0, 0, 0, 0.42);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 9% 24%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 17%, transparent 82%, rgba(0, 0, 0, 0.4)),
    #06151d;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.game-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 31vw) minmax(380px, 1fr) minmax(300px, 360px);
  min-height: 100vh;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0 2px,
      transparent 2px 54px
    ),
    linear-gradient(180deg, #11415c 0%, #1b6681 22%, #0a2735 100%);
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 21% 50%, rgba(255, 255, 255, 0.42), transparent 17%),
    radial-gradient(circle at 46% 36%, rgba(255, 255, 255, 0.12), transparent 19%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.52));
  opacity: 0.9;
}

.cookie-panel,
.world-panel,
.store-panel {
  min-width: 0;
  border-right: 9px solid transparent;
  border-image: linear-gradient(90deg, var(--wood-dark), var(--wood-light), var(--wood-dark)) 1;
}

.cookie-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 100vh;
  padding: 74px 22px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(180deg, rgba(18, 62, 84, 0.58), rgba(2, 17, 24, 0.82));
}

.cookie-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(
      circle at 36% 8%,
      rgba(172, 113, 55, 0.52) 0 8px,
      rgba(83, 44, 23, 0.42) 8px 13px,
      transparent 13px 118px
    );
  opacity: 0.38;
}

.bakery-name-bar,
.money-card,
.cookie-stage,
.status-strip {
  position: relative;
  z-index: 1;
}

.bakery-name-bar {
  position: absolute;
  top: 34px;
  left: 12%;
  width: 76%;
}

.bakery-name {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 19px;
  color: white;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-weight: 800;
  text-shadow: 0 2px 3px black;
  background: rgba(3, 21, 30, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 3px 8px rgba(0, 0, 0, 0.26);
}

.money-card {
  margin: 2px -22px 0;
  padding: 10px 16px 9px;
  text-align: center;
  background: rgba(0, 0, 0, 0.36);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.money-card strong,
.money-card span {
  display: block;
  font-family: var(--font-display);
  text-shadow: 0 2px 3px black;
}

.money-card strong {
  font-size: clamp(2rem, 4.4vw, 3.05rem);
  line-height: 0.96;
}

.money-card span {
  font-size: 1rem;
  font-weight: 800;
}

.cookie-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
}

.cookie-aura {
  position: absolute;
  width: min(90%, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(
      from 8deg,
      transparent 0 8deg,
      rgba(255, 255, 255, 0.34) 8deg 18deg,
      transparent 18deg 32deg
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12) 43%, transparent 70%);
  filter: blur(0.4px);
  opacity: 0.74;
  animation: slowSpin 34s linear infinite;
}

.game-shell.golden-active .cookie-aura {
  background:
    conic-gradient(
      from 8deg,
      transparent 0 7deg,
      rgba(255, 237, 129, 0.8) 7deg 18deg,
      transparent 18deg 30deg
    ),
    radial-gradient(circle, rgba(255, 231, 92, 0.76), rgba(255, 206, 47, 0.28) 43%, transparent 72%);
  animation: slowSpin 10s linear infinite, goldenPulse 1s ease-in-out infinite alternate;
}

.game-shell.golden-active .cookie-stage::before,
.game-shell.golden-active .cookie-stage::after {
  content: "";
  position: absolute;
  width: min(88%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 229, 90, 0.9) 0 2px, transparent 3px);
  background-size: 58px 58px, 79px 79px;
  animation: sparkleDrift 2.2s linear infinite;
}

.big-cookie {
  position: relative;
  z-index: 2;
  width: clamp(220px, 24vw, 330px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #d8a761 0 17%, transparent 18%),
    radial-gradient(circle at 63% 68%, rgba(89, 48, 30, 0.16), transparent 24%),
    radial-gradient(circle at 42% 42%, #bd7c38 0, #a8642d 44%, #815026 70%, #5f371e 100%);
  box-shadow:
    inset 18px 20px 28px rgba(255, 231, 170, 0.26),
    inset -18px -24px 30px rgba(55, 23, 10, 0.38),
    0 18px 32px rgba(0, 0, 0, 0.42);
  transition:
    transform 90ms ease,
    filter 140ms ease;
}

.big-cookie::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 24% 64%, rgba(255, 219, 154, 0.28), transparent 20%),
    radial-gradient(circle at 72% 22%, rgba(82, 37, 18, 0.2), transparent 19%),
    repeating-radial-gradient(circle at 52% 48%, transparent 0 11px, rgba(60, 28, 14, 0.13) 12px 13px);
  opacity: 0.82;
}

.big-cookie:hover {
  filter: brightness(1.06);
}

.big-cookie:active,
.big-cookie.clicked {
  transform: scale(0.94);
}

.chip,
.crumb {
  position: absolute;
  z-index: 2;
  display: block;
  background: #4a2619;
  box-shadow: inset -3px -4px 5px rgba(0, 0, 0, 0.35);
}

.chip-one {
  top: 23%;
  left: 33%;
  width: 20%;
  height: 16%;
  border-radius: 52% 44% 47% 58%;
  transform: rotate(-14deg);
}

.chip-two {
  top: 37%;
  right: 22%;
  width: 15%;
  height: 14%;
  border-radius: 52% 43% 52% 48%;
  transform: rotate(18deg);
}

.chip-three {
  bottom: 25%;
  left: 25%;
  width: 13%;
  height: 11%;
  border-radius: 42% 58% 48% 52%;
  transform: rotate(24deg);
}

.chip-four {
  bottom: 19%;
  right: 35%;
  width: 16%;
  height: 11%;
  border-radius: 46% 52% 42% 58%;
  transform: rotate(-23deg);
}

.chip-five {
  top: 51%;
  left: 42%;
  width: 11%;
  height: 12%;
  border-radius: 48%;
}

.chip-six {
  top: 20%;
  right: 35%;
  width: 10%;
  height: 9%;
  border-radius: 48% 54% 46% 50%;
}

.crumb {
  width: 5%;
  height: 5%;
  border-radius: 50%;
  background: #6f3d22;
}

.crumb-one {
  top: 30%;
  left: 19%;
}

.crumb-two {
  right: 18%;
  bottom: 36%;
}

.crumb-three {
  left: 49%;
  bottom: 13%;
}

.cursor-ring {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.auto-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: var(--cursor-transform);
}

.auto-cursor::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 1px;
  width: 13px;
  height: 24px;
  border-radius: 9px 9px 5px 5px;
  background: #f9f9f2;
  border: 2px solid #171717;
  transform: rotate(22deg);
  box-shadow:
    7px 11px 0 -3px #f9f9f2,
    8px 11px 0 -1px #171717;
}

.auto-cursor::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 21px;
  height: 14px;
  border: 2px solid #171717;
  border-radius: 5px 5px 10px 10px;
  background: #f9f9f2;
  transform: rotate(22deg);
}

.auto-cursor.tap {
  animation: cursorTap 260ms ease-out;
}

.float-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

.float-money {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: white;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  text-shadow: 0 2px 3px black;
  animation: floatMoney 900ms ease-out forwards;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-bottom: 8px;
}

.status-strip span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

.world-panel {
  position: relative;
  display: grid;
  grid-template-rows: 172px 1fr;
  min-height: 100vh;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0 2px,
      transparent 2px 64px
    ),
    linear-gradient(180deg, #0d3a50 0%, #1e708c 32%, #114057 100%);
}

.top-board {
  display: grid;
  grid-template-columns: 126px 1fr 126px;
  align-items: start;
  border-bottom: 16px solid transparent;
  border-image: linear-gradient(180deg, var(--wood-light), var(--wood), var(--wood-dark)) 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.07)),
    rgba(5, 23, 32, 0.56);
}

.top-board p {
  margin: 14px 12px 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 2px 4px black;
}

.wood-buttons {
  display: grid;
}

.wood-buttons span {
  display: grid;
  place-items: center;
  min-height: 43px;
  border: 1px solid #3a1d12;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  text-shadow: 0 2px 3px #000;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 6px),
    linear-gradient(90deg, var(--wood-dark), var(--wood-light), var(--wood));
}

.bakery-floor {
  position: relative;
  overflow: hidden;
}

.bakery-floor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 43%, rgba(255, 255, 255, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.shelf {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 84px;
  border-top: 9px solid #6b3b22;
  border-bottom: 6px solid #2e160d;
  background:
    radial-gradient(ellipse at 11% 45%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 22% 48%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 33% 43%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 44% 47%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 55% 45%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 66% 48%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 77% 44%, #8b4e2c 0 20px, transparent 21px),
    radial-gradient(ellipse at 88% 49%, #8b4e2c 0 20px, transparent 21px),
    linear-gradient(180deg, #8fcfe5 0 48%, #b6d78b 49% 100%);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.28);
}

.shelf-top {
  top: 72px;
}

.shelf-mid {
  top: 240px;
  background-color: #c35842;
}

.shelf-low {
  top: 408px;
  background-color: #536a40;
}

.bakery-worker {
  position: absolute;
  top: 99px;
  width: 28px;
  height: 48px;
  border-radius: 14px 14px 6px 6px;
  background:
    radial-gradient(circle at 50% 10%, #f3c798 0 8px, transparent 9px),
    linear-gradient(90deg, transparent 0 8px, #f4f4f0 8px 20px, transparent 20px),
    linear-gradient(180deg, transparent 0 18px, #d54646 18px 100%);
  opacity: 0.88;
  animation: workerBob 1.2s ease-in-out infinite alternate;
}

.worker-one {
  left: 26%;
}

.worker-two {
  left: 45%;
  animation-delay: 300ms;
}

.worker-three {
  left: 64%;
  animation-delay: 600ms;
}

.store-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 100vh;
  border-right: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.52)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0 2px,
      transparent 2px 56px
    ),
    linear-gradient(180deg, #0c3043, #08202c);
}

.store-title {
  min-height: 158px;
  display: grid;
  place-items: center;
  border-bottom: 16px solid transparent;
  border-image: linear-gradient(180deg, var(--wood-light), var(--wood), var(--wood-dark)) 1;
  background: rgba(0, 0, 0, 0.24);
}

.store-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.6rem;
  text-shadow: 0 3px 4px black;
}

.store-section {
  min-height: 0;
}

.store-section h2 {
  margin: 0;
  padding: 7px 10px 5px;
  border-top: 2px solid #a66a3c;
  border-bottom: 2px solid #2b130b;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, #371a10, #8b5531, #371a10);
}

.store-list {
  display: grid;
}

.store-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.56);
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(232, 226, 205, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.store-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 50%, rgba(0, 0, 0, 0.18));
}

.store-item:hover:not(:disabled) {
  filter: brightness(1.08);
}

.store-item:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45) brightness(0.62);
}

.store-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  border: 2px solid #231109;
  font-size: 1.75rem;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #082431, #176b87);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.store-info,
.store-count {
  position: relative;
  z-index: 1;
}

.store-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1;
  text-shadow: 0 2px 3px black;
}

.store-info span {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 800;
  text-shadow: 0 1px 2px black;
}

.store-info p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1.25;
}

.store-count {
  min-width: 2.4ch;
  color: rgba(255, 255, 255, 0.26);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.34);
}

.name-editor {
  position: absolute;
  top: 18px;
  right: 384px;
  z-index: 20;
  width: min(320px, calc(100vw - 28px));
  padding: 14px;
  border: 2px solid #a06a3f;
  color: white;
  background: rgba(7, 12, 14, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.name-editor label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.name-editor div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.name-editor input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  padding: 10px;
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.name-editor button {
  border: 0;
  border-radius: 3px;
  padding: 0 13px;
  color: #271504;
  font-weight: 900;
  background: var(--gold);
}

.golden-cookie {
  position: fixed;
  z-index: 30;
  left: var(--gold-x, 52vw);
  top: var(--gold-y, 46vh);
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, #fff4a4, transparent 24%),
    radial-gradient(circle at 32% 64%, #a97922 0 8%, transparent 9%),
    radial-gradient(circle at 64% 42%, #b48224 0 10%, transparent 11%),
    radial-gradient(circle, #ffe16c 0, #daa332 68%, #9b681a 100%);
  box-shadow:
    0 0 0 6px rgba(255, 235, 119, 0.22),
    0 0 28px rgba(255, 219, 79, 0.86),
    0 12px 22px rgba(0, 0, 0, 0.4);
  animation: goldenFloat 850ms ease-in-out infinite alternate;
}

.golden-cookie span {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 245, 166, 0.78);
  animation: slowSpin 2.5s linear infinite;
}

.cash-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cash {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 52px;
  height: 25px;
  border: 2px solid #145329;
  border-radius: 4px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 5px, transparent 6px),
    linear-gradient(90deg, #83e59c, #d9ffd7, #7bd993);
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: cashFly 1250ms ease-out forwards;
}

.spell-message {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 8;
  max-width: min(520px, 86%);
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 2px solid #a06a3f;
  color: white;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 3px black;
  background: rgba(7, 12, 14, 0.88);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
}

.spell-message.show {
  animation: messagePop 2.4s ease forwards;
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes goldenPulse {
  from {
    filter: saturate(1) brightness(1);
    transform: scale(0.98);
  }
  to {
    filter: saturate(1.45) brightness(1.25);
    transform: scale(1.04);
  }
}

@keyframes sparkleDrift {
  from {
    background-position: 0 0, 0 0;
    opacity: 0.58;
  }
  to {
    background-position: 58px 58px, -79px 79px;
    opacity: 0.9;
  }
}

@keyframes cursorTap {
  0% {
    transform: var(--cursor-transform) translate(0, 0) scale(1);
  }
  55% {
    transform: var(--cursor-transform) translate(-13px, -13px) scale(0.92);
  }
  100% {
    transform: var(--cursor-transform) translate(0, 0) scale(1);
  }
}

@keyframes floatMoney {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -84px) scale(1.08);
  }
}

@keyframes workerBob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(7px);
  }
}

@keyframes goldenFloat {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-12px) scale(1.06);
  }
}

@keyframes cashFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65) rotate(var(--rot));
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2)
      rotate(calc(var(--rot) + 260deg));
  }
}

@keyframes messagePop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.94);
  }
  12%,
  78% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.98);
  }
}

@media (max-width: 1100px) {
  .game-shell {
    grid-template-columns: minmax(300px, 44vw) minmax(280px, 1fr);
  }

  .store-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: auto;
    border-top: 9px solid transparent;
    border-image: linear-gradient(180deg, var(--wood-light), var(--wood), var(--wood-dark)) 1;
  }

  .store-title {
    min-height: 82px;
  }

  .store-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .name-editor {
    right: 18px;
  }
}

@media (max-width: 760px) {
  .game-shell {
    display: block;
  }

  .cookie-panel,
  .world-panel,
  .store-panel {
    min-height: auto;
    border-right: 0;
  }

  .cookie-panel {
    min-height: 620px;
  }

  .world-panel {
    min-height: 500px;
    grid-template-rows: auto 430px;
  }

  .top-board {
    grid-template-columns: 86px 1fr 86px;
  }

  .wood-buttons span {
    min-height: 34px;
    font-size: 0.86rem;
  }

  .store-list {
    grid-template-columns: 1fr;
  }

  .store-info strong {
    font-size: 1.34rem;
  }
}

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