html,
body {
  margin: 0;
  padding: 0;
  background: #f6f8fb;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2933;
}

.game-shell {
  box-sizing: border-box;
  width: 720px;
  max-width: 100%;
  min-height: 540px;
  margin: 0 auto;
  padding: 14px;
  background: #f6f8fb;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: #17324d;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
  font-size: 13px;
}

.stat {
  min-width: 72px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  text-align: center;
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: #0b5a7d;
}

.memory-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.memory-card {
  height: 72px;
  padding: 8px;
  border: 2px solid #b6c4d2;
  border-radius: 7px;
  background: linear-gradient(#ffffff, #edf4fa);
  color: #1f2933;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(31, 41, 51, 0.12);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.memory-card:hover {
  transform: translateY(-1px);
  border-color: #2780a7;
}

.memory-card.selected {
  background: #fff7d6;
  border-color: #d18b00;
}

.memory-card.matched {
  background: #dff4e7;
  border-color: #2d8f5b;
  cursor: default;
  box-shadow: none;
}

.card-kind {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 10px;
  color: #6b7b8d;
}

.card-text {
  display: block;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.lower-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
  margin-top: 10px;
}

.status-card,
.matched-card {
  min-height: 72px;
  padding: 10px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: #ffffff;
}

.status-card p {
  margin: 0 0 10px;
  min-height: 20px;
}

.controls {
  display: flex;
  gap: 8px;
}

.controls button {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid #1f6b8a;
  border-radius: 6px;
  background: #237fa4;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
}

.controls button:disabled {
  background: #9fb4c2;
  border-color: #9fb4c2;
  cursor: default;
}

.matched-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #17324d;
}

.matched-line {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.15;
}
