:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --text: #17201b;
  --button: #17201b;
  --button-text: #ffffff;
  --line: rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

.app {
  min-height: 100vh;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) clamp(18px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 56px);
}

.refresh-button {
  min-width: 128px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 12px 28px;
  background: var(--button);
  color: var(--button-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.14);
}

.refresh-button:active {
  transform: translateY(1px);
}

.refresh-button:focus-visible {
  outline: 3px solid #2f7cf6;
  outline-offset: 4px;
}

.region-list {
  width: 100%;
  display: grid;
  gap: clamp(18px, 4vw, 30px);
}

.region-row {
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  gap: clamp(10px, 3vw, 22px);
}

.region-item {
  min-height: clamp(64px, 11vw, 104px);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.58);
  font-size: clamp(24px, 5.4vw, 48px);
  font-weight: 800;
  letter-spacing: 0;
}

@media (max-width: 520px) {
  .app {
    justify-content: flex-start;
  }

  .region-row {
    gap: 8px;
  }

  .region-item {
    min-height: 58px;
    font-size: 23px;
  }
}
