.tmatch { max-width: 720px; margin: 1.5rem auto; }

.tmatch-level {
  text-align: center;
  font-weight: 700;
  color: var(--sea-deep, #0f4a52);
  margin-bottom: 1rem;
}

.tmatch-board {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem;
}
.tmatch-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
}
.tmatch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.tmatch-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--sand-deep, #e7d9b8);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  color: var(--ink, #1f2a2c);
}
.tmatch-item.selected {
  border-color: var(--sea, #1b6f7a);
  box-shadow: 0 0 0 3px rgba(46,151,163,.25);
}
.tmatch-item.done {
  border-color: #2e97a3;
  opacity: .9;
  cursor: default;
}

.tmatch-name { padding: .9rem 1.8rem; font-weight: 700; text-align: center; }
.tmatch-image { overflow: hidden; padding: 0; }
.tmatch-image img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.tmatch-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sea, #1b6f7a);
  z-index: 2;
  box-shadow: 0 0 0 2px #fff;
}
.tmatch-dot-l { left: 8px; }
.tmatch-dot-r { right: 8px; }
.tmatch-col[data-pos="first"] .tmatch-dot-l { visibility: hidden; }
.tmatch-col[data-pos="last"] .tmatch-dot-r { visibility: hidden; }

.tmatch-line { stroke-width: 4; stroke-linecap: round; }
.tmatch-line.correct { stroke: #2e97a3; }
.tmatch-line.wrong { stroke: #e24f4f; }

.tmatch-feedback {
  text-align: center;
  min-height: 1.4em;
  color: #e24f4f;
  font-weight: 600;
  margin: 1rem 0 .5rem;
}
.tmatch-reset {
  display: block;
  margin: 0 auto;
  background: #1b6f7a;
  color: #fff;
  border: none;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.tmatch-reset:hover { background: #0f4a52; }

.tmatch-win {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.9);
  border-radius: 14px;
}
.tmatch-win[hidden] { display: none; }
.tmatch-thumb { font-size: 6rem; line-height: 1; animation: tmatch-pop .4s ease; }
.tmatch-win p { color: #0f4a52; font-weight: 700; font-size: 1.2rem; margin-top: .4rem; }
.tmatch-next {
  margin-top: 1rem;
  background: #1b6f7a;
  color: #fff;
  border: none;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.tmatch-next:hover { background: #0f4a52; }
@keyframes tmatch-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 560px) {
  .tmatch-board { gap: .7rem; }
  .tmatch-name { padding: .7rem 1.4rem; font-size: .9rem; }
  .tmatch-image img { height: 78px; }
  .tmatch-dot { width: 12px; height: 12px; }
}
