:root {
  --h: 0;
  --s: 50%;
  --l: 50%;
}

.flag-name {
  margin: 4px 0 16px;
  font-size: 1.5rem;
  text-align: center;
}

.flag {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(170px, 52vw, 260px);
  margin: 0 0 24px;
}

.flag svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 6px 18px rgb(0 0 0 / 0.12);
}

.sliders {
  display: grid;
  gap: 18px;
}

.slider {
  display: grid;
  gap: 6px;
}

.slider__label {
  font-weight: 500;
  font-size: 0.9rem;
}

.slider input {
  --track: #ddd;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}

.slider input::-webkit-slider-runnable-track {
  height: 16px;
  border-radius: 999px;
  background: var(--track);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.slider input::-moz-range-track {
  height: 16px;
  border-radius: 999px;
  background: var(--track);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -6px;
  border-radius: 50%;
  background: hsl(var(--h) var(--s) var(--l));
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}

.slider input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: hsl(var(--h) var(--s) var(--l));
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}

.slider input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

.slider--hue input {
  --track: linear-gradient(90deg,
      hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%),
      hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%));
}

.slider--sat input {
  --track: linear-gradient(90deg, hsl(var(--h) 0% var(--l)), hsl(var(--h) 100% var(--l)));
}

.slider--light input {
  --track: linear-gradient(90deg, #000, hsl(var(--h) var(--s) 50%), #fff);
}

.slider input:disabled {
  opacity: 0.4;
}

.flag--reveal [data-color] {
  transition: fill 0.8s ease 0.4s, stroke 0.8s ease 0.4s;
}

.result {
  margin-top: 24px;
  text-align: center;
  animation: pop-in 0.35s ease-out;
}

.compare__colors,
.compare__labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.compare__colors {
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1), 0 4px 12px rgb(0 0 0 / 0.15);
}

.compare__labels {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.start__flags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  height: 90px;
  margin: 8px 0 16px;
}

.start__flags svg {
  height: 56px;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
}

.start__flags svg:nth-child(1) {
  transform: rotate(-8deg);
}

.start__flags svg:nth-child(2) {
  height: 72px;
}

.start__flags svg:nth-child(3) {
  transform: rotate(8deg);
}

.round-list__colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  width: 44px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1);
}

.meter {
  margin: 0 0 20px;
}

.meter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.meter__score {
  color: var(--muted);
}

.meter__score strong {
  font-size: 1.8rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.meter__message {
  font-weight: 500;
  text-align: right;
}

.meter__track {
  height: 12px;
  margin-top: 8px;
  border-radius: 999px;
  background: #ece9f1;
  overflow: hidden;
}

.meter__track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.15s, background-color 0.15s;
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  padding: 12px;
  border: 3px solid transparent;
  border-radius: 16px;
  background: #f6f5f9;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s, background-color 0.2s;
}

.choice:active {
  transform: scale(0.98);
}

.choice:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Feste Höhe statt max-height: 100%, die Safari in Buttons nicht auflöst. */
.choice svg {
  display: block;
  flex: none;
  max-width: 100%;
  width: auto;
  height: 82px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 4px 12px rgb(0 0 0 / 0.12);
}

.choice:disabled {
  cursor: default;
}

.choice--correct {
  border-color: #2f9e44;
  background: #ebfbee;
}

.choice--wrong {
  border-color: #e03131;
  background: #fff5f5;
}

.feedback {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-weight: 700;
  text-align: center;
}

.round-list__flag {
  display: flex;
  flex: none;
  width: 44px;
}

.round-list__flag svg {
  display: block;
  max-width: 44px;
  max-height: 30px;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1);
}

.streak {
  margin: 8px 0 0;
  color: #e8590c;
  font-weight: 700;
}

.streak:empty {
  display: none;
}

svg.flag-shaped {
  box-shadow: none !important;
  border-radius: 0 !important;
  filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.2));
}
