*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #6e8f86;
  color: #34241a;
  font-family: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button {
  font: inherit;
}

.shell {
  width: min(100vw, 1060px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 660px) 340px;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.game-wrap {
  overflow: hidden;
  border: 4px solid #ffe2a7;
  border-radius: 8px;
  background: #d7a864;
  box-shadow: 0 24px 70px rgba(39, 26, 16, 0.28);
}

#game {
  width: 100%;
  aspect-ratio: 33 / 40;
}

#game canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.panel {
  display: grid;
  gap: 13px;
  align-content: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 4px solid #ffe2a7;
  border-radius: 8px;
  background: #fff6dc;
  box-shadow: 0 18px 50px rgba(39, 26, 16, 0.2);
}

.brand,
.stats div,
.inventory div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand span {
  font-size: 26px;
  font-weight: 900;
}

.brand strong {
  color: #9b5e21;
}

.stats {
  display: grid;
  gap: 8px;
}

.stats div,
.inventory div {
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f3e5bd;
}

.stats span,
.inventory span {
  font-size: 13px;
  font-weight: 800;
}

.stats strong,
.inventory strong {
  color: #21705a;
  font-size: 18px;
}

.shop,
.inventory,
.achievements,
.feature-guide {
  display: grid;
  gap: 8px;
}

h2 {
  margin: 0;
  font-size: 16px;
}

.shop button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: #d89438;
  color: #3f270e;
  font-weight: 900;
  cursor: pointer;
}

.shop button:disabled {
  background: #d9ceba;
  color: #766c5d;
  cursor: default;
}

.notice {
  min-height: 54px;
  padding: 12px;
  border-radius: 7px;
  background: #e1f0e8;
  line-height: 1.45;
  font-weight: 800;
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.achievement {
  min-height: 54px;
  padding: 8px;
  border-radius: 6px;
  background: #f7e4b2;
  border: 2px solid #dfbd75;
  font-size: 13px;
  font-weight: 900;
}

.achievement.locked {
  color: #8d806c;
  background: #eee1c8;
  border-color: #d5c4a6;
}

.feature-guide ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-guide li {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 6px;
  background: #f2e7cd;
  border: 1px solid #dcc89d;
}

.feature-guide strong {
  color: #21705a;
  font-size: 13px;
}

.feature-guide span {
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .panel {
    max-height: none;
    order: 2;
  }
}
