#enigmes .puzzle-diagram.roman-matches {
  border-color: #ded1bc;
  background: #faf6ed;
  color: #26384a;
}

.roman-matches [data-roman-original] { display: none !important; }
.roman-matches-intro { margin-bottom: .65rem; }
#enigmes #puzzle-question .roman-matches-stage p {
  margin: .2rem 0;
  font: 1rem/1.45 var(--sans, system-ui, sans-serif);
  color: inherit;
}

.roman-matches-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: .375rem;
}

.roman-matches-lines button {
  min-height: 44px;
  border: 1px solid #b5c6d1;
  border-radius: 6px;
  background: #fff;
  font: 600 1rem var(--sans, system-ui, sans-serif);
  color: #26384a;
  cursor: pointer;
}
.roman-matches-lines button:hover,
.roman-matches-lines button[aria-pressed="true"] {
  border-color: #50749a;
  background: #e5eff9;
  color: #1c4166;
}

#enigmes .roman-matches .roman-matches-board {
  width: 100%;
  margin: .55rem 0 .85rem;
  border: 1px solid #e3d8c5;
  border-radius: 7px;
  background: #fffdf8;
}
.roman-match-target { stroke: transparent; stroke-width: 20; pointer-events: stroke; cursor: pointer; }
.roman-match-wood {
  stroke: #aa6b1d;
  stroke-width: 4.4;
  stroke-linecap: round;
  pointer-events: none;
}
.roman-match-head { fill: #a23a31; pointer-events: none; }
@media (hover: hover) {
  [data-roman-stick]:hover .roman-match-wood { stroke: #335f84; stroke-width: 5.5; }
}
[data-roman-stick][data-removed] .roman-match-wood {
  stroke: #7890a7;
  stroke-width: 1.5;
  stroke-dasharray: 2 3;
  opacity: .65;
}
[data-roman-stick][data-removed] .roman-match-head { visibility: hidden; }

.roman-matches-choice { display: grid; gap: .25rem; }
.roman-matches-choice select {
  width: 100%;
  min-height: 44px;
  padding: .4rem;
  border: 1px solid #9fafbd;
  border-radius: 6px;
  background: #fff;
  color: #26384a;
  font: 1rem var(--sans, system-ui, sans-serif);
}
.roman-matches-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin: .65rem 0 .45rem; }
.roman-matches-actions .button { min-height: 44px; white-space: normal; }
.roman-matches-actions [data-roman-verify] { color: #fff; background: #335f84; border: 1px solid #335f84; }
.roman-matches-actions button:disabled { opacity: .55; cursor: default; }
.roman-matches-progress { margin-top: .25rem; font-size: .9rem; }
#enigmes #puzzle-question .roman-matches-status[data-outcome="correct"] { color: #284c2d; }
#enigmes #puzzle-question .roman-matches-status:is([data-outcome="wrong"], [data-outcome="invalid"]) { color: #833121; }

.roman-matches-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: none;
}

@media print {
  .roman-matches-stage { display: none !important; }
  .roman-matches [data-roman-original] { display: block !important; }
}
