:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f5f7fb;
  color: #20242d;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 10px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 18px;
}

button {
  border: 1px solid #c4ccd9;
  background: #fff;
  color: #20242d;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.meta p {
  margin: 2px 0;
  font-size: 14px;
}

.tiles {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: hidden;
  padding-bottom: 4px;
}

.tile {
  padding: 0;
  text-align: center;
  width: clamp(24px, calc((100vw - 80px) / 14), 38px);
  min-width: 0;
}

.tile-face {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 0.72;
  object-fit: contain;
}

.tile-code {
  font-size: 10px;
  color: #4f5868;
}

.label {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

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

.choice {
  width: 100%;
}

.result {
  font-size: 14px;
  padding: 8px;
  border-radius: 8px;
}

.ok {
  background: #e5f6e9;
  color: #11531f;
}

.ng {
  background: #fce9eb;
  color: #7c1b25;
}
