﻿.umadle-grid {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tips {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Input styling handled globally; no select-specific styling needed here. */

.umadle-grid .row.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 12px 24px -20px rgb(var(--shadow-rgb) / 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.guess-details {
  width: 100%;
}

.guess-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.guess-summary::-webkit-details-marker {
  display: none;
}

.guess-summary::marker {
  content: "";
}

.guess-summary-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.guess-summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.guess-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.guess-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guess-thumb .guess-initials {
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-1);
}

.guess-summary-meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-right: 1.1rem;
}

.guess-summary-meta::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}

.guess-details[open] .guess-summary-meta::after {
  transform: translateY(-50%) rotate(-135deg);
}

.guess-details > .section {
  margin-top: 0.5rem;
}

.umadle-grid .uma-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.umadle-grid .uma-nick {
  font-size: 0.95rem;
  opacity: 0.85;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.section-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-1);
}

.section,
.group {
  min-width: 0;
}

.group-title {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: 0.2rem;
}

.group {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.1rem;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.95rem;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 110px;
}

.cell .k {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell .sym {
  flex: 0 0 auto;
  font-weight: 700;
}

.cell.match {
  background: rgb(var(--success-rgb) / 0.16);
  border-color: rgb(var(--success-rgb) / 0.5);
  color: var(--success);
}

.cell.up {
  background: rgb(var(--warning-rgb) / 0.16);
  border-color: rgb(var(--warning-rgb) / 0.5);
  color: var(--warning);
}

.cell.down {
  background: rgb(var(--info-rgb) / 0.16);
  border-color: rgb(var(--info-rgb) / 0.5);
  color: var(--info);
}

@media (max-width: 700px) {
  .tips {
    display: none;
  }

  .umadle-grid .row.card {
    padding: 0.5rem 0.55rem;
    gap: 0.4rem;
    align-items: center;
  }

  .guess-summary {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .guess-summary-meta {
    display: none;
  }

  .umadle-grid .uma-name,
  .umadle-grid .uma-nick,
  .group-title,
  .section-title {
    width: 100%;
    text-align: left;
  }

  .guess-thumb {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    align-content: flex-start;
    overflow-x: visible;
    min-width: 0;
  }

  .cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.22rem 0.38rem;
    font-size: 0.82rem;
    border-radius: 7px;
    flex: 0 0 auto !important;
    width: auto;
    min-width: unset;
    white-space: nowrap;
    max-width: 100%;
  }

  .cell .k {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cell .sym {
    flex: 0 0 auto;
    font-size: 0.85rem;
  }
}
