.omib {
  --omib-ink: #191918;
  --omib-red: #c40812;
  --omib-border: #d5cfca;
  color: var(--omib-ink);
  margin-bottom: 2rem;
}
.omib [hidden] { display: none !important; }
.omib-intro, .omib-score, .omib-about, .omib-task {
  border: 1px solid var(--omib-border);
  padding: clamp(1rem, 3vw, 2rem);
  margin: 1.15rem 0;
}
.omib-intro, .omib-task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}
.omib-intro { border-top: 3px solid var(--omib-red); background: #f8f5f1; }
.omib h2, .omib-task legend { font-family: "Barlow Condensed", sans-serif; font-weight: 800; }
.omib h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.05; margin: 0 0 .8rem; }
.omib p { font-size: 1.02rem; line-height: 1.55; margin: 0 0 .8rem; }
.omib .omib-kicker { font-weight: 700; color: #960b13; font-size: .94rem; }
.omib figure { margin: 0; }
.omib figure img { display: block; width: min(100%, 22rem); height: auto; margin-inline: auto; background: white; }
.omib-button, .omib-secondary {
  display: inline-block;
  border: 1px solid var(--omib-red);
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  padding: .6rem .95rem;
  text-decoration: none;
}
.omib-button { background: var(--omib-red); color: #fff; }
.omib-button:hover { background: #9c0710; color: #fff; }
.omib-secondary { background: #fff; color: var(--omib-ink); border-color: var(--omib-border); }
.omib-secondary:hover { border-color: var(--omib-red); }
.omib-task { min-inline-size: 0; padding-top: 1rem; }
.omib-task legend { padding-inline: .4rem; font-size: 1.65rem; }
.omib-task-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.omib-task-grid .omib-matrix {
  align-self: start;
  width: min(100%, 22rem);
  margin-inline: auto;
  position: relative;
}
.omib-task-grid .omib-matrix > img { width: 100%; }
.omib-preview {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 31.25%;
  height: 31.25%;
  outline: 2px solid #bc0f16;
  outline-offset: -2px;
  background: #fcf2ef;
  overflow: hidden;
}
.omib .omib-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}
.omib-answer { min-width: 0; }
.omib-palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35rem;
  margin: 0 0 .8rem;
  max-width: 18rem;
}
.omib-element {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 1;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--omib-border);
  background: white;
}
.omib-element input { position: absolute; opacity: 0; inline-size: 100%; block-size: 100%; margin: 0; cursor: pointer; }
.omib-element img { inline-size: min(100%, 48px); block-size: auto; }
.omib-element:has(input:checked) { border: 2px solid var(--omib-red); background: #faeeec; }
.omib-element:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 0;
  right: .13em;
  color: #a50911;
  font-size: .75em;
  pointer-events: none;
}
.omib-element:has(input:focus-visible), .omib-button:focus-visible, .omib-secondary:focus-visible { outline: 3px solid #164b9a; outline-offset: 2px; }
.omib-progress, .omib-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.omib-actions { margin-bottom: 1rem; }
.omib-progress { margin: 1rem 0; font-weight: 700; }
.omib progress { accent-color: var(--omib-red); width: min(14rem, 100%); }
.omib .omib-feedback { color: #861019; margin: .55rem 0; }
.omib .omib-feedback:empty, .omib .omib-save-status:empty { display: none; }
.omib details summary { cursor: pointer; color: #940910; font-weight: 700; margin-top: .65rem; }
.omib details[open] summary { margin-bottom: .6rem; }
.omib-score { border-top: 3px solid var(--omib-red); background: #f8f5f1; }
.omib-score form { margin: .9rem 0; }
.omib .omib-score-number { color: #8f1014; font-weight: 700; }
.omib-score-number strong { font-family: "Barlow Condensed", sans-serif; font-size: 4rem; line-height: 1; }
.omib-history { list-style: none; padding: 0; }
.omib-history li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .8rem 0; border-top: 1px solid #d5cfca; }
.omib-history form { margin: 0; }
#vysledky-testu .omib-delete { background: white; color: #930812; border: 1px solid #d5cfca; }

@media (max-width: 680px) {
  .omib-intro, .omib-task-grid { grid-template-columns: minmax(0, 1fr); }
  .omib-intro figure img { width: min(100%, 14rem); }
  .omib-task-grid .omib-matrix { width: min(100%, 17rem); }
}
